Application Development 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: 

Change text field in dialog programs

Former Member
0 Kudos
2,375

Dear Gurus ,

i have made a screen that has one text field .This text field is the text-001 with text "Customer Name".

Can i display dynamically "Vendor Name" when something triggers ?

Thanks a lot ...

1 ACCEPTED SOLUTION

surajarafath
Contributor
0 Kudos
361

Yes You can display,

Just follow this,

Create a Text Field and Name it (ex: WF_TEXT_FIELD)

Before Calling The Current Screen, I.e. Current Screen is 101,

so your condition will be in screen 100.

in screen 100.

Module User_command_0100 input.
if <..Condition1..>.
WF_TEXT_FIELD = 'CUSTOMER'.
ELSE.
WF_TEXT_FIELD = 'VENDOR'.
ENDIF.
endmodule.

You can also do this in Same screen itself,

You need to code

if <..Condition1..>.
WF_TEXT_FIELD = 'CUSTOMER'.
ELSE.
WF_TEXT_FIELD = 'VENDOR'.
ENDIF.

this in PBO

3 REPLIES 3

surajarafath
Contributor
0 Kudos
362

Yes You can display,

Just follow this,

Create a Text Field and Name it (ex: WF_TEXT_FIELD)

Before Calling The Current Screen, I.e. Current Screen is 101,

so your condition will be in screen 100.

in screen 100.

Module User_command_0100 input.
if <..Condition1..>.
WF_TEXT_FIELD = 'CUSTOMER'.
ELSE.
WF_TEXT_FIELD = 'VENDOR'.
ENDIF.
endmodule.

You can also do this in Same screen itself,

You need to code

if <..Condition1..>.
WF_TEXT_FIELD = 'CUSTOMER'.
ELSE.
WF_TEXT_FIELD = 'VENDOR'.
ENDIF.

this in PBO

0 Kudos
361

in my example the text field is the T_VBELN1 writes "Customer".

How i will declare the text field in the abap ?

look my code ...

MODULE PBO OUTPUT.

  SET PF-STATUS 'MAIN100'.
  SET TITLEBAR 'TITLE'.

  IF ITAB_SAL-VBELN1 = '0090050145'.

*Here to declare the text field ????*

    LOOP AT SCREEN.
      IF SCREEN-NAME = 'CMD_TAB6'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '0'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB3'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '1'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB2'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '1'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB1'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '1'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.

ENDIF.

0 Kudos
361

You could use a variable rather than a text field and set the value of the variable according to your conditions.