How to link vbak and vbrp tables

hi friends,
i want to display lips table values based on lips-vbeln = it_vbrp-vgbel
here i want a filed thru which i can link vbrp-<fieldname> to vbak/vbap-vbeln
so that i can get values into it_vbrp.
here is equation.
  it_vbrp =>   vbak-vbeln = vbrp-< ? >
  it_lips =>   vbrp-vgbel = lips-vbeln.
thanks in advance for your co operation
regards,
Anil kumar p

u can reach vbrp vbeln from vbrk vbeln
and to get vbrk vbeln from vbak vbeln
goto table VBFA
1.
GIVE VBFA-VBELV = VBAK-VBELN
and
VBFA-VBTYP_N = 'M'.   "INVOICE  IN CAPS
AND F8
THIS WILL GIVE U VBRK-VBELN .
NOW U CAN USE VBRK-VBELN TO FETCH VBRP
SIMILARLY
2.
IF U WANT TO PICK DELIVERY NUMBER FROM LIKP USING VBAK-VBELN.
SAME PPROCEDURE
PUT VBFA -VBELV = VBAK-VBELN
      VBFA-VBTYP_N = ' J'.   "IN CAPS 
WILL FETCH U LIKP-VBELN "DELIVERY
USE THIS TO GET LIPS ENTRIES
hope this helps
regards,
vijay

Similar Messages

  • How to link EKBE and MKPF tables

    HI all
    plz help me,
    how to link EKBE and MKPF tables
    thanks
    ramesh redddy

    HI,
    EKPO-EBELN =  EKKO-EBELN  has Purchase Documnet no.
    MSEG=MBLNR = MKPF-MBLNR  has material document no
    Link MSEG-EBELN =  EKPO-EBELN ( MSEG purchase prder no and EKPO purhcase document no.)
    and you should have to add one  more table MSEG which is provide three table.
    check this link
    EKPO-EBELN = EKKO-EBELN
    MSEG-EBELN =  EKPO-EBELN
    MSEG=MBLNR = MKPF-MBLNR
    regards,
    PK.

  • How to link T001 AND T001W Tables

    Hi Experts,
      I have t001-burks, how do i get t001w-werks, I need link between two tables.
    Thanks,
    mahe

    You can access T001K by BUKRS.  Take T001K-BWKEY and with it you can read T001W with T001W-BWKEY = T001K-BWKEY.  Then you can take T001W-WERKS.
    Note: With this method you can obtain more than one WERKS for one BUKRS.
    Hope it helps!
    Edited by: Gastón Jareño on Aug 6, 2010 1:32 PM

  • How to update the VBFA table without entries in VBRK and VBRP tables

    Hello,
    I have a requirement , where the sales order , delivery happens in one SAP system say X system and billing document wil happens in other sap system say Y.
    Now in this particular case , if the user want to know the billing document number in X system. what would be the solution.
    Is there any possibility to update the VBFA table with invoice number of Y system (without updating the VBRK and VBRP tables).
    User want to see the billing doc number from sales order in the form of document flow in X system
    Thanks in advance
    Pradeep

    Hii
    Without updating VBRK/VBRP table and updating VBFA is not possible, So you have to play with work arround to create one Z TABLE, so whenever system Y will create billing document with the reference of System X data you have to update Ztable with Invoice number created in System Y, The primary key will be in Z TABLE is Delivery document number to track one to one with billing doc.
    Thanks and Regards
    Shambhu Sarkar

  • How to link parent and child relation in Metapedia

    How to link parent and child relation in Metapedia

    Vamsi,
    Did you every determine how to do what you were asking about? Where you thinking of how to link a parent term to a child term (i.e. like a related term) or was this about linking a term to a different metadata object (e.g. table or report) ?

  • How can I copy and paste table cells from Pages into InDesign with minimum reformating?

    How can I copy and paste table cells from Pages into InDesign with minimum reformating?

    Do you mean you want to retain the formatting from Pages, or retain formatting already applied in ID?

  • Linking PO and AP tables

    Hi Gurus,
    Please help me in linking PO and AP tables for scenarios like to get the fully/ partially invoiced PO receipts.
    Thanks in advance
    Avinash

    Hi, you can link AP and PO tables in this way: please consider for the AP side table AP_INVOICE_DISTRIBUTIONS_ALL, where you will find all Invoices' distributions. In this table there is a field called PO_DISTRIBUTION_ID that is the right link to PO.
    Hope this helps
    Regards
    Riccardo

  • How to access RT and CRT tables

    Hi experts can any one guide me how to view RT and CRT Tables.
    How to access RT and CRT tables.
    Is there any Tcode existing to access these.
    Thanks in advance
    Regards
    vamsi.

    Hi Vamsi,
    1) You can use the function module : CU_READ_RGDIR
    In this function module you can pass PERNR and you can get SEQNR(Sequence No) or you can take the sequence no from any transparent table also.
    2)After getting the sequence NO Pass the employee NO and Sequence NO in the function module : PYXX_READ_PAYROLL_RESULT.
    From this function module you can get the RT,BTand CRT Table results.
    Thanks and Regards
    Partha

  • OBJNR is blank at VBAK and VBAP tables

    Dear collegues,
    There´s a strange situation on customer´s system. When end-user create a new quotation, the OBJNR field at VBAK and VBAP tables doesn´t fill itself, it remains blank. I believed that the field was filled when the document was saved. What´s wrong?
    Regards, Otávio.

    Hi,
    This might  be due to many reasons.Please check if there any dumps related to it in ST22/SM21.
    Also check if there any enough dialog/bckg work process to process the job.
    filling up takes more time depending on the no of records in the application tables.
    regards
    Nagaraju

  • "How to sum FKIMG in VBRK and VBRP Table with sample output

    Sir\Mam\Gurus ;
    I hardly found it difficult in resolving my program in getting the sum of FKIMG inside the VBRP and VBRK tables
    The scenario is that i have one Sales Order with multiple invoices . What i need to do is to sum up the fkimg or the quanitity of specific material regardless of how many invoices the material have in a particular SO
    Example I have Sales Order number 35678952 with
    3 invoices
    Invoice # 123 with material number mat1=12, mat2=5 , mat3=7
    345 with material number mat1=7, mat2=7
    678 with material number mat1=5, mat3=10
    Output shoud be
    salesorder# 35678952
    mat1 = 24
    mat2 = 12
    mat3 = 17
    Below is my Sample Codes:
    DATA : it_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
    ls_vbrp_details TYPE wa_vbrp_details,
    ls_vbrp_details1 TYPE wa_vbrp_details,
    lsfinal_vbrp_details TYPE wa_vbrp_details,
    it2_vbrp_details TYPE STANDARD TABLE OF wa2_vbrp_details,
    ls2_vbrp_details TYPE wa2_vbrp_details,
    it3_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
    itfinal1_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
    itfinal2_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
    itfinal3_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
    ls3_vbrp_details TYPE wa_vbrp_details,
    rtime1 TYPE i,
    rtime2 TYPE i,
    rtime3 TYPE i,
    s_erdate type d,
    scr_erdat type d,
    s_erdate = scr_erdat.
    CALL FUNCTION 'MONTH_PLUS_DETERMINE'
    EXPORTING
    months = 1 " Negative to subtract from old date, positive to add
    olddate = s_erdate
    IMPORTING
    newdate = new_date.
    """ This is another way manual adding by days
    CALL FUNCTION 'CALCULATE_DATE'
    EXPORTING
    days = +30
    start_date = s_erdate
    IMPORTING
    result_date = new_date.
    result_date = ddate.
    REFRESH: it_vbrp_details.
    SELECT
    vbrp~matnr
    vbrp~aubel
    vbrp~aupos
    vbrp~vbeln
    vbrp~kzwi1
    vbrp~kzwi2
    vbrp~kzwi3
    vbrp~kzwi4
    vbrp~kzwi5
    vbrp~kzwi6
    vbrp~mvgr1
    vbrp~mvgr2
    vbrp~mvgr3
    vbrp~mvgr4
    vbrp~mvgr5
    vbrp~knuma_pi
    vbrp~knuma_ag
    vbrp~mwsbp
    vbrp~vkaus
    vbrp~fkimg
    vbrk~vbeln
    vbrk~fkart
    vbrk~belnr
    vbrk~xblnr
    vbrk~vbtyp
    vbrk~kunag
    vbrk~fksto
    vbap~posnr
    INTO TABLE it_vbrp_details
    FROM vbrp INNER JOIN vbrk ON vbrkvbeln EQ vbrpvbeln
    where vbeln eq gt_data-vbeln
    where vbrpaubel eq vbapvbeln
    WHERE vbrp~posnr GE ''
    AND vbrk~vbtyp EQ 'M'
    AND vbrk~fksto NE 'X'
    AND ( vbrperdat GE s_erdate OR vbrperdat LE new_date OR vbrp~erdat IN s_erdat ) " + JP 09 19 2011 Additional Optimization
    ORDER BY aubel aupos .
    ORDER BY aubel aupos matnr.
    """" This where i need your help Sir\Mam\Gurus
    it3_vbrp_details = it_vbrp_details.
    SORT it3_vbrp_details BY aubel matnr fkimg kzwi1 kzwi2 kzwi3 kzwi4 kzwi5 kzwi6 aupos vbeln
    mvgr1 mvgr2 mvgr3 mvgr4 mvgr5 knuma_pi knuma_ag mwsbp vkaus fkart belnr vbtyp kunag fksto.
    LOOP AT it3_vbrp_details INTO ls_vbrp_details.
    COLLECT ls_vbrp_details INTO itfinal1_vbrp_details.
    APPEND ls_vbrp_details TO it_vbrp_details.
    ENDLOOP.
    kzwi1,kzwi2,kzwi3 is also been sum up
    Sir the output is something like this
    Sales Ord# Material Qty KWIZ1 KWIZ2 KWIZ3 MGVR1 VBELN
    1234       Mat1     24  23.2  22    12           LastInvoice#
    1234       Mat2     12  20.0  21    15           LastInvoice#  
    1234       Mat3     37  22.0  22    16           LastInvoice#
    5432       Mat1     30  25.0  23    15           LastInvoice#
    5432       Mat2     24  22.0  24    23           LastInvoice#
    5432       Mat3     20  18.0  20    12           LastInvoice#
    Hope you can help me as i cant hardy sleep thinking of this ...
    I will really appreciate your great help..
    Thanks !
    I will really appreciate your great help..
    Thanks !
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Sep 20, 2011 3:05 PM

    Hi,
      How you want to display the output?..
    If you want to display the output as mentioned below, then you have to use nested loop & dynamic field assignments to get result.
    Output column
    sales order     Mat1 Mat2 Mat3 ......
    1234               24    12     37
    Kindly let me know, if you have any questions
    Regards,
    S.Senthilkumar

  • SAP Query error for VBAK and KONV tables

    Dear Experts,
    Want to create SAP Query for below requirement but faced some error
    Step1) Extract the data from VBAK table w.r.t.  order type ,  Sale org and date range
    and collected the Sales order numbers and doc. condition record (KNUMV)
    Step 2)In table KONV (Transactional condition record data) in this table provided input as doc. condition record (KNUMV) with respect to condition type ABCD
    Manually i extracted data, there is no problem .
    But customer want to generate SAP Query for above requirement
    I tried to create but in t.code  SQ02 when i tried to join the table VBAK and KONV i faced the below error
    Table KONV cannot be used in a join.
    How  can I create SAP query for above requirement ???
    if its not possible then create Z report is the only solution ??????
    Thanks in advance

    Hello
    You can not create Query report with joining KONV. But there is one solution for your problem. You can create Query report by using Database VAV. In this logical database you will find all SD tables and also KONV. Use only those tables and fields which you want in your query report. I have checked this and its working
    Please try this and update the forum accordingly.
    Edited by: moazzamjii on Jun 30, 2011 12:13 PM

  • How to filter parent and child tables data in impdp?

    Hi Friends,
    i hope everyone doing good..
    I have two tables in my schema like below.
    STUDENT_DTLS:-
    SID Sname CID
    1     venkat     001
    2     uppy     002
    3     deepu     003
    4     trinath     003
    5     naveen     004
    6     ramesh     005
    COURSE_DTLS:-
    CID CNAME Fee
    001     Oracle     2000
    002     java     6000
    003     sieble     4000
    004     informatica     3000
    005     obiee 4000
    if I load only few Student details say sid=1,2,3 into another environment using impdp,corresponding to those students course details from COURSE_DTLS table only need to be loaded.Not all course details.
    Iam Expecting Result in new schema as below:-
    SID Sname CID
    1     venkat     001
    2     uppy     002
    3     deepu     003
    CID CNAME Fee
    001     Oracle     2000
    002     java     6000
    003     sieble     4000
    But when i am using the below import scrit,The COURSE_DTLS is loading first and its query option(select cid from STUDENT_DTLS) is returning no rows.Because at that time no data is insertred into STUDENT_DTLS yet.
    secondly it is importing data into STUDENT_DTLS with query option where sid=in (1,2,3) which is loaded propelry.
    Thirdly it is trying to enable primary key and Foreign key constraints which is also failing because of no data in COURSE_DTLS table.
    i have changed the order of tables in TABLES clause like tables=COURSE_DTLS ,STUDENT_DTLS.But still COURSE_DTLS table is loading first.
    impdp pa_data_sub/******* NETWORK_LINK=qdssih30 tables=STUDENT_DTLS,COURSE_DTLS query='STUDENT_DTLS:"where SID IN(1,2,3)"','COURSE_DTLS:"where cid in(select cid from STUDENT_DTLS)"', CONTENT=all table_exists_action=replace directory=DATA_PUMP_DIR logfile=exp_join.log
    output:
    Total estimation using BLOCKS method: 128 KB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    . . imported "PA_DATA_SUB"."COURSE_DTLS" 0 rows
    . . imported "PA_DATA_SUB"."STUDENT_DTLS" 3 rows
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    ORA-39083: Object type REF_CONSTRAINT failed to create with error:
    ORA-02298: cannot validate (PA_DATA_SUB.SYS_C0040905) - parent keys not found
    Failing sql is:
    ALTER TABLE "PA_DATA_SUB"."STUDENT_DTLS" ADD FOREIGN KEY ("CID") REFERENCES "PA_DATA_SUB"."COURSE_DTLS" ("CID") ENABLE
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    Job "PA_DATA_SUB"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 17:28:13
    Please suggest me how to achieve this task in a single import command?
    Is there any option in impdp to prioritize the table to be loaded first?
    Thanks,
    Venkat Vadlamudi

    You can't be guaranteed which order the data will be loaded in, so using a query that examines a table that is being imported is not going to always work the way you want it. The failing constraints makes sense because there is no data.
    So, in your case, course_dtls gets imported first and the table student-dtls exists, but it not populated yet, so the select cid from student_dtls comes back with 0 rows. The second query works fine.
    You might be able to change the query to be:
    'COURSE_DTLS:"where cid in(select cid from STUDENT_DTLS@qdssih30 where SID IN(1,2,3)"'
    This way, you query the source table pointed to by the network link and you use the same subquery from the first table.
    This should work for you... I think anyway.
    Dean

  • How to identify fact and dimension tables

    Hi ,
    We are having the list of parent child relation info for each database tables. Based upon the parent child tables ,needs to identify which table is fact ,which table is dimension .Could you please help me how to identify the fact table and dimensions tables ?
    Thanks in advance

    Hi,
    Refer this link........
    http://www.oraclebidwh.com/2007/12/fact-dimension-tables-in-obiee/
    Please mark if it helps you.......

  • Link VBAK AND LIPS

    Hi Experts,
    IS there any link between VBAK and LIPS (VBELN AND VGBEL). Data is flow from header level VBAK to Item level LIPS is correct or Item level to item level.
    Regards
    Rahul

    Dear Rahul1234 ,
    You can use the VBAK- VBELN or VBAP-VBELN
    Put the same in VBFA as preceding document and fetch subsequent document where subsequent document category is J(delivery)
    Now input that list in LIPS to get the required field.
    This will work. If your ABAPer is telling that the logic is not correct, then you may demonstrate the same using a query (table join VBAK-VBFA-LIPS)
    Thanks & Regards,
    Hegal K Charles

  • Vbrk and Vbrp tables performance problem

    Hi all,
    The below query is taking lot of time in QAS i need to decrease the time without affecting the logic.....
      SELECT vbrk~kunag
           vbkd~bstkd
           vbkd~bstdk
           INTO TABLE c_tab_po FROM vbrp
           INNER JOIN vbrk ON vbrkmandt = vbrpmandt AND vbrk~vbeln =
           vbrp~vbeln
           INNER JOIN vbkd ON vbkdmandt = vbrpmandt AND vbkd~vbeln =
           vbrp~aubel
                              AND vbkd~posnr = con_zposnr
           WHERE vbrp~vbeln EQ nast-objky.
      DELETE ADJACENT DUPLICATES FROM c_tab_po COMPARING ALL FIELDS.
    *Getting the other Invoices based on the customer PO number
      IF c_tab_po[] IS NOT INITIAL.
        SELECT
        vbrk~kunag
        vbkd~bstkd
        vbkd~bstdk
        vbkdposex_e vbrkvkorg
        vbrpvbeln vbrpposnr vbrp~erdat
               vbpakunnr vbrpaubel vbrpaupos vbakerdat
               vbrpmatnr vbrkmwsbk vbrp~netwr
               vbrkvaldt vbrkzterm vbrk~vbtyp
                INTO TABLE g_tab_invoice FROM vbrp
                INNER JOIN vbrk ON vbrkmandt = vbrpmandt AND vbrk~vbeln =
                vbrp~vbeln
                INNER JOIN vbkd ON vbkdmandt = vbrpmandt AND vbkd~vbeln =
                vbrp~aubel
                               AND vbkd~posnr = con_zposnr
                INNER JOIN vbpa ON vbpamandt = vbrpmandt AND vbpa~vbeln =
                vbrp~aubel
                               AND vbpaposnr = con_zposnr AND vbpaparvw =
                               con_parvw
                INNER JOIN vbak ON vbakmandt = vbakmandt AND vbak~vbeln =
                vbrp~aubel
                FOR ALL entries IN c_tab_po
                    WHERE vbrk~kunag EQ c_tab_po-kunag AND
                    vbkd~bstkd EQ c_tab_po-bstkd AND
                    vbkd~bstdk EQ c_tab_po-bstdk.
      ENDIF.

    Hi Younus,
    First join seems to be oku2026
    But you are querying Db tables multiple times to avoid this.
    Fetch the fields
    vbkdposex_e vbrkvkorg
    vbrpvbeln vbrpposnr vbrp~erdat
    vbrpaubel vbrpaupos
    vbrpmatnr vbrkmwsbk vbrp~netwr
    vbrkvaldt vbrkzterm vbrk~vbtyp
    in the first join itself.
    SELECT vbrk~kunag
    vbkd~bstkd
    vbkd~bstdk
    vbkd~posex_e vbrk~vkorg
    vbrp~vbeln vbrp~posnr vbrp~erdat
    vbrp~aubel vbrp~aupos
    vbrp~matnr vbrk~mwsbk vbrp~netwr
    vbrk~valdt vbrk~zterm vbrk~vbtyp
    INTO TABLE c_tab_po FROM vbrp
    INNER JOIN vbrk ON vbrk~mandt = vbrp~mandt AND vbrk~vbeln =
    vbrp~vbeln
    INNER JOIN vbkd ON vbkd~mandt = vbrp~mandt AND vbkd~vbeln =
    vbrp~aubel
    AND vbkd~posnr = con_zposnr
    WHERE vbrp~vbeln EQ nast-objky.
    then Just join VBPA & VBAK and get required data.
    Thanks,
    Sudha

Maybe you are looking for