2006 Dec 01 11:20 PM
<b>Scenario:</b> I've got a report with a selection screen where the user enters a document number. The report then reads line items for that document, and for each line item, calls a seperate transaction. In that seperate transaction, the user enters info on another screen.
<b>Problem:</b> If the user detects a problem on the called transaction screen, (eg, they entered the wrong document number, the line item is not complete, etc) then they hit the PF3 BACK button or the CANCEL button. But rather than go back to the initial Report selection screen, it simply processes the next line item. That is, it returns back to the called transaction screen... they hit PF3 again and again for as many line items as the document had.
In debug, I look at SY-UCOMM after the CALL TRANSACTION and it's empty. Is it possible to find out what the last PF STATUS of a called transaction or function was? Is there a way to determine if BACK or CANCEL was entered?
Thanks.
2006 Dec 03 4:14 PM
Hi Glen,
Are you calling user transactions (Z/Y) or standard transactions?
If it is user transacton, you could save the sy-ucomm into a variable at each PAI and return this variable back to the calling reprot. Before calling the next transaction, check this variable which contains the last PF-Status.
regards,
biju
Note: Please reward helpful answers
2006 Dec 04 2:53 PM
Biju, I'm calling standard SAP transactions. Our policy is to NOT update SAP code, so the variable solution wouldn't be acceptable. Thanks anyway.