Application Development and Automation 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: 
Read only

Clear parameter after execution

Former Member
0 Likes
1,540

Hi Experts,

How can I clear my selection screen after execution(f8)?

I cannot put my clear code at  AT-SELECTION-OUTPUT because when I press enter it also clear my parameters.

My requirement is to clear my screen after ececution(f8).

I've tried to put my clear code at START-OF-SELECTION Clear: p_tire, p_sup, p_head. and nothing happens.

Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,093

Hi Jepoy,

You can refer the below piece of code for your requirement: You can set the flag at Start of Selection.

Then Import the same in the AT SELECTION SCREEN Output event. Make sure to free the memory ID after the Import. This will not clear the Parameter when you press enter.

AT SELECTION-SCREEN OUTPUT.

  IMPORT lv_flg FROM MEMORY ID 'CLEAR'.

  FREE MEMORY ID 'CLEAR'.

  IF sy-subrc eq 0.

    CLEAR p_matnr.

  ENDIF.



START-OF-SELECTION.



lv_matnr = p_matnr.

EXPORT lv_flg = 'X' to MEMORY ID 'CLEAR'.

Hope this works.

Thanks,

Abhi

1 REPLY 1
Read only

Former Member
0 Likes
1,094

Hi Jepoy,

You can refer the below piece of code for your requirement: You can set the flag at Start of Selection.

Then Import the same in the AT SELECTION SCREEN Output event. Make sure to free the memory ID after the Import. This will not clear the Parameter when you press enter.

AT SELECTION-SCREEN OUTPUT.

  IMPORT lv_flg FROM MEMORY ID 'CLEAR'.

  FREE MEMORY ID 'CLEAR'.

  IF sy-subrc eq 0.

    CLEAR p_matnr.

  ENDIF.



START-OF-SELECTION.



lv_matnr = p_matnr.

EXPORT lv_flg = 'X' to MEMORY ID 'CLEAR'.

Hope this works.

Thanks,

Abhi