05-21-2010 12:34 PM
Hi,
if I do LOOP AT screen, and I stop in the Input/Output field where I want to show a text,
I cannot find a property like TEXT or VALUE where I can put my text.
How should I assign the text to my Input/Output field ?
thanks !!!
05-21-2010 2:03 PM
DATA: Field-name(29) TYPE c.
LOOP AT SCREEN.
IF screen-name = 'Field-name'.
Field-name = 'ABC'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Edited by: Shivani Singhal on May 21, 2010 3:04 PM
05-21-2010 12:46 PM
Hi
You must create a global variable in the program where you screen (Dynpro) is defined.
The name and type of the variable must exactly match the name/type of the Input/Output field on your screen (Dynpro).
Then you can assign the value to the variable in the PBO module of your screen.
05-21-2010 12:52 PM
which is the type of the Input/Output field ?
I guess it is a standard type.
05-21-2010 2:03 PM
DATA: Field-name(29) TYPE c.
LOOP AT SCREEN.
IF screen-name = 'Field-name'.
Field-name = 'ABC'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Edited by: Shivani Singhal on May 21, 2010 3:04 PM
05-25-2010 3:01 PM
it doesn't work. Maybe because it is an Input/Output field and should be another UI Element ?
05-25-2010 3:09 PM
If that is an Input/Output field, you should be able to display the value directly.
For example: If on the screen, there is Input/Output field as IO_TEXT.
And a similar variable is defined in your ABAP program. Then if you assign a value (say IO_TEXT = 'Material No."), then it should display it on the screen.
Are you trying to display I/O field as label?
- Saurabh
05-25-2010 3:11 PM
no, I did exactly what you did, but no text is appearing on the I/O field
05-25-2010 3:19 PM
Strange.
I tried it just now and I was able to get the text on the screen.
Here's what I did.
PROGRAM YTESTSAB.
DATA: IO_TEST TYPE STRING.
&----
*& Module STATUS_9001 OUTPUT
&----
text
----
module STATUS_9001 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
CLEAR: io_test.
io_test = 'Material'.
endmodule. " STATUS_9001 OUTPUT