BAPI_PRODORDCONF_CREATE_TX sample demo example

*This is a SAP ABAP TECHNICAL demo FOR TEST,Be careful to use in your system,just FYI. GENERIERT VON /SPE/QUEUE_CONTAINER_SHOW
*If you have any solution,Please feel free to talk with your IT team/SAP ABAP professional guys.GENERIERT VON /SPE/QUEUE_CONTAINER_SHOW

REPORT ZDEMO_BAPI_PRODORDCONF_CREATE_TX.
PARAMETERS SAMPLE AS CHECKBOX.
INITIALIZATION.
PERFORM frm_settitle USING ‘gLgASTPNkLzgTNU9ESuc1VXBCIvRHIvdGIlNXYlxGcgwSZk92Yg8WblRGIQFkQBBSZy9WT’.
START-OF-SELECTION.
BREAK-POINT..
DATA: LV_POST_WRONG_ENTRIES TYPE BAPI_CORU_PARAM-INS_ERR .”Option,Default Value =’0′,
DATA: LV_TESTRUN TYPE BAPI_CORU_PARAM-TESTRUN .”Obligatory
DATA: LV_CALL_ON_INBOUND_QUEUE TYPE CO_MES_CALL_ON_INBOUND_QUEUE .”Option,Default Value =SPACE,”Indicator: Module Is Called via an Inbound Queue

**********************************************************************
*******Defination of Work Area Structrue [Export]-[RETURN ] . “”Return Parameter
**********************************************************************
DATA: LS_RETURN TYPE BAPIRET1 . “”Return Parameter

**********************************************************************
*******Defination of [Tables]-[TIMETICKETS] .
**********************************************************************
DATA: LT_TIMETICKETS TYPE STANDARD TABLE OF BAPI_PP_TIMETICKET.””BAPI Structure: PP Confirmation Time Ticket
DATA: LS_TIMETICKETS TYPE BAPI_PP_TIMETICKET .””BAPI Structure: PP Confirmation Time Ticket
LS_TIMETICKETS-CONF_NO = ‘NUMC10’. “Confirmation
LS_TIMETICKETS-ORDERID = ‘CHAR12’. “Order
LS_TIMETICKETS-SEQUENCE = ‘CHAR6’. “Sequence
LS_TIMETICKETS-OPERATION = ‘CHAR4’. “Activity
LS_TIMETICKETS-SUB_OPER = ‘CHAR4’. “Suboperation
LS_TIMETICKETS-CAPA_CATEGORY = ‘CHAR3’. “Capacity category
LS_TIMETICKETS-SPLIT = ‘INT13’. “Split number
LS_TIMETICKETS-FIN_CONF = ‘CHAR1’. “Final Confirmation
LS_TIMETICKETS-CLEAR_RES = ‘CHAR1’. “Clear Open Reservs.
LS_TIMETICKETS-POSTG_DATE = ‘20241208’. “Posting Date
LS_TIMETICKETS-DEV_REASON = ‘CHAR4’. “Reason for Variance
LS_TIMETICKETS-CONF_TEXT = ‘CHAR40’. “Confirmation text
LS_TIMETICKETS-PLANT = ‘CHAR4’. “Plant
LS_TIMETICKETS-WORK_CNTR = ‘CHAR8’. “Work Center
LS_TIMETICKETS-RECORDTYPE = ‘CHAR3’. “Record Type
LS_TIMETICKETS-CONF_QUAN_UNIT = ‘UNIT3’. “Confirmation Unit of Measure
LS_TIMETICKETS-CONF_QUAN_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-YIELD = ‘QUAN13’. “Confirmation Yield Quantity
LS_TIMETICKETS-SCRAP = ‘QUAN13’. “Confirmation Scrap Quantity
LS_TIMETICKETS-REWORK = ‘QUAN13’. “Confirmation Rework Quantity
LS_TIMETICKETS-CONF_ACTI_UNIT1 = ‘UNIT3’. “Unit/activity
LS_TIMETICKETS-CONF_ACTI_UNIT1_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-CONF_ACTIVITY1 = ‘QUAN13’. “Act. t/b Confirmed
LS_TIMETICKETS-NO_REMN_ACTI1 = ‘CHAR1’. “No Remaining Act.
LS_TIMETICKETS-CONF_ACTI_UNIT2 = ‘UNIT3’. “Unit/activity
LS_TIMETICKETS-CONF_ACTI_UNIT2_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-CONF_ACTIVITY2 = ‘QUAN13’. “Act. t/b Confirmed
LS_TIMETICKETS-NO_REMN_ACTI2 = ‘CHAR1’. “No Remaining Act.
LS_TIMETICKETS-CONF_ACTI_UNIT3 = ‘UNIT3’. “Unit/activity
LS_TIMETICKETS-CONF_ACTI_UNIT3_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-CONF_ACTIVITY3 = ‘QUAN13’. “Act. t/b Confirmed
LS_TIMETICKETS-NO_REMN_ACTI3 = ‘CHAR1’. “No Remaining Act.
LS_TIMETICKETS-CONF_ACTI_UNIT4 = ‘UNIT3’. “Unit/activity
LS_TIMETICKETS-CONF_ACTI_UNIT4_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-CONF_ACTIVITY4 = ‘QUAN13’. “Act. t/b Confirmed
LS_TIMETICKETS-NO_REMN_ACTI4 = ‘CHAR1’. “No Remaining Act.
LS_TIMETICKETS-CONF_ACTI_UNIT5 = ‘UNIT3’. “Unit/activity
LS_TIMETICKETS-CONF_ACTI_UNIT5_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-CONF_ACTIVITY5 = ‘QUAN13’. “Act. t/b Confirmed
LS_TIMETICKETS-NO_REMN_ACTI5 = ‘CHAR1’. “No Remaining Act.
LS_TIMETICKETS-CONF_ACTI_UNIT6 = ‘UNIT3’. “Unit/activity
LS_TIMETICKETS-CONF_ACTI_UNIT6_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-CONF_ACTIVITY6 = ‘QUAN13’. “Act. t/b Confirmed
LS_TIMETICKETS-NO_REMN_ACTI6 = ‘CHAR1’. “No Remaining Act.
LS_TIMETICKETS-CONF_BUS_PROC_UNIT1 = ‘UNIT3’. “Process Unit
LS_TIMETICKETS-CONF_BUS_PROC_UNIT1_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-CONF_BUS_PROC1 = ‘QUAN13’. “Process Quantity
LS_TIMETICKETS-NO_REMN_BUS_PROC1 = ‘CHAR1’. “No Remaining Act.
LS_TIMETICKETS-EXEC_START_DATE = ‘20241208’. “Start of Execution
LS_TIMETICKETS-EXEC_START_TIME = ‘002624’. “Actual Start (Time)
LS_TIMETICKETS-SETUP_FIN_DATE = ‘20241208’. “Finish Setup
LS_TIMETICKETS-SETUP_FIN_TIME = ‘002624’. “Finish Setup
LS_TIMETICKETS-PROC_START_DATE = ‘20241208’. “Start of Processing
LS_TIMETICKETS-PROC_START_TIME = ‘002624’. “Start of Processing
LS_TIMETICKETS-PROC_FIN_DATE = ‘20241208’. “Finish Processing
LS_TIMETICKETS-PROC_FIN_TIME = ‘002624’. “Finish Processing
LS_TIMETICKETS-TEARDOWN_START_DATE = ‘20241208’. “Start of Teardown
LS_TIMETICKETS-TEARDOWN_START_TIME = ‘002624’. “Start of Teardown
LS_TIMETICKETS-EXEC_FIN_DATE = ‘20241208’. “Finish Execution
LS_TIMETICKETS-EXEC_FIN_TIME = ‘002624’. “Actual finish (time)
LS_TIMETICKETS-FCST_FIN_DATE = ‘20241208’. “Forecast finish date
LS_TIMETICKETS-FCST_FIN_TIME = ‘002624’. “Forecast End Time
LS_TIMETICKETS-STD_UNIT1 = ‘UNIT3’. “Standard Value Unit
LS_TIMETICKETS-STD_UNIT1_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-FORCAST_STD_VAL1 = ‘QUAN9’. “Forecast Value
LS_TIMETICKETS-STD_UNIT2 = ‘UNIT3’. “Standard Value Unit
LS_TIMETICKETS-STD_UNIT2_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-FORCAST_STD_VAL2 = ‘QUAN9’. “Forecast Value
LS_TIMETICKETS-STD_UNIT3 = ‘UNIT3’. “Standard Value Unit
LS_TIMETICKETS-STD_UNIT3_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-FORCAST_STD_VAL3 = ‘QUAN9’. “Forecast Value
LS_TIMETICKETS-STD_UNIT4 = ‘UNIT3’. “Standard Value Unit
LS_TIMETICKETS-STD_UNIT4_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-FORCAST_STD_VAL4 = ‘QUAN9’. “Forecast Value
LS_TIMETICKETS-STD_UNIT5 = ‘UNIT3’. “Standard Value Unit
LS_TIMETICKETS-STD_UNIT5_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-FORCAST_STD_VAL5 = ‘QUAN9’. “Forecast Value
LS_TIMETICKETS-STD_UNIT6 = ‘UNIT3’. “Standard Value Unit
LS_TIMETICKETS-STD_UNIT6_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-FORCAST_STD_VAL6 = ‘QUAN9’. “Forecast Value
LS_TIMETICKETS-FORCAST_BUS_PROC_UNIT1 = ‘UNIT3’. “Remain. Process Unit
LS_TIMETICKETS-FORC_BUS_PROC_UNIT1_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-FORCAST_BUS_PROC_VAL1 = ‘QUAN13’. “Remain.QtyBus.Proc.
LS_TIMETICKETS-PERS_NO = ‘NUMC8’. “Personnel number
LS_TIMETICKETS-TIMEID_NO = ‘NUMC8’. “Time ID number
LS_TIMETICKETS-WAGETYPE = ‘CHAR4’. “Wage type
LS_TIMETICKETS-SUITABILITY = ‘CHAR2’. “Suitability
LS_TIMETICKETS-NO_OF_EMPLOYEE = ‘DEC5’. “Number of employees
LS_TIMETICKETS-WAGEGROUP = ‘CHAR3’. “Wage Group
LS_TIMETICKETS-BREAK_UNIT = ‘UNIT3’. “Break Time Unit
LS_TIMETICKETS-BREAK_UNIT_ISO = ‘CHAR3’. “ISO Code
LS_TIMETICKETS-BREAK_TIME = ‘QUAN9’. “Confirmed Break Time
LS_TIMETICKETS-EX_CREATED_BY = ‘CHAR12’. “Created by
LS_TIMETICKETS-EX_CREATED_DATE = ‘20241208’. “Created on
LS_TIMETICKETS-EX_CREATED_TIME = ‘002624’. “Time
LS_TIMETICKETS-TARGET_ACTI1 = ‘CHAR1’. “Target activity
LS_TIMETICKETS-TARGET_ACTI2 = ‘CHAR1’. “Target activity
LS_TIMETICKETS-TARGET_ACTI3 = ‘CHAR1’. “Target activity
LS_TIMETICKETS-TARGET_ACTI4 = ‘CHAR1’. “Target activity
LS_TIMETICKETS-TARGET_ACTI5 = ‘CHAR1’. “Target activity
LS_TIMETICKETS-TARGET_ACTI6 = ‘CHAR1’. “Target activity
LS_TIMETICKETS-TARGET_BUS_PROC1 = ‘CHAR1’. “TrgtQtyBusinessTrans
LS_TIMETICKETS-EX_IDENT = ‘CHAR32’. “External key
LS_TIMETICKETS-LOGDATE = ‘20241208’. “Logical date
LS_TIMETICKETS-LOGTIME = ‘002624’. “Logical time
LS_TIMETICKETS-WIP_BATCH = ‘CHAR10’. “WIP Batch
LS_TIMETICKETS-VENDRBATCH = ‘CHAR15’. “Supplier Batch
LS_TIMETICKETS-ME_SFC_ID = ‘CHAR60’. “MES SFC
LS_TIMETICKETS-ME_2ND_CONF_QTY = ‘QUAN13’. “Rework Quantity (ME)
APPEND LS_TIMETICKETS TO LT_TIMETICKETS .
CLEAR LS_TIMETICKETS .

**********************************************************************
*******Defination of [Tables]-[GOODSMOVEMENTS] .
**********************************************************************
DATA: LT_GOODSMOVEMENTS TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_CREATE.””BAPI Communication Structure: Create Material Document Item
DATA: LS_GOODSMOVEMENTS TYPE BAPI2017_GM_ITEM_CREATE .””BAPI Communication Structure: Create Material Document Item
LS_GOODSMOVEMENTS-MATERIAL = ‘CHAR18’. “Material
LS_GOODSMOVEMENTS-PLANT = ‘CHAR4’. “Plant
LS_GOODSMOVEMENTS-STGE_LOC = ‘CHAR4’. “Storage Location
LS_GOODSMOVEMENTS-BATCH = ‘CHAR10’. “Batch
LS_GOODSMOVEMENTS-MOVE_TYPE = ‘CHAR3’. “Movement Type
LS_GOODSMOVEMENTS-STCK_TYPE = ‘CHAR1’. “Stock Type
LS_GOODSMOVEMENTS-SPEC_STOCK = ‘CHAR1’. “Special Stock
LS_GOODSMOVEMENTS-VENDOR = ‘CHAR10’. “Supplier
LS_GOODSMOVEMENTS-CUSTOMER = ‘CHAR10’. “Customer
LS_GOODSMOVEMENTS-SALES_ORD = ‘CHAR10’. “Sales Order
LS_GOODSMOVEMENTS-S_ORD_ITEM = ‘NUMC6’. “Sales Order Item
LS_GOODSMOVEMENTS-SCHED_LINE = ‘NUMC4’. “Sales order schedule
LS_GOODSMOVEMENTS-VAL_TYPE = ‘CHAR10’. “Valuation Type
LS_GOODSMOVEMENTS-ENTRY_QNT = ‘QUAN13’. “Qty in unit of entry
LS_GOODSMOVEMENTS-ENTRY_UOM = ‘UNIT3’. “Unit of Entry
LS_GOODSMOVEMENTS-ENTRY_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMOVEMENTS-PO_PR_QNT = ‘QUAN13’. “Qty in OPUn
LS_GOODSMOVEMENTS-ORDERPR_UN = ‘UNIT3’. “Order Price Unit
LS_GOODSMOVEMENTS-ORDERPR_UN_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMOVEMENTS-PO_NUMBER = ‘CHAR10’. “Purchase order
LS_GOODSMOVEMENTS-PO_ITEM = ‘NUMC5’. “Item
LS_GOODSMOVEMENTS-SHIPPING = ‘CHAR2’. “Shipping Instr.
LS_GOODSMOVEMENTS-COMP_SHIP = ‘CHAR2’. “Compliance with Shipping Instr.
LS_GOODSMOVEMENTS-NO_MORE_GR = ‘CHAR1’. “Delivery Completed
LS_GOODSMOVEMENTS-ITEM_TEXT = ‘CHAR50’. “Text
LS_GOODSMOVEMENTS-GR_RCPT = ‘CHAR12’. “Goods Recipient
LS_GOODSMOVEMENTS-UNLOAD_PT = ‘CHAR25’. “Unloading Point
LS_GOODSMOVEMENTS-COSTCENTER = ‘CHAR10’. “Cost Center
LS_GOODSMOVEMENTS-ORDERID = ‘CHAR12’. “Order
LS_GOODSMOVEMENTS-ORDER_ITNO = ‘NUMC4’. “Order item number
LS_GOODSMOVEMENTS-CALC_MOTIVE = ‘CHAR2’. “Accounting Indicator
LS_GOODSMOVEMENTS-ASSET_NO = ‘CHAR12’. “Asset
LS_GOODSMOVEMENTS-SUB_NUMBER = ‘CHAR4’. “Sub-number
LS_GOODSMOVEMENTS-RESERV_NO = ‘NUMC10’. “Reservation
LS_GOODSMOVEMENTS-RES_ITEM = ‘NUMC4’. “Item number of reservation
LS_GOODSMOVEMENTS-RES_TYPE = ‘CHAR1’. “Record type
LS_GOODSMOVEMENTS-WITHDRAWN = ‘CHAR1’. “Final Issue
LS_GOODSMOVEMENTS-MOVE_MAT = ‘CHAR18’. “Receiving Material
LS_GOODSMOVEMENTS-MOVE_PLANT = ‘CHAR4’. “Receiving plant
LS_GOODSMOVEMENTS-MOVE_STLOC = ‘CHAR4’. “Receiving stor. loc.
LS_GOODSMOVEMENTS-MOVE_BATCH = ‘CHAR10’. “Receiving Batch
LS_GOODSMOVEMENTS-MOVE_VAL_TYPE = ‘CHAR10’. “Val. Type Tfr Batch
LS_GOODSMOVEMENTS-MVT_IND = ‘CHAR1’. “Movement indicator
LS_GOODSMOVEMENTS-MOVE_REAS = ‘NUMC4’. “Reason for Movement
LS_GOODSMOVEMENTS-RL_EST_KEY = ‘CHAR8’. “Real Estate Key
LS_GOODSMOVEMENTS-REF_DATE = ‘20241208’. “Reference date
LS_GOODSMOVEMENTS-COST_OBJ = ‘CHAR12’. “Cost Object
LS_GOODSMOVEMENTS-PROFIT_SEGM_NO = ‘NUMC10’. “Profitab. Segmt No.
LS_GOODSMOVEMENTS-PROFIT_CTR = ‘CHAR10’. “Profit Center
LS_GOODSMOVEMENTS-WBS_ELEM = ‘CHAR24’. “WBS Element
LS_GOODSMOVEMENTS-NETWORK = ‘CHAR12’. “Network
LS_GOODSMOVEMENTS-ACTIVITY = ‘CHAR4’. “Activity
LS_GOODSMOVEMENTS-PART_ACCT = ‘CHAR10’. “Partner
LS_GOODSMOVEMENTS-AMOUNT_LC = ‘DEC23’. “Amount loc.curr
LS_GOODSMOVEMENTS-AMOUNT_SV = ‘DEC23’. “Sales value
LS_GOODSMOVEMENTS-REF_DOC_YR = ‘NUMC4’. “Fisc. Year Ref. Doc.
LS_GOODSMOVEMENTS-REF_DOC = ‘CHAR10’. “Reference Document
LS_GOODSMOVEMENTS-REF_DOC_IT = ‘NUMC4’. “Reference Doc. Item
LS_GOODSMOVEMENTS-EXPIRYDATE = ‘20241208’. “SLED/BBD
LS_GOODSMOVEMENTS-PROD_DATE = ‘20241208’. “Date of Manufacture
LS_GOODSMOVEMENTS-FUND = ‘CHAR10’. “Fund
LS_GOODSMOVEMENTS-FUNDS_CTR = ‘CHAR16’. “Funds Center
LS_GOODSMOVEMENTS-CMMT_ITEM = ‘CHAR14’. “Commitment item
LS_GOODSMOVEMENTS-VAL_SALES_ORD = ‘CHAR10’. “Sales order
LS_GOODSMOVEMENTS-VAL_S_ORD_ITEM = ‘NUMC6’. “Sales order item
LS_GOODSMOVEMENTS-VAL_WBS_ELEM = ‘CHAR24’. “WBS Element
LS_GOODSMOVEMENTS-GL_ACCOUNT = ‘CHAR10’. “G/L Account
LS_GOODSMOVEMENTS-IND_PROPOSE_QUANX = ‘CHAR1’. “Ind. default qty
LS_GOODSMOVEMENTS-XSTOB = ‘CHAR1’. “Reversal Mvmnt Type
LS_GOODSMOVEMENTS-EAN_UPC = ‘CHAR18’. “EAN/UPC
LS_GOODSMOVEMENTS-DELIV_NUMB_TO_SEARCH = ‘CHAR10’. “Delivery
LS_GOODSMOVEMENTS-DELIV_ITEM_TO_SEARCH = ‘NUMC6’. “Item
LS_GOODSMOVEMENTS-SERIALNO_AUTO_NUMBERASSIGNMENT = ‘CHAR1’. “Serial no. automatic
LS_GOODSMOVEMENTS-VENDRBATCH = ‘CHAR15’. “Supplier Batch
LS_GOODSMOVEMENTS-STGE_TYPE = ‘CHAR3’. “Storage Type
LS_GOODSMOVEMENTS-STGE_BIN = ‘CHAR10’. “Storage Bin
LS_GOODSMOVEMENTS-SU_PL_STCK_1 = ‘DEC3’. “SU to be Plcd Stock
LS_GOODSMOVEMENTS-ST_UN_QTYY_1 = ‘QUAN13’. “Placement Qty per SU
LS_GOODSMOVEMENTS-ST_UN_QTYY_1_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMOVEMENTS-UNITTYPE_1 = ‘CHAR3’. “Storage Unit Type
LS_GOODSMOVEMENTS-SU_PL_STCK_2 = ‘DEC3’. “SU to be Plcd Stock
LS_GOODSMOVEMENTS-ST_UN_QTYY_2 = ‘QUAN13’. “Placement Qty per SU
LS_GOODSMOVEMENTS-ST_UN_QTYY_2_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMOVEMENTS-UNITTYPE_2 = ‘CHAR3’. “Storage Unit Type
LS_GOODSMOVEMENTS-STGE_TYPE_PC = ‘CHAR3’. “Storage Type
LS_GOODSMOVEMENTS-STGE_BIN_PC = ‘CHAR10’. “Storage bin…
LS_GOODSMOVEMENTS-NO_PST_CHGNT = ‘CHAR1’. “Do not create posting chge notice
LS_GOODSMOVEMENTS-GR_NUMBER = ‘CHAR10’. “GR Number
LS_GOODSMOVEMENTS-STGE_TYPE_ST = ‘CHAR3’. “Storage Type
LS_GOODSMOVEMENTS-STGE_BIN_ST = ‘CHAR10’. “Storage bin…
LS_GOODSMOVEMENTS-MATDOC_TR_CANCEL = ‘CHAR10’. “Material document
LS_GOODSMOVEMENTS-MATITEM_TR_CANCEL = ‘NUMC4’. “Item
LS_GOODSMOVEMENTS-MATYEAR_TR_CANCEL = ‘NUMC4’. “Material Doc. Year
LS_GOODSMOVEMENTS-NO_TRANSFER_REQ = ‘CHAR1’. “No Transfer Requirmnt
LS_GOODSMOVEMENTS-CO_BUSPROC = ‘CHAR12’. “Business Process
LS_GOODSMOVEMENTS-ACTTYPE = ‘CHAR6’. “Activity Type
LS_GOODSMOVEMENTS-SUPPL_VEND = ‘CHAR10’. “Goods Supplier
LS_GOODSMOVEMENTS-MATERIAL_EXTERNAL = ‘CHAR40’. “Material Number
LS_GOODSMOVEMENTS-MATERIAL_GUID = ‘CHAR32’. “GUID (External)
LS_GOODSMOVEMENTS-MATERIAL_VERSION = ‘CHAR10’. “Version Number
LS_GOODSMOVEMENTS-MOVE_MAT_EXTERNAL = ‘CHAR40’. “Material Number
LS_GOODSMOVEMENTS-MOVE_MAT_GUID = ‘CHAR32’. “GUID (External)
LS_GOODSMOVEMENTS-MOVE_MAT_VERSION = ‘CHAR10’. “Version Number
LS_GOODSMOVEMENTS-FUNC_AREA = ‘CHAR4’. “Functional Area
LS_GOODSMOVEMENTS-TR_PART_BA = ‘CHAR4’. “Trading Part.BA
LS_GOODSMOVEMENTS-PAR_COMPCO = ‘CHAR4’. “Clearing CoCode
LS_GOODSMOVEMENTS-DELIV_NUMB = ‘CHAR10’. “Delivery
LS_GOODSMOVEMENTS-DELIV_ITEM = ‘NUMC6’. “Item
LS_GOODSMOVEMENTS-NB_SLIPS = ‘NUMC3’. “Number of GR Slips
LS_GOODSMOVEMENTS-NB_SLIPSX = ‘CHAR1’. “Updated info. user data field
LS_GOODSMOVEMENTS-GR_RCPTX = ‘CHAR1’. “Updated info. user data field
LS_GOODSMOVEMENTS-UNLOAD_PTX = ‘CHAR1’. “Updated info. user data field
LS_GOODSMOVEMENTS-SPEC_MVMT = ‘CHAR1’. “Special movement
LS_GOODSMOVEMENTS-GRANT_NBR = ‘CHAR20’. “Grant
LS_GOODSMOVEMENTS-CMMT_ITEM_LONG = ‘CHAR24’. “Commitment Item
LS_GOODSMOVEMENTS-FUNC_AREA_LONG = ‘CHAR16’. “Functional Area
LS_GOODSMOVEMENTS-LINE_ID = ‘NUMC6’. “Identification
LS_GOODSMOVEMENTS-PARENT_ID = ‘NUMC6’. “Parent line ID
LS_GOODSMOVEMENTS-LINE_DEPTH = ‘NUMC2’. “Hierarchy level
LS_GOODSMOVEMENTS-QUANTITY = ‘QUAN13’. “Quantity
LS_GOODSMOVEMENTS-BASE_UOM = ‘UNIT3’. “Base Unit of Measure
LS_GOODSMOVEMENTS-LONGNUM = ‘CHAR40’. “Smart Number
LS_GOODSMOVEMENTS-BUDGET_PERIOD = ‘CHAR10’. “Budget Period
LS_GOODSMOVEMENTS-EARMARKED_NUMBER = ‘CHAR10’. “Earmarked Funds
LS_GOODSMOVEMENTS-EARMARKED_ITEM = ‘NUMC3’. “Document Item
LS_GOODSMOVEMENTS-STK_SEGMENT = ‘CHAR16’. “Stock Segment
LS_GOODSMOVEMENTS-MOVE_SEGMENT = ‘CHAR16’. “Rec. Stock Segment
LS_GOODSMOVEMENTS-MATERIAL_LONG = ‘CHAR40’. “Material
LS_GOODSMOVEMENTS-MOVE_MAT_LONG = ‘CHAR40’. “Receiving Material
LS_GOODSMOVEMENTS-STK_SEG_LONG = ‘CHAR40’. “Stock Segment
LS_GOODSMOVEMENTS-MOV_SEG_LONG = ‘CHAR40’. “Rec. Stock Segment
LS_GOODSMOVEMENTS-CREATE_DELIVERY = ‘CHAR1’. “Create Delivery
LS_GOODSMOVEMENTS-WAREHOUSE_EWM = ‘CHAR4’. “Warehouse Number
LS_GOODSMOVEMENTS-STGE_BIN_EWM = ‘CHAR18’. “Storage Bin
LS_GOODSMOVEMENTS-EWM_DIFF_ANA = ‘CHAR1’. “GM to Difference Analyzer
LS_GOODSMOVEMENTS-SERVICE_DOC = ‘CHAR10’. “Service Document
LS_GOODSMOVEMENTS-SERVICE_ITEM = ‘NUMC6’. “Service Document Item
LS_GOODSMOVEMENTS-SERVICE_DOC_TYPE = ‘CHAR4’. “Service Document Type
LS_GOODSMOVEMENTS-SUPPLYAREA = ‘CHAR10’. “Prodn Supply Area
LS_GOODSMOVEMENTS-EWM_INSPUUID = ‘CHAR32’. ”
LS_GOODSMOVEMENTS-XSTOR = ‘CHAR1’. “Type of posting
LS_GOODSMOVEMENTS-TARGET_BIN_EWM = ‘CHAR18’. “Destination Bin
APPEND LS_GOODSMOVEMENTS TO LT_GOODSMOVEMENTS .
CLEAR LS_GOODSMOVEMENTS .

**********************************************************************
*******Defination of [Tables]-[LINK_CONF_GOODSMOV] .
**********************************************************************
DATA: LT_LINK_CONF_GOODSMOV TYPE STANDARD TABLE OF BAPI_LINK_CONF_GOODSMOV.””Link: Confirmation with goods movements
DATA: LS_LINK_CONF_GOODSMOV TYPE BAPI_LINK_CONF_GOODSMOV .””Link: Confirmation with goods movements
LS_LINK_CONF_GOODSMOV-INDEX_CONFIRM = ‘INT410’. “Table line
LS_LINK_CONF_GOODSMOV-INDEX_GOODSMOV = ‘INT410’. “Table entries
LS_LINK_CONF_GOODSMOV-INDEX_GM_DEPEND = ‘INT410’. “Reference
APPEND LS_LINK_CONF_GOODSMOV TO LT_LINK_CONF_GOODSMOV .
CLEAR LS_LINK_CONF_GOODSMOV .

**********************************************************************
*******Defination of [Tables]-[CHARACTERISTICS_WIPBATCH] .
**********************************************************************
DATA: LT_CHARACTERISTICS_WIPBATCH TYPE STANDARD TABLE OF BAPI_CHAR_WIPBATCH.””BAPI Confirmation: Characteristics WIP Batch
DATA: LS_CHARACTERISTICS_WIPBATCH TYPE BAPI_CHAR_WIPBATCH .””BAPI Confirmation: Characteristics WIP Batch
LS_CHARACTERISTICS_WIPBATCH-CHAR_NAME = ‘CHAR30’. “Characteristic Name
LS_CHARACTERISTICS_WIPBATCH-CHAR_VALUE = ‘CHAR30’. “Value description
LS_CHARACTERISTICS_WIPBATCH-CHAR_VALUE_LONG = ‘CHAR70’. “Value description
APPEND LS_CHARACTERISTICS_WIPBATCH TO LT_CHARACTERISTICS_WIPBATCH .
CLEAR LS_CHARACTERISTICS_WIPBATCH .

**********************************************************************
*******Defination of [Tables]-[LINK_CONF_CHAR_WIPBATCH] .
**********************************************************************
DATA: LT_LINK_CONF_CHAR_WIPBATCH TYPE STANDARD TABLE OF BAPI_LINK_CONF_CHAR_WIPBATCH.””Linkage of Confirmation with Characteristics WIP Batch
DATA: LS_LINK_CONF_CHAR_WIPBATCH TYPE BAPI_LINK_CONF_CHAR_WIPBATCH .””Linkage of Confirmation with Characteristics WIP Batch
LS_LINK_CONF_CHAR_WIPBATCH-INDEX_CONFIRM = ‘INT410’. “Table line
LS_LINK_CONF_CHAR_WIPBATCH-INDEX_CHAR_WIPBATCH = ‘INT410’. “Table Line
APPEND LS_LINK_CONF_CHAR_WIPBATCH TO LT_LINK_CONF_CHAR_WIPBATCH .
CLEAR LS_LINK_CONF_CHAR_WIPBATCH .

**********************************************************************
*******Defination of [Tables]-[DETAIL_RETURN] .
**********************************************************************
DATA: LT_DETAIL_RETURN TYPE STANDARD TABLE OF BAPI_CORU_RETURN.””Return information for APIs
DATA: LS_DETAIL_RETURN TYPE BAPI_CORU_RETURN .””Return information for APIs
LS_DETAIL_RETURN-TYPE = ‘CHAR1’. “Message type
LS_DETAIL_RETURN-ID = ‘CHAR20’. “Message Class
LS_DETAIL_RETURN-NUMBER = ‘NUMC3’. “Message Number
LS_DETAIL_RETURN-MESSAGE = ‘CHAR220’. “Message Text
LS_DETAIL_RETURN-LOG_NO = ‘CHAR20’. “Log Number
LS_DETAIL_RETURN-LOG_MSG_NO = ‘NUMC6’. “Message Serial No.
LS_DETAIL_RETURN-MESSAGE_V1 = ‘CHAR50’. “Message Variable
LS_DETAIL_RETURN-MESSAGE_V2 = ‘CHAR50’. “Message Variable
LS_DETAIL_RETURN-MESSAGE_V3 = ‘CHAR50’. “Message Variable
LS_DETAIL_RETURN-MESSAGE_V4 = ‘CHAR50’. “Message Variable
LS_DETAIL_RETURN-PARAMETER = ‘CHAR32’. “Parameter Name
LS_DETAIL_RETURN-ROW = ‘INT410’. “Lines in parameter
LS_DETAIL_RETURN-FIELD = ‘CHAR30’. “Field name
LS_DETAIL_RETURN-SYSTEM = ‘CHAR10’. “Logical system (source of message)
LS_DETAIL_RETURN-FLG_LOCKED = ‘CHAR1’. “Record blocked
LS_DETAIL_RETURN-CONF_NO = ‘NUMC10’. “Confirmation
LS_DETAIL_RETURN-CONF_CNT = ‘NUMC8’. “Counter
APPEND LS_DETAIL_RETURN TO LT_DETAIL_RETURN .
CLEAR LS_DETAIL_RETURN .

**********************************************************************
*******Defination of [Tables]-[CHARACTERISTICS_BATCH] .
**********************************************************************
DATA: LT_CHARACTERISTICS_BATCH TYPE STANDARD TABLE OF BAPI_CHAR_BATCH.””BAPI Confirmation: Batch Characteristics
DATA: LS_CHARACTERISTICS_BATCH TYPE BAPI_CHAR_BATCH .””BAPI Confirmation: Batch Characteristics
LS_CHARACTERISTICS_BATCH-CHAR_NAME = ‘CHAR30’. “Characteristic Name
LS_CHARACTERISTICS_BATCH-CHAR_VALUE = ‘CHAR30’. “Value description
LS_CHARACTERISTICS_BATCH-CHAR_VALUE_LONG = ‘CHAR70’. “Value description
APPEND LS_CHARACTERISTICS_BATCH TO LT_CHARACTERISTICS_BATCH .
CLEAR LS_CHARACTERISTICS_BATCH .

**********************************************************************
*******Defination of [Tables]-[LINK_GM_CHAR_BATCH] .
**********************************************************************
DATA: LT_LINK_GM_CHAR_BATCH TYPE STANDARD TABLE OF BAPI_LINK_GM_CHAR_BATCH.””Link: Batch Characteristics with Goods Movement Item
DATA: LS_LINK_GM_CHAR_BATCH TYPE BAPI_LINK_GM_CHAR_BATCH .””Link: Batch Characteristics with Goods Movement Item
LS_LINK_GM_CHAR_BATCH-INDEX_GOODSMVT = ‘INT410’. “Item index
LS_LINK_GM_CHAR_BATCH-INDEX_CHAR_BATCH = ‘INT410’. “Table Line
APPEND LS_LINK_GM_CHAR_BATCH TO LT_LINK_GM_CHAR_BATCH .
CLEAR LS_LINK_GM_CHAR_BATCH .

**********************************************************************
*******CallUp The Function Now. .
**********************************************************************
CALL FUNCTION ‘BAPI_PRODORDCONF_CREATE_TX’
* EXPORTING
* POST_WRONG_ENTRIES = ‘0’
* TESTRUN = LV_TESTRUN
* CALL_ON_INBOUND_QUEUE = ”
IMPORTING
RETURN = LS_RETURN
TABLES
TIMETICKETS = LT_TIMETICKETS
* GOODSMOVEMENTS = LT_GOODSMOVEMENTS
* LINK_CONF_GOODSMOV = LT_LINK_CONF_GOODSMOV
* CHARACTERISTICS_WIPBATCH = LT_CHARACTERISTICS_WIPBATCH
* LINK_CONF_CHAR_WIPBATCH = LT_LINK_CONF_CHAR_WIPBATCH
* DETAIL_RETURN = LT_DETAIL_RETURN
* CHARACTERISTICS_BATCH = LT_CHARACTERISTICS_BATCH
* LINK_GM_CHAR_BATCH = LT_LINK_GM_CHAR_BATCH
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》