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.

Similar Messages

  • How can I get Notification Number from Material Document?

    Can you please tell me that how can I get Notificatin Number(QMEL-QMNUM) from Material Document(MSEG-BELNR)?
    Regards,
    Subhasish

    This question is closed but unanswered.

  • I want Inbound Delivery number from Material document

    Hi,
    I wish to know where is the Inbound Delivery number (which SAP table) stored when we do a MIGO_GR against an Inbound Delivery ? I want to fetch the Inbound Delivery number from the Material document number.
    I observe, when we do a MIGO_GR against an Inbound Delivery; the original PO number (against which the Inbound Delivery was created) is stored in MSEG_EBELN. However, there is no trace of the Inbound Delivery number...neither in MKPF, nor in MSEG.
    Since a PO number- line item can have multiple Inbound Deliveries associated with it, having a PO number in MSEG is of no use to me.
    Please help.
    Thanks,
    Pranav

    Dear Pranav,
    I think you should check again, in MSEG, there's also PO -item with field name : MSEG-EBELP. So from PO and PO item , you can get all the Inbound delivery number.
    Regards,
    w1n

  • BAPI to get inbound delivery from material serial number

    BAPI to get inbound delivery number from material serial number?
    input---material serial number.
    output--inbound delivery number.

    Perhaps instead of using a BAPI you can code it like this.
    DATA:serial(10) TYPE n VALUE '0000340078',
    pos TYPE i VALUE 1.
    START-OF-SELECTION.
      WHILE pos <= 10 AND serial+pos(1) = 0.
        pos = pos + 1.
      ENDWHILE.
      REPLACE ALL OCCURRENCES OF '0' IN serial(pos) WITH space.
      WRITE serial.

  • How to get Accounting document number from billing document number

    Hi,
    How to get Accounting document number from billing document number i.e. from VBAK- VBELN.
    Cheta Pant

    Hi,
    VBAK is the Sale Order header table, Billing document table is VBRK.
    Sales tables (VBAK,VBAP,VBRP,VBRK) do not store accounting document numbers.
    You do other way around. Just go to SE16 and enter the Billing document number in field Billing document VBELN in BSEG or BSID or BSAD table and execute, you will find the accounting document number.
    If you just want collect this information once then you can use table BSEG, but if you think to develope a report then use table BSID and BSAD.
    Regards,
    Chintan Joshi

  • Challan material is different  from material document

    Dear All,
       When i going to reconciliation of subcontracting challan on t-code J1IFQ
    *material document -MIGO  Number(which was created at the time of MIGO)*
    *Year-2009*
    when i feel the detail like
    year            challan no             Item
    2009           00000001
    it also show a warning message *material document MIGO  Number(which was created at the time of MIGO) 2009 is allocated a challan during GR**
    im getting a error message
    challan material is different  from material document
    Pls Guide me
    Thanks
      Amin
    Edited by: sekh amin on Jul 9, 2009 8:16 AM

    M also facing the same problem and getting the same error message.
    "Chalan material is different from material document"
    But when I checked material and challan, everything was OK.
    Can anyone guide me to solve the issue.
    Regards
    Edited by: sapsarang on Jul 13, 2009 8:14 AM

  • Challan Material is Different from Material Document Message No. : 8I 572..

    Dear All,
    Good afternoon. In my company, after version upgrade from ECC5.0 to ECC6.0, facing one peculiar issue i.e in MIGO for subcontract order : When I enter challan number for reference in pop-up, We are getting the below error
    "Challan Material is Different from Material Document Message No. : 8I 572..."
    Creation of preliminary activites before migo in one user login and if i try migo for the same in same login, no errors reported. but if I do the MIGO from different user login, i have noticed with above error and vice versa.
    For this as a abaper, if I debug for trouble shooting from MIGO, no error noticed from any logins for the same activity.
    Kindly help us.
    Arunachalam S

    Dear Hema,
    Thanks for your reply.
    As you mentioned, every thing has been checked and found okey.
    The observation is with same authorization, User A can able to inward the sub-contracting material but User B coud'nt do so and noticed error of  "Challan Material is Different from Material Document Message No. : 8I 572.."
    Even thought,the input information for the both logins are same.
    have a nice day.
    Arunachalam S

  • How to find the message_ID/Reference_ID from a IDOC number

    hi
    can some one tell me how to find the message_ID/Reference_ID from a IDOC number
    regards
    Buddhike

    hi,
    check the t.code IDX5 .
    also check the below link for reference
    Monitoring the IDOC Adapter in XI/PI using IDX5                         
    Monitoring the IDOC Adapter in XI/PI using IDX5                         
    regards
    kummari
    Edited by: kummari on Jul 28, 2008 9:20 AM

  • Serial Number for material document number

    Hi All,
    Can any body tel me where Serial number stores for particular Material Document number.
    When user creation/posting MB11 he will enter serial numbers for material in material document.
    I already searched the forum. Unluckily i didn't received any related information.
    Thanks in Advance.
    NK

    I Tried looking standard table which contain Material number, Serial number, Equipment and Material Document but there isn't any.
    So I went into SQVI and join two tables, MSEG and OBJK. There I manually draged the MATNR from MSEG Table to OBJK and then selected the fields like Materials Number, Plant, Material Document, Mov Type etc and from other table I selected Material Number plus Serial Number, Equipment (chose your required filters) and then executed and it shows the required records correctly.
    Only issue it had was that if you try thousands of records e.g. Materials it went though and brought resukts and some time it dumped.  But it fulfilled my needs successfully.

  • BAPI to create Transfer order(WMS) from Material document

    Dears,
           We have activited WMS and we have not found any BAPI to generate TO in WMS from Material document to post GR to a specific bin. Is there any BAPI available for particular operation?
    Can anyone tell me about name of BAPI?
    Regards,
            FR

    Try with Function Module  L_TO_CREATE_TR
    also try
    Use this function module to create TO (transaction LT01) L_TO_CREATE_SINGLE
    CALL FUNCTION 'L_TO_CREATE_SINGLE'
    EXPORTING
    i_lgnum = ti_lqua-lgnum
    i_bwlvs = l_bwlvs
    i_matnr = zwwmugeori-matnr
    i_werks = ti_lqua-werks
    i_lgort = ti_lqua-lgort
    i_bestq = l_bestq
    i_letyp = l_letyp
    i_anfme = l_anfme
    i_altme = l_altme
    i_vlpla = l_vlpla
    i_vlenr = l_vlenr
    i_nlpla = l_nlpla
    i_nlenr = l_nlenr
    i_commit_work = space
    IMPORTING
    e_tanum = l_tanum.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 13, 2008 11:33 AM

  • 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

  • Find equipment number from the asset number

    hi,
    where i can find ( I NEED TABLE name ) Equipment number,
    its in transaction as03 ->allocations -> right to field Equipment number
    i press f1 and found it's a structure  ra02s
    where i can find it (which table)?
    i know equi is the master data table of equipment but i need to find equipment number from the asset number
    Regards
    Edited by: liu shaochang on Jan 21, 2010 3:31 AM

    Hi
    Please use view M_EQUIA . Hope this will serve your purpose.
    Regards
    Gaurav

  • Field Customs reference number in material document

    Hi Friends,
    While doing GR am geting document number and can see that in MB03. Now in MKPF table there is field called Customs reference number( field name # GTS_CUSREF_NO) , and after putting material document number in MKPF am getting all the detail including Customs reference number.
    Now my question is where can I see the detail of Customs Reference number in material document in t code (MB03).
    Any pointers
    Regards

    No reply at all.
    Rgds

  • Challan material is different from material document----Message no. 8I572

    Hi,
    I am getting the following error in subcontracting process when reconciling through J1IFQ.
    Challan material is different from material document----Message no. 8I572
    After P.O. creation and issued the materials through 541 and created a subcontract challan 57f4 and G.R has been done when reconciling through J1IFQ i am getting the above mentioned error.
    Thanks,
    Kiran Bodla

    Hi,
    In spro --> taxon goods movemnt > indiac> business transaction --> subcontrcating --> maintain movement type grp
    here miantain
    0002     101
    0002     542
    0002     543     O
    Hope help U !
    Regards,
    Pardeep Malik

  • Create TO from material document automatically

    Hi Experts,
    I'd like to ask for a solution about Create TO from material document automatically.
    Business Scenario:
    Normally, user will create TO from material document by LT06, then confirm it by LT12. If there is no stock on the shelf at the time when user confirms it, user will put quantity zero when confirmation by LT12, then user will create a new TO according to same material document.
    Requirement:
    According to scenario above, if there is no stock on the shelf, user wants to create a TO from material document automatically when he confirms the first TO.
    here I'd like to ask if there is any solution on it?
    We tried to use user exit: EXIT_SAPLL03T_002, and call transaction in it.
    but result is: first TO is not confirmed with zero quantity yet, so new TO can not be created.
    Please tell if there is any other solution, many thanks.
    Best Regards,
    H.B

    Hi
    To my understanding at the first time when TO is created for the material document and stock is not available using the available user exit in TO confirmation u can forcibly confirm the TO but for the second time TO creation and confirmation there wont be any trigger point( as bcz we have config to create TO immediately ony when mat doc is created) so for that u need to schedule a job for creation and confirm of TO's for the open mat documents.
    Regards
    Amarnatha

Maybe you are looking for

  • Error while sending mail from SAP system

    Hi all, I configured SAP connect  in ecc6.0 ehp7 while sending mail using tx sost i am error Message cannot be transferred to node SMTP due to connection error (final) , below is the icm log. ERROR => IcmPlAllocBuf: MpiGetOutbuf failed (rc = 14(MPI_E

  • Robohelp 9: Resizing the search result columns

    We haven't found a way to do this yet, but does anyone know what variable/where I would need to make an edit to change the column spacing for the Topic Title and Search Rank results in a project generated with WebHelp?  The Rank column is given for m

  • How to made a login to be saved on database

    I'm new in JSP. And I really need a help with this one. Suppose i made a login ( include password and name ) in JSP 1. how to made a database that save the name and password with JSP? 2. how can I save the login ( Pass and name ) in the database so I

  • Transport planning Book to Q

    Hi Gurus,          I wanted to know how we transport all the planning area and planning book from Development system to Quality system? Do we need to rebuild all of them in quantity or anyother way? Thanks for your answers and please let me know Rega

  • Illustrator cc 2014 running slow, how can I make it quicker?

    illustrator cc 2014 running slow, how can I make it quicker? file size is only 45.7 meg, I've newly installed a 512 gig solid state drive and 8 meg of ram into a mid 2009 Macbook pro. Surely it can go quicker than this.... help please.