2008 Jul 10 1:11 PM
Hi Gurus,
I have created a Screen which is having a Box.
The requirement is that the text of the box should change with the change in transaction.
Please suggest me how to change the Text of a Box at run time.
Thanks in Advance...
2008 Jul 10 1:18 PM
2008 Jul 11 5:21 AM
Thanks for the reply, I have the idea that I have to Set the value in PBO.
But if could you please elaborate on this because I know how to set the fields as
1.active
2.inactive
3.visible n invisible
but I dont know how to change the text content of a element at the run time.
Thanks once again.
2008 Jul 11 5:56 AM
Hi Amit,
As of now it is not possible to change the Lables that are used as Keywords in the Runtime. They are always displayed in a fixed position in the screen.
So you can use any of the options.
1. You can copy the screen to a new screen and then change the screen elements i.e the text box. You need to call the screen according to your program logic from the calling program.
2. In the same screen declare 2 of more text box (screen elements) and then you can make them visible or invisible based on your program logic.The template code to achive the same is already there.
Thanks,
Samantak.
Rewards points for useful answers.
2008 Jul 11 4:37 AM
Hi Amit,
You can follow this approach.
In the global variables you can store the conditions for which you want to display the text in the text boxes. In the ABAP code define the variables that are same as the screen elements.Then assign the text to these elements depending upon the condition that is getting satisfied. Also you can loop the screen the elements you can accomplish the same.
Option 1.
Process Before Output.
Module Set_value.
Module Set_value.
if condition = value.
variable name = 'Text'.
endif.
Endmodule.
Option 2.
Loop at screen.
if screen-<element name> =
if condition = value.
endif.
endif.
Endloop.
Thanks,
Samantak.
Rewards points for useful answers.