Thursday, February 7, 2008

Deletion of data row from PSA

Is it possible to delete whole single or multiple rows from PSA storage? This was an issue I faced recently and since I was too lazy to get back to my source system to adjust data there I simply wanted to delete some records which were erroneous in PSA and then re-uploaded PSA request furthermore to InfoProvider above PSA. My intention was simple; to go to PSA screen of RSA1; find my PSA request; choose “Edit data” from right-context menu on request and delete records on maintenance screen. Then I wonder why there is no Delete item in the menu of this screen enabled. I probably guess that I have forgotten to delete data request from InfoProvider above PSA but I haven’t. Request was deleted from InfoProvider. They I tried to do the same with additional authorization. I got SAP super user with SAP_ALL and SAP_NEW authorization. And you guess it right: it still didn’t work for me: Delete item in menu was disabled. OK; I was thinking; it is the highest time to search for some SAP note on service.sap.com/notes. Another bad news for me was that I wasn’t successful while searching for notes. The only official information I got was an online help at this page saying: “If you change the number of records for a request in the PSA, meaning adding or deleting records, a correct record count in the BW monitor is no longer guaranteed when posting or processing a request.Therefore, we recommend not changing the number of records for a request in the PSA.” This was my guideline. I finally realized that this is possible. I went through PSA-API in order to create custom ABAP program to delete the lines in PSA I wanted. Soon I comprehended that I have no time to play with PSA-API function modules so I made quick and dirty solution and I got rid of unwanted records in PSA in transaction SE11 while I debugged it and deleted it by changing of sy-subrc value.

Conclusion is: You can change records in the PSA or you can delete complete data from PSA but not single record even changing is only allowed if the request is not posted yet to InfoProvider above.

3 comments:

Anonymous said...

I was trying to delete PSA data just like you did.
You saved me a lot of time.
Thx,

sapper said...

Hey man, good to hear that, assign some points since it was useful :-) ~ means click on on advertisement links :)

Anonymous said...

Huh.. to think you went through all that trouble, just because you were lazy...