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

Dialog programming: TEXTBOX

vallamuthu_madheswaran2
Active Contributor
0 Likes
704

Hi friends,

I created two fields in dialogprogramming (one is NAME and another one is NUMBER. the NUMBER field is auto generated field) and i created a application toolbar it contains create, change, display & delete icons.

now i want that if i click the CREATE icon then the NUMBER field is in Diplay mode. otherwise if i click change icon then the number field change as entry mode/level.

if it is possible then please tell me how it is possible.

THANKS & REGARDS,

vallamuthu.M

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
656

yes it is possible.

see the two programs.

demo_dynpro_modify_simple

demo_dynpro_modify_screen

Their will be an auto generated table callled SCREEN, which contains all the attributes of the fields in the screen, By modifying this u can do that.

u will use the below statements.

Loop at screen. "screen is a table with header

if (condition)

"some scree modifications i.e., u will modify the screen table

Modify Screen.

endif

Endloop

4 REPLIES 4
Read only

Former Member
0 Likes
657

yes it is possible.

see the two programs.

demo_dynpro_modify_simple

demo_dynpro_modify_screen

Their will be an auto generated table callled SCREEN, which contains all the attributes of the fields in the screen, By modifying this u can do that.

u will use the below statements.

Loop at screen. "screen is a table with header

if (condition)

"some scree modifications i.e., u will modify the screen table

Modify Screen.

endif

Endloop

Read only

0 Likes
656

HOW IS IT POSSIBLE?PLEASE IVE ME AS EXAMPLE (SOME SAMPLE CODINGS)

Read only

0 Likes
656

go through the below prgrams.

demo_dynpro_modify_simple

demo_dynpro_modify_screen

first one is the simple one and second one is the complex one.

<u><b>Award if useful</b></u>

Regards,

Sudheer

Read only

Former Member
0 Likes
656
write the code in PAI

say P_NUM is the name of screen field for number

MODULE USER_COMMAND.

MODULE USER_COMMAND.

 WHEN 'DISPLAY'.
     loop at screen.
       if screen-name eq 'P_NUM'.
          screen-input = '0'.
          modify screen.
        endif.
     endloop.
  WHEN 'CHANGE'.
     loop at screen.
       if screen-name eq 'P_NUM'.
          screen-input = '1'.
          modify screen.
        endif.
     endloop.


ENDMODULE.