TO and Material Document

Hi gurus,
After creating transfer order, i need a way, it might be a BAPI or FM in order to create a material document.
I am using call transaction LT06 for creation of TO then BAPI_GOODSMVT_CREATE for the material document, but I have been encountering an error saying that "No Material Document Created".
I hope you can help me gurus..
Thanks so much..

Hai,
Iam sending example code. Check  where you made mistake.
DATA: wa_grdata    TYPE t_grdata,
      wa_gmvt_head TYPE bapi2017_gm_head_01,
      wa_gmvt_code TYPE bapi2017_gm_code,
      wa_gmvt_hret TYPE bapi2017_gm_head_ret.
  DATA: lv_testrun TYPE bapi2017_gm_gen-testrun,
        li_gmvmt_item  TYPE TABLE OF bapi2017_gm_item_create  WITH HEADER LINE,
        li_gmvmt_serl  TYPE TABLE OF bapi2017_gm_serialnumber WITH HEADER LINE,
        li_gmt_itm_cwm TYPE TABLE OF /cwm/bapi2017_gm_item_create.
   MOVE: wa_grdata-pstng_date TO wa_gmvt_head-pstng_date,
        wa_grdata-doc_date   TO wa_gmvt_head-doc_date,
        wa_grdata-deliv_numb TO wa_gmvt_head-ref_doc_no.
CLEAR i_gmvmt_item.
  MOVE-CORRESPONDING wa_grdata TO i_gmvmt_item.
  i_gmvmt_item-mvt_ind = c_b.
  i_gmvmt_item-move_type = c_101.   "Movmnt type 101 GR goods receipt
  APPEND i_gmvmt_item.
  CLEAR i_gmt_itm_cwm.
  i_gmt_itm_cwm-entry_qnt_pme = wa_grdata-cwm_erfmg.
  i_gmt_itm_cwm-entry_uom_pme = wa_grdata-cwm_erfme.
  APPEND i_gmt_itm_cwm.
wa_gmvt_code-gm_code = '01'.     
CLEAR: li_gmvmt_item, li_gmvmt_serl, li_gmt_itm_cwm, wa_gmvt_hret, lv_testrun.
  REFRESH: li_gmvmt_item, li_gmvmt_serl, li_gmt_itm_cwm.
wa_gmvt_head-pr_uname = sy-uname.
  li_gmvmt_item[]  = i_gmvmt_item[].
  li_gmvmt_serl[]  = i_gmvmt_serl[].
  li_gmt_itm_cwm[] = i_gmt_itm_cwm[].
  lv_testrun = p_simu.
  CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
      goodsmvt_header       = wa_gmvt_head
      goodsmvt_code         = wa_gmvt_code
      testrun               = lv_testrun
    IMPORTING
      goodsmvt_headret      = wa_gmvt_hret
    TABLES
      goodsmvt_item         = li_gmvmt_item
      goodsmvt_serialnumber = li_gmvmt_serl
      return                = i_return
      goodsmvt_item_cwm     = li_gmt_itm_cwm.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
WAIT = 'X'.

Similar Messages

  • PO print OUT And material Document Print Out is coming In English

    HI all.
    I have Created Vendor In ZH(chinese Language,)and in material master I have maintained description in Chinese language.
    I'M taking PO and material Documents print outs  in Chinese Server log-in.
    even Though Im taking Print outs in Chinese Log-In server, IM getting Print outs in English Language only not In chines language..
    At the Time Of PO creation the Communication Language is ZH(Chines)..
    I have read some related post even 89899..
    But I have not find solution
    plz help me.
    thanks and regards
    ramesh reddy.'

    Check SAP Note 894444 - Tool for server-based printing on Windows (SAPSprint) for your requirement,
      Installation
    Before you install SAPSprint, delete SAPLPD manually. To do this, you normally need to completely delete the installation directory only. If you installed SAPLPD as a service using the srvany tool, you can remove the service by calling 'Instsrv SAPLPD remove'.
    You can download SAPSprint as a self-extracting executable file from SAP Service Marketplace:
    1. Entry by Application Group (on the left)
    2. SAP Frontend Components (on the right)
    3. SAPSPRINT (on the right)
    4. SAPSPRINT <Release> (on the right)
    5. SAPSPRINT <Release> (on the right)
    6. Win32 (on the right)
    Start the program. After you enter the installation path, the system prompts you to enter the TCP/IP port.
    Normally, the default setting of 515 is suitable for the port. You should only change this setting if the Windows TCP/IP print service is also running on the computer. The SAPSprint Windows service starts as soon as the installation is over.
    We recommend that you set up the following options for the service in the Windows Service Control Manager:
    The service should run under a domain user that has the relevant authorizations for the required printers. After the installation, the service runs under "Local system account". This can access locally-defined printers only. You can set the user in the Windows Service Control Manager, in the options of the SAPSprint service.
    If you want to delete SAPSprint, you can do so using the normal Windows uninstall tool.
    We recommend that you install the SAPSprint service on a separate computer and not together with a SAP system, especially if you use a large number of printers. All printers that SAPSprint uses must be installed on the SAPSprint computer. This applies particularly to released printers from other computers. These should be installed as a queue on the SAPSprint server.
    Also note further settings in accordance with Note 1069483.
    Settings
    You can display the call parameters available for SAPSprint by calling 'sapsprint -?' on the command line. The most important parameters are those that set options, especially log options for troubleshooting.
    You can set the log level to 5 by specifying 'sapsprint -oi LogLevel 5'. Immediately after installation, no log level is set up, which means that no log file is created. By setting the log level to 1, 5, or 9, you can ensure that more information is available in the directory that you specified during the installation. A file called sapsprint.dbg and a print job specific file with a variable name are generated. The second file is deleted after successful printing. It is only retained if the printout is recognized as incorrect. If you set the option 'sapsprint -oi KeepFile 1', then both this file and the print file are retained. This is primarily intended for troubleshooting by SAP Support.
    All options are case-sensitive. You can display the most important SAPSprint options by calling 'sapsprint -?'. All possible options are described in Note 85469. Normally, the options described there are not necessary - you should use them only in exceptional circumstances.

  • Need help abt Purchase order and material document number

    1)Is there any releation ship between Purchse order number and material document number?
    2) I found aBAPI to get the goods receipt details. That is BAPI_GOODSMVT_GETDETAIL. But it is excepting Material document number and material document year as input parameters.Is there any BAPI to get goods receipt details by using purchase order number?

    hi kiran
    check this thraed. this gives you relatinship between Purchse order number and material document number
    Retrieving Accounting Document number based on PO numbers
    BAPI to get goods receipt details by using purchase order number is
    BAPI_GOODSMVT_CREATE
    thanks
    Sachin

  • Table name and field name for accounting and material document in MM

    Hi
    Table name and field name for accounting and material document in MM
    how can we diffreentiate the accounting document in MIGO and MIRO ?

    Hi,
    For Goods reciept documents you can search from the tables  MKPF-Header: Material Document and MSEG-Document Segment: Material,
    and for Invoice documents you can search in  tables   BKPF-Accounting Document Header and BSEG-Accounting Document Segment.
    For differentiating the Accounting documents in MIRO and MIGO based on posting key and document types for GRN -document key is -WE and for MIRO document is -RE.......
    Hope this may help you.....................

  • Billing Document and Material Document Relation

    Dear all,
    i need to know about the relation between Billing document and Material document.
    Please let me know if there is any Function Module or Some View available to get these details.
    my only requirement is to get only Material document From Billing Document.
    Thanks In Advance.
    Pradeep.

    Hi
    So the material document should be linked to the delivery
    The document flow:
    Delivery->Outgoing moviment->Delivery->Bill->FI invoinces
    If you start from FI:
    - Get the bill number from header data: BKPF-AWKEY
    - get the delivery number from bill item VBRP-VGBEL
    - get the document flow for the delivery: VBFA: here you can find out the material document
    Max

  • Relation between goods receipt and material document number

    guyz!
    i got stuck up at one functional doubt. can any one say link between goods receipt and material document number. in other way, i wanted to know difference between these two i.e. goods receipt and material document number. or both are same.
    awaiting for reply
    manas

    Hi,
    Just have a look if this thread can solve ur problem.
    Re: display goods receipt
    Rgds,
    Prakash

  • Relation between Material Number and Material document Number.

    hi xperts,
         I want to Know Is there any Relation ship between the <b>Material Number</b> and <b>Material Document Number</b>.
      If So can i get any Tcodes to check them?
    Thanks in advance.
    Message was edited by:
            STALIN JOSEPH

    Hi,
      Thanks for your reply.
    I want to Load the Inventory Management Data into Business warehouse ,there the Only way i correlate the Data between is by taking some material Number.
    and Material Document.
    In step 1 i load Material Number data and step 2 i load material document data,so i want to make cure those two loads i load the same material numbers.
    Please help me to collerate between them.

  • Get Material Document Number and Material Document Year

    Hi everyone,
    Right now, i'm developed idoc program. I need material document number (MBLNR) and material document year (MJAHR).  I have information only BAPI2017_GM_HEAD_01 and BAPI2017_GM_ITEM_CREATE. Is there any FM to get this value ? Thank you
    Regards,
    Satria

    Ok, i will explain with more detail about my problem
    Here my pseudocode :
    -  Get data with type BAPI2017_GM_HEAD_01 from Idoc (let we say this X)
    -  Get data with type BAPI2017_GM_CODE from Idoc (let we say this Y)
    -  Get data with type BAPI2017_GM_ITEM_CREATE from IDoc (let we say this Z)
    -  IF Y-GM_CODE <> "06" THEN
           CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
               EXPORTING
                   GOODSMVT_HEADER = X
                   GOODSMVT_CODE     = Y
               TABLES
                    GOODSMVT_ITEM      = Z
       ELSE IF Y-GM_CODE = "06" THEN
           CALL FUNCTION 'BAPI_GOODSMVT_CANCEL'
                EXPORTING
                     MATERIALDOCUMENT = ???
                     MATDOCUMENTYEAR = ???
                    GOODSMVT_PSTNG_DATE = ???
    I know that material doc and mat doc year is in table MKPF. But the problem is they are  the primary key, so how i use X,Y,Z in select operation to MKPF? or is there another way using FM ? Thank you
    Regards,
    Satria

  • New document type for Physical and material documents

    All SAP Gurus,
    I have created new document type in OBF4.
    How to view that Document type in OMBT (number range for for Physical and material documents)
    Regards,

    Hi,
    on the menu bar of trxn  click "number range object" in that go into overview you will get number range object overview  of every documment type or else do shift F7.
    Regards,
    Archit

  • Please provide logic for schedule lines and material document Quantity.

    Hi ABAPers,
    Please help in the following context.
    Is there any connecting or refrence field for which a particular schedule line item are considerd for the goods reciept of a particular material document.
    Also provide the logic.
    19                    34
    15
    14                   35
    11
    10
    If 19 15 14 11 10 are schedule lines, and 34 35 are two recived quantities,
    Then how can be the possible permutations and combinations logic to find out that, 34 = 19 + 15 and
           35 = 141110.
    Thanks in advance...

    Niles Raut wrote:
    Hello Gurus,
    >
    > This is intracompany STO scenario with delivery. There is one STO for quantity say 1000 pc created in 2008. Delivery and PGI done for 1000 qty in 2008.  Goods are received in receiving plant for qty 1000 in 2008. Now this delivery document is archieved and user has reversed the GR material document in 2010. Now this reversal material docuemnt has zero material qty becasue the delivery was archieved(which is the probable reson)
    >
    > When I want to cancel this reversal material document it gives error that "Qty and / or "delivery completed" ind. or final issue ind. are missing" which is logical since material document has zero quantity.
    >
    > Is there any sap notes or any other way to fix this?
    >
    > Please guide.
    >
    > Regards
    > Nilesh
    Where is actually the problem, if one only reversed 0 quantity?
    Why do you think you need to reverse this reversal again?
    why with year 2010?
    Dont you do anual inventories?  Such stock counts have corrected your stock anyway. if you start cancelling older movements then you create stock inconsistencies again.

  • Need to check PO Posting date at schedule line and material document level

    HI All,
    I am facing an issue to reconciliation data with ECC.
    Issue :
    we have a PO,item,schedule line with delivery date, scheduled qty and quantity received from EKET table
    we have PO,item,Material document,movement type,posting date with quantity received from EKBE table
    the standard extractor 2LIS_02_SGR is providing data at
    PO,item,schedule line,material document,movement,posting date
    as if now we are using this extractor to get the posting date at schedule line level.
    can some one let me know how exacty the EKET and EKBE table are joined ???

    Hi,
    The data for the datasource 2lis_02_sgr can be compared in ECC using ME80FN transaction.
    Please check the below Link for all the details reragrding 2LIS_02_SGR datasource.
    [http://help.sap.com/saphelp_dm40/helpdata/en/69/063f3f2615e07fe10000000a114084/content.htm]
    Hope this helps..
    Thanks,
    Nagarjuna

  • Link between Service Entry Sheet and Material Document

    Hi
    I am busy with developing a report where i am required to find the link between the Material Document and Service Entry Sheet. 
    I am aware that on the Purchase Order Data tab of the Material Document has the service entry sheet number and line item.  However the problem I have picked up here is in the event I create a Service Entry Sheet  with a service in line 1 and for some reason Delete that Line and then capture the service again, it is saved in table ESLL as line 2.  This is correct.  However when I have a look at the material document, it references it as line 1 of the service entry.  Is there any way to get this in sync?
    Thanks
    Vinesh

    Thanks
    This table does show the service entry sheet number and line item however the line item does not correspond with the line item on the service entry sheet.
    Eg.
    I create a service entry sheet where I capture a service in line 1.
    I delete Line 1
    I recapture on line 2.
    Post Service Entry
    The Material Doc reference document is the service entry however the line item for the reference is 1.
    I need to try and link the line items
    Thanks
    Vinesh

  • Display of FI document numbe and material document number

    Hi,
    I want to display both the material document number ( RBKP ) and the acccounting document number ( BSET ) together while posting the Invoice using MIRO transaction.
    Pl provide with your valuable suggestions.
    Regards,
    R. Dillibabu.

    Hi Arif,
    We wanted to generate a number during invoice verification based upon the order type of the PO, As you know it is not possible to generate a order specific material document number but it is possible to generate a order specific accounting document number provided we can select RE or ZE while processing invoice verification.
    This accounting document number will be considered as a claim number for one of the customized business process ( Warranty Claim process ).
    The user has to record the claim number on a daily basis. Currently it is being done by passig the RBKP-BELNR to the BKPF to get the accounting document number ( BELNR ) which is quite tedious.
    Hope the business functionality is quite clear now.
    Regards,
    R. Dillibabu.

  • Billing Document and Material Document number and Date (Goods Issue)

    Dear Experts,
    Is there a way I can find the relationship between a billing document and a material document number and Goods issue date?
    Thanks

    Hi Abid
    Is there a way I can find the relationship between a billing document and a material document number and Goods issue date?
    You have to follow the flow from the billing document to the material document. This will only work if the billing document comes from a delivery note.
    Billing document => Delivery
    LIPS-VBELN = VBRP-VGBEL
    and LIPS-POSNR-VBRP-VGPOS
    So you have LIPS + LIKP with the LIKP-WADAT_IST as the goods issue date.
    Delivery => Material Document Number
    You can use the table VBFA with the delivery item as the preceding document number (VBFA-VBELV) and item (VBFA-POSNV) ; you will also have to define the preceding document type as J (delivery) and the document category of subsequent document as R (material document).
    Because in SAP nothing is simple, there might more than one material document, because the goods issue (601) movement might have been canceled and issue again. So you will have to decide what to do in that case.
    Best Regards,
    Franck

  • Table for PO order and material document link

    Hello,
    I want to extract PO order and respecitive material documents ( IR , GR docs.)
    Can you give table(s) names ?
    Thanks,
    Ishak

    Hi ,
    You can use 2LIS_02_ITM ,2LIS_02_SCL DataSource you also check the following DataSources
    2LIS_02_SCL Tables EKKO, EKBE, T001, T001W, EKET, EKPA.
    2LIS_02_HDR  Tables  EKKO, EKBE, T001, EKPA.
    2LIS_02_ITM Tables  EKKO, EKBE, T001, T001W, EKPO, TMCLVBW, T027C, ESSR, T147K, T147
    2LIS_02_SCN  Tables  EKET, EKES, EKPO.
    2LIS_02_CGR  Tables  EKBE, EKES, EKPO.
    2LIS_02_SGR  Tables EKET, EKBE, KKPO
    Thanks
    REddy

  • ML81N Service entry sheet and material document

    Hello,
    Why SAP creates a material document "WE" and another document "Lerf" when you create a service entry sheet using the ML81N transaction?
    I have seen too that if you don't set up the "No limit" flag in the purchase order then you can make a lot of entry sheet but SAP doesn't create the same number of material documents.
    Therefore, it can be a scenario where you can have a document entry sheet but you don't have the corresponding material document.

    Hi,
    The GR document is an official document. The system creates the material document automatically when you accept and save the entry sheet (ESSR-KZABN = X).
    "Lerf" in the PO history is a service entry sheet, the material document is the same material document which MIGO would create.
    Please check the EKBE and MSEG for the entries.
    You can save for the same PO several entry sheets and the system automatically creates material documents for these entry sheets when you save and accept the entry sheets. It is not possible to save more than 1 material document for the same entry sheet.
    But it is possible to release entry sheets collectively in ML85:
    For example you created a PO with service quantity 20 and you can create as many entry sheets as the quantity from the PO service item (20) and the overdelivery tolerance this allows. All of these entry sheets will refer to the same PO item. In ML85 you can release all of these entry sheets in the same step in ML85 and the system will create a material document (just 1 material document) with as many items (BUZEI) as many different entry sheets you saved for your PO item...
    Regards,
    Edit

Maybe you are looking for

  • HOW DO I ADD A DATE IN THE FOOTER?

    I can not find the INSERT DATE function to add a DATE to the footer of a NUMBER spreadsheet.  How do I do that? 

  • Using SQLCMD variables in SQL Server Unit Test Project

    Is it possible to use SQLCMD variables in my SQL Server Unit Test Project? In my test initialize script I'd like to set a database name variable, something like this: :SETVAR MyDatabase "mydatabase" SELECT * FROM [$(MyDatabase)].[mytable] but I get s

  • Set Background color of columns in JTable

    Hi, I would like to set the background color of columns, which are not editable, to a grey color. I have a JTable with 8 columns where the first is not editable (set through a TableModel. Regards Thomas

  • Problem creating new ABAP Technical System in SLD

    I newly installed a ECC 5 IDES system (ABAP + JAVA) on my computer for ABAP and Webdynpro learning. I got problem when I try to create new ABAP Technical System in SLD. I put my steps of installation here so you know my full story. 1. Install Central

  • Feature Request - Replace MacBook Pro Feet

    So the feet on my MacBook Pro fell off after normal use.  (Turns out that this is a problem many MacBook users are having.)  Took my MacBook Pro to the Genious Bar and was told that the feet could not be replaced because they were part of the unibody