Combinataion between VBRK AND LIPS

hi,
I have a requirement, where i have to combine two tables , which doesnt have any field in common. but i have to combine the tables
VBRK and LIPS.
from lips
i have to select matnr and lfimg.
from  vbrk, i have to take vkorg,vtweg, kunrg.
how can i take the materials from lips for the partiicular VKORG or KUNRG.?
the only possible link, i have got is linking vbuk with both the tables.since the vbuk-vbeln hold the vbeln of  both these tables.
i m not willing to use join also.
I prefer for all entries.
can some one help me out with the codes.

hi,
DATA:it_lips LIKE lips OCCURS 0 WITH HEADER LINE.
DATA:it_vbrp LIKE vbrp OCCURS 0 WITH HEADER LINE.
DATA:it_vbrk LIKE vbrk OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
  SELECT * FROM lips
  INTO TABLE it_lips
UP TO 1000 ROWS.
*where vbeln in s_vbeln and matnr in s_matnr.
  IF NOT it_lips[] IS INITIAL.
    SELECT * FROM vbrp INTO TABLE it_vbrp
    FOR ALL ENTRIES IN it_lips
    WHERE vgbel = it_lips-vbeln
    AND vgpos = it_lips-posnr
    AND   vgtyp = 'J'.
  ENDIF.
  IF NOT it_vbrp[] IS INITIAL.
    SELECT * FROM vbrk INTO TABLE it_vbrk
    FOR ALL ENTRIES IN it_vbrp
    WHERE vbeln = it_vbrp-vbeln.
  ENDIF.
  LOOP AT it_vbrk.
    WRITE: / it_vbrk-vbeln,it_vbrk-vkorg,it_vbrk-vtweg,it_vbrk-kunrg.
  ENDLOOP.
( If you are not getting entries into it_lips means you have to use conversion exit function module for vbeln in the tbale s_vbeln )
Regds
Sivaparvathi
Please dont forget to reward points if helpful..
Edited by: Siva Parvathi on Jan 10, 2008 8:50 AM

Similar Messages

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

  • Join between ekpo and lips

    Hi,
    this join is syntactically correct but because ekpo-ebelp is the type numc(5) and lips-vgpos is the type numc(6) it's not working.
    Example: ekpo-ebelp = 00010
                   lips-vgpos = 000010
    What should i do? Please someone help me.
    Thank you.
    SELECT SINGLE e~ebelp e~aedat e~matnr e~menge e~netpr  l~lfimg
        INTO CORRESPONDING FIELDS OF it_joindata
        FROM ekpo AS e LEFT JOIN lips AS l ON e~matnr = l~matnr AND
    e~ebeln = l~vgbel AND
    e~ebelp = l~vgpos AND
    l~vbeln = pa_vbeln
        WHERE e~ebeln = pa_ebeln AND e~idnlf = it_file-cod.
    Edited by: Dan M. on Nov 3, 2008 5:14 PM

    Hi Dan,
    You'll have to exclude the line item criteria from the join I'm afraid.
    I'd select both ebelp and vgpos into my internal table and then remove the unwanted ones after the select statement. You'll be able to use offsets to compare the two fields at this stage.
    Darren

  • Link Between VBRK and VBFA

    Dear Gurus,
                     Here I got some Requirement where I am getting all the Deliveries but the User wants only Invoiced Deliveries. For achieving the same what should I do?
    Suggest Me if I am analyzing correct r wrong.
    Get the INVOICE DETAILS from VBRK, for the corresponding Values get the PRECEDING DOC NO from VBFA Table with VBTYP_N = "m".
    Am I doing correct????
    Ur Inputs are Valued....

    Hi Harsha,
    As per your requirement and my as per my understanding you do not need the details from VBFA.
    As you are getting all the deliveries, check the status of the delivery in VBUK whether it has been invoiced.
    If Invoiced, then display the Delivery,
    For a better understanding you can view the delivery in VL03n Transaction and see the status of the delivery at the header level.
    You will need the VBFA details only if you need the corresponding Invoice for a delivery which I think is not part of your requirement.
    Thanks,
    Rohan

  • 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

  • Reg:VBFA linking VBRK and VBAK

    Hi All,
    I am fetching vbrk, vbrp data. Now, i need to fetch data from vbak and vbap. i have passed the vbeln from vbrk to vbfa-vbeln and finally passed the vbelv value to vbak to get data from it. Is it the correct way?
    Regards,
    Swathi

    Hi
    U can find the link between VBRK and VBAK without to use VBFA table, this improves the performance of the program:
    SELECT SINGLE * FROM VBRK WHERE VBELN = P_VBELN.
    WRITE: 'Nr. bill:', VBRK-VBELN.
    SELECT * FROM VBRP WHERE VBELN = VBRK-VBELN.
    WRITE: / 'Nr. item:', VBRP-POSNR,
                  'Sales Order:', VBRP-AUBEL,
                  'Sales Order Item:', VBRP-AUPOS.
    ENDSELECT.
    So you can read the link in VBRP table.
    If you want to read the VBFA
    VBFA-VBELN = VBRK-VBELN.
    VBFA-VBTYP_V = 'C'.
    In this way you should select all records linked to the order, u find the number in VBFA-VBELV.
    But you can also use fm RV_ORDER_FLOW_INFORMATION
    Max

  • Link between vbap and vbrk

    hi folks
    whatt's the link between vbap and vbrk table.
    gaurav

    Hi Gaurav
    VBAP is Sales document item detail table and VBRK is Billing header data table.
    VBRK is linked to VBRP by VBELN (i.e. VBAP-VBELN = VBRK-VBELN).
    VBRP is linked to LIPS(SD document: Delivery: Item data)by
    VBRP-VGBEL = LIPS-VBELN.
    VBRP-VGPOS = LIPS-POSNR.
    And LIPS is linked to VBAP by
    LIPS-VGBEL = VBAP-VBELN.
    LIPS-VGPOS =VBAP-POSNR.
    the flow of the SD tables is like after creation of the sales document the header details of the document is filled in VBAK.THe item details of the sales document is stored in VBAP.After creation of the delivery the delivery documnet number is updated in the LIPS table and than if the INVOICE for the particular delivery is done than the BILLING document is generated the details of which can be looked in VBRK.

  • Link between KONA and VBRK/VBRP and KONP and VBRK/VBRP

    Hi
    please suggest me the link between KONA and VBRK/VBRP and
    KONP and VBRK/VBRP
    I want to give link of rebate agreement and invoice no/Inv Qty
    My requirement is I want a report where i can see Under one Rebate agreement ,how many Commercial Invoice use
    e.g. Rebate Agreement no -125 ( for 10 Rs / unit)
    I have created 10 Invoice for 10 qty each so accrual Amount is 10* 10= 100
    I want such report where for agreement No 125- 10 Invoice No should be reflected.
    I don't want to go into VBO2 and go to verification level that concept i know
    i want one report where i will see all
    Regards
    Hemant

    Hi
    In my case i want commercial invoice no (billing type F2) but if i try to find link between KONA and VBRK for field KNUMA i can only see credit Memo No(Billing type-B3-rebate billing type) ,
    I want to display commericial invoice and not rebate credit memo
    Pls advice
    Regards
    Hemant Gaikwad

  • Link field between kna1 and vbrk

    Hi All,
    how to link KNA1 and VBRK ?
    i need to get customer number KUNNR using Billing document number VBELN.
    reply asap.
    Regards,
    Booma Ganesan.

    Hi,
    VBRK-KUNWE will have the KUNNR value. Otherwise take the VGBEL and VGPOS value from VBRK and use that in LIKP as VBELN = VGBEL, select the KUNNR number. Use that in KNA1.
    Reward if useful..
    Thanks,
    Muthu.

  • Report - quantity and value difference between delivery and invoice?

    Hello experts,
    My client use u201EProof of deliveryu201D t-code: VLPOD. There is always quantity and value difference between delivery and invoice.
    Do you know any report which will show this differences between delivery and invoice?
    Best regards,
    Maciej

    Hi,
    Note 867678 - Proof of delivery (POD), delivery and billing document will help you to understand POD flow.
    You have the tcode VLPODF/VLPODL/VLPODA, but perhaps they will not help you. So, as the before note suggests you, you can use the tables VBFA, LIKP, LIPS, VBRK, VBRP, TVPOD and TVPODG to do your own report.
    I hope this helps you
    Regard,
    Eduardo

  • Differentiating between open and closed invoices

    Hi all
           I am using a database view of tables VBRK and VRKPA  for fetching invoice list based on the customer number. Can I use  'VBRK-RFBSK = C' to differentiate between closed  and open invoices?  If not is there any other field i can use from this particular view for the same.
    Thanks

    Hi Asim,
    Yes, you are absolutely right. This field give you the exact result like which billing dcoument is open and which is closed.
    Regards,
    MT

  • Difference between billing and invoice?

    Hi all
    can anybody say Difference between billing and invoice?
    thanks

    Hi Ipsit,
    Invoice is document indicating to delivery goods and Billing is a receipt of payment
    Tables are VBRK & VBRP. For flow, go to transaction VF03, enter document number and hit 'Display Document Flow' button on toolbar
    VBRK and VBRP holds billing/invoice details..
    Billing Document:
    Generic term for invoices, credit memos, debit memos, pro forma invoices and cancellation documents.
    The tables are VBRK and VBRP.
    2) -- once u do PGI the delivery document will be created. There is no way to stop it.. The thing u can to do go to the list of created deliveries in VL09. Select the delivery doc which u created. There u have the option of reversing the goods or canceling it.
    Billing is generic term and u can say invoice is a type of billing document.
    After PGI only way left is to cancel it by Using TCODE MBST as this Tcode is used to cancel any material document.
    Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

  • Difference between billing and invoice?  How to stop PGI?

    can u please help me in these questions.
    Difference between billing and invoice?  How to stop PGI?

    Invoice is document indicating to delivery goods and Billing is a receipt of payment
    Tables are VBRK & VBRP. For flow, go to transaction VF03, enter document number and hit 'Display Document Flow' button on toolbar
    vbrk and vbrp holds billing/invoice details..
    Billing Document:
    Generic term for invoices, credit memos, debit memos, pro forma invoices and cancellation documents.
    The tables are VBRK and VBRP.
    2)-- once u do PGI the delivery document will be created . there is no way to stop it  .. the thing u can to do go to the list of created deliveries in VL09.. select the delivery doc which u created.there  u have the option of reversing the goods or canceling it.
    let me know if i am wrong...
    thanks,
    madhan
    Message was edited by:
            madhan n

  • Difference between P0000 and PA0000?

    Hello Everyone,
    I'm a fresher(chunnu munnu) in this SAP-ABAP world.
    I have started learing ABAP recently.
    I have a serious doubt. I'll be obliged if anyone spend some time to solve my doubt and help me to improve further.
    <u>Question :</u>
    What's the difference between P0000 and PA0000?
    What's the difference between table with an Header and without and Header?
    ( as in VBLK and VBRK and all..... and what's the fun in using a table with an header..) With Internal Table.
    Kindly explain with example.
    Thanks!
    Regards,
    Tejas.

    Hi
    P0000  HR Master Record: Infotype 0000 (Actions)
    PA0001 HR Master Record: Infotype 0001 (Org. Assignment)
    for second question
    http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm
    Regards
    Shiva

  • Link between VBRP and KONV

    hello,
        any idea for the link between VBRP and KONV tables ?
    I am fetching vbeln from vbak and based on that i am getting matnr and quantity details from vbrp now i want to get condition type and tax code details from konv.how to link it?
    regards
    Soniya.

    KONV (condition table) is linked to VBRK (Billing: Header data) by the following
    VBRK-KNUMV = KONV-KNUMV
    and VBRK (Billing: Header data) is linked to VBRP (Billing: Item data) by the following
    VBRK-VBELN = VBRP-VBELN
    I believe you can can fetch data from VBRP using for all entries.
    Then fetch the data from KNOV table using the above given link and then modify the required internal table to retrieve the required result.
    Hope it helps

Maybe you are looking for

  • Can´t download an app I bought.

    Hello, I bought an app called english prepositions, I already received the invoice but I can´t download or install it. It keeps send me the message no se ha podido descargar la aplicación. Where Can I ask for a refund of my money? thanks I bought oth

  • Regarding Message server port

    Dear Experts   1)How can i get Messageserver port and Messagege server host in development.     Plz send a code snippet.(Belonging to sap j2eeengine)

  • The PageDirective script does not define the findServerBehaviors function

    We run 2 servers at work and both have sites with legacy ASP. We just upgraded to DW CS3 and now I get this error message when I make a new ASP VBScript page: quote: The PageDirective script does not define the findServerBehaviors function Any ideas

  • How to customize video player progress bar?

    I want a video progress bar (maybe it is a slider ), which can be used to show the buffer progress of video, the standard slider control in Flex has not this function. How can I customize the silder control?

  • Macbook keyboard unresponsive after charging

    For some reason, after charging my macbook, the keyboard and mousepad become un responsive and the screen goes into sleep mode. When that happens, I am able to use the mousepad and keyboard again. Why does this happen? I am running OS X Yosemite on M