EDUCAÇÃO E TECNOLOGIA

One Invoice Per Solution Order

In the Solution Order, the solution ID for the follow-on documents of solution order is not available at the billing document header but is available only on the billing document item level.

Therefore any billing documents created for these follow-on sales and distribution documents and service transactions will not be split per originating solution order. This will lead to a single Invoice for multiple solution orders . The below diagram demonstrates the Invoice combination for two solution orders

To have one Invoice per Solution Order (if no other split criteria apply that is, the split-relevant fields of the billed SD documents and service transactions referencing the solution order are identical) we can set up the system as below.

  • To introduce the solution order ID as an additional invoice split criterion, use extensibility to create a custom field at billing document header level .

Custom Field SOLNORDER is created

                       

  • Create a Custom Routine, In copy control for Billing documents, define a custom routine via Activity Define Copying Control for Billing Document .

         

  • Create BADI Implementation to automatically copy the solution order ID from each billed item to custom field in the billing document header. Custom logic is implemented in BADI  Custom Data Transfer for Billing.

        Business Context  Sales: Billing Document

Sample code as Below

 MOVE-CORRESPONDING bil_doc TO bil_doc_res. MOVE-CORRESPONDING bil_doc_item TO bil_doc_item_res. MOVE-CORRESPONDING bil_doc_item_contr TO bil_doc_item_contr_res. CLEAR bil_doc_res-documentreferenceid. CLEAR bil_doc_res-purchaseorderbycustomer. CLEAR bil_doc_res-assignmentreference. bil_doc_res-yy1_SOLNORDER_bdh = bil_doc_item-businesssolutionorder.

In this Badi we have cleared any other split criteria such purchaseorderbycustomer , assignment reference .

Pass the solution order id  from item to Header

bil_doc_res-yy1_SOLNORDER_bdh = bil_doc_item-businesssolutionorder.

yy1_SOLNORDER_bdh is the  custom field as part of the result parameter bil_doc_res.

After the above custom field logic has been implemented, the custom field receiving the solution order ID, like most other header fields, now acts as an additional invoice split criterion. This results in a separate invoice per solution order, assuming that no other split criteria apply.

This blog post should help you to understand in setting up one invoice per solution order

Thanks for reading this blog post, hopefully the blog post was informative.