Link between invoice number and material document number

I need a way to get the list of material document numbers which correspond to a particular invoice.  Is there a way to find this information?  I am looking [looping] at table EKBE during a user exit in SAPMV60S but I need to restrict the entries by a range of (multiple) material document numbers.
Regards,
Davis

It looks like you're missing a piece of code.
        SELECT SINGLE * FROM BKPF WHERE BUKRS = Z_EKKO-BUKRS AND
*                                       BELNR = EKBE-BELNR AND
                                        AWKEY LIKE X_KEYFLD AND
        CHECK SY-SUBRC = 0.
The SELECT just ends at the "AND".
Should there be another line after the "AND"?
You said you had an invoice number; why can't you use that in your WHERE clause to limit what is returned from BSEG?
What field are you using for the invoice?
I had mentioned BKPF-XBLNR before, which we use to store the vendor invoice on a PO, but what you are doing sounds different.  Are you referring to an invoice that you created?
I think that this might be in BSEG-REBZG, and you should be able to filter on this field.
Shouldn't such an additional filter give you what you want?
e.g.
if the invoice specification is a single value:
* Getting the Vendor Invoice header data
  SELECT SINGLE * FROM bseg WHERE bukrs = z_ekko-bukrs AND
                                  belnr = bkpf-belnr AND
                                  hkont = '0000416000' AND
                                  rebzg = invoice
or, if the invoice specification is a range or list:
* Getting the Vendor Invoice header data
  SELECT SINGLE * FROM bseg WHERE bukrs = z_ekko-bukrs AND
                                  belnr = bkpf-belnr AND
                                  hkont = '0000416000' AND
                                  rebzg IN s_invoice
If you are not using rebzg, then do the same against whatever field you are using.
Good luck
Brian

Similar Messages

  • 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.

  • 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.

  • Link between purchase requisition and dms document number(cv02n)

    hai all,
    can u pls tell me how to get the dms document number(cv02n) for a given purchase requisition number?
    is there any table?
    Tnx & Regards

    try table DRAD with field DOKOB = EBAN. The number of PR is in field OBJKY.
    Teresa

  • 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

  • Link between invoice number and accounting document number

    Hi Frnds,
    When i receive a partial receipt (of an invoice) from a customer, i am getting the link between invoice number and accounting document number from a table (BSEG), but when i am receiving the final settlement amount from the customer, i m not getting the link between the inv. no. and accounting document number. Can anyone tell me how can i get the same?

    hi
    try these tcodes
    FBL5N
    FB02
    regards

  • Link between inv. number and accounting document number

    Hi Frnds,
    When i receive  a partial receipt (of an invoice) from a customer, i am getting the link between invoice number and accounting document number from a table (BSEG), but when i am receiving the final settlement amount from the customer, i m not getting the link between the inv. no. and accounting document number. Can anyone tell me how can i get the same?

    Hello,
    Try to prepare query based on tables BSIK, BSAK and BSEG. (Transaction code SQVI)
    Regards,
    Ravi

  • Link to find Accounting document number from Material document number / PO

    Hi
    We are working on a custom report, in which we need to print purchasing details (from EKPO, EKKO & EKBE) as well as accounting details (from BSEG & BKPF). We need to hit BKPF/BSEG with the accounting document number, since it is the only key field (though PO number is there in BKPF, we can not use this because it is not a key field)
    My question from which table we get the accounting document number ? We need to provide a link between purchasing & accounting through accounting document number, but how to find the accounting document number. ?
    Thanks
    Venkat.

    Venkat,
      I guess you are trying to fetch Accouting Documents for goods receipt against PO.
      To do this, you need to look at the PO History table (EKBE) and find out the Corresponding material document (VGABE = 1 for good receipt).
      Get the value of BELNR and GJAHR.
      Concatenate BELNR and GJAHR into your refernce key (like BKPF-AWKEY).
      Then use this key to read table BKPF with the following key
       AWTYP = 'MKPF' for Material document
       AWKEY = reference key generated above.
       AWSYS = the value of the logical system (if used) or blanks
    This will get you quicker access as compared to what you've described below. In this case, the system uses a standard SAP Index "Index by application type and key" to fetch the relevant records.
    Hope this helps.

  • Link between outbound delivery and matriel documents of good receip

    HI,
    in which table we can find the link between outbound delivery and matriel documents of good receipt.
    thanks

    Hi!,
    If you have posted a goods receipt for an outbound delivery, you should find in the header table MKPF for the material document the field MKPF-XBLNR completed with the outbound delivery number.
    Then, if the document flow for the delivery has been updated correctly, in the table VBFA for the delivery (VBFA-VBELV), you should find the material document under VBFA-VBELN.
    I hope this helps you!
    Best regards,
    Esther.

  • Relation accounting document number and clearing document number

    Hi everyone,
    What is the relation between accounting document number and clearing document number.

    For every accounting document when it is posted it should be available in BKPF Doc header table.. Once that document is closed or cleared..there is any entry made to BSAK for Vendors (Cleared Items) or BSAD for Customers (Cleared Items).
    Eg: When a invoice is generated for a PO it gets created and is still not cleared or is not closed , it makes an entry in BSIK. Once it is closed it is available in BSAK.
    Same is the case with Sales order..

  • Link between Business area and Material master

    Hi guys
    Is there a link between Busines area and material master, i am getting an error when I am trying to Move part of material stock from unrestricted stock to Project stock by 411/Q.
    Error
    Business area xx changed to yy
    Ideas?
    sam

    Hi
    Yes Business area has a link with MMR
    Business area determination is through by three rules
    1. Plant and item division
    2. Sales area( sales orgdistribution channeldivision )
    3. Sales org, distribution channel and item division
    Here item division means the division in MMR that is basic data 1 tab and sales org 1 tab
    This division field forms the main link between Business area and MMR
    Regards
    Raja

  • MM Document number and FI document number is a single table

    Dear Friends,
    Could you please let me know the table where both MM document number and FI document number will be available. I checked in BKPF and it is only updating FI document number and not MM document number and in MKPF it is only updating MM doc number and not FI document number.
    Also let me know if there is any report/tcode/program available to view this at one place itself.
    Regards,
    Dwarak.

    hi
    i dont think you can view both table in one screen.
    in T-CODE:SE16N you can see one by one table.
    Regards
    ramana

  • Link between Invoice verifycation number and Accounting Document number

    Dear All
                   I want the Link between invoice verifycation number (MIRO) an accounting document number the same MIRO. in which table the both two numbers avilable.
    How can identify. can any one tell me the table name for this
    Regards
    Kumar.

    Hi..
    What is the link or join condition for these two tables
    BKPF and RBKP. and RSEG and BSEG.
    In this i want to Accounting document number and invoice verifycation number in a single report.
    Regards
    Kumar

  • 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

Maybe you are looking for

  • Trouble connecting to Wireless Network with T40

    Hi, My girlfriend and I are on vacation and renting an apartment with wireless access and though she is able to connect with her much newer laptop I am having trouble. My laptop is an IBM T40 (2373), running Win2000 with the following wireless card C

  • How to get the Path of the WebDynpro page

    Hi All, Can any one say how to get the path of the JSPDynPage ina Portlet in Portal Application. Becoz i have to display that Page in another JSPDynPagee Thanks in Advance....

  • How do I delete a network

    I have two networks set up with time capsule, don't ask why I have set up two as I only need one, I made a mistake. I want to delete one of them as they both have very similar names. Also how do I rename a network? Thanks.

  • Spacing JButtons on Flow Layout....

    Hello, I am a Java student. The assignment was to create a calculator. I have just begun the layout portion (to me the hardest part).... I decided to go with Flow Layout due to its easiest nature to a beginner. Here is the code i have so far: import

  • Using Spotlight to search Trash

    Hi gang, I'm running 10.5.2 and Spotlight does NOT search my trash. Any ideas on how to fix this? I'm looking at files right here in my trash can, and when I type these filenames into Spotlight, they don't show up. Spotlight used to search the trash