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: 

billing date for a purchase order in the corresponding billing document

Former Member
0 Kudos

Hello,

for a purchase order I need to select the billing date in the bill which corresponds to the purchase order. There is a posting date in the order history but I am not sure that this date is identical with the billing date in the purchase order. Any suggestions? Thanks.

Regards, Lars.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

Hi lars,

I think that is the Date, But check it with some more responses.

vijay

7 REPLIES 7

former_member188685
Active Contributor
0 Kudos

Hi lars,

I think that is the Date, But check it with some more responses.

vijay

Former Member
0 Kudos

I guess you are talking about due date for a billing document.

There's an FM Determine_Due_date for that. before that you'll have to use FM FI_DOCUMENT_READ with I_AWTYP as VBRK and I_AWREF as Billing Document Number. You will get T_BSEG entry.

CALL FUNCTION 'FI_DOCUMENT_READ'

EXPORTING

i_awtyp = 'VBRK'

i_awref = po_vbeln

TABLES

t_bseg = i_bseg

SORT i_bseg BY vbeln.

READ TABLE i_bseg WITH KEY vbeln = 'Billing Document Number'.

IF sy-subrc IS INITIAL.

MOVE-CORRESPONDING i_bseg TO wa_faede.

CALL FUNCTION 'DETERMINE_DUE_DATE'

EXPORTING

i_faede = wa_faede

IMPORTING

e_faede = wa_faede

EXCEPTIONS

account_type_not_supported = 1

OTHERS = 2.

This wa_faede will have due date in one of its fields.

Hey do reward points if this post is helpful.

0 Kudos

Did that work?

0 Kudos

Hello,

the problem is, that i don't have the number for the billing document. I have only the id-number of my purchasing document. And from my purchasing document I must find the corresponding billing document. Than, when I found the billing document I can read the billing date from it. The only link I found between the purchasing document and the billing document is the field awkey in the table bkpf which is a composite of the year and the corresponding material document which has a reference to the purchasing order. But this indirect selection is very very slow, so I am look for an alternativ.

Thanks.

Regards, Lars.

0 Kudos

you might want to do a where used list search on the purchase document number field, to see if there's some table having a link between purchase document and billing document.

Regards,

Vijay

0 Kudos

Hi!

Isn't it sufficient to get date you need from RBKP -"Document Header: Invoice Receipt"?

If so, you can find materials documents for purchasing document using EKBE - "History per Purchasing Document" and then query RBKP with key fields or issue JOIN select on key fields.

Regards,

Maxim.

Former Member
0 Kudos

Hello,

thanks for your help.

Regards, Lars.