Hierarchy
⤷ BW-WHM-DST (Application Component) Data Staging
⤷ RSAU (Package) Update
Basic Data
Data Element | RSROUTTXT4 |
Short Description | Routines with Unit Calculation |
Data Type
Category of Dictionary Type | D | Domain |
Type of Object Referenced | No Information | |
Domain / Name of Reference Type | TEXT60 | |
Data Type | CHAR | Character String |
Length | 60 | |
Decimal Places | 0 | |
Output Length | 60 | |
Value Table |
Further Characteristics
Search Help: Name | ||
Search Help: Parameters | ||
Parameter ID | ||
Default Component name | ||
Change document | ||
No Input History | ||
Basic direction is set to LTR | ||
No BIDI Filtering |
Field Label
Length | Field Label | |
Short | 10 | Routine |
Medium | 20 | Routine |
Long | 40 | Routine |
Heading | 60 | Routine |
Documentation
Definition
When setting the key figure Routine with Unit Calculation, there is the additional return parameter UNIT. You can store the required key figure unit in it, for example DEM or ST.
Caution: The units are not checked. When calculating units, you need to check for inconsistencies yourself.
Use
Dependencies
Example
The following routine shows an example of a routine with unit calculation which converts SALES_UNIT (sales unit) to BASE_UOM (base unit of measure).
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS80CM_DS02
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BI0/V0CM_C06T-RTPRINSABU
UNIT LIKE /BI0/V0CM_C06T-BASE_UOM
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
*
*$*$ begin of routine - insert your code only below this line *-*
* Sales = '201', Credit Note = '202'
IF ( COMM_STRUCTURE-PROCESSKEY = '201'
OR COMM_STRUCTURE-PROCESSKEY = '202' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'SD'
* Only promotions Sales are updated.
AND NOT COMM_STRUCTURE-RT_PROMO IS INITIAL.
* Quantity convert from order quantity to basic quantity
* result value of the routine
IF COMM_STRUCTURE-INV_QTY <> 0. "order volume in sales UNIT
PERFORM QUANTITY_CONVERT
USING COMM_STRUCTURE-INV_QTY"order volume in sales UNIT
COMM_STRUCTURE-SALES_UNIT "sales UNIT
COMM_STRUCTURE-BASE_UOM "basic UNIT
COMM_STRUCTURE-NUMERATOR "Numerator for calculation
COMM_STRUCTURE-DENOMINTR "denominator for calculation
CHANGING RESULT.
UNIT = COMM_STRUCTURE-BASE_UOM.
RETURNCODE = 0.
ELSE.
RETURNCODE = 4.
ENDIF.
ELSE.
RETURNCODE = 4.
ENDIF.
ABORT = 0.
*$*$ end of routine - insert your code only before this line *-*
*
History
Last changed by/on | SAP | 20130604 |
SAP Release Created in | 30A |