Skip to Content
author's profile photo Former Member
Former Member

adding buttons to ALV list

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2006 at 01:59 PM

    For ME38 the parameter ID is <b>VRT</b>. Aggrement number is of type EVRTN. You can see the parameter ID by pressing F1 on that field and press technical information.

    Change the code like this:

    SET PARAMETER ID 'VRT' FIELD rs_selfield-value.

    CALL TRANSACTION 'ME38' AND SKIP FIRST SCREEN.

    Regards,

    Prakash.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2006 at 03:16 PM

    Hi,

    Parameter Id for ME38 is VRT but not BES. Change the code as below and try.

    SET PARAMETER ID 'VRT' FIELD rs_selfield-value.

    CALL TRANSACTION 'ME38' AND SKIP FIRST SCREEN.

    Also,for Transactions MD04, MMBE,MD51, You are reading table it_rep_tab using index but i think you are wrongly setting the parameter id values, i.e, you have used the below lines

    SET PARAMETER ID 'MAT' FIELD l_selfield-value.

    SET PARAMETER ID 'WRK' FIELD l_selfield-value.

    I think You may have to use wa_rep_tab for Material Value and for Plant Value but not l_selfield-value.

    please check.

    thanks,

    sksingh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      The functionality for MD04, MMBE, MD51 is:

      If I select the a row in the list, the plant and material needs pass to the above transactions from that record or line.

      I have created 3 buttons for these transaction next to ALV tool bar.

      Please help me

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.