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

Transaction MM02

Hi All,

In one of our program it is required to navigate to the particular view of MM02 transaction. The view selection depends upon the type of error for the material.

I tried with the FM MATERIAL_MAINTAIN_DIALOGUE but using this I can only enter all the basic views such as basic data 1, MRP1, Costing1, etc.

My requirement is to enter the other views also (MRP2, Costing2, etc).

I thought of BDC but it will make a big code.

Is there another simple way of doing this?

If anyone has worked on such requirement then please get back to me.

Thanks in advance.

Regards

Atish

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 Dec 01, 2005 at 01:12 PM

    Hi,

    Welcome to SDN !!

    I think you can still achieve what you want with MATERIAL_MAINTAIN_DIALOGUE...

    See the following test program,

    REPORT zsritest.

    TABLES mara.

    DATA: lv_bilds LIKE t133a-bilds,

    ls_t130m LIKE t130m,

    ls_rmmg1 LIKE rmmg1,

    lwa_view TYPE mbildtab,

    lwa_auswg TYPE mgauswg,

    lt_views TYPE STANDARD TABLE OF mbildtab INITIAL SIZE 0,

    lt_auswg TYPE STANDARD TABLE OF mgauswg INITIAL SIZE 0.

    PARAMETERS: p_matnr LIKE mara-matnr,

    p_werks LIKE marc-werks,

    p_dytxt LIKE mbildtab-dytxt.

    SELECT SINGLE * FROM mara WHERE matnr EQ p_matnr.

    CHECK sy-subrc EQ 0.

    CALL FUNCTION 'T130M_SINGLE_READ'

    EXPORTING

    tcode = 'MM03'

    kzrfb = 'X'

    IMPORTING

    wt130m = ls_t130m

    EXCEPTIONS

    not_found = 1

    wrong_call = 2

    OTHERS = 3.

    CALL FUNCTION 'BILDSEQUENZ_IDENTIFY'

    EXPORTING

    branche = mara-mbrsh

    materialart = mara-mtart

    tcode_ref = ls_t130m-trref

    • KZRFB = ' '

    IMPORTING

    bildsequenz = lv_bilds

    • KZ_BILDS_CHANGED =

    EXCEPTIONS

    wrong_call = 1

    not_found = 2

    OTHERS = 3.

    CALL FUNCTION 'SELECTION_VIEWS_FIND'

    EXPORTING

    bildsequenz = lv_bilds

    pflegestatus = mara-pstat

    TABLES

    bildtab = lt_views[]

    EXCEPTIONS

    call_wrong = 1

    empty_selection = 2

    OTHERS = 3.

    ls_rmmg1-matnr = mara-matnr.

    ls_rmmg1-werks = p_werks.

    READ TABLE lt_views INTO lwa_view WITH KEY dytxt = p_dytxt.

    CHECK sy-subrc EQ 0.

    lwa_auswg-auswg = lwa_view-auswg.

    APPEND lwa_auswg TO lt_auswg.

    CALL FUNCTION 'MATERIAL_MAINTAIN_DIALOGUE'

    EXPORTING

    irmmg1 = ls_rmmg1

    • IRMMG1_REF = ' '

    KZ_EIN_DARK = 'X'

    t_tcode = 'MM03'

    • FLG_MATNR_RES = ' '

    p_pstat = mara-pstat

    • FLG_STAT_ALL = ' '

    • CALL_MODE2 = ' '

    • IMPORTING

    • MATERIAL_NO =

    • UPDATE_OK =

    TABLES

    iauswg = lt_auswg[]

    EXCEPTIONS

    no_authority = 1

    OTHERS = 2.

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Try with a material, plant and "MRP 2" as p_dytxt. Use this code as reference to arrive at your own logic based on the data you have at hand at the time of call.

    Hope this helps..

    Sri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2005 at 06:12 AM

    HI

    I am using FM MATERIAL_MAINTAIN_DIALOGUE with tcode as MM02, but when I am changing data it gives message that material data changed and saved but it is not reflecting in the actual material master.

    Can anybody tell what may be the issue.

    Thanks in advance.

    Atish

    Add a comment
    10|10000 characters needed characters exceeded

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.