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

ABAP Refresh Selection Screen

Former Member
0 Likes
6,486

Hi Gurus,

I'm using selection screen parameters to accept 2 columns of material numbers and quantities.  There are multiple rows on the screen.

When editing the values with "AT SELECTION-SCREEN ON field" it will stop at the field in question to perform the edit.  However, upon fixing the error I would

like for the screen to re-fresh with everything entered thus far.  Perhaps I have entered a material and quantity and the material is incorrect.  I wuld like to fix the

material (which is working), but to then refresh the screen in case I need to change the quantity as well.  Any help would be appreciated.

Thanks,

Mike

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,866

Hi Michael,

Why don't you use AT SELECTION-SCREEN event instead of AT SELECTION-SCREEN ON event? In this way you won't face this issue and you can put all the validation under one event.

Regards,

R

6 REPLIES 6
Read only

former_member156446
Active Contributor
0 Likes
3,866

check this post http://scn.sap.com/thread/1860208 to save the selection screen parameters entered. This will give you a backup.... after refresh you can use the values provided by the FM

Read only

Former Member
0 Likes
3,867

Hi Michael,

Why don't you use AT SELECTION-SCREEN event instead of AT SELECTION-SCREEN ON event? In this way you won't face this issue and you can put all the validation under one event.

Regards,

R

Read only

0 Likes
3,866

Thanks to Rudra and Jay !!  Very helpful !!  This question has been answered.

Read only

0 Likes
3,866

Rudra.....Using AT SELECTION-SCREEN works fine for what I'm doing, but I can't get the cursor to remain on a field that has an error.  The message will say "Invalid material", but doesn't remain on that field for the user to correct it.  I have tried SET CURSOR, but it doesn't seem to work.  Can you help ?.

Read only

0 Likes
3,866

Hi Michael,

SET Cursor field should work. I just checked it. It works like a charm. Please check your syntax as it does not give syntax error if you write it in a wrong way.

It should be like this

set CURSOR FIELD 'P_MATNR'. "P_MATNR is the parameter name for Material

Or if you are using select options then it should be

set CURSOR FIELD 'S_MATNR-LOW'.

Please note the name of the fieldl has to be written withing single quotes and should be in uppercase. Otherwise it will not work.

Hope it helps.

Regards,

R

Read only

0 Likes
3,866

Hi Rudra......Thank You !!...I didn't put single quotes around the field name....Now it works great !!

Thanks again !

Mike