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

dynamic text on a button

Former Member
0 Likes
923

I am using module pool .I have a button on a screen. Is it possible to control the text on the button dynamically through flow logic?

4 REPLIES 4
Read only

Former Member
0 Likes
543

Hi Pankaj,

it's possible see this thread

Regards,

Flavya

Read only

Former Member
0 Likes
543

Hi Pankaj,

I think it can be done. You can assign the Button to a group in design time.

In PBO, you can check if the

IF SCREEN-GROUP = ' the one that you had given for the button'.

" Here you can change the name

" SCREEN-NAME = name

" Attribute can be NAME or TEXT. I am not sure. Just check.

ENDIF.

Best Regards,

Ram.

Edited by: ram Kumar on Dec 19, 2008 8:30 AM

Read only

Former Member
0 Likes
543

thanks

Read only

Former Member
0 Likes
543

i know it says answered, but here is my take on this issue

i am sure you can play with positions also.

adding it just for the reference



  DATA : repid TYPE sy-repid.
  DATA : f1 TYPE TABLE OF trmsg WITH HEADER LINE.


  DATA : dynp_header   TYPE d020s,

         tdynp_fields  TYPE TABLE OF d021s,
         tdynp_logic   TYPE TABLE OF d022s,
         tdynp_matchc  TYPE TABLE OF d023s,

         dynp_fields  TYPE d021s,
         dynp_logic   TYPE d022s,
         dynp_matchc  TYPE d023s.

  DATA: BEGIN OF dynproname,
          prog LIKE d020s-prog,
          dnum LIKE d020s-dnum,
        END OF dynproname.

  repid = sy-repid.



  CLEAR: dynp_header, dynp_fields, dynp_logic, dynp_matchc.
  REFRESH: tdynp_fields, tdynp_logic, tdynp_matchc.

  dynproname-prog = repid.
  dynproname-dnum = '0023'.

  IMPORT DYNPRO dynp_header tdynp_fields
                tdynp_logic  tdynp_matchc ID dynproname.

  LOOP AT tdynp_fields INTO dynp_fields
       WHERE fnam = 'BT_NEXT'.
    dynp_fields-stxt = 'xxxx'.
    MODIFY  tdynp_fields FROM dynp_fields.
  ENDLOOP.

  EXPORT DYNPRO dynp_header tdynp_fields
                tdynp_logic  tdynp_matchc ID dynproname.

  GENERATE DYNPRO dynp_header tdynp_fields
                tdynp_logic  tdynp_matchc ID dynproname MESSAGE f1 LINE f1 WORD f1 .