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

How do i add fields to dynamic selections?

Former Member
0 Likes
395

how to add fields to dynamic selections in the customer line item display reports by maintaining selection views ?

how to add fields to dynamic selections in the customer line item display reports by maintaining selection views ?

1 REPLY 1
Read only

Former Member
0 Likes
371

HI,

The system table SCREEN contains information about the fields contained on the current screen. You can read them using the LOOP AT SCREEN statement, and change them using MODIFY SCREEN.

Each field on a screen has a set of attributes that are fixed when you define the screen in the Screen Painter. When an ABAP program is running, a subset of the attributes of each screen field can be addressed using the system table SCREEN.

As example you can execute Program DEMO_DYNPRO_MODIFY_SCREEN. It demonstrates all possible modifications

And for your info here is the source code of Dynamic screen modifications.

REPORT demo_dynpro_modify_simple.

DATA: ok_code TYPE sy-ucomm,

save_ok TYPE sy-ucomm.

DATA flag(1) TYPE c.

CALL SCREEN 100.

MODULE status_0100 OUTPUT.

SET PF-STATUS 'SCREEN_100'.

LOOP AT SCREEN.

IF screen-group1 = 'MOD'.

IF flag = ' '.

screen-input = '0'.

ELSEIF flag = 'X'.

screen-input = '1'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE.

MODULE cancel.

LEAVE PROGRAM.

ENDMODULE.

MODULE user_command_0100 INPUT.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'TOGGLE'.

IF flag = ' '.

flag = 'X'.

ELSEIF flag = 'X'.

flag = ' '.

ENDIF.

ENDCASE.

ENDMODULE.

Regards