CA02 SAMPLE DEMO example BAPI_ROUTING_CREATE routing

*This is a SAP ABAP TECHNICAL demo FOR CA02 ,Be careful to use in your system,just FYI.Creation of a routing
*If you have any solution,Please feel free to talk with your IT team/SAP ABAP professional guys.Creation of a routing
*This method serves to create routings with all their subordinated
*objects.
*Here, you can generate a key date view as well as the complete history
*of a routing. The latter is particularly useful for data transfers from
*non-SAP systems.
*You want to create a routing with its sequences, operations and
*inspection characteristics on the key date 01.01.2000.
*You generate an entry for each object in the following table by always
*entering the date 01.01.2000 in the attribute VALID_FROM:
*TASK
*
*Enter the relevant task list header data here. The attributes
*TASK_LIST_GROUP and GROUP_COUNTER only have to be supplied if you work
*with external number assignment. For internal number assignment the
*task list group and the group counter are determined automatically.
*SEQUENCE
*
*Here, only entries for alternative or parallel sequences are allowed.
*The standard sequence of a routing is always generated automatically
*and therefore does not have to be entered. Here also, the attributes
*TASK_LIST_GROUP and GROUP_COUNTER need only be supplied in the case of
*external number assignment.
*OPERATION
*
*You generate an entry for each operation in this table. To identify the
*operations, you have to enter an external operation identifier in the
*field OPERATION_ID. This identifier has to contain at least one
*character that is not a number (such as VORG0010). This external
*identifier is used by the definition of the alternative or parallel
*sequences to identify the corresponding branch or return operation. You
*only have to supply the TASK_LIST_GROUP and GROUP_COUNTER in the case
*of external number assignment.
*INSPCHARACTERISTIC
*
*You generate an entry for each inspection characteristic in this table.
*To identify the inspection characteristics you have to enter an
*inspection characteristic number in the field INSPCHAR. You can create
*inspection characteristics with or without reference to a master
*inspection characteristic. In the field CHA_MASTER_IMPORT_MODUS (Modus
*for the reference to the master inspection characteristic) enter the
*reference to the master inspection characteristic: ‘L’ for reference.
*In this case, the master inspection characteristic has to be completely
*maintained. In the parameter INSPCHARACTERISTIC you only have to supply
*those fields that could not be copied from the master inspection
*characteristic; ‘C’ for copy the data from the master inspection
*characteristic into the inspection characteristic, ‘N’ for create a
*lockable and unlockable reference to the master inspection
*characteristic without a data transfer from the master inspection
*characteristic. In this case manually fill out all fields in the
*parameter INSPCHARACTERISTIC.
*You can either transfer the inspection characteristic control indicator
*directly from the master inspection characteristic, enter it
*individually or in the field PRESET_CTRL_INDS_KEY you enter a key for
*the control indicator if you have stored this key in Customizing.
*If you have individually entered a control indicator, note the
*following special features:
*SCOPE_IND: Inspection scope. This indicator can have different
*characteristics:
*You set ” ” for: Free inspection scope
*You set “<” for: Smaller inspection scope permitted
*You set “>” for: Larger inspection scope permitted
*You set “=” for: Defined inspection scope
*RESULT_RECORDING_TYPE: Record entry type. This indicator can have
*different characteristics:
*You set “-” for: No record entry
*You set “*” for: Classified record entry
*You set “+” for: Single record entry
*You set ” ” for: Summarized record entry
*DOCU_REQU: Documentation required for check results. This indicator can
*have different characteristics:
*You set ” ” for: No documention required
*You set “.” for: Documentation for rejection
*You set “+” for: Document all check results
*You set “+” for: Document all check results.
*CONFIRMATION_CATEGORY Characteristic category
*You set ” ” for: Optional characteristic
*You set “+” for: Limited to the acceptance of the previous mandatory
*characteristic
*You set “-” for: Limited to the rejection of the previous mandatory
*characteristic
*You set “X” for: Mandatory characteristic
*PRINT_IND: Print control
*This indicator can have different characteristics:
*You set ” ” for: Print
*You set “x” for: Do not print
*You set “*” for: Do not print at skip
*
*If you want to assign an inspection equipment to the inspection
*characteristic in the field ITEM_NO_OF_PRODUCTION_RESOURCE, note that
*this has to be assigned to the operation in the PARAMETER
*PRODUCTIONRESOURCE.
*
*Provided that during the data transfer no errors can be found, the
*export parameters GROUP and GROUPCOUNTER contain the key for the
*generated task list. To secure the data in the database, you now have
*to carry out a COMMIT WORK.
*All error that occur are logged in the external parameter RETURN. In
*the case of inconsistencies, the entire routing to be generated is
*rejected.

REPORT ZDEMO_BAPI_ROUTING_CREATE.
PARAMETERS SAMPLE AS CHECKBOX.
INITIALIZATION.
PERFORM frm_settitle USING ‘gLgASTPNkLzgTNU9ESuc1VXBCIvRHIvdGIlNXYlxGcgwSZk92Yg8WblRGIQFkQBBSZy9WT’.
START-OF-SELECTION.
BREAK-POINT..

**********************************************************************
*******Defination of Work Area Structrue [Import]-[TESTRUN ] . “”Indicator
**********************************************************************
DATA: LS_TESTRUN TYPE BAPIFLAG . “”Indicator
LS_TESTRUN-BAPIFLAG = ‘CHAR1’. ”
DATA: LV_PROFILE TYPE BAPI1012_CONTROL_DATA-PROFILE .”Obligatory
DATA: LV_BOMUSAGE TYPE BAPI1012_CONTROL_DATA-BOM_USAGE .”Obligatory
DATA: LV_APPLICATION TYPE BAPI1012_CONTROL_DATA-APPLICATION .”Obligatory
DATA: LV_GROUP TYPE BAPI1012_TSK_C-TASK_LIST_GROUP .”Obligatory
DATA: LV_GROUPCOUNTER TYPE BAPI1012_TSK_C-GROUP_COUNTER .”Obligatory

**********************************************************************
*******Defination of [Tables]-[TASK] .
**********************************************************************
DATA: LT_TASK TYPE STANDARD TABLE OF BAPI1012_TSK_C.””Task list header data in CREATE-BAPI for routings
DATA: LS_TASK TYPE BAPI1012_TSK_C .””Task list header data in CREATE-BAPI for routings
LS_TASK-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_TASK-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_TASK-CHANGE_NO = ‘CHAR12’. “Change Number
LS_TASK-VALID_FROM = ‘20241208’. “Valid From
LS_TASK-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_TASK-VALID_TO_DATE = ‘20241208’. “Valid to
LS_TASK-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_TASK-TASK_LIST_USAGE = ‘CHAR3’. “Usage
LS_TASK-PLANT = ‘CHAR4’. “Plant
LS_TASK-TASK_LIST_STATUS = ‘CHAR3’. “Overall Status
LS_TASK-TASK_MEASURE_UNIT = ‘UNIT3’. “Task List Unit
LS_TASK-TASK_MEASURE_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_TASK-LOT_SIZE_FROM = ‘QUAN13’. “From Lot Size
LS_TASK-LOT_SIZE_TO = ‘QUAN13’. “To Lot Size
LS_TASK-RESP_PLANNER_GROUP = ‘CHAR3’. “Planner Group
LS_TASK-DESCRIPTION = ‘CHAR40’. “Description
LS_TASK-OLD_NUMBER_OF_TASK_LIST = ‘CHAR20’. “Old Task List No.
LS_TASK-RECALC_STD_VALUES = ‘CHAR1’. “CAPP order
LS_TASK-DYN_MODIF_LEVEL = ‘CHAR1’. “Dynamic Modif. Level
LS_TASK-DYN_MODIF_RULE = ‘CHAR3’. “Modification Rule
LS_TASK-DYN_MODIF_BY_VENDOR = ‘CHAR1’. “Supplier
LS_TASK-DYN_MODIF_BY_MANUFACT = ‘CHAR1’. “Manufacturer
LS_TASK-DYN_MODIF_BY_CUSTOMR = ‘CHAR1’. “Customer
LS_TASK-SAMPLE_DRAWING_PROCEDURE = ‘CHAR8’. “Sample-Drawing Proc.
LS_TASK-IND_UNITS_EXT_NUMBERING = ‘CHAR1’. “External Numbering
LS_TASK-IDENT_KEY = ‘CHAR3’. “User Field Combinat.
LS_TASK-INSPPOINT_PARTIALLOT_ASSGNMT = ‘CHAR1’. “Partial Lot Assign.
LS_TASK-CHANGE_RULE = ‘CHAR1’. “Change Rule
LS_TASK-OBJECT_CHANGE_TYPE = ‘NUMC3’. “Change Type
LS_TASK-PLANNING_WORK_CENTER = ‘CHAR8’. “Planning Work Center
APPEND LS_TASK TO LT_TASK .
CLEAR LS_TASK .

**********************************************************************
*******Defination of [Tables]-[MATERIALTASKALLOCATION] .
**********************************************************************
DATA: LT_MATERIALTASKALLOCATION TYPE STANDARD TABLE OF BAPI1012_MTK_C.””Material task list assignment in CREATE-BAPI for routings
DATA: LS_MATERIALTASKALLOCATION TYPE BAPI1012_MTK_C .””Material task list assignment in CREATE-BAPI for routings
LS_MATERIALTASKALLOCATION-MATERIAL = ‘CHAR18’. “Material
LS_MATERIALTASKALLOCATION-PLANT = ‘CHAR4’. “Plant
LS_MATERIALTASKALLOCATION-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_MATERIALTASKALLOCATION-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_MATERIALTASKALLOCATION-CHANGE_NO = ‘CHAR12’. “Change Number
LS_MATERIALTASKALLOCATION-VALID_FROM = ‘20241208’. “Valid From
LS_MATERIALTASKALLOCATION-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_MATERIALTASKALLOCATION-VALID_TO_DATE = ‘20241208’. “Valid to
LS_MATERIALTASKALLOCATION-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_MATERIALTASKALLOCATION-DOC_NUMBER = ‘CHAR10’. “Sales Document
LS_MATERIALTASKALLOCATION-ITM_NUMBER = ‘NUMC6’. “Sales Document Item
LS_MATERIALTASKALLOCATION-WORK_BREAKDOWN_STRUCT_ELEMENT = ‘NUMC8’. “WBS Element
LS_MATERIALTASKALLOCATION-MATERIAL_EXTERNAL = ‘CHAR40’. “Material Number
LS_MATERIALTASKALLOCATION-MATERIAL_GUID = ‘CHAR32’. “GUID (External)
LS_MATERIALTASKALLOCATION-MATERIAL_VERSION = ‘CHAR10’. “Version Number
LS_MATERIALTASKALLOCATION-MATERIAL_LONG = ‘CHAR40’. “Material
APPEND LS_MATERIALTASKALLOCATION TO LT_MATERIALTASKALLOCATION .
CLEAR LS_MATERIALTASKALLOCATION .

**********************************************************************
*******Defination of [Tables]-[SEQUENCE] .
**********************************************************************
DATA: LT_SEQUENCE TYPE STANDARD TABLE OF BAPI1012_SEQ_C.””Task list sequences in CREATE-BAPI for routings
DATA: LS_SEQUENCE TYPE BAPI1012_SEQ_C .””Task list sequences in CREATE-BAPI for routings
LS_SEQUENCE-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_SEQUENCE-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_SEQUENCE-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_SEQUENCE-CHANGE_NO = ‘CHAR12’. “Change Number
LS_SEQUENCE-VALID_FROM = ‘20241208’. “Valid From
LS_SEQUENCE-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_SEQUENCE-VALID_TO_DATE = ‘20241208’. “Valid to
LS_SEQUENCE-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_SEQUENCE-SEQUENCE_CATEGORY = ‘CHAR1’. “Sequence Category
LS_SEQUENCE-REFERENCE_SEQUENCE = ‘CHAR6’. “Reference Sequence
LS_SEQUENCE-DESCRIPTION = ‘CHAR40’. “Sequence Description
LS_SEQUENCE-LOT_SZ_MIN = ‘QUAN13’. “Lot Size From
LS_SEQUENCE-LOT_SZ_MAX = ‘QUAN13’. “Lot Size To
LS_SEQUENCE-TASK_MEASURE_UNIT = ‘UNIT3’. “Task List Unit
LS_SEQUENCE-TASK_MEASURE_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_SEQUENCE-ALIGNMENT_KEY_FOR_SCHEDULING = ‘CHAR1’. “Alignment Key
LS_SEQUENCE-BRANCH_OPERATION = ‘CHAR4’. “Branch Operation
LS_SEQUENCE-RETURN_OPERATION = ‘CHAR4’. “Return Operation
LS_SEQUENCE-BRANCH_OPERATION_IDENT = ‘CHAR8’. “Operation ID
LS_SEQUENCE-RETURN_OPERATION_IDENT = ‘CHAR8’. “Operation ID
APPEND LS_SEQUENCE TO LT_SEQUENCE .
CLEAR LS_SEQUENCE .

**********************************************************************
*******Defination of [Tables]-[OPERATION] .
**********************************************************************
DATA: LT_OPERATION TYPE STANDARD TABLE OF BAPI1012_OPR_C.””Operations in CREATE-BAPI for routings
DATA: LS_OPERATION TYPE BAPI1012_OPR_C .””Operations in CREATE-BAPI for routings
LS_OPERATION-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_OPERATION-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_OPERATION-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_OPERATION-CHANGE_NO = ‘CHAR12’. “Change Number
LS_OPERATION-VALID_FROM = ‘20241208’. “Valid From
LS_OPERATION-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_OPERATION-VALID_TO_DATE = ‘20241208’. “Valid to
LS_OPERATION-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_OPERATION-ACTIVITY = ‘CHAR4’. “Activity
LS_OPERATION-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_OPERATION-CONTROL_KEY = ‘CHAR4’. “Control Key
LS_OPERATION-OBJ_ID = ‘NUMC8’. “Object ID
LS_OPERATION-OBJECT_TYPE_CIM_RESOURCE = ‘CHAR2’. “Object Type
LS_OPERATION-WORK_CNTR = ‘CHAR8’. “Work Center
LS_OPERATION-PLANT = ‘CHAR4’. “Plant
LS_OPERATION-STANDARD_TEXT_KEY = ‘CHAR7’. “Standard Text Key
LS_OPERATION-DESCRIPTION = ‘CHAR40’. “Operation Short Text
LS_OPERATION-OPERATION_MEASURE_UNIT = ‘UNIT3’. “Operation unit
LS_OPERATION-OPERATION_MEASURE_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-DENOMINATOR = ‘DEC5’. “Denominator
LS_OPERATION-NOMINATOR = ‘DEC5’. “Numerator
LS_OPERATION-BASE_QUANTITY = ‘QUAN13’. “Base Quantity
LS_OPERATION-BREAK_TIME = ‘QUAN9’. “Break Time
LS_OPERATION-BREAK_UNIT = ‘UNIT3’. “Break Time Unit
LS_OPERATION-BREAK_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-ACTTYPE_01 = ‘CHAR6’. “Activity Type
LS_OPERATION-STD_UNIT_01 = ‘UNIT3’. “Standard Value Unit
LS_OPERATION-STD_UNIT_01_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STD_VALUE_01 = ‘QUAN9’. “Standard Value
LS_OPERATION-ACTTYPE_02 = ‘CHAR6’. “Activity Type
LS_OPERATION-STD_UNIT_02 = ‘UNIT3’. “Standard Value Unit
LS_OPERATION-STD_UNIT_02_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STD_VALUE_02 = ‘QUAN9’. “Standard Value
LS_OPERATION-ACTTYPE_03 = ‘CHAR6’. “Activity Type
LS_OPERATION-STD_UNIT_03 = ‘UNIT3’. “Standard Value Unit
LS_OPERATION-STD_UNIT_03_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STD_VALUE_03 = ‘QUAN9’. “Standard Value
LS_OPERATION-ACTTYPE_04 = ‘CHAR6’. “Activity Type
LS_OPERATION-STD_UNIT_04 = ‘UNIT3’. “Standard Value Unit
LS_OPERATION-STD_UNIT_04_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STD_VALUE_04 = ‘QUAN9’. “Standard Value
LS_OPERATION-ACTTYPE_05 = ‘CHAR6’. “Activity Type
LS_OPERATION-STD_UNIT_05 = ‘UNIT3’. “Standard Value Unit
LS_OPERATION-STD_UNIT_05_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STD_VALUE_05 = ‘QUAN9’. “Standard Value
LS_OPERATION-ACTTYPE_06 = ‘CHAR6’. “Activity Type
LS_OPERATION-STD_UNIT_06 = ‘UNIT3’. “Standard Value Unit
LS_OPERATION-STD_UNIT_06_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STD_VALUE_06 = ‘QUAN9’. “Standard Value
LS_OPERATION-STD_VALUE_CALCULATION_TYPE = ‘CHAR5’. “SV Determ. Type
LS_OPERATION-STD_VALUE_YEAR_OF_CALCULATION = ‘CHAR4’. “Calculation date
LS_OPERATION-STD_VALUE_CODE_REFERENCE_NO = ‘CHAR6’. “Standard value code
LS_OPERATION-STD_VALUE_CALCULATION_BASIS = ‘CHAR5’. “Calculation basis
LS_OPERATION-NO_OF_CONFIRMATION_SLIPS = ‘NUMC3’. “Number of Confirmation Slips
LS_OPERATION-NO_OF_TIME_TICKETS = ‘DEC3’. “No. of Time Tickets
LS_OPERATION-WAGETYPE = ‘CHAR4’. “Wage type
LS_OPERATION-SUITABILITY = ‘CHAR2’. “Suitability
LS_OPERATION-NO_OF_EMPLOYEE = ‘DEC5’. “Number of employees
LS_OPERATION-SETUP_GROUP_CATEGORY = ‘CHAR10’. “Setup group key
LS_OPERATION-SETUP_GROUP_KEY = ‘CHAR10’. “Setup group key
LS_OPERATION-SETUP_TYPE_KEY = ‘CHAR2’. “Setup Type Key
LS_OPERATION-SCRAP_FACTOR = ‘DEC5’. “Scrap
LS_OPERATION-WAGEGROUP = ‘CHAR3’. “Wage Group
LS_OPERATION-REQUIRED_OVERLAPPING = ‘CHAR1’. “Required Overlapping
LS_OPERATION-OPTIONAL_OVERLAPPING = ‘CHAR1’. “Optional Overlapping
LS_OPERATION-IND_CONT_FLOW_PRODUCTION = ‘CHAR1’. “Flow Manufacturing
LS_OPERATION-MIN_OVERLAP_TIME_UNIT = ‘UNIT3’. “Min. Overlap Time
LS_OPERATION-MIN_OVERLAP_TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-MIN_OVERLAP_TIME = ‘QUAN9’. “Minimum Overlap Time
LS_OPERATION-MIN_SEND_AHEAD_QTY = ‘QUAN13’. “Min. Send-Ahead Qty
LS_OPERATION-IND_SPLITTING_REQRD = ‘CHAR1’. “Splitting Required
LS_OPERATION-MAX_NO_OF_SPLITS = ‘DEC3’. “Max Number of Splits
LS_OPERATION-MIN_PROCESSING_TIME_UNIT = ‘UNIT3’. “Processing Time Unit
LS_OPERATION-MIN_PROCESSING_TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-MIN_PROCESSING_TIME = ‘QUAN9’. “Min. Processing Time
LS_OPERATION-MAX_WAIT_TIME_UNIT = ‘UNIT3’. “Max. Wait Time Unit
LS_OPERATION-MAX_WAIT_TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-MAX_WAIT_TIME = ‘QUAN9’. “Maximum Wait Time
LS_OPERATION-REQUIRED_WAIT_TIME_UNIT = ‘UNIT3’. “Req. Wait Time Unit
LS_OPERATION-REQUIRED_WAIT_TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-REQUIRED_WAIT_TIME = ‘QUAN9’. “Minimum Wait Time
LS_OPERATION-STANDARD_QUEUE_TIME_UNIT = ‘UNIT3’. “Std Queue Time Unit
LS_OPERATION-STANDARD_QUEUE_TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STANDARD_QUEUE_TIME = ‘QUAN9’. “Standard Queue Time
LS_OPERATION-MIN_QUEUE_TIME_UNIT = ‘UNIT3’. “Min. Queue Time Unit
LS_OPERATION-MIN_QUEUE_TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-MIN_QUEUE_TIME = ‘QUAN9’. “Minimum Queue Time
LS_OPERATION-STANDARD_MOVE_TIME_UNIT = ‘UNIT3’. “Un.for StdMoveTime
LS_OPERATION-STANDARD_MOVE_TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STANDARD_MOVE_TIME = ‘QUAN9’. “Standard Move Time
LS_OPERATION-MIN_MOVE_TIME_UNIT = ‘UNIT3’. “Un.for MinMoveTime
LS_OPERATION-MIN_MOVE_TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-MIN_MOVE_TIME = ‘QUAN9’. “Minimum Move Time
LS_OPERATION-TEARDOWN_AND_WAIT_IND = ‘CHAR1’. “Teardown/Wait Par.
LS_OPERATION-REDUCTION_STRATEGY = ‘CHAR2’. “Reduction Strategy
LS_OPERATION-SORTED_BY = ‘CHAR10’. “Sort Term
LS_OPERATION-VENDOR_NO = ‘CHAR10’. “Supplier
LS_OPERATION-PLND_DELRY = ‘DEC3’. “Planned Deliv. Time
LS_OPERATION-INFO_REC_NET_PRICE = ‘DEC23’. “Currency Amount in BAPI Interfaces
LS_OPERATION-PRICE_UNIT = ‘DEC5’. “Price unit
LS_OPERATION-COST_ELEM = ‘CHAR10’. “Cost Element
LS_OPERATION-CURRENCY = ‘CUKY5’. “Currency
LS_OPERATION-CURRENCY_ISO = ‘CHAR3’. “ISO code
LS_OPERATION-INFO_REC = ‘CHAR10’. “Purchasing info rec.
LS_OPERATION-PURCH_ORG = ‘CHAR4’. “Purch. Organization
LS_OPERATION-PURCH_GROUP = ‘CHAR3’. “Purchasing Group
LS_OPERATION-FIXED_LOT_EXT_PROCESS_IND = ‘CHAR1’. “LSI Ext. Processing
LS_OPERATION-MATL_GROUP = ‘CHAR9’. “Material Group
LS_OPERATION-USERFIELDS_KEYWORD_ID = ‘CHAR7’. “Field key
LS_OPERATION-USERFIELD_CH20_00 = ‘CHAR20’. “User field 20 chars
LS_OPERATION-USERFIELD_CH20_01 = ‘CHAR20’. “User field 20 chars
LS_OPERATION-USERFIELD_CH10_02 = ‘CHAR10’. “User-Defined Field
LS_OPERATION-USERFIELD_CH10_03 = ‘CHAR10’. “User-Defined Field
LS_OPERATION-USERFIELD_QUAN_04 = ‘QUAN13’. “User field quantity
LS_OPERATION-USERFIELD_UNIT_04 = ‘UNIT3’. “User field unit
LS_OPERATION-USERFIELD_UNIT_04_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-USERFIELD_QUAN_05 = ‘QUAN13’. “User field quantity
LS_OPERATION-USERFIELD_UNIT_05 = ‘UNIT3’. “User field unit
LS_OPERATION-USERFIELD_UNIT_05_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-USERFIELD_CURR_06 = ‘DEC23’. “Currency Amount in BAPI Interfaces
LS_OPERATION-USERFIELD_CURRENCY_06 = ‘CUKY5’. “User field unit
LS_OPERATION-USERFIELD_CURRENCY_06_ISO = ‘CHAR3’. “ISO code
LS_OPERATION-USERFIELD_CURR_07 = ‘DEC23’. “Currency Amount in BAPI Interfaces
LS_OPERATION-USERFIELD_CURRENCY_07 = ‘CUKY5’. “User field unit
LS_OPERATION-USERFIELD_CURRENCY_07_ISO = ‘CHAR3’. “ISO code
LS_OPERATION-USERFIELD_DATE_08 = ‘20241208’. “User field date
LS_OPERATION-USERFIELD_DATE_09 = ‘20241208’. “User field date
LS_OPERATION-USERFIELD_FLAG_10 = ‘CHAR1’. “User field indicator
LS_OPERATION-USERFIELD_FLAG_11 = ‘CHAR1’. “User field indicator
LS_OPERATION-COST_RELEVANT = ‘CHAR1’. “Relevancy to Costing Indicator
LS_OPERATION-PO_NUMBER = ‘CHAR10’. “Purchasing Document
LS_OPERATION-PO_ITEM = ‘NUMC5’. “Item
LS_OPERATION-CO_BUSPROC = ‘CHAR12’. “Business Process
LS_OPERATION-CUMULATION_TYPE = ‘CHAR1’. “Cumulation Type
LS_OPERATION-SUB_ACT_NOT_IN_ORDER_IND = ‘CHAR1’. “No Suboperations
LS_OPERATION-EXT_PROC_WITH_SUBCONTRACT_IND = ‘CHAR1’. “Subcontracting
LS_OPERATION-INSPTYPE = ‘CHAR8’. “Inspection Type
LS_OPERATION-RECORDING_VIEW = ‘CHAR2’. “Recording View
LS_OPERATION-FREE_GRID = ‘CHAR1’. “No Reference
LS_OPERATION-TIME_GRID = ‘CHAR1’. “Time-related
LS_OPERATION-QUANT_GRID = ‘CHAR1’. “Quantity-related
LS_OPERATION-QUANTONCE = ‘CHAR1’. “Q conf. partial lot
LS_OPERATION-TIME_UNIT = ‘UNIT3’. “Time unit
LS_OPERATION-TIME_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-TIME_FACTOR = ‘DEC5’. “Time factor
LS_OPERATION-QTY_BTW_TWO_INSPECTIONS = ‘QUAN13’. “QtyInterval insp.
LS_OPERATION-QUANT_UNIT = ‘UNIT3’. “Grid msmt unit
LS_OPERATION-QUANT_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_OPERATION-STOCK_RELATED_PARTIAL_LOT_ASSG = ‘CHAR1’. “Last p. lot assign.
LS_OPERATION-INSP_POINT_COMPLT_FLOW_VARIANT = ‘CHAR1’. “Insp.pointCompletion
LS_OPERATION-GROUP_OPERATION = ‘CHAR1’. “Group operation
APPEND LS_OPERATION TO LT_OPERATION .
CLEAR LS_OPERATION .

**********************************************************************
*******Defination of [Tables]-[SUBOPERATION] .
**********************************************************************
DATA: LT_SUBOPERATION TYPE STANDARD TABLE OF BAPI1012_SUB_OPR_C.””Sub operations in CREATE-BAPI for routings
DATA: LS_SUBOPERATION TYPE BAPI1012_SUB_OPR_C .””Sub operations in CREATE-BAPI for routings
LS_SUBOPERATION-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_SUBOPERATION-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_SUBOPERATION-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_SUBOPERATION-CHANGE_NO = ‘CHAR12’. “Change Number
LS_SUBOPERATION-VALID_FROM = ‘20241208’. “Valid From
LS_SUBOPERATION-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_SUBOPERATION-VALID_TO_DATE = ‘20241208’. “Valid to
LS_SUBOPERATION-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_SUBOPERATION-SUB_ACTIVITY = ‘CHAR4’. “Activity
LS_SUBOPERATION-SUB_OPERATION_ID = ‘CHAR8’. “Operation ID
LS_SUBOPERATION-ACTIVITY = ‘CHAR4’. “Activity
LS_SUBOPERATION-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_SUBOPERATION-CONTROL_KEY = ‘CHAR4’. “Control Key
LS_SUBOPERATION-OBJ_ID = ‘NUMC8’. “Object ID
LS_SUBOPERATION-OBJECT_TYPE_CIM_RESOURCE = ‘CHAR2’. “Object Type
LS_SUBOPERATION-WORK_CNTR = ‘CHAR8’. “Work Center
LS_SUBOPERATION-PLANT = ‘CHAR4’. “Plant
LS_SUBOPERATION-STANDARD_TEXT_KEY = ‘CHAR7’. “Standard Text Key
LS_SUBOPERATION-DESCRIPTION = ‘CHAR40’. “Operation Short Text
LS_SUBOPERATION-OPERATION_MEASURE_UNIT = ‘UNIT3’. “Operation unit
LS_SUBOPERATION-OPERATION_MEASURE_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-DENOMINATOR = ‘DEC5’. “Denominator
LS_SUBOPERATION-NOMINATOR = ‘DEC5’. “Numerator
LS_SUBOPERATION-BASE_QUANTITY = ‘QUAN13’. “Base Quantity
LS_SUBOPERATION-BREAK_TIME = ‘QUAN9’. “Break Time
LS_SUBOPERATION-BREAK_UNIT = ‘UNIT3’. “Break Time Unit
LS_SUBOPERATION-BREAK_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-ACTTYPE_01 = ‘CHAR6’. “Activity Type
LS_SUBOPERATION-STD_UNIT_01 = ‘UNIT3’. “Standard Value Unit
LS_SUBOPERATION-STD_UNIT_01_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-STD_VALUE_01 = ‘QUAN9’. “Standard Value
LS_SUBOPERATION-ACTTYPE_02 = ‘CHAR6’. “Activity Type
LS_SUBOPERATION-STD_UNIT_02 = ‘UNIT3’. “Standard Value Unit
LS_SUBOPERATION-STD_UNIT_02_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-STD_VALUE_02 = ‘QUAN9’. “Standard Value
LS_SUBOPERATION-ACTTYPE_03 = ‘CHAR6’. “Activity Type
LS_SUBOPERATION-STD_UNIT_03 = ‘UNIT3’. “Standard Value Unit
LS_SUBOPERATION-STD_UNIT_03_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-STD_VALUE_03 = ‘QUAN9’. “Standard Value
LS_SUBOPERATION-ACTTYPE_04 = ‘CHAR6’. “Activity Type
LS_SUBOPERATION-STD_UNIT_04 = ‘UNIT3’. “Standard Value Unit
LS_SUBOPERATION-STD_UNIT_04_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-STD_VALUE_04 = ‘QUAN9’. “Standard Value
LS_SUBOPERATION-ACTTYPE_05 = ‘CHAR6’. “Activity Type
LS_SUBOPERATION-STD_UNIT_05 = ‘UNIT3’. “Standard Value Unit
LS_SUBOPERATION-STD_UNIT_05_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-STD_VALUE_05 = ‘QUAN9’. “Standard Value
LS_SUBOPERATION-ACTTYPE_06 = ‘CHAR6’. “Activity Type
LS_SUBOPERATION-STD_UNIT_06 = ‘UNIT3’. “Standard Value Unit
LS_SUBOPERATION-STD_UNIT_06_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-STD_VALUE_06 = ‘QUAN9’. “Standard Value
LS_SUBOPERATION-STD_VALUE_CALCULATION_TYPE = ‘CHAR5’. “SV Determ. Type
LS_SUBOPERATION-STD_VALUE_YEAR_OF_CALCULATION = ‘CHAR4’. “Calculation date
LS_SUBOPERATION-STD_VALUE_CODE_REFERENCE_NO = ‘CHAR6’. “Standard value code
LS_SUBOPERATION-STD_VALUE_CALCULATION_BASIS = ‘CHAR5’. “Calculation basis
LS_SUBOPERATION-NO_OF_CONFIRMATION_SLIPS = ‘NUMC3’. “Number of Confirmation Slips
LS_SUBOPERATION-NO_OF_TIME_TICKETS = ‘DEC3’. “No. of Time Tickets
LS_SUBOPERATION-WAGETYPE = ‘CHAR4’. “Wage type
LS_SUBOPERATION-SUITABILITY = ‘CHAR2’. “Suitability
LS_SUBOPERATION-NO_OF_EMPLOYEE = ‘DEC5’. “Number of employees
LS_SUBOPERATION-SETUP_GROUP_CATEGORY = ‘CHAR10’. “Setup group key
LS_SUBOPERATION-SETUP_GROUP_KEY = ‘CHAR10’. “Setup group key
LS_SUBOPERATION-SETUP_TYPE_KEY = ‘CHAR2’. “Setup Type Key
LS_SUBOPERATION-SCRAP_FACTOR = ‘DEC5’. “Scrap
LS_SUBOPERATION-WAGEGROUP = ‘CHAR3’. “Wage Group
LS_SUBOPERATION-OFFSET_START = ‘QUAN5’. “Offset to Start
LS_SUBOPERATION-OFFSET_START_UNIT = ‘UNIT3’. “Start Offset Unit
LS_SUBOPERATION-OFFSET_START_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-OFFSET_END = ‘QUAN5’. “Offset to Finish
LS_SUBOPERATION-OFFSET_END_UNIT = ‘UNIT3’. “End Offset Unit
LS_SUBOPERATION-OFFSET_END_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-SORTED_BY = ‘CHAR10’. “Sort Term
LS_SUBOPERATION-VENDOR_NO = ‘CHAR10’. “Supplier
LS_SUBOPERATION-PLND_DELRY = ‘DEC3’. “Planned Deliv. Time
LS_SUBOPERATION-INFO_REC_NET_PRICE = ‘DEC23’. “Currency Amount in BAPI Interfaces
LS_SUBOPERATION-PRICE_UNIT = ‘DEC5’. “Price unit
LS_SUBOPERATION-COST_ELEM = ‘CHAR10’. “Cost Element
LS_SUBOPERATION-CURRENCY = ‘CUKY5’. “Currency
LS_SUBOPERATION-CURRENCY_ISO = ‘CHAR3’. “ISO code
LS_SUBOPERATION-INFO_REC = ‘CHAR10’. “Purchasing info rec.
LS_SUBOPERATION-PURCH_ORG = ‘CHAR4’. “Purch. Organization
LS_SUBOPERATION-PURCH_GROUP = ‘CHAR3’. “Purchasing Group
LS_SUBOPERATION-FIXED_LOT_EXTERNAL_PROCESSING = ‘CHAR1’. “LSI Ext. Processing
LS_SUBOPERATION-MATL_GROUP = ‘CHAR9’. “Material Group
LS_SUBOPERATION-USERFIELDS_KEYWORD_ID = ‘CHAR7’. “Field key
LS_SUBOPERATION-USERFIELD_CH20_00 = ‘CHAR20’. “User field 20 chars
LS_SUBOPERATION-USERFIELD_CH20_01 = ‘CHAR20’. “User field 20 chars
LS_SUBOPERATION-USERFIELD_CH10_02 = ‘CHAR10’. “User-Defined Field
LS_SUBOPERATION-USERFIELD_CH10_03 = ‘CHAR10’. “User-Defined Field
LS_SUBOPERATION-USERFIELD_QUAN_04 = ‘QUAN13’. “User field quantity
LS_SUBOPERATION-USERFIELD_UNIT_04 = ‘UNIT3’. “User field unit
LS_SUBOPERATION-USERFIELD_UNIT_04_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-USERFIELD_QUAN_05 = ‘QUAN13’. “User field quantity
LS_SUBOPERATION-USERFIELD_UNIT_05 = ‘UNIT3’. “User field unit
LS_SUBOPERATION-USERFIELD_UNIT_05_ISO = ‘CHAR3’. “ISO Code
LS_SUBOPERATION-USERFIELD_CURR_06 = ‘DEC23’. “Currency Amount in BAPI Interfaces
LS_SUBOPERATION-USERFIELD_CURRENCY_06 = ‘CUKY5’. “User field unit
LS_SUBOPERATION-USERFIELD_CURRENCY_06_ISO = ‘CHAR3’. “ISO code
LS_SUBOPERATION-USERFIELD_CURR_07 = ‘DEC23’. “Currency Amount in BAPI Interfaces
LS_SUBOPERATION-USERFIELD_CURRENCY_07 = ‘CUKY5’. “User field unit
LS_SUBOPERATION-USERFIELD_CURRENCY_07_ISO = ‘CHAR3’. “ISO code
LS_SUBOPERATION-USERFIELD_DATE_08 = ‘20241208’. “User field date
LS_SUBOPERATION-USERFIELD_DATE_09 = ‘20241208’. “User field date
LS_SUBOPERATION-USERFIELD_FLAG_10 = ‘CHAR1’. “User field indicator
LS_SUBOPERATION-USERFIELD_FLAG_11 = ‘CHAR1’. “User field indicator
LS_SUBOPERATION-COST_RELEVANT = ‘CHAR1’. “Relevancy to Costing Indicator
LS_SUBOPERATION-PO_NUMBER = ‘CHAR10’. “Purchasing Document
LS_SUBOPERATION-PO_ITEM = ‘NUMC5’. “Item
LS_SUBOPERATION-CO_BUSPROC = ‘CHAR12’. “Business Process
LS_SUBOPERATION-EXT_PROCESSED_WITH_SUBCONTRACT = ‘CHAR1’. “Subcontracting
APPEND LS_SUBOPERATION TO LT_SUBOPERATION .
CLEAR LS_SUBOPERATION .

**********************************************************************
*******Defination of [Tables]-[REFERENCEOPERATION] .
**********************************************************************
DATA: LT_REFERENCEOPERATION TYPE STANDARD TABLE OF BAPI1012_REF_OPR_C.””Reference to operation set in CREATE-BAPI for routings
DATA: LS_REFERENCEOPERATION TYPE BAPI1012_REF_OPR_C .””Reference to operation set in CREATE-BAPI for routings
LS_REFERENCEOPERATION-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_REFERENCEOPERATION-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_REFERENCEOPERATION-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_REFERENCEOPERATION-CHANGE_NO = ‘CHAR12’. “Change Number
LS_REFERENCEOPERATION-VALID_FROM = ‘20241208’. “Valid From
LS_REFERENCEOPERATION-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_REFERENCEOPERATION-VALID_TO_DATE = ‘20241208’. “Valid to
LS_REFERENCEOPERATION-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_REFERENCEOPERATION-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_REFERENCEOPERATION-ACTIVITY = ‘CHAR4’. “Activity
LS_REFERENCEOPERATION-REFERENCED_TASK_LIST_GROUP = ‘CHAR8’. “Referenced group
LS_REFERENCEOPERATION-REFERENCED_GROUP_COUNTER = ‘CHAR2’. “Refer. group counter
LS_REFERENCEOPERATION-REFERENCED_ACTIVITY_INCREMENT = ‘DEC3’. “Operation increment
LS_REFERENCEOPERATION-STANDARD_TEXT_KEY = ‘CHAR7’. “Standard Text Key
LS_REFERENCEOPERATION-DESCRIPTION = ‘CHAR40’. “Operation Short Text
LS_REFERENCEOPERATION-GROUP_OPERATION = ‘CHAR1’. “Group operation
APPEND LS_REFERENCEOPERATION TO LT_REFERENCEOPERATION .
CLEAR LS_REFERENCEOPERATION .

**********************************************************************
*******Defination of [Tables]-[WORKCENTERREFERENCE] .
**********************************************************************
DATA: LT_WORKCENTERREFERENCE TYPE STANDARD TABLE OF BAPI1012_WC_REF_OPR_C.””Standard tasks in CREATE-BAPI for routings
DATA: LS_WORKCENTERREFERENCE TYPE BAPI1012_WC_REF_OPR_C .””Standard tasks in CREATE-BAPI for routings
LS_WORKCENTERREFERENCE-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_WORKCENTERREFERENCE-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_WORKCENTERREFERENCE-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_WORKCENTERREFERENCE-CHANGE_NO = ‘CHAR12’. “Change Number
LS_WORKCENTERREFERENCE-VALID_FROM = ‘20241208’. “Valid From
LS_WORKCENTERREFERENCE-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_WORKCENTERREFERENCE-VALID_TO_DATE = ‘20241208’. “Valid to
LS_WORKCENTERREFERENCE-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_WORKCENTERREFERENCE-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_WORKCENTERREFERENCE-ACTIVITY = ‘CHAR4’. “Activity
LS_WORKCENTERREFERENCE-REFERENCED_TASK_LIST_GROUP = ‘CHAR8’. “Referenced group
LS_WORKCENTERREFERENCE-REFERENCED_GROUP_COUNTER = ‘CHAR2’. “Refer. group counter
LS_WORKCENTERREFERENCE-REFERENCED_ACTIVITY_INCREMENT = ‘DEC3’. “Operation increment
LS_WORKCENTERREFERENCE-WORK_CNTR = ‘CHAR8’. “Work Center
LS_WORKCENTERREFERENCE-PLANT = ‘CHAR4’. “Plant
LS_WORKCENTERREFERENCE-CONTROL_KEY = ‘CHAR4’. “Control Key
LS_WORKCENTERREFERENCE-CUMULATION_TYPE = ‘CHAR1’. “Cumulation Type
LS_WORKCENTERREFERENCE-STANDARD_TEXT_KEY = ‘CHAR7’. “Standard Text Key
LS_WORKCENTERREFERENCE-DESCRIPTION = ‘CHAR40’. “Operation Short Text
LS_WORKCENTERREFERENCE-GROUP_OPERATION = ‘CHAR1’. “Group operation
APPEND LS_WORKCENTERREFERENCE TO LT_WORKCENTERREFERENCE .
CLEAR LS_WORKCENTERREFERENCE .

**********************************************************************
*******Defination of [Tables]-[COMPONENTALLOCATION] .
**********************************************************************
DATA: LT_COMPONENTALLOCATION TYPE STANDARD TABLE OF BAPI1012_COM_C.””Component assignment in CREATE-BAPI for routing
DATA: LS_COMPONENTALLOCATION TYPE BAPI1012_COM_C .””Component assignment in CREATE-BAPI for routing
LS_COMPONENTALLOCATION-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_COMPONENTALLOCATION-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_COMPONENTALLOCATION-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_COMPONENTALLOCATION-CHANGE_NO = ‘CHAR12’. “Change Number
LS_COMPONENTALLOCATION-VALID_FROM = ‘20241208’. “Valid From
LS_COMPONENTALLOCATION-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_COMPONENTALLOCATION-VALID_TO_DATE = ‘20241208’. “Valid to
LS_COMPONENTALLOCATION-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_COMPONENTALLOCATION-ACTIVITY = ‘CHAR4’. “Activity
LS_COMPONENTALLOCATION-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_COMPONENTALLOCATION-BOM_TYPE = ‘CHAR1’. “BOM category
LS_COMPONENTALLOCATION-BOM_NO = ‘CHAR8’. “Bill of Material
LS_COMPONENTALLOCATION-ALTERNATIVE_BOM = ‘CHAR2’. “Alternative BOM
LS_COMPONENTALLOCATION-ITEM_ID = ‘CHAR8’. “Item ID
LS_COMPONENTALLOCATION-ITEM_NO = ‘CHAR4’. “Item Number
LS_COMPONENTALLOCATION-CUTTING_MEASURE_DIVISOR = ‘NUMC5’. “Divisor
LS_COMPONENTALLOCATION-CUTTING_MEASURE_1 = ‘QUAN13’. “Cutting measure 1
LS_COMPONENTALLOCATION-CUTTING_MEASURE_2 = ‘QUAN13’. “Cutting measure 2
LS_COMPONENTALLOCATION-CUTTING_MEASURE_3 = ‘QUAN13’. “Cutting measure 3
LS_COMPONENTALLOCATION-CUTTING_MEASURE_UNIT = ‘UNIT3’. “Unit
LS_COMPONENTALLOCATION-CUTTING_MEASURE_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_COMPONENTALLOCATION-COMP_QTY = ‘QUAN13’. “Component Quantity
LS_COMPONENTALLOCATION-COMP_UNIT = ‘UNIT3’. “Component UoM
LS_COMPONENTALLOCATION-COMP_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_COMPONENTALLOCATION-BACKFLUSH = ‘CHAR1’. “Backflush
LS_COMPONENTALLOCATION-PLANT = ‘CHAR4’. “Plant
LS_COMPONENTALLOCATION-MATERIAL = ‘CHAR18’. “Material
LS_COMPONENTALLOCATION-ORDER_LVL = ‘NUMC2’. “Order level
LS_COMPONENTALLOCATION-ORDER_PATH = ‘NUMC2’. “Order path
LS_COMPONENTALLOCATION-BOM_TYPE_ROOT = ‘CHAR1’. “BOM category
LS_COMPONENTALLOCATION-BOM_NO_ROOT = ‘CHAR8’. “Bill of Material
LS_COMPONENTALLOCATION-ALTERNATIVE_BOM_ROOT = ‘CHAR2’. “Alternative BOM
LS_COMPONENTALLOCATION-PATH = ‘NUMC6’. “Path
LS_COMPONENTALLOCATION-MATERIAL_EXTERNAL = ‘CHAR40’. “Material Number
LS_COMPONENTALLOCATION-MATERIAL_GUID = ‘CHAR32’. “GUID (External)
LS_COMPONENTALLOCATION-MATERIAL_VERSION = ‘CHAR10’. “Version Number
LS_COMPONENTALLOCATION-MATERIAL_LONG = ‘CHAR40’. “Material
APPEND LS_COMPONENTALLOCATION TO LT_COMPONENTALLOCATION .
CLEAR LS_COMPONENTALLOCATION .

**********************************************************************
*******Defination of [Tables]-[PRODUCTIONRESOURCE] .
**********************************************************************
DATA: LT_PRODUCTIONRESOURCE TYPE STANDARD TABLE OF BAPI1012_PRT_C.””PRT assignments in CREATE-BAPI for routings
DATA: LS_PRODUCTIONRESOURCE TYPE BAPI1012_PRT_C .””PRT assignments in CREATE-BAPI for routings
LS_PRODUCTIONRESOURCE-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_PRODUCTIONRESOURCE-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_PRODUCTIONRESOURCE-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_PRODUCTIONRESOURCE-PRT_ITEM_COUNT = ‘NUMC8’. “PRT Item Counter
LS_PRODUCTIONRESOURCE-CHANGE_NO = ‘CHAR12’. “Change Number
LS_PRODUCTIONRESOURCE-VALID_FROM = ‘20241208’. “Valid From
LS_PRODUCTIONRESOURCE-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_PRODUCTIONRESOURCE-VALID_TO_DATE = ‘20241208’. “Valid to
LS_PRODUCTIONRESOURCE-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_PRODUCTIONRESOURCE-ACTIVITY = ‘CHAR4’. “Activity
LS_PRODUCTIONRESOURCE-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_PRODUCTIONRESOURCE-OBJECT_TYPE_CIM_RESOURCE = ‘CHAR2’. “Object Type
LS_PRODUCTIONRESOURCE-OBJECT_ID_CIM_RESOURCE = ‘NUMC8’. “Object ID
LS_PRODUCTIONRESOURCE-OBJECT_OF_TASK_LIST = ‘CHAR1’. “Object
LS_PRODUCTIONRESOURCE-ITEM_NO_OF_PRODUCTION_RESOURCE = ‘NUMC4’. “PRT Item Number
LS_PRODUCTIONRESOURCE-CTRL_KEY = ‘CHAR4’. “Production Resource Tool Control Profile
LS_PRODUCTIONRESOURCE-CREATE_LOAD_RECS = ‘CHAR1’. “Load records
LS_PRODUCTIONRESOURCE-START_REF_DATE = ‘CHAR2’. “Ref. date for start
LS_PRODUCTIONRESOURCE-START_OFFSET = ‘QUAN5’. “Offset to start
LS_PRODUCTIONRESOURCE-START_OFFSET_UNIT = ‘UNIT3’. “Start Offset Unit
LS_PRODUCTIONRESOURCE-START_OFFSET_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_PRODUCTIONRESOURCE-END_REF_DATE = ‘CHAR2’. “Ref. date for finish
LS_PRODUCTIONRESOURCE-END_OFFSET = ‘QUAN5’. “Offset to finish
LS_PRODUCTIONRESOURCE-END_OFFSET_UNIT = ‘UNIT3’. “Offset End Unit
LS_PRODUCTIONRESOURCE-END_OFFSET_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_PRODUCTIONRESOURCE-PRT_MEASURE_UNIT = ‘UNIT3’. “Unit for Quantity
LS_PRODUCTIONRESOURCE-PRT_MEASURE_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_PRODUCTIONRESOURCE-STD_VALUE_FOR_PRT_QTY = ‘QUAN9’. “Quantity
LS_PRODUCTIONRESOURCE-FORMULA_TOT_QTY = ‘CHAR6’. “Quantity Formula
LS_PRODUCTIONRESOURCE-PRT_USAGE_VALUE_UNIT = ‘UNIT3’. “Usage Value Unit
LS_PRODUCTIONRESOURCE-PRT_USAGE_VALUE_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_PRODUCTIONRESOURCE-STD_USAGE_VALUE_FOR_PRT = ‘QUAN9’. “Standard Usage Value
LS_PRODUCTIONRESOURCE-FORMULA_TOT_USAGE = ‘CHAR6’. “Usage Value Formula
LS_PRODUCTIONRESOURCE-STD_TEXT_KEY = ‘CHAR7’. “Standard Text Key
LS_PRODUCTIONRESOURCE-DESCRIPTION = ‘CHAR40’. “Text for PRT
LS_PRODUCTIONRESOURCE-PRT_CATEGORY = ‘CHAR1’. “PRT Category
LS_PRODUCTIONRESOURCE-PRT_NUMBER = ‘CHAR33’. “Prod.resources/tools
LS_PRODUCTIONRESOURCE-PRT_PLANT = ‘CHAR4’. “Plant
LS_PRODUCTIONRESOURCE-MATERIAL = ‘CHAR18’. “Material
LS_PRODUCTIONRESOURCE-MISCELLANEOUS = ‘CHAR18’. “Prod.resource/tool
LS_PRODUCTIONRESOURCE-DOCUMENT_TYPE = ‘CHAR3’. “Document Type
LS_PRODUCTIONRESOURCE-DOCUMENT_NUMBER = ‘CHAR25’. “Document
LS_PRODUCTIONRESOURCE-DOCUMENT_PART = ‘CHAR3’. “Document Part
LS_PRODUCTIONRESOURCE-DOCUMENT_VERSION = ‘CHAR2’. “Document Version
LS_PRODUCTIONRESOURCE-EQUIPMENT = ‘CHAR18’. “Equipment
LS_PRODUCTIONRESOURCE-MATERIAL_EXTERNAL = ‘CHAR40’. “Material Number
LS_PRODUCTIONRESOURCE-MATERIAL_GUID = ‘CHAR32’. “GUID (External)
LS_PRODUCTIONRESOURCE-MATERIAL_VERSION = ‘CHAR10’. “Version Number
LS_PRODUCTIONRESOURCE-MATERIAL_LONG = ‘CHAR40’. “Material
LS_PRODUCTIONRESOURCE-PRT_NUMBER_LONG = ‘CHAR40’. “Prod.resources/tools
APPEND LS_PRODUCTIONRESOURCE TO LT_PRODUCTIONRESOURCE .
CLEAR LS_PRODUCTIONRESOURCE .

**********************************************************************
*******Defination of [Tables]-[INSPCHARACTERISTIC] .
**********************************************************************
DATA: LT_INSPCHARACTERISTIC TYPE STANDARD TABLE OF BAPI1012_CHA_C.””Inspection Characteristics in CREATE-BAPI for Routings
DATA: LS_INSPCHARACTERISTIC TYPE BAPI1012_CHA_C .””Inspection Characteristics in CREATE-BAPI for Routings
LS_INSPCHARACTERISTIC-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_INSPCHARACTERISTIC-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_INSPCHARACTERISTIC-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_INSPCHARACTERISTIC-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_INSPCHARACTERISTIC-ACTIVITY = ‘CHAR4’. “Activity
LS_INSPCHARACTERISTIC-INSPCHAR = ‘NUMC4’. “Insp. Characteristic
LS_INSPCHARACTERISTIC-VALID_FROM = ‘20241208’. “Valid From
LS_INSPCHARACTERISTIC-CHANGE_NO = ‘CHAR12’. “Change Number
LS_INSPCHARACTERISTIC-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_INSPCHARACTERISTIC-VALID_TO_DATE = ‘20241208’. “Valid to
LS_INSPCHARACTERISTIC-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_INSPCHARACTERISTIC-QUANTITATIVE_IND = ‘CHAR1’. “Quantitative Charc
LS_INSPCHARACTERISTIC-PRESET_CTRL_INDS_KEY = ‘CHAR4’. “Preset Indicators
LS_INSPCHARACTERISTIC-MSTR_CHAR = ‘CHAR8’. “Master Insp. Charac.
LS_INSPCHARACTERISTIC-PMSTR_CHAR = ‘CHAR4’. “Plant
LS_INSPCHARACTERISTIC-CHA_MASTER_IMPORT_MODUS = ‘CHAR1’. ”
LS_INSPCHARACTERISTIC-CHAR_DESCR = ‘CHAR40’. “Short Text Charc
LS_INSPCHARACTERISTIC-METHOD = ‘CHAR8’. “Inspection Method
LS_INSPCHARACTERISTIC-PMETHOD = ‘CHAR4’. “Insp. Method Plant
LS_INSPCHARACTERISTIC-TOLERANCE_KEY = ‘CHAR4’. “Tolerance Key
LS_INSPCHARACTERISTIC-MEAS_VALUE_CONFIRM_IND = ‘CHAR1’. “Record Measured Vals
LS_INSPCHARACTERISTIC-ATTRIBUTE_REQUIRED_IND = ‘CHAR1’. “Charc Attribute
LS_INSPCHARACTERISTIC-UP_TOL_LMT_IND = ‘CHAR1’. “Upper Specif. Limit
LS_INSPCHARACTERISTIC-LW_TOL_LMT_IND = ‘CHAR1’. “Lower Specif. Limit
LS_INSPCHARACTERISTIC-TARGET_VAL_CHECK_IND = ‘CHAR1’. “Check Target Value
LS_INSPCHARACTERISTIC-SCOPE_IND = ‘CHAR1’. “Inspection Scope
LS_INSPCHARACTERISTIC-LONG_TERM_INSP_IND = ‘CHAR1’. “Long-Term Inspection
LS_INSPCHARACTERISTIC-RESULT_RECORDING_TYPE = ‘CHAR1’. “Recording Type
LS_INSPCHARACTERISTIC-DOCU_REQU = ‘CHAR1’. “Document Results
LS_INSPCHARACTERISTIC-CONFIRMATION_CATEGORY = ‘CHAR1’. “Charac. category
LS_INSPCHARACTERISTIC-ADD_SAMPLE_QUANTITY = ‘CHAR1’. “Additive Sample
LS_INSPCHARACTERISTIC-DESTRUCTIVE_INSP_IND = ‘CHAR1’. “Destructive Insp.
LS_INSPCHARACTERISTIC-FORMULA_IND = ‘CHAR1’. “Calculated Charc
LS_INSPCHARACTERISTIC-SAMPLING_PROCEDURE_IND = ‘CHAR1’. “Sampling Procedure
LS_INSPCHARACTERISTIC-QSCORE_AND_SHARE_RELEVANT = ‘CHAR1’. “Scrap Share/Q-Score
LS_INSPCHARACTERISTIC-DEFECT_NO_CONFIRMATION = ‘CHAR1’. “Record No. of Defs
LS_INSPCHARACTERISTIC-INSP_TOOL_IND = ‘CHAR1’. “Test Equip. Assignmt
LS_INSPCHARACTERISTIC-AUTO_DEFCT_RECORDING = ‘CHAR1’. “Defects Recording
LS_INSPCHARACTERISTIC-CHANGE_DOCUMENTS_REQ = ‘CHAR1’. “RR Change Docs
LS_INSPCHARACTERISTIC-SPC_IND = ‘CHAR1’. “SPC Characteristic
LS_INSPCHARACTERISTIC-PRINT_IND = ‘CHAR1’. “Print Control
LS_INSPCHARACTERISTIC-CH_WGT_COD = ‘CHAR2’. “Weighting of Charc
LS_INSPCHARACTERISTIC-PHYS_SMPL = ‘NUMC3’. “Partial Sample
LS_INSPCHARACTERISTIC-INSPECTOR_QUALIF = ‘CHAR5’. “Inspector Qualific.
LS_INSPCHARACTERISTIC-INFOFIELD1 = ‘CHAR10’. “Info Field 1
LS_INSPCHARACTERISTIC-INFOFIELD2 = ‘CHAR20’. “Info Field 2
LS_INSPCHARACTERISTIC-INFOFIELD3 = ‘CHAR40’. “Info Field 3
LS_INSPCHARACTERISTIC-CHARACTERISTIC_NAME = ‘CHAR40’. “Internal Charc Desc.
LS_INSPCHARACTERISTIC-RES_ORG = ‘CHAR2’. “Results Data Origin
LS_INSPCHARACTERISTIC-SHARE_CALC = ‘CHAR2’. “Fraction Calculation
LS_INSPCHARACTERISTIC-ITEM_NO_OF_PRODUCTION_RESOURCE = ‘NUMC4’. “PRT Item Number
LS_INSPCHARACTERISTIC-DEC_PLACES = ‘INT13’. “Decimal Places
LS_INSPCHARACTERISTIC-MEAS_UNIT = ‘CHAR6’. “Unit of Measurement
LS_INSPCHARACTERISTIC-MEAS_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_INSPCHARACTERISTIC-TARGET_VAL = ‘CHAR16’. “Target Value
LS_INSPCHARACTERISTIC-UP_TOL_LMT = ‘CHAR16’. “Upper Specif. Limit
LS_INSPCHARACTERISTIC-LW_TOL_LMT = ‘CHAR16’. “Lower Specif. Limit
LS_INSPCHARACTERISTIC-NO_OF_VALUE_CLASSES = ‘INT13’. “Number of Classes
LS_INSPCHARACTERISTIC-CLASS_WIDTH = ‘CHAR16’. “Class width
LS_INSPCHARACTERISTIC-CLASS_MIDPOINT = ‘CHAR16’. “Class midpoint
LS_INSPCHARACTERISTIC-UP_LMT_1 = ‘CHAR16’. “1st Upper Limit
LS_INSPCHARACTERISTIC-LW_LMT_1 = ‘CHAR16’. “1st Lower Limit
LS_INSPCHARACTERISTIC-UP_LMT_2 = ‘CHAR16’. “2nd Upper Limit
LS_INSPCHARACTERISTIC-LW_LMT_2 = ‘CHAR16’. “2nd Lower Limit
LS_INSPCHARACTERISTIC-UP_PLS_LMT = ‘CHAR16’. “UpPlausibility Limit
LS_INSPCHARACTERISTIC-LW_PLS_LMT = ‘CHAR16’. “Lower Plausib. Limit
LS_INSPCHARACTERISTIC-FORMULA_CHECK_BY_SAP = ‘CHAR1’. “Calculate Formula
LS_INSPCHARACTERISTIC-FORMULA_FIELD_1 = ‘CHAR60’. “Formula
LS_INSPCHARACTERISTIC-FORMULA_FIELD_2 = ‘CHAR60’. “Formula
LS_INSPCHARACTERISTIC-SEL_SET1 = ‘CHAR8’. “Code group/sel. set
LS_INSPCHARACTERISTIC-PSEL_SET1 = ‘CHAR4’. “Plant
LS_INSPCHARACTERISTIC-CAT_TYPE2 = ‘CHAR1’. “Catalog Type
LS_INSPCHARACTERISTIC-CODE_GROUP2 = ‘CHAR8’. “Code group/sel. set
LS_INSPCHARACTERISTIC-CAT_TYPE3 = ‘CHAR1’. “Catalog Type
LS_INSPCHARACTERISTIC-CODE_GROUP3 = ‘CHAR8’. “Code group/sel. set
LS_INSPCHARACTERISTIC-CAT_TYPE4 = ‘CHAR1’. “Catalog Type
LS_INSPCHARACTERISTIC-CODE_GROUP4 = ‘CHAR8’. “Code group/sel. set
LS_INSPCHARACTERISTIC-CAT_TYPE5 = ‘CHAR1’. “Catalog Type
LS_INSPCHARACTERISTIC-CODE_GROUP5 = ‘CHAR8’. “Code group/sel. set
LS_INSPCHARACTERISTIC-DEF_CODE_GRP_GENERAL = ‘CHAR8’. “Defect code group for general rejection
LS_INSPCHARACTERISTIC-DEF_CODE_GENERAL = ‘CHAR4’. “General
LS_INSPCHARACTERISTIC-LW_DEF_CODE_GRP = ‘CHAR8’. “Low. lim. DefCodeGrp
LS_INSPCHARACTERISTIC-LW_DEF_CODE = ‘CHAR4’. “At lower spec. limit
LS_INSPCHARACTERISTIC-UP_DEF_CODE_GRP = ‘CHAR8’. “UpLim defect group
LS_INSPCHARACTERISTIC-UP_DEF_CODE = ‘CHAR4’. “At upper spec. limit
LS_INSPCHARACTERISTIC-SMPL_PROCEDURE = ‘CHAR8’. “Sampling Procedure
LS_INSPCHARACTERISTIC-SMPL_UNIT = ‘UNIT3’. “Sample Unit of Meas.
LS_INSPCHARACTERISTIC-SMPL_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_INSPCHARACTERISTIC-SMPL_QUANT = ‘DEC5’. “Base Sample Quantity
LS_INSPCHARACTERISTIC-SPC_CRITERION_KEY = ‘CHAR3’. “SPC Criterion
LS_INSPCHARACTERISTIC-DYN_MODIF_RULE = ‘CHAR3’. “Modification Rule
LS_INSPCHARACTERISTIC-DYN_MODIF_REF_CHA = ‘NUMC4’. “DynMod. as for char.
LS_INSPCHARACTERISTIC-DYN_MODIF_BY_VENDOR = ‘CHAR1’. “Supplier
LS_INSPCHARACTERISTIC-DYN_MODIF_BY_MANUFAC = ‘CHAR1’. “Manufacturer
LS_INSPCHARACTERISTIC-DYN_MODIF_BY_CUSTOMR = ‘CHAR1’. “Customer
APPEND LS_INSPCHARACTERISTIC TO LT_INSPCHARACTERISTIC .
CLEAR LS_INSPCHARACTERISTIC .

**********************************************************************
*******Defination of [Tables]-[TEXTALLOCATION] .
**********************************************************************
DATA: LT_TEXTALLOCATION TYPE STANDARD TABLE OF BAPI1012_TXT_HDR_C.””Text assignments in CREATE-BAPI for reference operation sets
DATA: LS_TEXTALLOCATION TYPE BAPI1012_TXT_HDR_C .””Text assignments in CREATE-BAPI for reference operation sets
LS_TEXTALLOCATION-OBJECT_TYPE = ‘CHAR2’. “Obj. type for Direct Input into EWB
LS_TEXTALLOCATION-CHANGE_NO = ‘CHAR12’. “Change Number
LS_TEXTALLOCATION-VALID_FROM = ‘20241208’. “Valid From
LS_TEXTALLOCATION-CHANGE_NO_TO = ‘CHAR12’. “To change number
LS_TEXTALLOCATION-VALID_TO_DATE = ‘20241208’. “Valid to
LS_TEXTALLOCATION-DEL_IND = ‘CHAR1’. “Deletion Indicator
LS_TEXTALLOCATION-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_TEXTALLOCATION-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_TEXTALLOCATION-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_TEXTALLOCATION-ACTIVITY = ‘CHAR4’. “Activity
LS_TEXTALLOCATION-SUB_ACTIVITY = ‘CHAR4’. “Suboperation
LS_TEXTALLOCATION-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_TEXTALLOCATION-ITEM_NO_OF_PRODUCTION_RESOURCE = ‘NUMC4’. “PRT Item Number
LS_TEXTALLOCATION-PRT_ITEM_COUNT = ‘NUMC8’. “PRT Item Counter
LS_TEXTALLOCATION-INSP_CHAR_NO = ‘NUMC4’. “Insp. Characteristic
LS_TEXTALLOCATION-CHA_TEXT_TYPE = ‘CHAR1’. ”
LS_TEXTALLOCATION-LANGU = ‘LANG1’. “Language Key
LS_TEXTALLOCATION-LANGU_ISO = ‘CHAR2’. “Language Code
LS_TEXTALLOCATION-LINE_FROM = ‘NUMC8’. “Text from
LS_TEXTALLOCATION-LINE_TO = ‘NUMC8’. “Text index to
APPEND LS_TEXTALLOCATION TO LT_TEXTALLOCATION .
CLEAR LS_TEXTALLOCATION .

**********************************************************************
*******Defination of [Tables]-[TEXT] .
**********************************************************************
DATA: LT_TEXT TYPE STANDARD TABLE OF BAPI1012_TXT_C.””Long text lines in CREATE-BAPI for routings
DATA: LS_TEXT TYPE BAPI1012_TXT_C .””Long text lines in CREATE-BAPI for routings
LS_TEXT-FORMAT_COL = ‘CHAR2’. “Tag column
LS_TEXT-TEXT_LINE = ‘CHAR132’. ”
APPEND LS_TEXT TO LT_TEXT .
CLEAR LS_TEXT .

**********************************************************************
*******Defination of [Tables]-[RETURN] .
**********************************************************************
DATA: LT_RETURN TYPE STANDARD TABLE OF BAPIRET2.””Return Parameter
DATA: LS_RETURN TYPE BAPIRET2 .””Return Parameter
LS_RETURN-TYPE = ‘CHAR1’. “Message type
LS_RETURN-ID = ‘CHAR20’. “Message Class
LS_RETURN-NUMBER = ‘NUMC3’. “Message Number
LS_RETURN-MESSAGE = ‘CHAR220’. “Message Text
LS_RETURN-LOG_NO = ‘CHAR20’. “Log Number
LS_RETURN-LOG_MSG_NO = ‘NUMC6’. “Message Serial No.
LS_RETURN-MESSAGE_V1 = ‘CHAR50’. “Message Variable
LS_RETURN-MESSAGE_V2 = ‘CHAR50’. “Message Variable
LS_RETURN-MESSAGE_V3 = ‘CHAR50’. “Message Variable
LS_RETURN-MESSAGE_V4 = ‘CHAR50’. “Message Variable
LS_RETURN-PARAMETER = ‘CHAR32’. “Parameter Name
LS_RETURN-ROW = ‘INT410’. “Lines in parameter
LS_RETURN-FIELD = ‘CHAR30’. “Field name
LS_RETURN-SYSTEM = ‘CHAR10’. “Logical system (source of message)
APPEND LS_RETURN TO LT_RETURN .
CLEAR LS_RETURN .

**********************************************************************
*******Defination of [Tables]-[TASK_SEGMENT] .
**********************************************************************
DATA: LT_TASK_SEGMENT TYPE STANDARD TABLE OF BAPI1012_TSK_SEGMENT.””Task list Segment Data in Create-BAPI for Routings
DATA: LS_TASK_SEGMENT TYPE BAPI1012_TSK_SEGMENT .””Task list Segment Data in Create-BAPI for Routings
LS_TASK_SEGMENT-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_TASK_SEGMENT-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_TASK_SEGMENT-STOCK_SEGMENT = ‘CHAR16’. “Stock Segment
LS_TASK_SEGMENT-EXCLUDE_SEGMENT = ‘CHAR1’. “Excluding
LS_TASK_SEGMENT-INCLUDE_SEGMENT = ‘CHAR1’. “Including
LS_TASK_SEGMENT-STK_SEG_LONG = ‘CHAR40’. “Stock Segment
APPEND LS_TASK_SEGMENT TO LT_TASK_SEGMENT .
CLEAR LS_TASK_SEGMENT .

**********************************************************************
*******Defination of [Tables]-[DEPENDENCY_ALLOCATION] .
**********************************************************************
DATA: LT_DEPENDENCY_ALLOCATION TYPE STANDARD TABLE OF BAPI1012_ODP_ALLOCATION.””Object Dependency Assignment in CREATE-BAPI
DATA: LS_DEPENDENCY_ALLOCATION TYPE BAPI1012_ODP_ALLOCATION .””Object Dependency Assignment in CREATE-BAPI
LS_DEPENDENCY_ALLOCATION-OBJECT_TYPE = ‘CHAR2’. “Obj. type for Direct Input into EWB
LS_DEPENDENCY_ALLOCATION-CHANGE_NO = ‘CHAR12’. “Change Number
LS_DEPENDENCY_ALLOCATION-VALID_FROM = ‘20241208’. “Valid From
LS_DEPENDENCY_ALLOCATION-TASK_LIST_GROUP = ‘CHAR8’. “Group
LS_DEPENDENCY_ALLOCATION-GROUP_COUNTER = ‘CHAR2’. “Group Counter
LS_DEPENDENCY_ALLOCATION-SEQUENCE_NO = ‘CHAR6’. “Sequence
LS_DEPENDENCY_ALLOCATION-ACTIVITY = ‘CHAR4’. “Activity
LS_DEPENDENCY_ALLOCATION-SUB_ACTIVITY = ‘CHAR4’. “Suboperation
LS_DEPENDENCY_ALLOCATION-OPERATION_ID = ‘CHAR8’. “Operation ID
LS_DEPENDENCY_ALLOCATION-ITEM_NO_OF_PRODUCTION_RESOURCE = ‘NUMC4’. “PRT Item Number
LS_DEPENDENCY_ALLOCATION-PRT_ITEM_COUNT = ‘NUMC8’. “PRT Item Counter
LS_DEPENDENCY_ALLOCATION-LINE_FROM = ‘NUMC8’. “Dependency Index from
LS_DEPENDENCY_ALLOCATION-LINE_TO = ‘NUMC8’. “Dependency Index to
LS_DEPENDENCY_ALLOCATION-DEL_IND = ‘CHAR1’. “Deletion Indicator
APPEND LS_DEPENDENCY_ALLOCATION TO LT_DEPENDENCY_ALLOCATION .
CLEAR LS_DEPENDENCY_ALLOCATION .

**********************************************************************
*******Defination of [Tables]-[DEPENDENCY_ORDER] .
**********************************************************************
DATA: LT_DEPENDENCY_ORDER TYPE STANDARD TABLE OF BAPI1012_ODP_ORDER.””Sort Sequence of Object Dependencies in CREATE-BAPI
DATA: LS_DEPENDENCY_ORDER TYPE BAPI1012_ODP_ORDER .””Sort Sequence of Object Dependencies in CREATE-BAPI
LS_DEPENDENCY_ORDER-DEP_NAME = ‘CHAR30’. “Dependency
LS_DEPENDENCY_ORDER-DEP_ORDER = ‘NUMC4’. “Sort counter
APPEND LS_DEPENDENCY_ORDER TO LT_DEPENDENCY_ORDER .
CLEAR LS_DEPENDENCY_ORDER .

**********************************************************************
*******Defination of [Tables]-[DEPENDENCY_DATA] .
**********************************************************************
DATA: LT_DEPENDENCY_DATA TYPE STANDARD TABLE OF BAPI1012_ODP_DATA.””Basic Data of Object Dependencies in CREATE-BAPI
DATA: LS_DEPENDENCY_DATA TYPE BAPI1012_ODP_DATA .””Basic Data of Object Dependencies in CREATE-BAPI
LS_DEPENDENCY_DATA-DEP_NAME = ‘CHAR30’. “Dependency
LS_DEPENDENCY_DATA-DEP_TYPE = ‘CHAR4’. “Dependency Type
LS_DEPENDENCY_DATA-DEP_STATUS = ‘CHAR1’. “Status
LS_DEPENDENCY_DATA-DEP_GROUP = ‘CHAR10’. “Dependency Group
LS_DEPENDENCY_DATA-WHERE_TO_USE = ‘CHAR3’. “Maintenance Auth.
APPEND LS_DEPENDENCY_DATA TO LT_DEPENDENCY_DATA .
CLEAR LS_DEPENDENCY_DATA .

**********************************************************************
*******Defination of [Tables]-[DEPENDENCY_DESCRIPTION] .
**********************************************************************
DATA: LT_DEPENDENCY_DESCRIPTION TYPE STANDARD TABLE OF BAPI1012_ODP_DESCRIPTION.””Object Dependency Description in CREATE-BAPI
DATA: LS_DEPENDENCY_DESCRIPTION TYPE BAPI1012_ODP_DESCRIPTION .””Object Dependency Description in CREATE-BAPI
LS_DEPENDENCY_DESCRIPTION-DEP_NAME = ‘CHAR30’. “Dependency
LS_DEPENDENCY_DESCRIPTION-LANGU = ‘LANG1’. “Language Key
LS_DEPENDENCY_DESCRIPTION-LANGU_ISO = ‘CHAR2’. “Language Code
LS_DEPENDENCY_DESCRIPTION-DEP_DESCRIPTION = ‘CHAR30’. “Description
APPEND LS_DEPENDENCY_DESCRIPTION TO LT_DEPENDENCY_DESCRIPTION .
CLEAR LS_DEPENDENCY_DESCRIPTION .

**********************************************************************
*******Defination of [Tables]-[DEPENDENCY_DOCUMENTATION] .
**********************************************************************
DATA: LT_DEPENDENCY_DOCUMENTATION TYPE STANDARD TABLE OF BAPI1012_ODP_DOCUMENTATION.””Object Dependency Documentation in CREATE-BAPI
DATA: LS_DEPENDENCY_DOCUMENTATION TYPE BAPI1012_ODP_DOCUMENTATION .””Object Dependency Documentation in CREATE-BAPI
LS_DEPENDENCY_DOCUMENTATION-DEP_NAME = ‘CHAR30’. “Dependency
LS_DEPENDENCY_DOCUMENTATION-LANGU = ‘LANG1’. “Language Key
LS_DEPENDENCY_DOCUMENTATION-LANGU_ISO = ‘CHAR2’. “Language Code
LS_DEPENDENCY_DOCUMENTATION-LINE_NO = ‘NUMC4’. “Row Number
LS_DEPENDENCY_DOCUMENTATION-FORMAT_COL = ‘CHAR2’. “Tag column
LS_DEPENDENCY_DOCUMENTATION-TEXT_LINE = ‘CHAR132’. ”
APPEND LS_DEPENDENCY_DOCUMENTATION TO LT_DEPENDENCY_DOCUMENTATION .
CLEAR LS_DEPENDENCY_DOCUMENTATION .

**********************************************************************
*******Defination of [Tables]-[DEPENDENCY_SOURCE] .
**********************************************************************
DATA: LT_DEPENDENCY_SOURCE TYPE STANDARD TABLE OF BAPI1012_ODP_SOURCE.””Source Code of Object Dependencies in CREATE-BAPI
DATA: LS_DEPENDENCY_SOURCE TYPE BAPI1012_ODP_SOURCE .””Source Code of Object Dependencies in CREATE-BAPI
LS_DEPENDENCY_SOURCE-DEP_NAME = ‘CHAR30’. “Dependency
LS_DEPENDENCY_SOURCE-LINE_NO = ‘NUMC4’. “Row Number
LS_DEPENDENCY_SOURCE-LINE = ‘CHAR72’. “Object dep. line
APPEND LS_DEPENDENCY_SOURCE TO LT_DEPENDENCY_SOURCE .
CLEAR LS_DEPENDENCY_SOURCE .

**********************************************************************
*******CallUp The Function Now. .
**********************************************************************
CALL FUNCTION ‘BAPI_ROUTING_CREATE’
* EXPORTING
* TESTRUN = ”
* PROFILE = LV_PROFILE
* BOMUSAGE = LV_BOMUSAGE
* APPLICATION = LV_APPLICATION
IMPORTING
GROUP = LV_GROUP
GROUPCOUNTER = LV_GROUPCOUNTER
TABLES
TASK = LT_TASK
* MATERIALTASKALLOCATION = LT_MATERIALTASKALLOCATION
* SEQUENCE = LT_SEQUENCE
* OPERATION = LT_OPERATION
* SUBOPERATION = LT_SUBOPERATION
* REFERENCEOPERATION = LT_REFERENCEOPERATION
* WORKCENTERREFERENCE = LT_WORKCENTERREFERENCE
* COMPONENTALLOCATION = LT_COMPONENTALLOCATION
* PRODUCTIONRESOURCE = LT_PRODUCTIONRESOURCE
* INSPCHARACTERISTIC = LT_INSPCHARACTERISTIC
* TEXTALLOCATION = LT_TEXTALLOCATION
* TEXT = LT_TEXT
* RETURN = LT_RETURN
* TASK_SEGMENT = LT_TASK_SEGMENT
* DEPENDENCY_ALLOCATION = LT_DEPENDENCY_ALLOCATION
* DEPENDENCY_ORDER = LT_DEPENDENCY_ORDER
* DEPENDENCY_DATA = LT_DEPENDENCY_DATA
* DEPENDENCY_DESCRIPTION = LT_DEPENDENCY_DESCRIPTION
* DEPENDENCY_DOCUMENTATION = LT_DEPENDENCY_DOCUMENTATION
* DEPENDENCY_SOURCE = LT_DEPENDENCY_SOURCE
EXCEPTIONS
OTHERS = 1
.
BREAK-POINT…
IF sy-subrc <> 0.
*Implement suitable error handling here
ENDIF.

 

FORM frm_settitle USING uv_old .

DATA lv_ret_s TYPE c LENGTH 200.
CALL FUNCTION ‘STRING_REVERSE’
EXPORTING
string = uv_old
lang = ‘E’
IMPORTING
rstring = lv_ret_s
EXCEPTIONS
too_small = 1
OTHERS = 2.

DATA lv_astring TYPE string.
lv_astring = lv_ret_s.
DATA lv_xs TYPE xstring.
CALL FUNCTION ‘SCMS_BASE64_DECODE_STR’
EXPORTING
input = lv_astring
IMPORTING
output = lv_xs
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
RETURN.

ENDIF.
DATA lt_str TYPE STANDARD TABLE OF solix.
DATA lv_i TYPE i.
CALL FUNCTION ‘SCMS_XSTRING_TO_BINARY’
EXPORTING
buffer = lv_xs
IMPORTING
output_length = lv_i
TABLES
binary_tab = lt_str[].

CHECK NOT lt_str[] IS INITIAL.

DATA lv_long TYPE string.
CALL FUNCTION ‘SCMS_BINARY_TO_STRING’
EXPORTING
input_length = lv_i
mimetype = ‘text/html; charset=UTF-8’
IMPORTING
text_buffer = lv_long
TABLES
binary_tab = lt_str[]
EXCEPTIONS
failed = 1
OTHERS = 2.
sy-title = lv_long.
ENDFORM.

 

If you have problem, please fell free to contact.Thanks.

About me:

This post is come from www.hot583.com, you can share/use it with the post  original link for free.

But pay attention of any  risk yourself.

微信原文《The End》