Skip to Content
0
Former Member
Oct 13, 2006 at 01:03 PM

adding buttons to ALV list

36 Views

I need to call 2 transactions from my dril down list,

and 3 transactions from the tool bar by adding 3 buttons.

Here I am using dynamic calls from the reuse alv list display function module.

but I am not getting the parameter id for ME38.

and not populating MMBE transaction. please help me..

Here I have given code for that...

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE rs_selfield-fieldname.

WHEN 'EBELN'.

IF rs_selfield-fieldname = 'EBELN'.

rs_selfield-fieldname = 'EVRTN'.

SET PARAMETER ID 'BES' FIELD rs_selfield-value.

CALL TRANSACTION 'ME38' AND SKIP FIRST SCREEN.

CLEAR rs_selfield.

ENDIF.

WHEN 'MATNR'.

SET PARAMETER ID 'MAT' FIELD rs_selfield-value.

CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

ENDCASE.

ENDFORM.

----


  • FORM SET_PF_STATUS *

----


FORM set_pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'ZNEWSTATUS'.

data:l_ucomm like sy-ucomm.

case l_ucomm.

when 'MD04'.

READ TABLE it_rep_tab INTO wa_rep_tab INDEX l_selfield-tabindex.

SET PARAMETER ID 'MAT' FIELD l_selfield-value.

SET PARAMETER ID 'WRK' FIELD l_selfield-value.

CALL TRANSACTION 'MD04' AND SKIP FIRST SCREEN.

when 'MMBE'.

READ TABLE it_rep_tab INTO wa_rep_tab INDEX l_selfield-tabindex.

SET PARAMETER ID 'MAT' FIELD l_selfield-value.

SET PARAMETER ID 'WRK' FIELD l_selfield-value.

CALL TRANSACTION 'MMBE' AND SKIP FIRST SCREEN.

when 'MD51'.

READ TABLE it_rep_tab INTO wa_rep_tab INDEX l_selfield-tabindex.

SET PARAMETER ID 'MAT' FIELD l_selfield-value.

SET PARAMETER ID 'WRK' FIELD l_selfield-value.

CALL TRANSACTION 'MD51' AND SKIP FIRST SCREEN.

when 'EXIT'.

leave program.

when 'BACK'.

leave to screen 0.

endcase.