Get Material Document

Hi
Can anyone pls let me Function Module or BAPI for getting "Material Document (MBLNR)" based on "Sales Order (VBELN)"
It is a very urgent requirement.
Regards
Raghav

Sales Order will not create any Material Document , but Deliver will create the M.Doc.
check VBFA-VBElV = Delivery number
      VBFA-VBtyp_n = R.
here u will get the list of MBLNRS.
Regards
Prabhu

Similar Messages

  • Function Module to get Material Document Number

    Hi All,
    I want to get the Material Document Number based on the Material, batch ,movement type and plant. Is there any function module to achieve this, without going to MSEG table.

    check this might help you..
    Get Material Document Number and Material Document Year
    Regards
    Kumar

  • 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

  • How to get Material Document List (MB51) Data

    Hi ,
    Can anybody please explain me the procedure to get MB51 data through report .
    Here my requirement is to display the data with additional selection screen parameters & add some more fields in out put of ALV GRID Display.
    Thanks in advance.
    --Hamsitha.

    Hi Hamsitha,
    I think you may have posted your question to the wrong Forum:
    This is the Forum for the SDK of SAP's product for smaller (and lower midsize) companies "SAP Business One".
    Please check!
    Thx,
    Frank

  • How to get relationship between material document no and accounting documen

    Hi Experts !!
                     I want to create a report displaying accounting document no and GL account no buy providing PO No and material document no (MIGO No).
    I want a database table from where I can get  material document no (MIGO No)(MBLNR/BELNR) and accounting document(BELNR) no both.Currently I am using
    BSEG for getting HKONT,EBELN,BELNR
    MSEG for getting MBLNR by using EBELN (P.O. NO)
    BKPF for getting BUDAT.
    the problem came with EBELN (P.O. NO) as repeated entries are there.
    I am unable to write query for getting MBLNR and  BELNR for same EBELN (P.O. NO).
    Is there any table where MBLNR and  BELNR are related to each other??????
    Thanks in advance !!!!

    Check this thread, if this helps.
    [url] Link between MKPF table and EKKO or RBKP table [url]
    I've done this as well earlier to create a custom document flow for archived documents where from the EBELN i've found all the related documents. Hope this helps.

  • Material Document is not generated in PGI

    Hi,
    Iam doing PGI i am not getting Material document number and i went to MB51 there also i am not any document number is there any customizing settings for the material document
    thanks
    seshu

    Hi,
    Check the material, it might be service material, go to material master in MM02 and check the Item category group and check weather it to be LEIS "Service with delviery" if it is then PGI will be done but not material doc will be generated
    Second:- Check weather material is maintained as Non-Valuated, and check weather Accounting1 view is maintained or not
    if not maintained then maitain standard price and valuation control there
    Regards
    Shambhu Sarkar

  • Material document ,quantity and stock location for a given material

    hello all,
    i have a requirement like this.
    in the selection screen i have,
    material.....
    plant....
    posting document date.....
    i need to get material document number,quantity,units and stock location for the above mentioned selection criteria...
    what tables do i need to use..
    do i need to use any BAPI or Function module..
    thanks in advance...

    Hi Vinay ,
    Look into table MKPF & MSEG for material document
    anf for quantity in MARD
    Regards
    Yogendra Bhaskar

  • How get Material Doc. From Delivery

    Hi experts,
    How can i get Material Document No. from Delivery No. when PGI Complete.
    What is the Proper way to find the material document no. from delivery no.
    with best performance.

    Use table VBFA.
    select <fields> from VBFA
    where vbelv = <delno>
    and      posnv = <del line item>
    and      vbtyp_n = 'R'.
    Regards
    Vinod

  • How to get the number of Item in Material Document?

    Hi all.
    I'm using the BAPI_GOODSMVT_CREATE, and want to get the Item number in Material Document of every entry in the internal table. How can I do that?
    Thanks in advance.

    Hi YiNing
    You can use this code after calling BAPI.
          SELECT SINGLE mblnr
           INTO CORRESPONDING FIELDS OF wa_mkpf
           FROM mkpf
           WHERE mblnr = p_mblnr.
          IF sy-subrc EQ 0.
            EXIT.
          ELSE.
            CALL FUNCTION 'RZL_SLEEP'
              EXPORTING
                seconds        = 2
              EXCEPTIONS
                argument_error = 1
                OTHERS         = 2.
          ENDIF.
    *Check material document number is in table MKPF
      CHECK wa_mkpf-mblnr IS NOT INITIAL.
      REFRESH : i_mseg[],i_ser03[],i_objk[]..
      SELECT matnr charg vfdat erfmg erfme mblnr zeile
             INTO CORRESPONDING FIELDS OF TABLE i_mseg
             FROM mseg
             WHERE mblnr = wa_mkpf-mblnr.
    Here you will get  the item in material number (ZEILE).
    Regards,
    Mukesh Kumar

  • How to Get PO from Material Document by MB1B!

    Hi,
    I created a PO for subcontracting. When I send
    the goods to vendor with trx MB1B and mvt type 541, Material Document Number will be generated (option: to Purchase Order) . When print out this Material Document Number by MB90, I want to get this PO number. Please let me know how to get the relation bw this PO and Material Document.(I have checked in MKPF-XBLNR, but it is blank).
    Thanks in advance.

    there's no relation. the process how you have implemented it leaves no relation between PO and GM except for your doing so 'artificially' by filling field XABLN (for example) or any other.
    if you would adjust the process to use deliveries (tx. ME2O) the prospect would not be much better but there would at least be a chance to find the relation.
    as it is, SAP designed this to be a 'transfer posting' - to do it entering a PO-number is only in order to make typing easier but does not mean, items, quantities or anything else has to be entered as it is in the PO. you can add as many line items as you like ... as long as there's available stock you get your movement.

  • Material Document not getting posted.

    Hi Guys:
    Material document is not getting created when i try post the inventory difference using transaction LI21 ( Clearing of differences in Inventory Management ).
    we are using WM , so physical inventory is carried out at Bin Level.
    Did I miss anything in the config setting?
    Thanks
    Sweth.

    Hi Jurgen:
    do you have a pick or putaway quantity in this quant in storage type 999 ?
    Yes , in the available quantity I could see the -ve quant ( Goods Issue/Pick)  and + Quant (Goods Receipt/Putaway)
    is the quant locked?
    Quant is showing with unlocked logo.
    is somebody else in change mode in that quant?
    Nope
    is this the only item in your inventory document?
    yes
    have you tried to execute LI21 in background?
    I don't how to do that ,
    do you require to enter a reason for the difference?
    I didn't see that question Popped Up.
    Thanks for the help.
    Sweth

  • User-Exit - MIGO How to get the Number of Material Document

    Hi everyone!!
    I'm looking for an user-exit after saving in MIGO transaction. I need the Number of Material Document (MKPF-MBLNR) to generate an IDOC.
    Does anybody knows an user-exit to get this number?
    Regards,
    Rubens Kumori
    Edited by: Rubens  Kumori on Oct 20, 2008 3:26 PM

    In BADI definition [MB_DOCUMENT_BADI|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=mb_document_badi&adv=false&sortby=cm_rnd_rankvalue], you may use interfaces [MB_DOCUMENT_BEFORE_UPDATE|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=mb_document_badiMB_DOCUMENT_BEFORE_UPDATE&adv=false&sortby=cm_rnd_rankvalue] (before update task) and [MB_DOCUMENT_UPDATE|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=mb_document_badiMB_DOCUMENT_UPDATE&adv=false&sortby=cm_rnd_rankvalue] (in update task)
    Regards

  • How to get receiving and sending storage location in material document?

    Hi, guys,
    I am now writing a report about material document.  I need to get receiving storage location and sending storage location from material document  in MSEG table , Is there any function module for this ?
    Thanks.
    Justin

    I don't know, but there is a SELECT statement that lets you read any desired column from the database.
    Thomas

  • How to get the partner tab in the Goods Issue Material Document ?

    Hello ALl,
    We have a 3rd party sales order stock with acc assignment "M" with special stock "E".  we wanted the customer number to be populated on the G/L account line. This is being possible if we have the partner tab in the GI material document.
    currently we have other tabs like material, Qty, Where, & Acc ***.,  but not the partner tab in our GI material document in detail section.
    Can some telll me how i can get the tab?
    THanks in advance
    Arpita Rani

    Abaper help is needed over here.
    Appreciate if resolved.
    Regards,
    Kishore

  • How to get the Material-Document-Number wie the delivery-Number+Position???

    Hi,
    we want to connect mseg and likp+lips.
    But therefore we need the Material-Document-number concerning this
    delivery and in likp+lips isn't a Material-Document-Number!
    Could anybody help me to connect likp+lips with mseg!

    ok, NICE!!! But how should I get with these information a unique Material-Document-Number for a delivery+deliveryposition?

Maybe you are looking for

  • How do i create a mail box in the SMTP server thru a java program

    How do i create a mail box in the SMTP server thru a java program. If it is possible thru a java program.pls suggest a mail server compatible for the above possibility to work. pls help ....

  • Email Report List as an attachment

    Hello Experts, I need to write a new program which will run in background and should be able to send its list as an attachement in an email. (I really appreciate if that can send the report's spool (if PDF format) as an attachment). I know that there

  • Register with Shared Services Failing in 11.1.1.3

    Hi, We installed 11.1.1.3 in Linux operating system and the application server is Websphere 6.1.After Installation and Configuration of EPM products we Externalized users from EAS Console and configured Active Directory in Shared Services and now wan

  • Portlet compatibility

    Hi all.. is the portlet developed using Web dynpro can be run on any other portal server??? How do we deploy the portlet with out using studio??

  • Same object ID-Multiple record

    Hi, We have an issue related to object id , we have 3 records for same one object id in the table hrp100 all the are active and not delimited i.e 3 objects created with the same id with out delimitation. As per the standard behavior we should not get