Skip to Content
0
May 17 at 02:07 PM

unable to clear Parameter ID in ABAP code

91 Views

I have an interactive ALV report using Factory method in which when the Order Number is clicked it should call the Transaction COR2.

on click of the event I have the code as below:

DATA(lv_aufnr) = wa_final-aufnr.

SET PARAMETER ID 'ANR' FIELD lv_aufnr.
CALL TRANSACTION 'COR2' AND SKIP FIRST SCREEN.
SET PARAMETER ID 'ANR' FIELD space.

The user will click on the Process Order Number and do some modification in the Order and after save the program will direct it back to the ALV list. This part is working fine.

In debug I have checked that on each click of the row, the correct Order number is passed to lv_aufnr.

However the problem is that while the first click calls the COR2 with correct order number, second time onwards even when the variable lv_aufnr has correct order number, the Call Transaction happens with the first order number only.

Clearly the value set to the PARAMETER ID first time isnt getting refreshed even when I have explicitly set it to Space. And hence the interactive part is not working correctly for the next click onwards.

Is there any other way or some FM to clear the PARAMETER ID? How do I resolve this?