Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving the last PF status from a Call Transaction

Former Member
0 Kudos
143

<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.

2 REPLIES 2

Former Member
0 Kudos
48

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

0 Kudos
48

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.