‎2010 Oct 05 7:01 AM
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 .
‎2010 Oct 05 1:06 PM
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
‎2010 Oct 05 7:43 AM
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
‎2010 Oct 05 12:11 PM
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
‎2010 Oct 05 12:27 PM
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
‎2010 Oct 05 12:30 PM
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
‎2010 Oct 05 1:06 PM
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