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

Calling mm01 tcode

Dear Abapers,

I developed a screen in dialog programming in that i have stored material number in one text.My requirement is when i click its corresponding create button it should call mm01 and the material number should be dispalyed in mm01 screen.

I tried the below code but the material number not displayed in matnr field.

case sy-ucomm.

when 'CREATE'.

SET PARAMETER ID 'MAT' FIELD MATNR.

CALL TRANSACTION 'MM01'.

endcase.

I have declared matnr like

data: matnr like mara-matnr.

can anyone pl help me out in this issue.

Thanks in Advance!!!

Edited by: Ranganayahi Chandirasekaran on May 27, 2008 11:05 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

10 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 09:15 AM

    Hi,

    declare as

    data : matnr like mara-MATNR MEMORY ID MAT.

    CHECK WHETHER THE DATA MATNR IS filled before calling the transaction.......

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 09:08 AM

    Hi

    You need to do it with BDC

    Aditya

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Ranganayahi,

      Use this code instead of SET PARAMETER ID.

      The SET PARAMETER is not working incase of MM01.

      DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.

      bdcdata-fnam = 'RMMG1-MATNR'.

      bdcdata-PROGRAM = 'SAPLMGMM'.

      bdcdata-dynpro = '0060'.

      bdcdata-DYNBEGIN = 'X'.

      bdcdata-fval = MATNR.

      APPEND bdcdata.

      CALL TRANSACTION 'MM01' USING bdcdata.

      Hope this helps you.

      Thanks,

      Arun

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 09:20 AM

    Hi Ranganayahi,

    Try CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.

    At the same time check field MATNR has some value.

    Hope this helps you.

    Thanks,

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 27, 2008 at 09:21 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 09:22 AM

    hi!

    INITIALIZATION.

    IMPORT wk_noteno FROM MEMORY ID 'NOTIFNO'.

    CASE sscrfields-ucomm.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 09:09 AM

    is the screen field value assigned to the variable matnr before setting the parameter id??

    Rgds,

    stck

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 09:17 AM

    Hi,

    In MM01 material number is not displayed before it is created so you cannot call MM01 setting parameter you have to call MM02 for a particular material with the same syntax.You cannot call MM01 because matetial number is only generated at the end of the process of creation of matrerial in MM01 but you can try to call MM02 with the same syntax

    SET PARAMETER ID 'MAT' FIELD MATNR.

    CALL TRANSACTION 'MM02'.

    where field MATNR will have some valid material number.

    Regards,

    Himanshu Verma

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      yes.u r correct! My code is working for mm02 and mm03.

      but it is not working for mm01.

      but my requirement is: i need to create material number which shows in the screen.so when user click create button it should call mm01 with material number displayed in screen.

      Is it possible to call mm01 screen for this suituation?

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 09:20 AM

    HI,

    In your code , add this also:

    case sy-ucomm.

    when 'CREATE'.

    SET PARAMETER ID 'MAT' FIELD MATNR.

    CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.

    endcase.

    Hope this helps.

    Reward if helpful.

    Regards,

    Sipra

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 09:21 AM

    Hi,

    Your code will not work for MM01, but it works for MM02 and MM03.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2009 at 06:25 AM

    Closing this thread.

    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.