Sei sulla pagina 1di 42

Page 1 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Technical Solution Guide

Page 2 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Consolidating or Splitting Billing Documents
Most organizations run the illing due list nightl! to create illing documents" #uite often there are $uestions related to ho% and %h! certain deli&eries or orders com ine' or fail to com ine' on illing documents" (his document %ill e)plain ho% the standard s!stem %or*s and pro&ide e)amples of ho% the standard logic can e enhanced"

Creating Billing Documents


Before attempting to alter the processing logic of the illing program' it is %ise to understand its asic functionalit!" Billing documents are creating using function module +,-./,0.C1-C+12(1" (his function module is called from the illing document create transaction 3,401/S2PM,5026 and the illing due list 3,404/SDB.77D76" 2n internal ta le is passed to this function that contains one or more source documents for %hich illing is to occur" (hese documents are sorted ! customer' sales organization and illing t!pe" (he result of this sort is se&eral su sets of source documents that are grouped ! the sort fields" 4or each su set' the illing logic attempts to create a illing document" During the creation' the s!stem %ill populate illing document header and item fields from the source document" +/3 contains configura le routines called Data (ransfer +outines that can e de&eloped to alter the %a! fields are copied from a source document to a destination document 3in this case' illing documents6" (hese routines e)ecuteduringthis ilingprocess"(hesu se$uentsection8Data(ransfer+outines9 e)plains ho% these routines %or* in detail" 0nce the illing fields are populated' the logic compares the fields to the pre&ious record" .f the asic fields are e$ual' the current document %ill com ine %ith the pre&ious document" .f the fields are different' a ne% illing document %ill e created" (here are se&eral fields in illing documents that %ill al%a!s e different and should not cause a split to occur" (he su se$uent section 8StandardCom inationCriteria9e)plainsthislogic"

Relevant OSS Notes


(he follo%ing 0SS notes ma! e useful in understanding this process: 11152 35;32 30;<33 .n&oice Split Criteria in Billing Documents .n&oice Split 4ields from the Sales 0rder Billing Split Due to the Person /um er

Page 3 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Standard Combination Criteria
=hen creating illing documents' the s!stem compares fields from the source documents to determine if splitting should occur" (here are fields that must e specificall! ignored during this process" 4or e)ample the document creation time 3,B+>?1+@1(6 %ill al%a!s e different and a split should not occur ecause of this" (o handle this' the main illing program contains a hard coded character string that contains the field names of all fields to ignore during the source document comparison" (he follo%ing screen shots demonstrate ho% this internal data string %or*s" =e ha&e modified it in the illustration for demonstration purposes onl!" (his should ne&er e done in a real s!stem' since the same result can e o tained using data transfer routines" .n the follo%ing e)ample' %e ha&e selected t%o deli&eries for the same customer' %ith different shipping conditions" (he fact that the shipping conditions are different %ill cause a split to occur"

Page 4 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


(he illing due list has split the deli&eries into t%o illing documents" (he Split anal!sis utton can e pressed to see %hich fields caused the split"

Page A of 42

11/14/2013

SD Billing Document Consolidation and Splitting


.n this e)ample' a split occurs due to differences in three fields" 0ne of these fields is the shipping conditions"

Page 5 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Program S2PM,502 contains a hard coded list of fields that are e)cluded from consideration in the splitting logic" (he follo%ing screen displa!s these fields as the! are coded in the (0P include 3M,502(0P6" (his su set of fields ma! differ depending on the +/3 release"

Page < of 42

11/14/2013

SD Billing Document Consolidation and Splitting


(o illustrate ho% the 2BS/2CM1-(2B string controls splitting' %e ha&e added ,SB1D 3Shipping conditions6 to the list" Changing this list is not recommended' %e ha&e done it here temporaril! to demonstrate the functionalit! of the standard logic"

Page ; of 42

11/14/2013

SD Billing Document Consolidation and Splitting


(he same t%o in&oices are processed and the shipping condition is no longer causing a split"

Page D of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Data Transfer Routines
(he correct %a! to control illing document consolidation and splitting is &ia Data (ransfer +outines" (hese routines are created using transaction ,04M and assigned in the Cop! Control configuration" +/3 contains se&eral standard routines and !ou can create !our o%n ! cloning one of the standard routines" (he main purpose of data transfer routines is to populate the fields of the document eing created %ith data from the related preceding document"

Forcing a Split
(he illing document header ta le 3,B+>6 contains a special field that is used to force a split to occur" (he @B>+. field is a character string that contains concatenated fields from the preceding documents" B! adEusting the contents of this string %ithin a data transfer routine' !ou can force a split to occur"

Preventing a Split
(o pre&ent a split' the fields that cause a split to occur can e modified %ithin a data transfer routine to contain the same &alue" 4or e)ample' t%o deli&eries that contain different shipping conditions %ill split ecause the shipping conditions are copied to the in&oice header 3,B+>6" .f the field is cleared for each in&oice' the split %ill no longer occur"

Page 10 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Standard Billing Document Data Transfer Routine (001)
(he data transfer routine elo% is one of the standard +/3 illing document routines" .n this logic' the @B> string is defined and populated %ith the distri ution channel and di&ision from the sales order header ta le" 2dditional fields can e added to this string and filled %ith &alues from an! of the data structures listed in the comments section" (he concatenated @B> string then mo&ed to the @B>+. field of the illing document header 3,B+>6"

Page 11 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Implementing a new Data Transfer Routine
.mplementing a ne% routine re$uires oth de&elopment and configuration" (he routine is created using transaction ,04M" (he routine is then assigned &ia cop! control configuration" (he easiest method used to create a ne% routine is to clone one of the standard routines" (he follo%ing steps illustrate this procedure"

Step 1

Clone the standard routine

Bsing transaction ,04M' na&igate to the data transfer routines for illing documents" (he easiest %a! to create a ne% routine is to t!pe the ne% routine num er o&er one of the e)isting routines and press enter" (he s!stem %ill create the ne% routine as a clone of the one that %as o&er t!ped"

Page 12 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step !ctivate the ne" routine

,04M routines need to e acti&ated efore the! can e used"

Page 13 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step #
!ssign the ne" routine in cop$ control

Billing data transfer routines are assigned in cop! control at the item categor! le&el"

Page 14 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


!ample "
#revent an Invoice Split b$ Ship Condition

(he follo%ing e)ample demonstrates ho% to pre&ent illing document splits for a specific field"

Business Re%uirement
(he illing due list in standard +/3 creates multiple illing documents for deli&eries that contain different shipping conditions" (he client %ants these deli&eries to com ine into a single illing document"

Solution
(o sol&e this pro lem' %e %ill create a custom Data (ransfer +outine" .n this routine' %e %ill clear the shipping conditions field" B! clearing the field' it %ill contain the same &alue for all deli&eries and %ill no longer cause a illing document split" (he side effect of this change is that the illing documents %ill no longer contain a shipping condition"

Page 1A of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step 1 Functionalit$ Prior to Changes

Belo% is the custom data transfer routine efore ma*ing an! changes" (his routine %as cloned from the standard routine 001"

Page 15 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


=e ha&e identified t%o deli&eries for the same customer' on the same da!' %ith different shipping conditions" (he follo%ing screens displa! the functionalit! of the standard illing due list logic prior to our change"

Page 1< of 42

11/14/2013

SD Billing Document Consolidation and Splitting


+unning the simulation' %e ha&e selected the t%o in&oices and e)ecuted the split anal!sis"

Page 1; of 42

11/14/2013

SD Billing Document Consolidation and Splitting


(he result of the split anal!sis is a split ased on the shipping condition"

Page 1D of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step
Coding the Data Transfer Routine Change

.n the custom data transfer routine' a single line of code is added that clears the shipping conditions"

Page 20 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step # Testing the Change

Bsing the same t%o deli&eries' %e e)ecute the illing due list again after changing the routine in simulation mode"

Page 21 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Because there %as no split' the in&oice detail screen appears %ith items from each deli&er!"

Page 22 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


!ample %
Billing Document Split b$ #lant

(he follo%ing e)ample demonstrates ho% to force a illing document split ased on a specific field"

Business Re%uirement
(he Billing Due 7ist processes multiple deli&eries for customers on the same da!" .f a customer has shipments from multiple plants' the! are to appear on separate illing documents"

Solution
(o sol&e this pro lem' %e %ill create a custom Data (ransfer +outine" .n this routine' %e %ill add the plant 3=1+>S6 field to the Com ination Criteria field 3,B+>?@B>+.6 field" (his %ill cause a illing document split ! plant"

Page 23 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step 1 Functionalit$ Prior to Changes

Belo% is our custom data transfer routine efore ma*ing an! changes" (his routine %as cloned from the standard routine 001"

Page 24 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


=e ha&e identified t%o deli&eries for the same customer' on the same da!' %ith different plants" (he follo%ing screens displa! the functionalit! of the standard illing due list logic prior to our change"

Page 2A of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Because there %as no split' the in&oice detail screen appears %ith items from each deli&er!"

Page 25 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step
Coding the Data Transfer Routine Change

.n the custom data transfer routine' the plant field 3=1+>S6 is added to the com ination criteria field definition 3,B+>?@B>+.6" .n addition' logic is added to populate the field %ith the plant contained in the deli&er! item 37.PS?=1+>S6" (his %ill cause the ,B+>? @B>+. field to differ %hen multiple plants are processed forcing the split to occur"

Page 2< of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step # Testing the Change

Bsing the same t%o deli&eries' %e e)ecute the illing due list again after changing the routine in simulation mode"

Page 2; of 42

11/14/2013

SD Billing Document Consolidation and Splitting


+unning the simulation' %e ha&e selected the t%o in&oices and e)ecuted the split anal!sis"

Page 2D of 42

11/14/2013

SD Billing Document Consolidation and Splitting


(he result of the split anal!sis is a split ased on the com ination criteria field 3@B>+.6" (he field contains a string that is the concatenation of the &alue80019'distri ution channel' di&ision and plant"

Page 30 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


!ample &
Consolidated Invoicing b$ Customer

(he follo%ing e)ample demonstrates ho% to consolidate/split illing documents using a custom indicator on the Customer Master"

Business Re%uirement
Man! customers place multiple sales orders per da!" (his results in multiple goods issues and illing documents per da! also" Some customers %ant all shipments that occur on the same da!' from the same plant to appear on a single in&oice" 0ther customers %ant a separate in&oice for each shipment"

Solution
(o sol&e this pro lem' %e %ill create a custom Data (ransfer +outine" (his routine %ill determine if deli&eries should e com ined into a single illing document or split ased on a custom indicator added to the Customer Master" (o accomplish this' the order num er %ill e added to the Com ination Criteria field 3,B+>?@B>+.6" (he order num er %ill e mo&ed into this field onl! if splitting is re$uired" .f illing consolidation is re$uired' the order num er %ill e null causing the consolidation to occur"

Page 31 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step 1
Define an &ndicator in the Customer 'aster

2n indicator in the Customer Master is needed to dri&e the consolidation logic" Standard +/3 contains ten additional attri utes on >/21 that can e used for an! purpose" 4or this proEect' %e %ill use >2(+<"

.t is a good practice to change the data element description to an appropriate description" 4or>2(+<'%eha&echangedthedescriptionto8Consolidatedin&oice9"

Page 32 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step Define the (alues for )!TR*

Bsing SM30' %e ha&e defined the follo%ing t%o &alues for the ne% field"

Page 33 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step # 'a+e the )!TR* Field !vaila,le to the Data Transfer Routine(he Data (ransfer +outine %ill interrogate the >2(+< field to determine %hether or not to consolidate documents" Structure >B2F, contains the Sold?to customer master data and this structure is passed to the routine" (he structure contains include >B2F,@ %hich can e used to specif! customer specific fields" (he functions that read the customer master ta les and populate the structures use M0,1?C0++1SP0/D./F statements" (herefore' simpl! inserting >2(+< into the user include %ill cause the field to e read and populated" (here is no need to specificall! select the field from the ta le"

Page 34 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


4ield >2(+< is added to the structure"

Page 3A of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step .
Coding the Data Transfer Routine Change

.n the custom data transfer routine' the order num er field 3,B17/6 is added to the com ination criteria field definition 3,B+>?@B>+.6" .n addition' logic is added to populate the field %ith the sales order num er ased on the ne% indicator added to the customer master" .f the indicator is set 3denoting that consolidation should occur6' the order num er field %ill e empt!" .f the indicator is not set 3denoting that splitting should occur6' the field %ill e filled" (his %ill cause the ,B+>?@B>+. field to differ %hen multiple orders are processed forcing the split to occur"

Page 35 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step /
Test1 (Create Separate Billing Documents)

(he indicator on the customer master is set so that separate illing documents are created"

Page 3< of 42

11/14/2013

SD Billing Document Consolidation and Splitting


1)ecute the illing due list using t%o deli&eries for the same customer on the same da!" (hese deli&eries are related to different sales orders"

Page 3; of 42

11/14/2013

SD Billing Document Consolidation and Splitting


+unning the simulation' %e ha&e selected the t%o in&oices and e)ecuted the split anal!sis"

Page 3D of 42

11/14/2013

SD Billing Document Consolidation and Splitting


(he result of the split anal!sis is a split ased on the com ination criteria field 3@B>+.6" (hefieldcontainsastringthatistheconcatenationofthe&alue80019'distri ution channel' di&ision' plant and sales order num er" .n this e)ample' the sales order num ers are different"

Page 40 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Step 0
Test (Create a consolidated Billing Document)

(he indicator on the customer master is set so that illing document consolidation occurs"

Page 41 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Bsing the same t%o deli&eries' %e e)ecute the illing due list again"

Page 42 of 42

11/14/2013

SD Billing Document Consolidation and Splitting


Because there %as no split' the in&oice detail screen appears %ith items from each deli&er!"

Potrebbero piacerti anche