Application Development 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: 

Retrieve the elements of a screen...

Former Member
0 Kudos

Hello EveryBody,

How can we with ABAp statements retrieve the elements list of a screen. I want to create a function module that allows to clear all fields of a screen by pushing a button, because such function doesn't exist in SAP I think.

Thanks.

9 REPLIES 9

Former Member
0 Kudos

Hi...

In the PBO module of the screen you can assign values to the fields of the screen like for any other variables in the program. The field names should be same as the screen names.

You can clear the same in the PAI module after the clicking the Push button.

Maybe you can give more detail on the Function Module you are looking to create as the Screen fields and names wıll vary from screen to screen.

Archana.

0 Kudos

Hello Archana,

Thanks for your reply, but what I want is a per example a function of SAP that allow to retrieve the elements of a screen, because this list of elements differ from screen to screen, and with the list of elements of a screem we can export this list to the function module who will clear it, that avoid to create a function for each screen.

Thanks...

0 Kudos

Nobody has a solution for me??

Thanks...

Former Member
0 Kudos

Hi

Irrespective of what the screen elements are, you can access them by looping on SCREEN.

So, you can loop on screen, and clear the field contents.

Regards,

Raj

0 Kudos

Hi,

Thank you Rajasekhar, but how can we loop on a screen do you have un example?

Thanks...

Former Member
0 Kudos

i dont think u need to create a fm....just clear all the parameters and select-options in the

at selection-screen output. n i hope that should work

0 Kudos

Hi Kaluvala,

I know that what you say will work, but it'snt very performent. Because for each program and screen you must do that. But with one FM you can do it for all however the program and screen is.

Thanks...

Former Member
0 Kudos

Hi,

use below Fm RS_REFRESH_FROM_DYNAMICAL_SEL

CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

EXPORTING

CURR_REPORT = C_PROGNAME

TABLES

SELECTION_TABLE = SEL_TAB

EXCEPTIONS

NOT_FOUND = 1

NO_REPORT = 2

OTHERS = 3.

Regards

amole

Former Member
0 Kudos

parameters: p_chk type c as checkbox user-command ucomm default ' '.

parameters: p_matnr type mara-matnr modif id abc.

at selection-screen output.

loop at screen.

case p_chk.

when ' '.

if screen-group1 = 'ABC'.

screen-input = 0.

modify screen.

endif.

when 'X'.

if screen-group1 = 'ABC'.

screen-input = 1.

modify screen.

endif.

endcase.

endloop.

this is how u loop at screen and its use in dynamic selection screen

regards,

santhosh