Date post: | 14-Apr-2018 |
Category: |
Documents |
Upload: | tamanam-kiran-kumar |
View: | 219 times |
Download: | 0 times |
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 1/22
\\10.0.3.52\Wipro\07. ABAP\Technical Specifications\MM 1 of 22
Technical Specification
Wipro-Metra Computers
Con f i d e n t i a l i t y Th i s d o cu m e n t i s t h e p r o p e r t y o f W I , w h o o w n s t h e co p y r i g h t
t h e r e o f . Th e i n f o r m a t i o n i n t h i s d o c u m e n t i s g i v e n i n co n f i d e n c e an d
w i t h o u t t h e w r i t t e n co n s en t o f W I , g i v en b y c o n t r a ct o r o t h e r w i se ,
t h i s d o cu m e n t m u s t n o t b e c o p ie d , r e p r i n t e d o r r e p r o d u c e d in a n y
m a t e r i a l f o r m , e i t h e r w h o l l y o r i n p a r t . A l so t h e co n t e n t s o f t h i s
d o cu m e n t o r a n y m e t h o d s o r t e ch n i q u e s av a i l a b le t h e r e f r o m , m u s t
n o t b e d i s c l o se d t o a n y t h i r d p a r t y w h a t s o e v e r
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 2/22
\\10.0.3.52\Wipro\07. ABAP\Technical Specifications\MM 2 of 22
TS DOC NUMBER : TIME_MACHINE _TS_MARGIN_GATE _SWITCH_OVER_TO_ECC(MARGIN_GATE_CALCULATION) _V1.2
TITLE : TIME_MACHINE _TS _Triggering Margin Gate calculation for Sales Order_V1.2
LAST UPDATED : 12.10.2012
DOCUMENT CONTROL:
FS Number Time Machine_FS_SD_001_Margin Gate Control_1.07
Creation Date 12.07.2012
Task ID TIME_MACHINE _TS _Triggering Margin Gate calculation for Sales Order _V1.2
Author Bashir Ahmed
Developer Vishal Singh
Complexity H
Document Status Draft
REVISION HISTORY:
Version # Date Modified Request ID Development Class Modified By Brief
Description
1.0 30.07.2012 ZSD_SWITCHOVER Vishal Singh Initial version
1.2 12.10.2012 ZSD_SWITCHOVER Vishal Singh Final Version
TS APPROVAL:
Action Name Date
Approved By Vishal Singh 01.08.2012
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 3/22
\\10.0.3.52\Wipro\07. ABAP\Technical Specifications\MM 3 of 22
Table of Contents
DETAIL DESIGN SPECIFICATIONS OVERVIEW.............. .............. ............. ............. ............. ........ 5 BUSINESS FUNCTIONALITY .....................................................................................................................6
PROGRAM & DATA FLOW INTERACTION............ .............. ............. ............. ............. ............. ...... 7
PICTORIAL VIEW....................................................................................................................................7 PROGRAM / R EPORT / FUNCTION / BAPI NAME......................................................................................... 7 PROGRAM / R EPORT / FUNCTION / BAPI DESCRIPTION .............................................................................7 EXECUTION METHOD .............................................................................................................................8 FUNCTION GROUP ..................................................................................................................................8 FUNCTION MODULE PARAMETERS...........................................................................................................8 BAPI ............. ............. ............. ............. ............. .............. ............. ............. ............. ............. .............. ... 8 BAPI METHODS ....................................................................................................................................8
TRANSACTION NAME .............................................................................................................................8 TRANSACTION TYPE...............................................................................................................................8 USER EXIT NAME...................................................................................................................................8 EXIT COMPONENT NAME AND TYPE........................................................................................................8 BADI / E NHANCEMENT NAME................................................................................................................ 8 BADI / E NHANCEMENT IMPLEMENTATION ..............................................................................................8 BADI FILTER VALUE .............................................................................................................................8 WORKFLOW OBJECTS.............................................................................................................................8 WORKFLOW R OUTING TABLE .................................................................................................................8 LSMW PROJECT NAME, MODULE, OBJECT NAME ...................................................................................8 LSMW OTHER PARAMETERS ..................................................................................................................8 BDC TRANSACTION ...............................................................................................................................9 BDC SCREENS AND FIELDS USED............................................................................................................9
BDC NUMBER OF TRANSACTIONS A NTICIPATED......................................................................................9 BDC TRANSACTION ...............................................................................................................................9 COMMON SUBROUTINES/FUNCTION MODULES ........................................................................................9 EXCEPTIONS TO PROGRAMMING STANDARDS ........................................................................................10 LIST OF OBJECTS IMPACTED .................................................................................................................. 10 R EPORT FIELD LIST .............................................................................................................................. 10 R EPORT SORT I NFORMATION ................................................................................................................ 10 R EPORT CONTROL BREAKS................................................................................................................... 10 SELECTION SCREEN.............................................................................................................................. 10 MESSAGES...........................................................................................................................................10 STRUCTURES ....................................................................................................................................... 11
DETAILED PROGRAM LOGIC ............ .............. ............. ............. ............. ............. .............. ............ 12
PROGRAM LOGIC .................................................................................................................................12 ASSUMPTIONS MADE............................................................................................................................ 20 SCREEN NUMBER AND TITLE ................................................................................................................ 20 SREEN DESCRIPTION ............................................................................................................................ 20 SCREEN LOGIC / PROCESS BEFORE OUTPUT ........................................................................................... 20 SCREEN LOGIC / PROCESS AFTER I NPUT ................................................................................................20 SCREEN LOGIC / PROCESS ON HELP R EQUEST ........................................................................................20 SCREEN LOGIC / PROCESS ON VALUE R EQUEST ......................................................................................20
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 4/22
\\10.0.3.52\Wipro\07. ABAP\Technical Specifications\MM 4 of 22
DICTIONARY OBJECTTS............... ............. ............. ............. .............. ............. ............. ............. ...... 21
DATABASE TABLE/ STRUCTURE/VIEW/I NDEX NAME.............................................................................. 21 TABLE/ STRUCTURE/VIEW/I NDEX DESCRIPTION ....................................................................................21
SIZING
................................................................................................................................................. 21 DETAILED FORMS DESIGN SPECIFICATIONS........................ ............. ............. .............. ............ 22
(ENTER FORM NAME HERE)....................................................................................................................22 FORM DESCRIPTION ............................................................................................................................. 22 FORM CODE......................................................................................................................................... 22 FORM DETAILS ....................................................................................................................................22 FORM PRINT PARAMETERS ................................................................................................................... 22 FORM COMMENTS ................................................................................................................................22
DETAILED SAP SCRIPT DESIGN SPECIFICATIONS ............. ............. ............. ............. .............. . 23
SAP SCRIPT DESCRIPTION ....................................................................................................................23 SAP SCRIPT ELEMENTS / PAGES / WINDOWS / PAGE WINDOW DETAILS ..................................................23
DETAILED SEARCH HELP / MATCHCODE DESIGN SPECIFICATIONS ............ ............. ........ 24
(ENTER SEARCH HELP / MATCHCODE OBJECT NAME HERE)....................................................................... 24 SEARCH HELP / MATCHCODE DESCRIPTION ........................................................................................... 24 TABLE NAME....................................................................................................................................... 24 TABLE DESCRIPTION ............................................................................................................................ 24 CHANGE TYPE ..................................................................................................................................... 24
OTHER OBJECT SPECIFICATIONS............... .............. ............. ............. ............. ............. .............. . 25
NAME AND DESCRIPTION ......................................................................................................................25 OBJECT DETAILS ..................................................................................................................................25 CHANGE TYPE ..................................................................................................................................... 25
CODE INSPECTOR RESULT SCREENSHOT............ .............. ............. ............. ............. ............. .... 26
EXTENDED CHECK RESULT SCREENSHOT............. ............. ............. ............. ............. .............. . 27
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 5/22
5
Detail Design Specifications Overview
TIME_MACHINE_TS_MARGIN GATE _SWITCH_OVER TO ECC(MARGIN_GATE_CALCULATION)
Area (R/3Module): SD Module Date: 12.07.2012
Requested by: Bashir Ahmed Phone:
Title: TIME_MACHINE _TS_MARGIN GATE _SWITCH_OVER TO
ECC(MARGIN_GATE_CALCULATION)
Short description: MARGIN GATE SWITCHOVER TO ECC MARGIN GATE CALCULATION
Functional Developer: Bashir Ahmed Phone:
Technical Developer: Vishal Singh Phone:
Program name:
Type: Creation Change Copy of Standard
Program type: (select
the check box)
Conversion Batch Interface Online Interface Report
Form Enhancement Extension Dialog
Modification Unknown Others BAPI
ALE/ IDOC Application Development WebDynpro/BSP
Priority: Very High High Medium Low
Complexity: Very High High Medium Low
Specify known SAP functionality: SD Cross Reference Documentation: MARGIN GATE SWITCH_OVER TO ECC - MARGIN GATE CALCULATION
Only for Interfaces:
Type of interface:
Direction of interface:
Frequency:
Real-Time Batch
Inbound Outbound Both
Daily Weekly Monthly
Biweekly Other:
Only for Reports:
1. The report will be created via:
2. Requested characteristics:
Standard Report
Report Painter Report Writer ABAP Query
ABAP Program Info System
Drill-down Pushbuttons Sort
Entry files Others:
________________________________
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 6/22
6
Generic question:
1. Impact of not creating the
program:
legal requirements will not be fulfilled
lack of information required for the business
lose functionality compared to the old system
others: could have duplicate data entered into the system_
Development labor estimate: 60 working days
Are there any alternatives in the standard system: Yes No
Describe the alternative found: ES_SAPFV45P spot enhancement can be
used to compare different pricing condition
with sales price instead of calculation from
routine. This is better solution compare to
calculate each line item’s condition.
The enhancement point PREISFINDUNG_11
We will gate xkomv table with all thecondition values. This enhancement point is
called just after the pricing function module
is finished calculation.
Reason why this alternative was not acceptable: Performance problems Complexity
Others: The transaction to initiate
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 7/22
7
Business Functionality Describe in detail the scope and business purpose of the function.
Pricing control to ensure sale of materials above the margins set at various levels by
the Management. Any sale below the allowed margins has to be routed through an
approval process.
Management decides the margins to be made on the sales of material. Any sale below the margin set by
the management has to be routed through an approval process at various levels which will be ensured
by this development.
Program / Report / Function / BAPI name
NA
Program / Report / Function / BAPI Description
N/A
Execution Method Describe in detail, the method of program invocation (online, background, etc.)
Online
Function Group
ZSD_MARGIN_GATE_TRIGGER
Function Modules
ZGET_CONDITION_RECORDS: To set the margin gate block for given condition and remove
block from certain line item.
ZPUT_MARGIN_GATE : To set margin gate block in xvbep table.
ZSOD_DB_UPDATE : To update ZSD_MARGIN_GATE & ZSD_MARGIN_HEAD tables
BAPIN.A
BAPI MethodsN.A
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 8/22
8
Transaction Name
VA01/VA02, VL01N, MASS, VKM3, VA05
Transaction Type
Standard Transaction
User Exit Name
USEREXIT_MOVE_FIELD_TO_VBEP
Exit Component Name and TypeN.A
BADI / Enhancement Name
ES_SAPMV45A / BELEG_SICHERN_14
BADI / Enhancement Implementation
ZSOD_DB_UPDATE
BADI Filter Value
N.A
Workflow Objects
Workflow Routing TableN.A
LSMW Project Name, Module, Object NameN.A
LSMW other parameters
N.A
BDC Transaction Mention Call transactions and Session detail
N.A
BDC Screens and Fields UsedN.A
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 9/22
9
BDC Number of Transactions AnticipatedN.A
BDC TransactionN.A
Common Subroutines/Function Modules A list of common, external routines.
N.A
Exceptions to Programming Standards A list of exceptions to the programming standards and reasons why.
N.A
List of objects impacted A list of objects impacted (e.g. Message Class, Function Module, Include etc).
Report Field list
Report Field Name Logical Data Base /
Table
Field Name Computation / Edit Rule
Report Sort Information
Sort By Report Field Name Sort By (ascending, descending)
Selection Screen
Messages A list of required error messages and message ids.
Message Class Message
Type
Message Id Message Text Long Text
Structures Describe internal program structure. Several methods may be used for defining the layouts (table,
includes, subroutines, view, etc.)
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 10/22
10
DETAILED PROGRAM LOGIC
Describe logic through the use of pseudo code (if necessary), flow charts and supporting text. Include
specific error handling. Number all “If's, “When's and condition checks to drive test scenarios.
Detail Logic
In the VA01/VA02 at the time of creation/change of line item at line item level user exit
move_fields_to_vbep from routine 600 need to be called. Compare the values here from routine.
It will be 5 loop steps for 5 following conditions.
ZM01 – Margin Gate PM
ZM05 – Margin gate BUM
ZM10 – Margin Gate MD / Price Controller
ZN01 – Minimum Price – PM
ZN05 – Minimum Price – BUM
ZM15 – Margin Gate CEO: will be calculated after save command using Enhancement Spot.
Margin calculation will be done based on the Cost Price(VPRS), Vendor Rebate(ZSD0, ZSD1, ZSD2) and
Customer Rebate(ZC01, ZC02).
i.e. Price = VPRS - (ZSD0 + ZSD1 + ZSD2) + (ZC01 + ZC02)
lv_kbetr_pricea = ( lv_kwert_vprs + lv_kwert_vend + lv_kwert_cust ).
NOTE: In case of Back to Back Order Check for ZBOC condition value(If available else VPRS).If ZBOC is
available then check for the ZBUD if yes add ZBUD to get the Cost price.
if lv_auart = 'ZOBB'. " Back 2 Back read table xkomv into ls_komv with key kschl = 'ZBOC'. if sy-subrc eq 0.
lv_kwert_vprs = ls_komv-kwert.read table xkomv into ls_komv with key kschl = 'ZBUD'. if sy-subrc = 0. lv_kwert_vprs = lv_kwert_vprs + ls_komv-kwert.endif.
endif.
else. " Other than Back 2 back
read table xkomv into ls_komv with key kschl = 'VPRS'. if sy-subrc eq 0. lv_kwert_vprs = ls_komv-kwert.read table xkomv into ls_komv with key kschl = 'ZBUD'. if sy-subrc = 0. lv_kwert_vprs = lv_kwert_vprs + ls_komv-kwert.endif.
endif.endif.
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 11/22
11
Check one by one. Each line item’s calculate value will be in the variable xkwert and this can be
compared against ls_komp-kzwi2 variable.
If komp- kzwi2 < xkwert.
when 'ZMXX'. if ls_komv-kinak = ' '. read table xkomv into ls_komv with key kschl = 'ZMAN' kinak = ' '. if sy-subrc = '0'. if komp-kzwi2 ge xkwert. " Remove Block. perform margin_block_remove in program zsd_subroutinepool
tables xkomvusing ls_komv
xkwert.perform userexit_move_field_to_vbep(sapmv45a).
elseif komp-kzwi2 < xkwert. "Put a Block. read table xkomv into ls_komv with key kschl = lv_kschl kinak = ' '.
perform margin_block_put in program zsd_subroutinepool tables xkomv
using ls_komvxkwert.
perform userexit_move_field_to_vbep(sapmv45a). endif.else. if komp-kzwi2 ge xkwert. " Remove Block. perform margin_block_remove in program zsd_subroutinepool tables xkomv
using ls_komvxkwert.
perform userexit_move_field_to_vbep(sapmv45a). elseif komp-kzwi2 < xkwert. "Put a Block. perform margin_block_put in program zsd_subroutinepool tables xkomv
using ls_komvxkwert.
perform userexit_move_field_to_vbep(sapmv45a). endif.
endif. endif.
Then put a block for corresponding condition in the zsd_margin_gate(item) table, and update the
structure XVBEP for schedule lines by setting value in field LIFSP = ‘08’.
**--> Change xvbep. READ TABLE vbep_tab INTO ls_vbep WITH KEY posnr = vbep_line-posnr.IF sy-subrc = '0'. LOOP AT xvbep INTO lsx_vbep WHERE posnr = vbep_line-posnr
AND bmeng IS NOT INITIAL. idx = sy-tabix.lsx_vbep-lifsp = ls_vbep-lifsp.MODIFY xvbep INDEX idx FROM lsx_vbep TRANSPORTING lifsp.ENDLOOP.
ENDIF.
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 12/22
12
Field for the CEO will be at the Header level whereas the other fields will be at the item level.
To set the CEO level block change the VBAK structure by setting value in LIFSK = '08'.
Step 2: Logic will be incorporated for the 4 levels of approval for the Margin Gate Control. Only authorized person should be able to block & release the fields.
CEO Level approval will be at the header level whereas all other approvals will be at Item Levels. If any
of the levels fails margin control item block has to be set for the item which will not allow further
processing till the block has been removed. Once all the blocks are removed the status of the item has to
be set as released.
Step 6: Ztable for authorization is created so that the authorized person shall be able to remove the
block from the sales order.
Except ions
If the margin gate condition has not been maintained at any level the system should exclude the item for margin check at that level.
Validations
Any Change in the sales price will trigger margin gate approval again in the sales order.
The detail ed processing logic is at tached below for reference
Pseudo Code
There are two type of blocking procedure: Non Deal Sales Order & Deal Sales Order
Non Deal Sales Order
Step 1: Routine Calling
User has entered the Line Item and press Enter key while creating the sales order (VA01)
Routine RV64A600 will be called for conditions ZM01/ZN01/ZM05/ZN05/ZM10 one by one
C:\Documents andSettings\sapdev\Des
For conditions ZM01 /ZM05 /ZM10 calculation of margin is % based where as ZN01/ZN05 are the fixedvalues for particular material.
After calculation and comparison of Cost (Manual 'ZMAN' if available else system suggested) with the
margin (ACTIVE Conditions i.e. KINAK IS INITIAL) USEREXIT_MOVE_FIELD_TO_VBEP will be called to
remove margin gate block or put the margin block in the standard structure XVBEP-LIFSP = '08' or initial.
For recording the status of each level i.e. PM/BUM/MD the PERFORM margin_block_remove /
margin_block_put will be used.
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 13/22
13
if vbak-AUART = 'ZORD'. ß- Check for the sale order document.Function module to receive line items which are required for the block /not for the block.
CALL FUNCTION 'ZPUT_MARGIN_GATE' TABLES XVBEP = XVBEP ßXVBEP table will be changedCHANGING vbep = vbep <-VBEP structure will be changed.vbak_line = vbak. <-VBAK structure will be changed.
endif.
Step 2: Performing the routine
You can access the 600 pricing routine from VOFM transaction code. Compare sales price with condition
type’s kwert value. If sales price is less then condition type’s kwert value put a block to xvbep structure.
Step 3: Database table Update
For the enhancement implementation ZSOD_DB_UPDATE of ES_SAPMV45A enhancement spot for
BELEG_SICHERN_14 enhancement point. We use function module 'ZSOD_DB_UPDATE'
NOTE: Margin gate control is applicable for the document type which are maintained in the table
'ZSD_SOD_DOC_TYP'
call function 'ZSOD_DB_UPDATE' exporting im_vbap = vbapim_vbep = vbep
tables komv_tab = xkomvvbap_tab = xvbap
* komk_tab = vbep_tab = xvbeptkomp = tkompyvbap = yvbap
changing im_vbak = vbak.
C:\Documents andSettings\sapdev\Des
To update the ZSD_MARGIN_HEAD & ZSD_MARGIN_GATE tables.
§ For item level block VBEP-LIFSP status are updated based on the value filled in the internal table
by PERFORM margin_block_remove/ margin_block_put (ZSD_MARGIN_GATE)
§ For Header Block VBAK-LIFSK is filled based on the total of CEO Margin i.e. ZM15 of all the line
items and the Total Net value of the order for Non rejected items(If line item has been rejected
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 14/22
14
for any reason then don’t consider the particular line item in the calculation).
ZSD_MARGIN_HEAD
STATUS INDICATORS FOR ZTABLESBlock : 08
Rejected : 93
Approved: 43
Order Change§ If order has been changed then the margin gate calculation will be done again.
§ If order has been approve after the block and some changes the order quantity or some
thing else which affects the Front end margin the following logic will be applied:
If New quantity not equal to old quantity OR New FEM < Old FEM OR New FEM % < Old FEM %
Then block the order again as per the calculation
if ls_komv-kwert < ls_margin_gate-fem_zabm or ls_komv_p-kwert < ls_margin_gate-fem_zmgp or ls_vbap-kwmeng <> ls_margin_gate-kwmeng.
update zsd_margin_gate set pm_block = ls_mgate-pm_blockbu_block = ls_mgate-bu_blockmd_block = ls_mgate-md_blockapproved = ls_mgate-approvedrejected = ls_mgate-rejected
where vbeln = ls_mgate-vbelnand posnr = ls_mgate-posnr.
if sy-subrc <> 0. modify zsd_margin_gate from ls_mgate.
clear ls_mgate.endif. endif.
DEAL SALES ORDER
§ For deal Sales Order all the calculations are done after save command and there is only
header level block no item level block. All the block status are recorded in the Table
ZSD_MARGIN_HEAD and the approval is also done for header level only by all the blocks
i.e. PM/BUM/MD/CEO.
§ For Header Block VBAK-LIFSK is filled based on the total of XXX Margin i.e. ZMXX of all the
line items and the Total Net value of the order for Non rejected items(If line item has been
rejected for any reason then don’t consider the particular line item in the calculation).
For example: ZM01 of all the line items < Net Value of the order then VBAK-LIFSK = '08' and the
Header table will be recorded PM status = 08.
NOTE: If line item is Deleted or rejected from the transaction VA02 then do not record in the table
and don’t consider for margin calculation.
Order change
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 15/22
15
§ If order has been changed then the margin gate calculation will be done again.
§ If order has been approve after the block and some changes the order quantity or some
thing else which affects the Front end margin the following logic will be applied:
If New quantity not equal to old quantity OR New FEM < Old FEM OR New FEM % < Old FEM %
Then block the order again as per the calculation
* Deal Sales Order if im_vbak-auart = 'ZODL'. Loop at vbap_tab where updkz ne 'D'
and abgru = ' '. lv_kzwi2 = lv_kzwi2 + vbap_tab-kzwi2.
* PM Header Block for Deal Sales Order read table komv_tab into komv_n with key kposn = vbap_tab-posnr
kschl = 'ZN01' kinak = ' '.
If sy-subrc ne 0. Read table komv_tab into komv_m with key kposn = vbap_tab-posnr
kschl = 'ZM01' kinak = ' '.
if sy-subrc = 0. lv_kwert_zm01 = lv_kwert_zm01 + komv_m-kwert.
Endif. else if sy-subrc = 0. lv_kwert_zm01 = lv_kwert_zm01 + komv_n-kwert .
Endif. Endif.
* PM Margin Gate Check if lv_kzwi2 < lv_kwert_zm01.if ls_margin_head-approved = 'X'. if lv_zabm < ls_margin_head-fem_zabm or
lv_zmgp < ls_margin_head-fem_zmgp .ls_mgate_head-pm_block = '05'. im_vbak-lifsk= '08'. block = 'X'.
endif. else.
ls_mgate_head-pm_block = '05'. im_vbak-lifsk = '08'. block = 'X'.
endif. else. ls_margin_head-pm_block= ' '.
endif.
Assumptions Made
N.A
Screen Number and Title
N.A
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 16/22
16
Screen Description
N.A
Screen Logic / Process Before Output Define the SAP processing before the screen is output.
N.A
Screen Logic / Process After Input Define the SAP processing after the screen is input.
N.A
Screen Logic / Process on Help Request Define the SAP processing for help.
N.A
Screen Logic / Process on Value Request Define the SAP processing for value request
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 17/22
17
DICTIONARY OBJECTTS
Database Table/ Structure/View/Index Name
Table/ Structure/View/Index Description
Table/ Structure/View/Index Change Type
Sizing
Monthly Data Volume Online Retention (in months)
Method for Data Purge (delete,
archive, etc.)
ABAP Name
Data Maintenance and Security ABAP Name
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 18/22
18
DETAILED FORMS DESIGN SPECIFICATIONS
All new and modified forms for this design will be defined. Repeat this section for each form included inthis design.
(Enter form name here)
NA
Form Description
N A
Form Code
(Mention logic for selection done from within the smart form)
Form Details
(Fill as Necessary and Applicable)
N.A
Form Print ParametersN.A
Form Comments
NOTE: Print program details have to be mentioned in the ‘DETAILED PROGRAM DESIGN
SPECIFICATIONS’
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 19/22
19
DETAILED SAP SCRIPT DESIGN SPECIFICATIONS
All new and modified SAP Scripts for this design will be defined. Repeat this section for each SAP Scriptincluded in this design.
(Enter SAP script name here)
N.A
SAP Script Description
SAP Script Elements / Pages / Windows / Page Window Details
Window Meaning Type
NOTE: Print program details have to be mentioned in the ‘DETAILED PROGRAM DESIGN
SPECIFICATIONS’
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 20/22
20
DETAILED SEARCH HELP / MATCHCODE DESIGN
SPECIFICATIONS
All new and modified search help / matchcode objects for this design will be defined. Repeat this section
for each search help / matchcode object included in this design.
(enter search help / matchcode object name here)
Search Help / Matchcode Description
Table Name
Table Description
Change Type
New _____ Modified _____
Field Name Field
Type
Field
Length
Key
Information
Field Description
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 21/22
21
OTHER OBJECT SPECIFICATIONS
Name and Description
Object details
Change Type
New _____ Modified _____
7/30/2019 Time Mechine Ts Triggring Margin Gate Calculation for Sales Order v1.02
http://slidepdf.com/reader/full/time-mechine-ts-triggring-margin-gate-calculation-for-sales-order-v102 22/22
End of Document