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

REUSE_ALV_GRID_DISPLAY Problem

Former Member
0 Likes
638

Hi All,

I am using REUSE_ALV_GRID_DISPLAY to show data in ALV.

Here I am using my own PF-Status containing one extra PUSHBUTTON in Application Toolbar, other than the standard ones.

I want to gray out this button once this PUSHBUTTON is pressed.

Please let me know how I can get this functionality....

Rgds,

Avijit

Hi All,

I am using REUSE_ALV_GRID_DISPLAY to show data in ALV.

Here I am using my own PF-Status containing one extra PUSHBUTTON in Application Toolbar, other than the standard ones.

I want to gray out this button once this PUSHBUTTON is pressed.

Please let me know how I can get this functionality....

Rgds,

Avijit

4 REPLIES 4
Read only

Former Member
0 Likes
604

Hi,

Create another GUI status with the push button disabled. Set this PF-STATUS at user command.

Regards.

Read only

uwe_schieferstein
Active Contributor
0 Likes
604

Hello Avijit

You need a "switch" variable which stores whether the pushbutton has been used already or not.


TYPE-POOLS: abap.

DATA: gd_button_pushed    TYPE boole_d.

...
START-OF-SELECTION.
...

gd_button_pushed = abap_false.
...
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.

In order to define your own pushbutton and handle its ok-code you need to implement the FORM routines for I_CALLBACK_PF_STATUS_SET and I_CALLBACK_USER_COMMAND (see fm documentation), e.g.:


FORM pf_status_set ....

  IF ( gd_button_pushed = abap_true ).
    SET PF-STATUS '<my gui-status>' EXCLUDING '<my pushbutton>'.
  ELSE.
    SET PF-STATUS '<my gui-status>'. 
  ENDIF.

ENDFORM.


FORM user_command ...


  CASE r_ucomm.
    WHEN '<my pushbutton>'.
      gd_button_pushed = abap_true.

    WHEN others.
  ENDCASE.
...
ENDFORM.

Regards

Uwe

Read only

nkr1shna
Contributor
0 Likes
604

Hi,

Please pass the export parameter IT_EXCLUDING in the FM to achieve your expected results.

Best Regards,

Krishna

Read only

naimesh_patel
Active Contributor
0 Likes
604

Normally, when we create the GUI status and use it with the EXCLUDING addition, it will HIDE the button from the GUI, not DEACTIVATE it.

To make it GRAY, you have to change Application Toolbar Settings in the GUI status.

To do so:

Open your GUI status in the Change Mode

Against the "Application Toolbar" you will see the Green light. Click on the Green Light

From the Popup, Select the Option "Display ALL" Option

Enter.

Save and Activate.

Now, when you use the


SET PF-STATUS 'ZTEST' EXCLUDING ex_tab.

System will show the Gray button instead of the Removing that button.

You have to use the SET PF-STATUS ........... with help of some flag as suggested by Uwe.

Regards,

Naimesh Patel