Transcription of SD Subsequent Function Requirement Routines
1 SD Subsequent FunctionRequirement RoutinesTechnical Solution GuideThe Smith Consulting Group, Box 703 Flanders, NJ and R/3are the trademarks or registered trademarks of SAP AG in Germany and in several other 2005 The Smith Consulting Group, Inc. All Rights Function Requirement Routines6/19/2005 Page2of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights Function Requirement Function Group Function Goods Issue Requirement 1 Clone the standard 2 Activate the 3 Assign the new 4 Code the 5 Test the new 6 Running the VOFM Function Requirement Routines6/19/2005 Page3of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.
2 All Rights Function Requirement RoutinesSubsequent Function Requirement Routines are usedto control the Subsequent processingof sales and delivery documents within the Sales and Distribution Module. The purposeof these Routines is to prevent specific functions from occurring if certain conditionsexist. These Routines do not prevent Subsequent documents from being created and theyshould not be confused with Copy Control. For example, these Routines will not preventan invoice from being created from a delivery, but they can prevent the picking of anexisting Function CodeThe system uses Subsequent Function Codes to determine which Routines to call.
3 TableTVFO contains all Subsequent functions defined in the system. The following are thecurrent from sales document (availability)02 Purchase requisition from sales document03 requirements from sales document (procurement)04 Create delivery due index05 Production order/plan order from sales document06 Release/Block-Assembly Order From Sales Document11 Picking fromdelivery12 Packing from delivery13 Goods issue from deliverySDSubsequent Function Requirement Routines6/19/2005 Page4of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.
4 All Rights TVFOT able TVFO contains the routine mapping for each Subsequent Function code. For eachfunction there are two Routines specified. The System Routine (SyFORM routine) is thestandard R/3 routine and should not be modified. The User Routine (Routine number) isthe user defined the example above, Function code 11 is the picking Function code. Routine 011 is thestandard system routine and routine 111 is the user Function Requirement Routines6/19/2005 Page5of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights Group V07 AFunction group V07A contains the processing Function modules and all of therequirement Routines .
5 Each routine is contained in a separate include. Both the includefile and routine name contain the routine Function Requirement Routines6/19/2005 Page6of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights Function ModulesThere are two Function modules in this Function group that process requirements . Onefunction is for sales documents, and the other is for delivery documents. These functionmodules are called from various points in the Order and Delivery programs. The callingprograms pass the appropriate Function code to the Function module.
6 The logic reads tableTVFO with the passed Function code to determine which Routines to call. Each functionexecutes the non-modifiable system routine first, and thenexecutes the user all relevant sales document structures and the Function SD_ORDER_SUBSEQUENT_ALLOWEDIMPORTINGBTVA PLIKETVAPBTVEPLIKETVEPBVBAKLIKEVBAKBVBAP LIKEVBAPBVBEPLIKEVBEPBVBEPVBLIKEVBEPVBBV BUKLIKEVBUKBVBUPLIKEVBUPFOFUNLIKETVFO-FO FUNI_SIMUL_MODEDEFAULT SPACEI_CHECK_CYCLE_FOFUN_04 DEFAULT Function Requirement Routines6/19/2005 Page7of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.
7 All Rights all relevant delivery document structures and the Function Function Requirement Routines6/19/2005 Page8of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights CallsThese functions are called multiple times from the calling program during the processingof a document. Each time the functions are called, the data contained in the structuresmay be different. In the case of delivery processing, the Function is first called with onlythe header data populated. During Subsequent calls, the header data is not passed, butitem data is aboveexample is the standard logic from the goods issue routine.
8 The logic checks afield in VBUK only when LIPS is initial. The ELSE side of the IF statement is forchecking item fields. This is because when LIPS is initial, the header data is suggest setting break points in the functions and Routines to understand exactly howthey work before implementing your own Function Requirement Routines6/19/2005 Page9of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights Goods Issue Requirement ExampleThe following example demonstrates how to implement a custom goods issuerequirement routine.
9 The basic process is the same for the other available RequirementFor a specific plant, inventory balances are maintained in a custom Z table in addition to the standard R/3 inventory. This was done as part of a larger project to track thequantities of materials imported into Mexico for re-sale. Without elaborating on thedesign of the entire project, the purpose of this portion is to ensure that inventory exists inthe Z table during the goods issue process. If there is insufficient inventory in the table,the goods issue will not be solve this problem, a custom goods issue Requirement routine will be logic in this routine will check the inventory balance in the Z table and prevent thegoods issue if the quantity in the table is less than the delivery Function Requirement Routines6/19/2005 Page10of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.
10 All Rights 1 Clone the standard routineUsing transaction VOFM, navigate to the Subsequent Function Requirement routine forgoods issue. Alternatively, you can go directly to the good issue Requirement usingtransaction Function Requirement Routines6/19/2005 Page11of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights is only one routine allowed for each Function even though the screen implies thatmultiple Routines can be used. On this screen, press the Req. maintenance button at the bottom of the Function Requirement Routines6/19/2005 Page12of25 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.