Skip to Content
author's profile photo
Former Member

Dynamically changing buttons...

My development staff is new to ABAP and the screen painter, and one of those developers is designing a screen with buttons on it that need to dynamically change according to what is brought back from the database. How would one accomplish that task?

Thanks,

Kevin.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Posted on Jul 15, 2004 at 05:27 PM

    First define all possible buttons in Gui Status. Read your database. In the PBO when calling the status, Make your decision and add the addition EXCLUDING to SET PF-STATUS 'XXXX'. Check out the documentation on SET PF-STATUS for more information.

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 15, 2004 at 05:48 PM

    Hi

    You can directly assign the text to the pushbutton variable.

    e.g.

    PB_PUSH = 'Create' .

    You can also add an icon using

    "WRITE <icon_name> AS ICON TO <pb_field_name> ." provided that you have include <ICON> in your program.

    *--Serdar

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Jul 19, 2004 at 08:29 PM

    You could do it.

    For example:

    Define a variable

    Data: v_butt1(10).

    In PBO, give the value for v_butt1.

    V_butt1 = ‘My Button’.

    When you draw the button on screen, mark the attribute of the button as ‘Output Field’ in Program Tab. Give the name of the button as v_butt1 and do not worry about the text.

    In the PBO when you change the value for v_butt1, it will reflect on screen.

    Rgds

    Subra

    Add comment
    10|10000 characters needed characters exceeded