Application Development 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: 

Call transaction in Grid display

Former Member
0 Kudos

I need to call Tcode VA02 when user press a button 'Change Sales Order' in Application tool bar of Grid display. my question is

How to set this button in Appl tool bar? Waht I shud consider while creating this in SE51(i.e. PF_STATUS_SET)?.

How to use User_Command to write logic for same.

can anybody help on this.

Regards,

Zakir.

1 REPLY 1

Former Member
0 Kudos

Hi Zakir,

For adding a button in application tool bar,

1. Goto SE80

2. Select function group and give SALV

3. expand the GUI STATUS drop down and right click on STANDARD

4. Copy -->Copy that to ur Z* program

5. Go to change mode and add a button in application bar

let say '&VA02'.

6 Save and activate it in ur program

7. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = V_REPID

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'

8. FORM PF_STATUS using RT_EXTAB TYPE SLIS_T_EXTAB.

SET PF-STATUS 'STANDARD' EXCLUDING RT_EXTAB.

ENDFORM. "PF_STATUS

9 FORM USER_COMMAND using RT_UCOMM type SY-UCOMM

RT_FIELD type SLIS_SELFIELD.

READ TABLE IT_FINAL INDEX RT_FIELD-TABINDEX.

CASE RT_UCOMM.

WHEN '&VA02'.

SET PARAMETER ID 'AUN' FIELD IT_FINAL-VBELN.

CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.

ENDCASE.

ENDFORM. "USER_COMMAND

Check the parameter id for vbeln, it should be AUN.

Hopes it helps you.

Ali