cancel
Showing results for 
Search instead for 
Did you mean: 

Collective Invoicing based on SO field value & complete delivery.

Former Member
0 Kudos

Hello All,

Need your insights into this one please.

Based on a field value (Sales Order: Goto-->Header-->Shipping->SpecProcId(field)) and complete delivery of all Sales Order line items, can we make collective billing (only one invoice for multiple/partial deliveries).

Details:

1. If the field in the Sales Order(VBKD-SDABW),Goto-->Header-->Shipping->SpecProcId(field) has the value “CB(collective billing)” then the system should allow partial delivery / multiple deliveries but prevent individual billing i.e. only Collective billing should happen.

2. The rule should be executed if and only if point 1 (above) is met and all sales order line items are completely delivered.

Limitation:


  1. Against this particular customer, I cannot select "Complete delivery reqd by law" in customer master record (sales area view--.shipping) because the same customer might require partial deliveries neither can I do it in the Sales Order, nor CMIR as insisted by the user.

Accepted Solutions (1)

Accepted Solutions (1)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Manage it with your own VOFM subroutines in the copy rules.

First, in the requirements in VTFA use the status in VBUK to check if the SO is full delivered. Remember in VBUK and VBUP you have fields available for your status you could populate with userexits in include RV45PFZA.

Last, you can use the splitting VOFM subroutine to populate field ZUKRI defining your own structure ZUK using field VBKD-SDABW as a criteria. Remember how to manage the splitting because ZUKRI has 40 characters.

I hope this helps you

Regards

Eduardo

Answers (3)

Answers (3)

Former Member
0 Kudos

I've checked the records of the table VBUK and noticed a bit of inconsistency.

Checked the document flow of the Sales order and line item status, entered that Sales order number in VBUK. The status of VBUK-LFSTK and that of document flow do not match.

I double checked VBUK-LFSTK with Sales Order --> GOTO --> Header --> Status --> Delivery status

In a nutshell, VBUK-LFSTK="C" (Completely Processed) does not match Sales Order --> GOTO --> Header --> Status --> Delivery status. Am I missing something?

My objective:

  1. To ensure that all items of the sales order are completely delivered and prevent invoicing of partially delivered line items (of sales order), based on the criteria that I mentioned in my earlier post.
  2. Scenario: One Sales Order --> multiple deliveries--> one only invoice (as per my criteria)
  3. Should I instead check for VBUP-LFSTA = C instead of VBUK-LFSTK.
  4. Are there any known issues w.r.t sales order status(doc flow/header status) deviating from VBUK-LFSTK.
  5. Any reasons for VBUK-LFSTK not being same as sales order header status?

Thanks.

Former Member
0 Kudos

Thank you very much Eduardo and Raju for precise answers. I am exploring them in my sandbox and will get back to you. 

Thanks once again.

Former Member
0 Kudos

Hi,

You need to write the code as shown below:

In copy controls from delivery to Billing - at the item category level

Requriement Routine:

If VBKD-SDABW = CB

   If VBUK-Delivery status  =  Fully Delivered

      Sy-subrc= 0.

   Else

       Sy-subrc= 4.

Else

     Sy-subrc = 0.

Endif.

The above code will help you in restricted the invocing of deliveries of one sales order, untill all the line items are fully delivered.

Data Transfer Routine :

If VBKD-SDABW = CB

Create ZUK structure with Sales Order number

and pass on that value to VBRK-ZUKRI

Endif.

Write this code just above the VBRK-ZUKRI line in your code, this will help in combining all the deliveries into one invoice.

Hope this helps.

Regards

Raju