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

Extra button in alv tree display

Former Member
0 Likes
2,253

Hi,

I need toa add an extra button in the PF-Status, using a container to display an ALV.

How can I do this?

Thanks in advance,

Rui

5 REPLIES 5
Read only

Former Member
0 Likes
1,280

hi,

In PBO pf-status, create buttons u require and use sy-ucomm to process.

Read only

Former Member
0 Likes
1,280

Hi Rui,

Please find the code below

Add a button on your GUI status.

AT USER-COMMAND event block will be triggered when you press your button.

AT USER-COMMAND.
  if sy-ucomm = 'PUSHBUTTON'.    "Function code of your button

  endif.

Hope this is helpful

Thanks

Kalyan

Read only

Former Member
1,280

Hi friend,

go through BCALV_TREE_02

or

BCALV_TREE* programs

Regards,

pratik vora

Read only

Former Member
0 Likes
1,280

hi,

Tyr using this

SET PF-STATUS 'ASSIG'.

and after double clicking on ASSIG, On the Application Tool Bar u can give as many buttons with its short cut key.

You can use these buttons with sy-ucomm .

Thanks and Regards

Suraj

Read only

Former Member
0 Likes
1,280

u can do this way as in this example....

Assign different function codes in the application toolbar of pf-status in gui status as 'add' and program them in the user-command.

DATA: OK_CODE LIKE SY-UCOMM,

SAVE_OK LIKE OK_CODE,

OUTPUT LIKE OK_CODE.

CALL SCREEN 100.

MODULE INIT_SCREEN_0100 OUTPUT.

SET PF-STATUS 'STATUS'.

SET TITLEBAR 'TABLE'.

ENDMODULE.

MODULE USER_COMMAND_0100 INPUT.

SAVE_OK = OK_CODE.

CLEAR OK_CODE.

CASE SAVE_OK.

WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.

LEAVE PROGRAM.

WHEN 'ADD'.

-


-


(PROCESSING HERE)

WHEN OTHERS.

OUTPUT = SAVE_OK.

ENDCASE.

ENDMODULE.