Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 

I met a case which may give some hints in biling status check relevant debugging.

The scenario is:

One delivery has two items with different payment terms.

VF01 to bill the delivery and it was split into two billing documents as expected. Then VF11 to cancel one of the billing. So now VBUP for the delivery is like below:

VBELNPOSNRFKSTA
7001002132000010C
7001002132000020A

Now if VF01 to bill the delivery, only the item 20 should be billed. However instead, the 1st billed item 000010 will be billed again. WHY?

As usual, we will go VTFL first to check the copy control customizing. In this case, customer is using all standard settings. Then why the billing status for item 10 was not checked here?

The key Form for debugging is FAKTURA_LIEFERBEZOGEN (SAPLV60A). It will loop over delivery item in table ALIPS. This FORM is in FM RV_INVOICE_CREATE. So set breakpoint in FM RV_INVOICE_CREATE first and then find FORM FAKTURA_ERZEUGEN. (see below)

F5 enter this FORM and find the key FORM FAKTURA_LIEFERBEZOGEN. (see below)

Here LOOP at alips to find the affected item 000010. ( see below )

In this form, system will check the copy requirement routine in VTFL which is 004. (see below)

Go inside the 004 routine and find the 'billing status' line then set breakpoint there. (see below)

You will find the enhancement-section there after 'biling status' line. Go F5 to check if any coding existed for this enhancement.

So customer has his own coding in the enhancement which ingored the part of 'billing status' check.

After going through the enhancement, it goes directly to pricing status check. (see below)

Customer may deactivate the enhancement or put the standard 'billing status' relevant checking code into the enhancement to solve the problem.

Hope it will give you some hint.

Regards,

Maria Du.