Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Link between Customer Purchase Order and Accounting Document Number

Former Member
0 Kudos
1,718

Hello all,

is there a table in SAP that contains the purchase order number of the customer and the Accounting Document Number (belnr)?

thanks in advance

Anne

12 REPLIES 12

former_member208856
Active Contributor
0 Kudos
581

Hi,

Check Table EKBE.

EBELN is Purchase Order Number

BELNR is Accounting Document Number.

Regards,

Sandeep Kaushik

0 Kudos
581

Thanks,

but EBELN, is this the purchase order number of the CUSTOMER? I don't think so?

Anne

0 Kudos
581

Hi Anne,

VBELN is Customer Purchase Order Number ?

If your field is VBELN, go into table VBRK, VBELN and BELNR are both there.

Sandeep Kaushik

0 Kudos
581

If you raise a sales order, the customer purchase order is VBAK-BSTNK. You should be able to use the sales document flow (VBFA) to get the accounting document.

Rob

Former Member
0 Kudos
581

Hi,

I think there is ambiguity in your statement.

PO of Customer? Is it a PO in your system or is it a Sales Order?

You have to check what that is in your system. Generally it should be Sale Order in which case use VBFA.

But in case you are checking it as a PO in your system the you need to use EKBE.

Hope this helps

Regards

Nishant

0 Kudos
581

Hello,

what I have is BSIS-BELNR and I need VBKD-BSTKD. Is there any connection?

I have tried over table VBRK, VBELN and BELNR, but VBRK-BELNR is empty is our system.

Any suggestions?

Thanks again,

Anne

0 Kudos
581

Yes - it's more work than just that. The first thing to do is to get AWTYP and AWKEY from BKPF using the information you have from BSIS. Do you have that yet?

Rob

0 Kudos
581

No I don't have that.

What can I do to use the information with these tow entries AWTYP and AWKEY from BKPF? I mean, is the BKPF-AWKEY the same as BSIS-BELNR?

Anne

Message was edited by:

Anne Jannasch

0 Kudos
581

Do this:

SELECT awtyp awkey
  FROM bkpf
  INTO CORRESPONDING FIELDS OF bkpf
  WHERE bukrs = bsis-bukrs
    AND belnr = bsis-belnr
    AND gjahr = bsis-gjahr.
ENDSELECT.

This should give you SD billing document information.

Rob

0 Kudos
581

Thanks Rob, but how can I get the Customer PO number, is it bkpf-awkey?

Anne

0 Kudos
581

No, but if awtyp = VBRK, then I think awkey contains the sales order.

Rob

Former Member
0 Kudos
581

Select entries from BSEG(BSEG-EBELN)

where belnr = BSIK/BSAK-BELNR.

*reward if helpful*