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 Selection-Screen Fields

Former Member
0 Likes
1,100

Hello all,

How to clear the fields content from a selection-screen when the user returns from report to sel.screen?

I try in PBO for selection screen to clear all the fields, works fine but with one exception, when it is pressed Enter,

all the fields contents are empty.

Thank you

Bogdan

1 ACCEPTED SOLUTION
Read only

andreas_mann3
Active Contributor
0 Likes
795

Hi Bogdan,

i think you can achieve this with a flag and export/import to SAP-memory:

...
AT SELECTION-SCREEN OUTPUT.
  IMPORT back FROM MEMORY ID 'back'.
  IF back = 'X'.
*clear/refresh your sel-opt/param.
    refresh gjahr.
    CLEAR : gjahr , amount.
    CLEAR back.
    FREE MEMORY ID 'back'.
  ENDIF.

START-OF-SELECTION.
...
*end of your program
  back = 'X'.
  EXPORT back TO MEMORY ID 'back'.

Andreas

5 REPLIES 5
Read only

Former Member
0 Likes
795

Hope u will return from report to selection screen using leave screen or set screen .

if it so b4 this u clear those selection fields

regs

gv

Read only

0 Likes
795

<b>at selection-screen output</b> clear the fields with clear statement.

Regards

Raja

Read only

andreas_mann3
Active Contributor
0 Likes
796

Hi Bogdan,

i think you can achieve this with a flag and export/import to SAP-memory:

...
AT SELECTION-SCREEN OUTPUT.
  IMPORT back FROM MEMORY ID 'back'.
  IF back = 'X'.
*clear/refresh your sel-opt/param.
    refresh gjahr.
    CLEAR : gjahr , amount.
    CLEAR back.
    FREE MEMORY ID 'back'.
  ENDIF.

START-OF-SELECTION.
...
*end of your program
  back = 'X'.
  EXPORT back TO MEMORY ID 'back'.

Andreas

Read only

0 Likes
795

sorry i didnt get the question fully, i think the only way you can achieve is thru what Andreas has given

Regards

Raja

Read only

Former Member
0 Likes
795

Hi,

It's better to clear your fields after INITIALIZATION event. It's started only once.

Svetlin