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

Selection screen modifications

Former Member
0 Likes
1,227

Hi fellow ABAPPERS,

I am currently working on a selection screen which requires descriptive text being displayed at the left of each field. This text changes according to the user input. Since the use of comments cannot be dynamic, I have opted to manually changing the selection screen dynpro (screen 1000), by adding the text boxes where needed. Then the code automatically places the required text at run-time.

This solution works, but the problem is that any further modification made to the selection screen declaration leads to a regeneration of the screen. Thus all the text boxes that were added manually via screen painter are lost.

Do any of you know any way to avoid this problem and make the screen text fixed?

Please not that the screen cannot be converted into Module Pool as the program should be able to run in background as well.

All your help would be greatly appreciated .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,060

Hi ,,

Try this out ..

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(12) p_comp FOR FIELD p_bukrs.

PARAMETERS: p_bukrs TYPE bukrs.

SELECTION-SCREEN COMMENT 30(30) p_text FOR FIELD p_bukrs. "Comment line after the parameters

SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.

p_comp = 'Company Code'.

AT SELECTION-SCREEN .

SELECT SINGLE butxt INTO p_text FROM t001

WHERE bukrs = p_bukrs.

you can change the code according to your requirement

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,060

Just try those snippets

PARAMETERS: p_field(20).

AT SELECTION-SCREEN OUTPUT.
  WRITE sy-uzeit TO %_p_field_%_app_%-text.

or

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) p_text FOR FIELD p_field.
PARAMETERS: p_field(20).
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.
  WRITE sy-uzeit TO p_text.

Regards,

Raymond

Read only

0 Likes
1,060

Hi Raymond,

Thanks for ur reply. But there was a mistake in my question. I actually have to display the dynamic text on the RIGHT of the parameter. Any idea on how to do that?

Thx

Read only

0 Likes
1,060

SELECTION-SCREEN BEGIN OF LINE.
  
PARAMETERS: p_field(20).
SELECTION-SCREEN COMMENT 40(30) p_text FOR FIELD p_field.
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.
  WRITE sy-uzeit TO p_text.

Thanks

Bala Duvvuri

Edited by: Bala Duvvuri on Oct 5, 2010 5:27 AM

Read only

0 Likes
1,060

Hi,

It is very basic.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: p_field(20).

SELECTION-SCREEN COMMENT 23(30) p_text FOR FIELD p_field. "Comment line after the parameters

SELECTION-SCREEN END OF LINE.

Sujay

Read only

Former Member
0 Likes
1,061

Hi ,,

Try this out ..

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(12) p_comp FOR FIELD p_bukrs.

PARAMETERS: p_bukrs TYPE bukrs.

SELECTION-SCREEN COMMENT 30(30) p_text FOR FIELD p_bukrs. "Comment line after the parameters

SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.

p_comp = 'Company Code'.

AT SELECTION-SCREEN .

SELECT SINGLE butxt INTO p_text FROM t001

WHERE bukrs = p_bukrs.

you can change the code according to your requirement