GRN for respective Accounting document number

Hi guru,
I need to show a report like bellow:
+Accounting doc number+         +GRN+
4900030516                      4900743137
Both document number and GRN is saved in same table MSEG.
can you please give me the relation, depending on that I can recognise 'GRN  4900743137' is created for
'doc number 4900030516'
with thanks
Moshior
Edited by: moshiur sohel on Oct 7, 2010 8:24 AM

hi,
1st to find accounting docs for GR find BKPF - BLART  = WE
read table field BKPF-AWKEY
suppose u found AWKEY = 49007431372010 
AWKEY =    GR number + GR year
for above example GR number is = 4900743137  and GR year = 2010
you can use reverse logic if want to go from accounting document to GR document .
hope this helps
regards
Avinash
Edited by: avinash goswami on Oct 7, 2010 12:11 PM

Similar Messages

  • For BSID- Accounting Document Number corresponding PO Number is required

    Hi Gurus,
                 I have got a requirement to develop a report similiar to 'FBL5N' . I am getting the details of open and cleared items of a customer from BSID and BSAD tables respectively. My requirement is also to fetch the corresponding PO number of the LINE items displayed in the report.
                Can any one suggest how can I fetch PO number with Accounting document number(BSID-BELNR)  or (BSAD-BELNR).
               Your efforts in this matter are deeply appreciated and <<removed_by_moderator>>.
    Thanking You,
    ZIa.
    Edited by: Vijay Babu Dudla on Jan 28, 2009 11:07 PM

    If you have fields BSID-VBEL2 and BSID-VPOS2 are populated with the sales order, than access VBKD with the Sales Order to get the Customer PO (VBKD-BSTKD)
    Or
    First, You need to get the Billing document. Access BKPF with the BSID-BELNR to get the AWKEY where AWTYP = 'VBRK'
    Now, you can go to SD document flow with the billing document to find out the Sales Document. Access VBKD with the Sales document to get the Customer PO
    Regards,
    Naimesh Patel

  • How to find Invoice number linked to FI accounting document number ??

    Hello All,
    I have been looking around for all possible combinations to find the link between FI accounting document number (BSEG-BELNR) and Intercompany Invoice number (for which billing corr. to STOs' or POs' is done).
    The requirement is that during ERS posting, we have accounting document numbers (BSEG-BELNR) and associated STOs' for this (BSEG-EBELN), but we are unable to map the Intercompany Billing Invoice number(s) (where the billing corr. to STOs' obtained from BSEG-EBELN) to this accounting document number (BSEG-BELNR).
    Any pointers or detailed view solution would be of great help.
    Thanks,
    Ansh

    Hello DPM,
    Thank you for the descriptive help. But my requirement is to look for Intercomapny Billing number (VBRK-VBELN) linked to an accounting document number (BSEG-BELNR) and not Invoice Receipt Number.
    The steps that I am following are:
    From BSEG, found EBELN (Stock Transfer Order) and XREF3 (Reference Key, combination of fiscal yr., some ref. number, maybe GR no. and ref item no.), based on BELNR (Accounting document number).
    From EKBE, found XBLNR (Reference Delivery Number or Direct Intercompany Billing Number on which GR is done) based on
    EKBE - EBELN = BSEG - EBELN
    EKBE - BELNR = BSEG - XREF3 (only ref and item no., considering it to be a GR no.)
    EKBE - VGABE = '1' and EKBE - BEWTP = 'E'.
    From VBRP, found VBELN (Intercompany Billing No., which is a desired number) based on
    VBRP - AUBEL = EKBE -EBELN (Stock Transfer Order)
    VBRP - VGBEL = EKBE - XBLNR (Delivery number)
    Here, I am not sure about 2 things:
    Whether the reference no in BSEG-XREF3 will always be Goods Receipt number for Stock Transfer Order or not. If not, then what it can be and how I will have to proceed further then.
    Secondly, If in case for an accounting document number, I have 2 Stock Transfer orders (BSEG - EBELN) and same reference number (BSEG-XREF3), then from History table (EKBE) I get only single delivery based on which GR was doen for both STOs', then I shall be getting single Intercompany Billing Invoice from VBRP or different ?
    Kindly provide your inputs.
    Thanks,
    Ansh

  • Table for Dispute case ID and accounting document number

    Hi,
    For a given dispute case ID (EXT_KEY) I am unable to find the corresponding accounting document number ( BELNR ) for this dispute case. I am able to see the accounting document for the dispute case on the transaction UDM_DISPUTE but then I am not finding the same in any tables. Can anyone let me know in which table can I find the relationship to determine this. Thanks in advance.
    Rgds,
    Sowmya

    Hi Sowmya,
    check the table UDMCASEATTR00.it contains all the details about disputemanagement
    please reward poitns if helpful

  • How to catch accounting Document Number in SE37 for  BAPI_ACC_DOCUMENT_POST

    HI Frds,
    My ReQ is i have to post Customer Invoice from Legacy to ECC through PI interface. So i am using one BAPI , ' BAPI_ACC_DOCUMENT_POST''. I had customized this BAPI by adding 2 fields (1.zstatus, 2.zsaprefno) as i have to send the status(1. Success/Fail, 2.Account Document Number) back to Legacy.
    For PI i have to give the BAPI structure. So when i am executing in SE37 zstatus field is catching the value as 'Success'. But the ZSAPREFNO is not catching the account document number. Bez we have to execute BAPI_TRANSACTION_COMMIT after this BAPI(in test sequence from Menu bar). So directly updating in Database tables.
    when i was excuting in SE38 the Accounting Document Number is returned in RETURN parameter of MESSAGE_V2 as we are checking the return parameter after BAPI_TRANSACTION_COMMIT.
    when i am trying in SE37 its not catching the value in MESSAGE_V2(catching as $).  After COMMITing we have no option to check the RETURN parameter.
    So, any idea how to get the Account Document Number  in SE37.......Or any other way to do..........
    Edited by: priya tavanam on Sep 3, 2010 7:02 AM

    Hi,
    if standard BAPI did not return the Acc. document number before BAPI_COMMIT then create wrapper FM
    1) call actual BAPI and BAPI_COMMIT with in that.
    2) retrun the account document back.
    otherwise you can try sync proxy as well.
    Regds,
    Suresh

  • Table relations between vbrk and bkpf for  Accounting Document Number

    hello,
    i am using 4 tables to get data into my programs.
    vbrk,vbrp konv and bkpf.
    i want to get belnr from bkpf.i found relation between vbrk and belnr.but in vbrk table belnr's value is initial.
    can anybody tell me that how should i relate vbrk and bkpf or how to get Accounting Document Number(belnr) from bkpf for Billing Document(vbeln).
    regards,
    soniya s.

    hi,
    chekc this. its working for me.
    data : WA_AWKEY LIKE BKPF-AWKEY.
    data :  WA_BELNR LIKE BKPF-BELNR.
    data : LENGTH TYPE I.
    *BREAK MTABAP.
    LENGTH = STRLEN( IT_VBRK-VBELN ).
    if  LENGTH = '10' .
    MOVE it_vbrk-VBELN TO WA_AWKEY.
    SELECT SINGLE BELNR FROM BKPF INTO WA_BELNR
      WHERE AWKEY = WA_AWKEY
      AND AWTYP = 'VBRK'
      and blart = 'RV'.
    it_final-acc_doc = WA_BELNR.
      CLEAR WA_BELNR .
      CLEAR WA_AWKEY .
    else.
    CONCATENATE '0' it_vbrk-vbeln INTO wa_awkey.
    SELECT SINGLE BELNR FROM BKPF INTO WA_BELNR
      WHERE AWKEY = WA_AWKEY
      AND AWTYP = 'VBRK'
      and blart = 'RV'.
    it_final-acc_doc = WA_BELNR .
      CLEAR WA_BELNR .
      CLEAR WA_AWKEY.
    endif.

  • Incremental records for accounting document number

    I am facing a problem where I need to get incremental upload. I have to get the Accounting document number posted for an asset. I was thinking of using ANLP-BELNR, forming the AWKEY from it, and then getting the BKPF-BELNR. This way I thought I would get incremental records, as BKPF has CPUDT and CPUTM. But my confusion is:
    1) is that date and time the time when the document was posted?
    2) this date and time differs from the date(CPUDT) and time(CPUTM) in ANEK table? Does that make any difference?
    3) Also I checked CDPOS, and for OBJECTCLAS = BELEG, adn TABNAME = BKPF, there is no entry with Changeid = 'I'. That means the new documnets posted are not being captured in CDPOS?
    Please tell me a way how can I get the incremental data?
    Thanks a lot,
    Nalini

    Here you go....
    RF_BELEG
    Regards,

  • Related Accounting Document Number for an SO

    Hi,
    How will I determine the Accounting Document number related to a Sales Order?
    I know the flow is in VBFA but, I can't seem to see the Accounting Document number in there be cleared/completed or not cleared.
    Is there a function module, bapi that I could use?
    Thanks,
    KLL

    Hi,
      If you to check whether the accounting document is cleared of not ..Check the field BSEG-AUGBL not initial..
      If the field BSEG-AUGBL is initial.
         accounting document not cleared.
      elseif the field BSEG-AUGBL not initial.
         accounting doucment is cleared.
      endif.
    Thanks,
    Naren

  • Report with Invoice and Accounting Document Number

    Dear Experts,
    Here i have a requirement.
    I wanna a report which gives a Invoice (MIRO) and its accounting documents (Follow on document) in one page. Because If I view a MIRO document, for checking the accounting document, I need to click on Follow on doc, then I'll get.
    But If wanna see for 1000 MIRO documents with accounting document number, then I don't want to click 1000 times to see the account doc for respective Invoice number.
    The approximate format is,
    Column 1                              Column 2     Column 3        .......................              Column n
    MIRO  (Invoice number)                             Accountting Doc Number
    5100000099                                              5100000011
    Which tcode will give the both in one screen?
    Thanks in advance
    Regards,
    navahsek

    Hi,
    Enter Sork Key 002 for Vendor Master Record.
    and also you can check the Report in ECC 6.0
    MIR5 - Display List of Invoice Documents
    There you select Export Mode --> Display Accounting Document Number.
    You can get Report FI and MM Document Numbers.
    Hope It will Clear.
    Regards,
    Kishore

  • Link between Material Document number & Accounting document number

    Hi All,
    For material document there is a corresponding accounting document number generated.However this is not the rule in all cases.
    Where is the link between the two(Material Document & Accounting Document) ?
    In other words i want to list those material documents only, for which accounting documents are generated.
    Regards
    Piyush Kothari

    STEP 1
    SAP query way to extract your information.
    Create an infoset SQ02 with a single table MKPF. (include key fields in the field group)
    Step 2
    From Extras
    Create an additional field called zawkey (like bkpf-belnr) which will concatenate the MM document number MKPF-MBLNR and MKPF_MJAHR. The sequencing shall be number 1.
    You may use this code below and paste also (this needs authorization as well)
    data: zzawkey like bkpf-awkey.
    clear: zawkey, zzawkey.
    concatenate mkpf-mblnr mkpf-mjahr into zzawkey.
    zawkey = zzawkey.
    Add another field called ACCDOCNO (accounting documnet number) with sequencing number 2 with following code.
    data: zaccdocno like bkpf-belnr..
    clear: zaccdocno, accdocno.
    select belnr from bkpf into zaccdocno where
      bukrs = ccode and
      GJAHR = MKPF-MJAHR and
      awkey = zawkey.
    endselect.
    accdocno = zaccdocno.
    Step 3
    Include the additional fields  into the field group.
    Step 4
    Click on the selection tab and create a parameter called ccode with a description Company Code and  against
    LIKE    BKPF-BUKRS 
    Extras  OBLIGATORY 
    Step 5
    Click on the selection tab and create a seelction criteria pdate with a description Posting Date for the field MKPF-BUDAT
    Extras  OBLIGATORY 
    Step 6
    Save, Generate and assign the infoset to a user group.
    Step 6
    Create a SQ01 query under the usergroup with all the fields in the infoset. and Execute. Enter a company code and one date of a working day where you expect material transactions.
    The result will be all the material documents and their corresponding accounting documents, if available. If you want to see only those material document that do not have corrsponding accounting documnet, then while you are in the selection screen say accounting document number is not equal to blank.

  • How to get an accounting document number from an Invoice number

    Dear All,
    I have a requirement where I need to know which accounting document is created against a  particular invoice. As we know that in the document flow of invoice we can see the Accounting document also. But to develop the report I need to pick the accounting document by the invoice document. Please suggest me a table where this value is getting stored. I already tried VBFA and VBKD but nowhere I am getting such information from which I can pick a accounting document number for a particular invoice.
    Please give me your suggestions.
    Regards,
    Sanju

    Dear,
    For Billing document create no. range by Tcode-VN01 and assign it to in Tcode-VOFA
    For Accounting document create no. range by Tcode-FBN1 and activate the External Field and assing it to in Tcode- OBA7
    but Assign the same no. range to both Document types for exp 1000000 to 1999999.
    Regards
    AJIT K SINGH
    HAPPY TO HELP U

  • Excise No. using  Accounting Document Number and the P.O. number

    Hi All ! In my GL report, I'm displaying the Accounting Document Number and the P.O. number.
    Now, the requirement is to display the excise no..
    Tried different tables in SE11 using J_1EXC for excise detials, but to no avail.
    And last which vendor to pick, Because vendors in P.O and BSEG differs.
    If I use the BSEG-BELNR I get a different vendor & If I use the P.O. no. in EKKO then also I get a different vendor.
    Please suggest.

    Hi,
    Actually the vendor in the accounting document and PO should match. If not look in table EKBE, It will have the accounting document or at least the invoice receipt against which accounting document would have been created. Check if the vendor number matches with the invoice receipt.
    Regarding the excise number I'm not sure what you mean, If you mean excise invoice number, you can look at the J_1IEXCDTL
    J_1IEXCHDR tables. You could check with FC on what basis the document is getting created to make out the relation ship. If it is vendor excise no etc. you can hit F1 help to find out the table etc.
    Hope it helps.
    Sujay

  • How to fetch accounting document number from known material document number

    Hi,
    Using MIGO transaction, by giving mblnr(material document number) as input, I get accounting document number by clicking FI document.I have to add this accounting document number in my report for corresponding known mblnr(material document number) values.
    My question is how to fetch the accounting document number present in MIGO to add in my report program.
    I used the xblnr(Reference Document Number) which is present both in mkpf and bkpf tables to fetch values.
    I extracted xblnr values with known mblnr values from mkpf (Header: Material Document table).
    and then extracted belnr(accounting document number) from bkpf (Accounting Document Header table) by using xblnr values.
    But the query is running for a long time.
    Is there any other method  to extract the values in a simpler way.
    Kindly advise.
    Thanks and Regards,
    Sanjeev

    I had the values of xblnr and some other fields such as mblnr, budat etc in wi_item table.
    I created a new internal table i_xblnr and got down those values.
    And then created a new internal table i_belnr and tried to get values of belnr in it.
    The code I wrote is given below:
    IF not wi_item[] is initial.
    loop at wi_item.
       at new xblnr.
        ws_xblnr-xblnr = wi_item-xblnr.
         append ws_xblnr to i_xblnr.
       endat.
    endloop.
      select belnr xblnr from bkpf into table i_belnr for all entries in i_xblnr where xblnr = i_xblnr-xblnr.
    ENDIF.
    Kindly look after it.Thank you.
    Regards,
    Sanjeev

  • Invoice & Accounting Document Number

    Dear Experts,
    We are facing number range problem. When we are saveing an invoice then Invoice number and accounting document number showing different. It should come same number. Can you pls advice why this is happening and how I can resolve this issue.
    Thanks in advance for your kind support.
    Best Regards.
    Ripon Kumar Paul

    Dear Ripon,
    Please check the below which will help you achieve same document number:
    SAP gives you customizing options to make both document numbers the same. The solution lies in the number range assignment of the MM and FI document. You need to configure the MM document number assignment as internal and external for the FI documents. (FI documents are set up with external-assigned numbering, while the MM document has internal, or system-generated, numbering.) In this case, the MM document number is passed on to the FI document, which means that the number of the FI document is identical to the MM document.
    Because the document number assignment in MM is not company code-specific, in contrast to the FI document, you need to take the following points into consideration before using external document number assignments for FI documents. They have the following effects on your system:
    Continuous number assignments for FI documents are not guaranteed, especially if you have more than one company code.
    The document number ranges in MM and FI have to be the same for all company codes.
    In Release 4.6C, you need to use internal number assignments for revaluation documents, invoice reduction documents, Evaluated Receipt Settlement (ERS) postings, or reversal documents. There are no restrictions as of SAP Enterprise 4.70.
    Use a different number range assignment for FI invoice posting (FB60), because FI invoice postings usually use internal number range assignments and the postings originate in FI, not MM.
    If you use document parking and the number range intervals are fiscal year-dependent, you cannot change the posting date of the document if the fiscal year is different to that determined for the previous posting date. In this case you have to delete the document and re-enter it. There are no restrictions for fiscal year-independent number ranges.
    What do you do if you have already posted thousands of invoices in your system and the numbers are already different? In this case, you need to find unused number range intervals in MM and FI. Since most companies do not change the SAP standard delivered number ranges during the original implementation, number range interval 52 is usually available in MM and FI.
    Now let's look at the detailed customizing steps. With the following customizing steps, you can align the MM and FI document numbers going forward only. No fix is available for invoices already posted in your system, since SAP does not allow the change of document numbers.
    Step 1. Maintain FI document number range. Use transaction OMR4 and go to Number range for document types in FI. Select the company code for which you want to create the new number range interval and click on the change interval button. Insert a new document number range by clicking on the insert interval button on top of the screen. In this example, I created number range interval 52 with the document numbers 5200000000 u2013 5299999999. Don't forget to set the external number range check box (Ext).
    Step 2. Assign FI number range to FI document types. The second step is to assign the number range created in step 1 to the FI document type for invoices. Again use transaction OMR4 and go to Document type. Double-click on the document type, which you are using for LIV invoices. In my example, I used the SAP standard document type RE. In the number range field, assign the new number range interval 52.
    Thanks!!!
    Murlidhar Khatri

  • Cancelled Accounting Document Number(belnr)

    Hello Experts,
    I m developing a report in which i have to capture accounting document number which has been generated against the cancelled A/c document number.
    Is any field populated when the a/c doc num has been canceeled so that we can make out that this particular a/c doc num is for this particular cancelled a/c doc number..
    Thanks in advance.
    Ravi

    Hello all,
    In my report i want to fetch accounting document number as per date(posting date) entered by user.
    If suppose posting of particular doc(200000001) has been done on date 22.10.2008 and it is reversed(200000002) on 29.10.2008 and if user enter date in selection criteria 22.10.2008 200000001 document number should occur and if user enter 29.10.2008 200000002 document number should occur.
    Ravi

Maybe you are looking for

  • 2nd display in iMac-style?

    Hi all, i would like to add a 2nd 20" display to my 20" Alu-iMac. Has anybody seen a display, which is very similar to the iMac-display? The same height of the stand, aluminium-design and so on, too? Do the ACD have the same height, so that you could

  • Errors in IDOC transfer method.....

    Hi I am loading customer data ( LIS , S001) by using transfer method as IDOC. now i got 4 error records. so how do we rectify in IDOC method. i can use PSA also, so that its very easy to rectify errors. But how do we rectify the error records in IDOC

  • Kb2920730 shows up in software center but server has no Sharepoint

    on one server the update kb2920730 shows up in software center as failed, but this specific server has nothing installed related to SharePoint server how can we get rid of this update? the customer forced the machine to scan online and then it did no

  • Question about classpath

    After I set the classpath, I can run the program with importing the packages from other folder. However, when I run the applet with importing the packages from other folder, the errors occur and state that the class file is not found in the directory

  • VCR2Mac USB VHS Converter ?

    I'm interested in purchasing a USB VHS Converter for a PowerBook 17" G4 Mac, both hardware and software. I was disappointed that Ion's EZ VHS Converter software is NOT Mac compatible!!! In short, I'm asking what USB VHS Converter PowerBook 17" G4 Mac