05-11-2006 9:40 PM
I have a screen with 2 radio buttons and 2 drop down fields both of which have a list of valid selections. Different lists are valid depending on which radio button is selected. This screen also allows the user to run the program in background using the PROGRAM command on the SAP application command line.
If the user selects button A, runs the screen, and returns, the previously selected data is still visible. The problem is if the user then selects button B to run again, the selected data from the previous run is added to the drop down list of valid values for button B when in fact, it is not valid with button B.
I added a CLEAR statement which solves this problem but now the selected drop down data is missing when the user elects to run in background so the background job errors out. I can't figure out where to put the CLEAR so the data is retained for background processing but removed when restarting the selection screen. Or perhaps there's another solution? Any help would be appreciated.
05-12-2006 5:14 AM
Hi jane,
1. U must have written some code
to put values in the drop down fields.
2. Put this whole code
under some if condition based upon a FLAG.
After filling this values, set the flag to X.
if flag is initial.
flag = 'X'.
*--- code for filling data in drop down
endif.
regards,
amit m.
05-11-2006 11:23 PM
Can you please post your code , so we can help you out !!
Thanks
SK
05-12-2006 5:14 AM
Hi jane,
1. U must have written some code
to put values in the drop down fields.
2. Put this whole code
under some if condition based upon a FLAG.
After filling this values, set the flag to X.
if flag is initial.
flag = 'X'.
*--- code for filling data in drop down
endif.
regards,
amit m.
06-08-2006 7:18 PM
To those who replied, thank you so much for responding and I apologize for not getting back sooner; I had some unanticipated leave.
Amitt, I tried setting a flag but the value kept getting reset with each succeeding run (i.e. the user clicking [Back]. I couldn't figure out how to pass myself a value short of writing it to a table then reading it back in. I tried checking sy-batch thinking it would tell me the user had selected "background processing" but it's value never changed either; it was always a space.
But I did get the program running (with help). I had to create separate fields to go with each radio button. Then I could clear the fields not being used and the data from the used fields was included with the background job.