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: 

modify the selection screen

Former Member
0 Kudos

hi folks,

I need to modify the selection screen, I need the selection screen block B1 to be displayed only when the 'Delete' button is selected. Here is the code...

tables: ZABC.

data: itab like ZABC occurs 0 with header line.

selection-screen begin of block bl1 with frame title text-000 no

intervals.

parameters: Del_all radiobutton group r1,

Del_blk radiobutton group r1,

Delete radiobutton group r1.

selection-screen end of block bl1.

selection-screen begin of block B1 with frame title text-110.

select-options: P_PERNR for ZABC.

selection-screen end of block B1.

at selection-screen output.

if Del_all = 'X'.

select * from ZABC into table itab where pernr ne ' '.

DELETE ZABC FROM TABLE itab.

endif.

if Del_blk = 'X'.

delete from ZABC where pernr = ' '.

endif.

if Delete = 'X'.

delete from ZABCwhere pernr IN p_pernr[].

COMMIT WORK.

endif.

How can I do that? It is used only when the 'Delete' button is checked.

Thanks,

Sk

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

On your checkbox use the addition user command

define a modification id to the p_pernr

in the at selection screen event.

loop at screen.

if delete = 'X'.

if screen-group1 = test1.

screen-active = 1.

screen-invisible = 0.

endif.

else.

if screen-group1 = test1.

screen-active = 0.

screen-invisible = 1.

endif.

endif.

Modify Screen.

endloop.

This will enable you to achieve the functionality

Reward points if useful

Regards,

gaurav

Message was edited by:

Gaurav Parashar

4 REPLIES 4

Former Member
0 Kudos

Hi,

On your checkbox use the addition user command

define a modification id to the p_pernr

in the at selection screen event.

loop at screen.

if delete = 'X'.

if screen-group1 = test1.

screen-active = 1.

screen-invisible = 0.

endif.

else.

if screen-group1 = test1.

screen-active = 0.

screen-invisible = 1.

endif.

endif.

Modify Screen.

endloop.

This will enable you to achieve the functionality

Reward points if useful

Regards,

gaurav

Message was edited by:

Gaurav Parashar

0 Kudos

I changed the code to

select-options: P_PERNR for ZABC-PERNR modif id ABC.

at selection-screen output.

loop at screen.

if Delete = 'X'.

if screen-group1 = 'ABC'.

screen-active = 1.

screen-invisible = 0.

endif.

else.

if screen-group1 = 'ABC'.

screen-active = 0.

screen-invisible = 1.

endif.

endif.

modify screen.

endloop.

kept the rest of the code same....

When I clicked the delete button the parameters option did not show up,

did I miss something here?

trying to understand this piece of programming

thanks,

SK

0 Kudos

Hi,

Kindly use the following parameters in the screen modification.

also put a break point on the EVENT at selection screen & check if user command gets triggered.

loop at screen.

if Delete = 'X'.

if screen-group1 = 'ABC'.

SCREEN-INPUT = '0'.

SCREEN-INVISIBLE = '1'.

endif

else.

if screen-group1 = 'ABC'.

SCREEN-INPUT = '1'.

SCREEN-INVISIBLE = '0'.

if screen-group1 = 'ABC'.

endif.

modify screen.

endloop.

0 Kudos

I got it, missed the user-command syntax on to the radiobutton.

Thanks,

Sk