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.

Similar Messages

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

  • Validation and Subtitution for accounting document (FB01) by EXIT method

    hi experts,
      i want to modify the bseg-vbund field while posting in FB01. for this i  need to insert my logic to find out the vbund value and i need to subtitute  the new value for  posting the document.
    for this requirement i wriiten my logic in exit U102 ( by copying the program RGGBS000 to ZRGGBS000  and assigned in ( GCX2 transaction ) and uncomment the code for form U102 )
      i created one (OBBH) substitution and selected the 'ONLY EXIT'  option then i saved .but the system througing error as ' EXIT U102 has the incorrect type' .if i remove the type reference in form it is saving but the field is reset to original value while saving and not taking my substitution.
      and i want to change the field BSEG-VBUND which is not in the substitution list is it possible?
       is this is correct or any other method is correct?
       i checked in BTE,user-exits and BADI  which is applicable for FB01 ,i am not getting any suiteable solution.
      please suggest me.

    (1) don't duplicate posts Fb01 - enhancement
    (2) Look at parameters when filling the EXITS table
      use a C_EXIT_PARAM_NONE parameter under Line Item node.
      Also use a TABLES BSEG declaration and directly udpate the BSEG-VBUND field.
      OR
      put your Step rule under the Complete Document node and update the value in
      a LOOP AT the received parameter.
    Regards

  • Relation between AUFK and EDISCDOC

    Anybody knows the table relation between AUFK and EDISCDOC?
    Please help!

    Hi
    Please be clear
    AUFK is a table
    but what is EDISCDOC ? table of field?

  • Accounting Document number from Purchasing Document Number

    Hi Gurus,
    My Requirement is that i have a Purchasing Document number (EBELN) and i need Accounting Document Number( BELNR_D)  so that i can get the Amount in Document Currency (WRBTR) for that document .

    Hi,
    Check table EKBE.

  • Link between AUFK and BKPF table

    Hi all,
    Can anyone tell me the link between AUFK and BKPF table.
    Thanks in advance
    Regards
    Neha Kapoor

    hi neha ,
    1.first u have to get MBLNR from AUFM for that order
    2.Next u have to call FM
    <b>AC_DOCUMENT_RECORD</b>
    I_AWTYP                         MKPF--->Constant
    I_AWREF                         4900003215--->MBLNR
    I_AWORG                         2004--->Year
    I_AWSYS
    I_AWTYP_INCL
    I_AWTYP_EXCL
    I_BUKRS
    I_VALUTYP                       0
    X_DIALOG                           X
    then u will get the Accounting Documents.
    regards
    prabhu

  • Database table/FM to find relation between plant and company code in SRM

    Hi,
    I have a requirement where I need to determine the relation between the plant and company code in SRM.
    The plant and company code both belong to R/3. We are replicating the plant by using the report BBP_LOCATIONS_GET_ALL.
    This plant is now available as a BP in SRM. But from which SRM table or using which SRM FM can I get the relation between this and the company code?
    Thanks,
    Srivatsan

    Hi
    <b>Check table BBP_LOCMAP. (Plants) -  Manage Table Business Partner   > System   > Location
    BBP_COMPCODE_FAV               User-Specific Favorites for Permitted Company code.</b>
    Hope this will help.
    Please reward suitable points, incase it suits your requirements.
    Regards
    - Atul

  • Relation between Eban and Erev tables

    Hi,
       What is the Relation between Eban and Erev tables?
    Thanks and Regards,
    Parvatha Reddy

    Hi,
    if you have activated version management for purchase requisitions (spro - mm - purchasing - version mgmt - set up ver mgmt for PR), then if any changes are made to the fields as specified in the customizing, then an entry is made in EREV table. EBAN is the pur. reqn table.
    Hope it answers your query.
    Regards,
    Vivek

  • Table that gives the relation between plant and company code

    Hi gurus,
    I actually have plant number and using this plant value i need to get the company code.
    Is there any table that gives the relation between plant and company code. So,that i can get the company code details.
    Thanks in advance.

    Hi Bhanuphani,
    Use  T001K  where BWKEY is the plant
    Reward if useful
    Thanks Arjun

  • How to get data from three tables (A,B,C) having one to many relation between A and B .and having one to many reation between b and c

    i have  three tables A,B,C.  there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables

    check if this helps:
    select * --you can always frame your column set
    from tableA a
    left join tableB b on a.aid=b.aid
    left join tableC c on c.bid=b.bid
    This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Relation Between RSEG and BSET Tables

    Hi ,
      I want to Calculate the the tax for MIRO document Line item wise, i am not able to get the relation between RSEG and BSET from where i can get the taxes. so, any one can help me to resolve this issue on priority.
    Regards,
    Venugopal.

    Hi, Mr. fantasy,
    I'm not too familar with MIGO - now working in non-logistics environment.
    Did you already try RSEG fields
    LFBNR     LFBNR     CHAR     10     0     Document No. of a Reference Document                                  
    LFGJA     LFGJA     NUMC     4     0     Fiscal Year of Current Period                                  
    LFPOS     LFPOS     NUMC     4     0     Item of a Reference Document     
    just an idea.
    Regards,
    Clemens

  • Relation between matnr and kunnr in master tables

    Hi Friends,
    could you please suggest me database tables where we can get relation between matnr and kunnr in master tables.
    Thanks,
    Sathish

    Hi Satish,
    MARA ---> General Material Data
    Best regards,
    raam

  • Relation between vbuk and vbup tables?

    relation between vbuk and vbup tables?
    regards phani

    Dear Phani,
    http://help.sap.com/saphelp_erp2005/helpdata/en/70/a7853478616434e10000009b38f83b/frameset.htm
    VBUK .... Sales Document: Header Status and Administrative Data
    VBUP ....Sales Document: Item Status
    VBUK contains header status where as VBUP contains individual item status of the header. Similar to VBAK and ABAP where VBAK contains Sales Document header data and VBAP contains Sales document item data.
    Hope this will help.
    Regards,
    Naveen.

  • 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

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

Maybe you are looking for

  • I don't have a TV ,How connect my apple TV to my macbook pro to watch the programs?

    Hi, I want to use  apple TV with macbook pro .do i have to buy any special connecting cable?BTW I don't have TV set. Thank you

  • HP Assistant not working after trying solutions in community

    HP Support assistant not connecting to internet.  Tried various solutions from the support site that included:  * running ms fixit program to uninstall * turned off firewall * reinstalled ...install latest version as of Dec14 ...  I have two of the s

  • How to do delta loading in BI?

    Hai.. I sheduled the one job in the LBWE transaction. I deleted the contents of setup table and again filled the same and checked the data source in RSA3 and found data there. Then I replicated the data source in BI 7.0. After this thing How to perfo

  • Where is link to download API?

    I am very new and have looked through this web site because in the book Head First Java, it says that you can download the API here (the one I need is for 1.4.2.) Although I found the page with the API and am excited, I need help to get to the link t

  • Column selection

    Hey ho! I have a JTable which has an x number of rows and columns. Each of the table's columns as a JComboBox as it's header, with multiple options. I need an option where the user can select all rows in the column when selecting a "select all" optio