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 fields in screen

Former Member
0 Likes
3,159

Hi,

I have one field in screen say LIFNR. When I press refresh button the value entered in LIFNR should be get cleared.

I wrote clear statement to clear that field & I see that the value get it clear but once the control will return back to screen the field LIFNR is populated whatever we entered previously.

any suggestion??

9 REPLIES 9
Read only

Former Member
0 Likes
1,422

TRY REFRSH instead of clear statement...

Read only

0 Likes
1,422

still it is not working..

Read only

0 Likes
1,422

from where is it picking LIFNR value??

clear that field.. or clear that structure...

Read only

0 Likes
1,422

You may have a "get / set" parameter ID set on the screen field, in which case you will need to clear that too e.g. "set parameter id 'LIF' field l_lifnr." after you have cleared l_lifnr.

Jonathan

Read only

Former Member
0 Likes
1,422

Hi,

If it is main screen then In PAI of that screen:

If u r moving this value into other variable or work area which is similar to screen fields or standard table work area

Then At PBO of that screen u want clear that variable or workarea-variable or tablename-variable and also screen variable name.

Note: check that screen attributes must be don’t selected HOLD option. (If selected which stores values after coming back to that screen also even u cleared that variable).

If it is subscreen then u need to clear at calling (Main) screen’s PBO and PAI (procedure is above only).

Regards,

Vijay Mekala

Read only

Former Member
0 Likes
1,422

Hi,

try this code in the PAI...............

***********************************************

when 'REFRESH'.

clear: lifnr.

***********************************************

to clear the field before going to a screen write

clear lifnr.

in the PBO of that screen.

<b>reward points of useful.</b>

regards,

Vinod Samuel.

Read only

Former Member
0 Likes
1,422

it is possible that when you cleared the field it would clear but when you again try to go on that field it might again take the data from internal table or table or from any other field and display, check it out.

If you still feel difficulty, let me know the code of PAI and PBO of previous screen.

Read only

former_member491305
Active Contributor
0 Likes
1,422

Hi Neha,

I wonder If you have used FIELD statement in Flow logic.If so then,if you wrote the code to refresh the Lifnr value in a module which is called above the <b>FIELD</b> statement then the value will not crear.Because this FIELD statement in Flow logic will fetch the current value in screen to the field LIFNR eventhough you cleared the value.So what you have to do is put the clear statement in a module which should be called after the FIELD statement.

Regards,

Vigneswaran S

Read only

former_member196299
Active Contributor
0 Likes
1,422

hi Neha ,

Try like this :

At the end of the PAI events clear the field LIFNR . And make sure you use the same variable names through out your PBO and PAI and in layout .

Regards,

Ranjita