Skip to Content
avatar image
Former Member

link between VBRK & VBAK

HI

I want to retrieve invoice details of particular sales document number. But there is no relationship between these two tables. But there is relationship between VBRP & VBAK. But if iam linking these two then line item also displaying. But i dont want any line item. how can i get the billing details based on sales document number

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • May 21, 2008 at 05:34 AM

    hi,

    check the tables RBKP and RSEG.u can find invoice details.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 21, 2008 at 05:36 AM

    Hi,

    VBRK-XBLNR eq VBAP-VBELN

    vbrp and vbap for the positions.

    Regards

    Nicole

    Add comment
    10|10000 characters needed characters exceeded

  • May 21, 2008 at 05:37 AM

    Dear Hima,

    For this purpose use VBFA table and field is VBELV and VBELN.now you can join with these field to vbak and abrk.

    Amit.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 21, 2008 at 05:39 AM

    Hi,

    Vbeln is the only relation for vbak and vbrp

    there is a relation between vbap and mara bu suing matnr

    and there is a realtion between mara and rseg using matnr

    and there is relation between rbkp and rseg using belnr and gjahr.

    By using these detils you can fetch the invoice details.

    I think it is helpful for you.

    Reward if useful.

    Thanks and regards

    Deepika

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 21, 2008 at 05:40 AM

    Hi,

    Try ds way:

    VBRK-VBELN = VBRP-VBELN

    VBRP-AUBEL = VBAP-VBELN

    Regards,

    Mehul Shah

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 21, 2008 at 05:40 AM

    Hi Hima,

    See below , u may get idea.

    Invoice to Sales order Link

    (VBRP-AUBEL = VBAP-VBELN, VBRP-AUPOS = VBAP-POSNR).

    Invoice to Delivery Link

    (VBRP-VGBEL = LIPS-VBELN, VBRP-VBPOS = LIPS-POSNR)

    First you should link with item tables and get required header data of VBRK.

    Regards,

    Vishvesh

    if helpful, rewards it.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      I have written join condition for getting the invoice details of a particular sales document number

      SELECT VBRP~AUBEL

      VBRK~VBELN

      VBRK~FKDAT

      VBRK~NETWR

      VBRK~WAERK

      VBAK~BSTNK

      VBAK~BSTDK

      INTO TABLE IT_VBRP

      FROM ( VBRK INNER JOIN VBRP

      on VBRKVBELN = VBRPVBELN )

      INNER JOIN VBAK

      ON VBRPAUBEL = VBAKVBELN.

      but here what is happening is im getting the line item also. how to avoid that.

  • avatar image
    Former Member
    May 21, 2008 at 05:48 AM

    Hi,

    One to One link beween bill no and sale order is not available

    vbrp-aubel and vbak-vbeln can be linked

    sort and delete adjacent duplicates comparing vbak-vbeln..,

    if u want sales order header wise data.

    Regards,

    Mukundan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 21, 2008 at 05:50 AM

    Hello,

    Check the following fields.

    VBRP-AUBEL = VBAP-VBELN.

    Regards

    Add comment
    10|10000 characters needed characters exceeded