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

Abt Selection Screen

Former Member
0 Likes
856

Hi,

How to change selection screen text dynamically?

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
836

Hi

[code[SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(10) TEXT FOR FIELD P1.

PARAMETERS P1.

SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.

IF TEXT IS INITIAL.

TEXT = 'First time'.

ELSE.

TEXT = 'Second time'.

ENDIF.[/code]

Max

7 REPLIES 7
Read only

p291102
Active Contributor
0 Likes
836

Hi,

The following example may help you:

SELECTION-SCREEN BEGIN OF BLOCK 001.

PARAMETERS: P_MRU RADIOBUTTON GROUP SEL DEFAULT 'X' USER-COMMAND AC,

P_PART RADIOBUTTON GROUP SEL.

SELECT-OPTIONS P1 FOR <field> MODIF ID PRT.

SELECT-OPTIONS G1 FOR <field> MODIF ID MRU.

SELECTION-SCREEN END OF BLOCK 001.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF P_MRU = 'X'.

IF SCREEN-GROUP1 = 'PRT'.

SCREEN-INPUT = '0'.

ENDIF.

IF SCREEN-GROUP1 = 'MRU'.

SCREEN-INPUT = '1'.

ENDIF.

ELSEIF P_PART = 'X'.

IF SCREEN-GROUP1 = 'MRU'.

SCREEN-INPUT = '0'.

ENDIF.

IF SCREEN-GROUP1 = 'PRT'.

SCREEN-INPUT = '1'.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Thanks,

Shankar

Read only

rahulkavuri
Active Contributor
0 Likes
836

sorry i got ur question incorrectly, i thought it was selection screen parameter

Read only

Former Member
0 Likes
837

Hi

[code[SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(10) TEXT FOR FIELD P1.

PARAMETERS P1.

SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.

IF TEXT IS INITIAL.

TEXT = 'First time'.

ELSE.

TEXT = 'Second time'.

ENDIF.[/code]

Max

Read only

former_member480923
Active Contributor
0 Likes
836

Hi

try this

selection-screen: begin of block b1 with frame title text-001.
selection-screen: begin of line.
selection-screen comment w_bukrs 0(10) for p_bukrs.
parameters: p_bukrs type bukrs.
selection-screen: end of line.
selection-screen: end of block b1.
initialization.
w_bukrs = 'Compnay Text'. 

Hope this Helps

anirban.

Read only

Former Member
0 Likes
836

Hi

By using the text elements, you can change the selection screen text dynamically. At the selection screen events, just change the value to a different text element.

Reward if helpful

Regards,

Prasanth

Read only

Former Member
0 Likes
836

You can use selection screen comment for that.. and in run time based on conditions, you can change get dynamic text by changin the text-elements assigned to that..

Hope it will help you..

Reward helpful answers...

Regards,

Sankar.

Read only

Former Member
0 Likes
836

Hi,

Based on the condition move text to VAR.

if xxx = yyy.

VAR = Text-001.

else zzz = xyz.

VAR = Text-002.

endif.

selection-screen: begin of block b1 with frame title VAR.

Regards

Sudheer