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

set text for Input/Output field in Dynpro dynamically

joan_ayala
Participant
0 Likes
7,512

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 !!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,082

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

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 !!!

7 REPLIES 7
Read only

Former Member
0 Likes
4,079

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.

Read only

0 Likes
4,079

which is the type of the Input/Output field ?

I guess it is a standard type.

Read only

Former Member
0 Likes
4,083

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

Read only

0 Likes
4,079

it doesn't work. Maybe because it is an Input/Output field and should be another UI Element ?

Read only

0 Likes
4,079

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

Read only

0 Likes
4,079

no, I did exactly what you did, but no text is appearing on the I/O field

Read only

0 Likes
4,079

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