BAPI_GOODSMVT_CREATE_OIL MIGO Post

*This is a SAP ABAP TECHNICAL demo FOR MIGO POST,Be careful to use in your system,just FYI. Cwith MB_CREATE_GOODS_MOVEMENT
*If you have any solution,Please feel free to talk with your IT team/SAP ABAP professional guys. Post goods movements with MB_CREATE_GOODS_MOVEMENT
*You can use this method to create a material document for a goods
*movement.
*You can only create one material document each time you call up the
*method.
*You can use a simulation function before posting the goods movement to
*check how the data is updated in the database. The standard system is
*configured so that the goods movement is posted immediately without
*simulating beforehand.
*Ensure that you transfer the data in the same way as it is run in the
*database, for example,
*Material number 18-figure with leading zeros
*Batches with uppercase letters
*Note that for all transactions/events listed below, the posting date is
*entered in the header data of the material document. In the
*<LS>BAPI2017_GM_HEAD_01 interface, fill the <LS>PSTNG_DATE (import
*structure <LS>GOODSMVT_HEADER) field.
*Industry-Specific Information for SAP Oil & Gas when Calling Method
*CreateFromDataOil
*The system transfers the material document data for a document item to
*the method using the following interface tables:
*GOODSMVT_ITEM_01 STRUCTURE BAPIOIL2017_GM_ITM_CRTE_01
*GOODSMVT_ITEM_02 STRUCTURE BAPIOIL2017_GM_ITM_CRTE_02 OPTIONAL
*GOODSMVT_ITEM_PARAM STRUCTURE BAPIOIL2017_GM_ITM_CRTE_PARAM OPTIONAL
*GOODSMVT_ITEM_QUAN STRUCTURE BAPIOIL2017_GM_ITM_CRTE_QUAN OPTIONAL
*When calling the method, make sure that all of the above interface
*tables contain the fields <LS>LINE_ID, <LS>PARENT_ID, and
*<LS>LINE_DEPTH as these are needed to identify a document item. Of
*these fields, at the very least, the <LS>LINE_ID field must contain a
*unique number for each document item so that there is a unique link
*between each of these document items and the corresponding item data in
*the four tables.
*<ZH>Example
*Post a material document with two document items, the the first item
*fora standard material (without any industry-specific data), and the
*seconditem for an industry-specific material. The header data is is
*transferred in the same way as with method CreateFromData.
*Enter the relevant data for the first item in table GOODSMVT_ITEM_01.
*Enter <LB>000001 in the <LS>LINE_ID field.
*Enter the relevant data for the second item in table GOODSMVT_ITEM_01.
*Enter <LB>000002 in the <LS>LINE_ID field.
*Enter the external details and excise duty data in table
*GOODSMVT_ITEM_02. Enter <LB>000002 in the <LS>LINE_ID field.
*Enter the quantity conversion parameters in table GOODSMVT_ITEM_PARAM.
*Enter <LB>000002 in the <LS>LINE_ID field.
*The system transfers the additional quantities (number n) to table
*GOODSMVT_ITEM_QUAN. For each item, enter <LB>000002 in the
*<LS>LINE_ID field.
*<ZH>Posting the Additional Quantities
*Table GOODSMVT_ITEM_PARAM contains two control parameters for posting
*items with additional quantities:
*<LS>CALCULATEMISSING
*<LS>USEDEFAULTPARAMETERS
*If the value you enter for the <LS>USEDEFAULTPARAMETERS parameter
*differs from the default value, the system ignores any any quantity
*conversion parameters you entered manually and determines these
*parameters from the relevant default value tables.
*If the value you enter for the <LS>CALCULATEMISSING parameter differs
*from the default value, the system determines all all necessary units of
*measure for this posting item and calculates the missing quantities.
*Otherwise you must ensure that the system can access all quantities in
*all required units of measure through the interface.
*For each quantity and unit of measure, in the <LS>QUANTITYCHECK field
*in table GOODSMVT_ITEM_QUAN, you can enter a value that differs from the
*default value. If you do this, the system compares the additional
*quantities with the calculated additional quantities, and in line with
*the Customizing settings, performs a tolerance check. If you do not
*enter a value in the <LS>QUANTITYCHECK field, no check takes place
*and the system posts the additional quantities without a check taking
*place (in this case, there is a <LB>U in the <LS>MANEN field).
*
*
*<ZH>Authorization check,,,,<ZV>check
*In the MM Inventory Management component, the method does not execute
*any authorization checks.
*Note that during a posting of a goods movement, depending on the
*business transaction of the system, authorization objects of other
*applications can also be checked.
*<ZH>Transfer
*The following information about the material document that is to be
*created is transferred to the method:
*a structure with header data
*a structure with the code for the movement
*a table with the item data
*a table with the serial numbers
*The posting is carried out in the SAP R/3 via the
*MB_CREATE_GOODS_MOVEMENT function module.
*<ZH>Confirmations
*INCLUDE BAPI_RET LANGUAGE EN
*
*INCLUDE BAPI_INVENTUR_WEITERINF LANGUAGE EN
*<ZH>Which fields have to be filled during the various transactions/
*events?
*The following sample scenarios demonstrate which fields have to be
*filled for which business transactions/events (code).
*There are the following types of transactions/events:
*GM_Code 01: Goods receipt for purchase order
*GM_Code 02: Goods receipt for production order
*GM_Code 03: Goods issue
*GM_Code 04: Transfer posting
*GM_Code 05: Other goods receipts
*GM_Code 06: Reversal of goods movements
*GM_Code 07: Subsequent adjustment to a subcontract order
*<ZH>Entering the movement indicator
*Depending on the transaction, you must enter the following in the
*movement indicator:
*GM_Code 01 (Goods receipt for purchase order): <LB>B
*GM_Code 02 (Goods receipt for production order): <LB>F
*For all other transactions, you leave the field blank.
*<ZH>For 1: GM_Code 01: Goods receipt for purchase order
*Purchase order known
*The following fields have to be filled:
*Purchase order
*Purchase order item
*Movement type
*Movement indicator
*Quantity in unit of entry
*ISO code unit of measurement for unit of entry <ZH>or
*quantity proposal
*The following fields may have to be filled in some cases (incomplete
*listing):
*Shelf life expiration date (if it has been configured like this in the
*system)
*Reason for movement (if it has been configured like this in the system)
*Batch (if the material is handled in batches and batch numbers are not
*assigned automatically)
*Storage location (if a storage location has not been specified in the
*purchase order item)
*The following fields can be filled (incomplete listing):
*Stock type
*Item text
*Unloading point
*Delivery completed indicator
*You cannot fill the following fields (incomplete listing):
*Account assignment fields (account assignment is adopted from the
*purchase order)
*Reservation
*Receiving/issuing material
*Receiving/issuing plant
*Receiving/issuing storage location
*In the case of a purchase order item with the “subcontracting” item
*category, only the GR item in the interface is to be transferred. The
*system automatically determines GI items.
*Purchase order unknown: Shipping notification known
*The following fields have to be filled:
*Delivery
*Delivery item
*Movement type
*Other fields, such as those under “Purchase order known”. The system
*determines the relevant purchase order item via the delivery/delivery
*item.
*Purchase order unknown: Purchase order should be created automatically
*The following fields have to be filled:
*Material number
*Plant
*Storage location
*Vendor
*Movement type
*Movement indicator
*Quantity in unit of entry
*ISO code unit of measurement for unit of entry
*The following fields may have to be filled in some cases (incomplete
*listing):
*Shelf life expiration date (if it has been configured like this in the
*system)
*Reason for movement (if it has been configured like this in the system)
*Batch (if the material is handled in batches and batches are not
*assigned automatically)
*The following fields can be filled (incomplete listing):
*Stock type
*Item text
*Unloading point
*You cannot fill the following fields (incomplete listing):
*Account assignment fields (automatic creation of purchase order items
*with account assignment is not supported)
*Reservation
*Receiving/issuing material
*Receiving/issuing plant
*Receiving/issuing storage location
*Purchase order unknown: A purchase order should not be created
*The following fields have to be filled:
*Material number
*Plant
*Storage location
*Vendor
*Movement type
*Movement indicator
*Quantity in unit of entry
*ISO code unit of measurement for unit of entry
*The following fields may have to be filled in some cases (incomplete
*listing):
*Shelf life expiration date (if it has been configured like this)
*Reason for movement (if it has been configured like this)
*Batch (if the material is handled in batches and automatic assignment of
*batch numbers is not set)
*The following fields can be filled (incomplete listing):
*Special stock indicator
*Item text
*Unloading point
*Goods recipient
*The following fields cannot be filled (incomplete listing):
*Account assignment fields (automatic creation of purchase order items
*with account assignment is not supported)
*Reservation
*Receiving/issuing material
*Receiving/issuing plant
*Receiving/issuing storage location
*Receiving/issuing batch
*The input combinations listed above for the GM_CODE 01 can be combined
*within an input table so that they can be posted in a material document.
*Items can also be posted for different purchase orders, provided that
*all the purchase orders refer to the same vendor.
*Transfer of subcontracting components
*During the posting of the ordered material of a subcontract order with
*movement type 101, for the transfer of the subcontracting components,
*the filled unique identification of the document line (LINE_ID) is also
*required.
*<DS:TX.BAPI_GOODSMVT_CREATE_LB_INFO>More information on LINE_ID and
*PARENT_ID
*
*The following fields have to be filled for the components:
*Unique identification of the document line
*Identification of the immediately superior line
*Material number
*Plant
*Storage location
*Quantity in unit of entry
*The following fields can be filled for the components:
*All other fields in the method that are included in this
*<DS:TX.BAPI_GOODSMVT_CREATE_GOCOMB>list.
*The following fields cannot be filled for the components:
*All fields that are not included in the list above. The movement
*indicator must be initial.
*Additional fields in goods-receipt-based invoice verification
*When you post a goods receipt to purchase order with movement type
*<LS>102, an issue with reference to a previously posted goods issue,
*the following fields must also be transferred:
*REF_DOC_IT (LFPOS): Item of a reference document
*REF_DOC (LFBNR): Document number of a reference document
*REF_DOC_YR (LFBJA): Fiscal year of a reference document
*Only when you transfer these fields is it guaranteed that the reference
*to the original goods movement stay the same.
*<ZH>For 2 GM_Code 02: Goods receipt for production order
*The following fields have to be filled:
*Order
*Movement type
*Movement indicator
*Quantity in unit of entry
*ISO code unit of measurement for unit of entry <ZH>or
*quantity proposal
*The following fields may have to be filled in some cases (incomplete
*listing):
*Shelf life expiration date (if the system has been configured like this)
*Reason for movement (if the system has been configured like this)
*Batch (if the material is handled in batches and automatic batch number
*assignment is not set)
*Storage location (if storage location has not been specified in the
*order)
*The following fields can be filled (incomplete listing):
*Order item (co-product)
*Stock type
*Item text
*Unloading point
*”Delivery completed” indicator
*The following fields cannot be filled (incomplete listing):
*Account assignment fields (the account assignments are adopted from the
*purchase order)
*Reservation
*Receiving/issuing material
*Receiving/issuing plant
*Receiving/issuing storage location
*Receiving/issuing batch
*<ZH>For 3 GM_Code 03: Goods issue
*Goods issue without reference to a reservation
*The following fields have to be filled:
*Material number
*Plant
*Storage location
*Movement type
*Movement indicator
*Quantity in unit of entry
*ISO code unit of measurement for unit of entry
*The following fields may have to be filled in some cases (incomplete
*listing):
*Special stock (e.g. sales order, project, vendor etc.)
*Shelf life expiration date (if the system is configured like this)
*Reason for movement (if the system has been configured like this)
*Batch (if the material is handled in batches and automatic batch number
*assignment is not set)
*Account assignment fields
*The following fields can be filled (incomplete listing):
*Special stock indicator
*Item text
*Unloading point
*Goods recipient
*The following fields cannot be filled (incomplete listing):
*Reservation
*Receiving/issuing material
*Receiving/issuing plant
*Receiving/issuing storage location
*Receiving/issuing batch
*Goods issue with reference to a reservation
*The following fields have to be filled:
*Reservation number
*Reservation item
*Record type of the reservation
*Movement indicator
*Quantity in unit of entry
*ISO code unit of measurement for unit of entry
*The following fields may have to be filled in some cases (incomplete
*listing):
*Shelf life expiration date (if this has been configured in the system)
*Reason for movement (if this has been configured in the system)
*Batch (if the material is handled in batches and automatic batch number
*assignment is not set)
*Storage location (if not planned in the reservation)
*The following fields can be filled (incomplete listing):
*Special stock indicator
*Item text
*Unloading point
*Goods recipient
*The following fields cannot be filled (incomplete listing):
*Movement type
*Material
*Plant
*Account assignment fields
*<ZH>For 4 GM_Code 04: Transfer posting
*Transfer posting without reference to a reservation
*The following fields have to be filled:
*Material number
*Plant
*Storage location
*Movement type
*Movement indicator
*Quantity in unit of entry
*ISO code unit of measurement for unit of entry
*The following fields may have to be filled in some cases (incomplete
*listing):
*Receiving material
*Receiving plant
*Receiving storage location
*Receiving batch (if material is handled in batches and you want to
*change batches)
*Receiving/issuing special stock (e.g. sales order, project, vendor etc.)
*Shelf life expiration date (if this has been configured in the system)
*Reason for movement (if this has been configured in the system)
*Batch (if the material is handled in batches and automatic batch number
*assignment is not set)
*The following fields can be filled (incomplete listing):
*Special stock indicator
*Item text
*Account assignment fields (for automatic posting lines: Expense/income
*from stock transfer)
*The following fields cannot be filled (incomplete listing):
*Reservation
*Transfer posting with reference to a reservation
*See goods issue with reference to a reservation
*<ZH>For 5 GM_Code 05: Other goods receipts
*Other goods receipt without reference to a reservation
*See goods issue without reference to a reservation
*Other goods receipt with reference to a reservation
*See goods issue with reference to a reservation
*<ZH>For 6 GM_Code 06: Reversal of goods movements
*You can use the <LS>Cancel method to reverse goods movements. But you
*may also want to cancel a goods movement without referring to a material
*document (see the <LS>Cancel method).
*If you want to work without referring to the document, you have to fill
*the field <LS>BAPI_GM_ITEM_CREATE-XSTOB in the interface (import
*table <LS>GOODSMVT_ITEM). In this case, the system converts the
*movement type assigned in the interface to the reversal movement type.
*Alternatively, you can set the reversal movement type in the interface.
*In this case, the <LS>BAPI_GM_ITEM_CREATE_XSTOB field must be
*transferred blank.
*If you want to cancel a goods movement with reference to a reservation
*(without using the <LS>Cancel method) you can only transfer the field
*<LS>BAPI_GM_ITEM_CREATE_XSTOB if it is filled. Movement types are not
*transferred when you post with reference to a reservation, as the
*movement type is contained in the reservation item.
*<ZH>For 7. GM_Code 07: Subsequent adjustment to a subcontract order
*Ordered material of subcontract order
*The following fields have to be filled:
*Unique identification of document line (can be assigned to anything)
*Posting date in document header
*Document number of purchasing document
*Item number of purchasing document
*Material number,,,, <ZV>check
*Plant,,,,<ZV>check
*Movement type (select movement type <DS:CHAP.SIMG_OLMB_BWA_121>121)
*Movement indicator (must be <LS>O)
*Further entries are not allowed. The entry quantity for the ordered
*material of a subcontract order must be zero.
*Components
*The following fields have to be filled:
*Unique identification of document line (can be assigned to anything)
*Identification of the immediately superior line
*Plant
*Material number,,,, <ZV>check
*Quantity in unit of entry; can also be negative
*The following fields can be filled:
*Storage location
*All other fields in the method that are included in this
*<DS:TX.BAPI_GOODSMVT_CREATE_GOCOMB>list.
*The following fields may not be filled:
*All fields that are not in the list above. The movement indicator must
*be blank.
*
*<DS:TX.BAPI_GOODSMVT_CREATE_LB_INFO>More information on LINE_ID and
*PARENT_ID
*Additional fields in goods-receipt-based invoice verification
*When you post a subsequent adjustment, the following fields must also be
*transferred:
*REF_DOC_IT (LFPOS): Item of a reference document
*REF_DOC (LFBNR): Document number of a reference document
*REF_DOC_YR (LFBJA): Fiscal year of a reference document
*Only when you transfer these fields is it guaranteed that the reference
*to the original goods movement stays the same.

 

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

**********************************************************************
*******Defination of Work Area Structrue [Import]-[GOODSMVT_HEADER ] . “”BAPI Communic. Structure: Create Mat. Doc. Header Data (OIL)
**********************************************************************
DATA: LS_GOODSMVT_HEADER TYPE BAPIOIL2017_GM_HEAD_CREATE . “”BAPI Communic. Structure: Create Mat. Doc. Header Data (OIL)
LS_GOODSMVT_HEADER-PSTNG_DATE = ‘20241208’. “Posting Date
LS_GOODSMVT_HEADER-DOC_DATE = ‘20241208’. “Document Date
LS_GOODSMVT_HEADER-PSTNG_TIME = ‘000956’. “Posting time
LS_GOODSMVT_HEADER-REF_DOC_NO = ‘CHAR16’. “Reference
LS_GOODSMVT_HEADER-BILL_OF_LADING = ‘CHAR16’. “Bill of lading
LS_GOODSMVT_HEADER-GR_GI_SLIP_NO = ‘CHAR10’. “Goods Receipt/Issue Slip
LS_GOODSMVT_HEADER-PR_UNAME = ‘CHAR12’. “User Name
LS_GOODSMVT_HEADER-HEADER_TXT = ‘CHAR25’. “Document Header Text
LS_GOODSMVT_HEADER-VER_GR_GI_SLIP = ‘CHAR1’. “Print Version
LS_GOODSMVT_HEADER-VER_GR_GI_SLIPX = ‘CHAR1’. “Updated info. user data field
LS_GOODSMVT_HEADER-EXT_WMS = ‘CHAR1’. “Ext. WMS control
LS_GOODSMVT_HEADER-REF_DOC_NO_LONG = ‘CHAR35’. “Reference
LS_GOODSMVT_HEADER-BILL_OF_LADING_LONG = ‘CHAR35’. “Bill of Lading
LS_GOODSMVT_HEADER-BAR_CODE = ‘CHAR40’. “Bar code

**********************************************************************
*******Defination of Work Area Structrue [Import]-[GOODSMVT_CODE ] . “”MMIM: New Key Assignment GM_CODE to Transaction of Inv. Mgmt
**********************************************************************
DATA: LS_GOODSMVT_CODE TYPE BAPI2017_GM_CODE . “”MMIM: New Key Assignment GM_CODE to Transaction of Inv. Mgmt
LS_GOODSMVT_CODE-GM_CODE = ‘CHAR2’. “GM_code
DATA: LV_TESTRUN TYPE BAPI2017_GM_GEN-TESTRUN .”Option,Default Value =SPACE,

**********************************************************************
*******Defination of Work Area Structrue [Export]-[GOODSMVT_HEADRET ] . “”MMIM: Output Structure For General FM To Post Goods Movement
**********************************************************************
DATA: LS_GOODSMVT_HEADRET TYPE BAPI2017_GM_HEAD_RET . “”MMIM: Output Structure For General FM To Post Goods Movement
DATA: LV_MATERIALDOCUMENT TYPE BAPI2017_GM_HEAD_RET-MAT_DOC .”Obligatory
DATA: LV_MATDOCUMENTYEAR TYPE BAPI2017_GM_HEAD_RET-DOC_YEAR .”Obligatory

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

**********************************************************************
*******Defination of [Tables]-[GOODSMVT_ITEM_02] .
**********************************************************************
DATA: LT_GOODSMVT_ITEM_02 TYPE STANDARD TABLE OF BAPIOIL2017_GM_ITM_CRTE_02.””BAPI Communication Structure: Create Material Document Item
DATA: LS_GOODSMVT_ITEM_02 TYPE BAPIOIL2017_GM_ITM_CRTE_02 .””BAPI Communication Structure: Create Material Document Item
LS_GOODSMVT_ITEM_02-LINE_ID = ‘NUMC6’. “Identification
LS_GOODSMVT_ITEM_02-PARENT_ID = ‘NUMC6’. “Parent line ID
LS_GOODSMVT_ITEM_02-LINE_DEPTH = ‘NUMC2’. “Hierarchy level
LS_GOODSMVT_ITEM_02-ORIGINCITY = ‘CHAR4’. “Origin city code
LS_GOODSMVT_ITEM_02-ORIGINCOUNTY = ‘CHAR3’. “Origin county code
LS_GOODSMVT_ITEM_02-ORIGINREGION = ‘CHAR3’. “Origin region
LS_GOODSMVT_ITEM_02-ORIGINCOUNTRYISO = ‘CHAR2’. “ISO Code
LS_GOODSMVT_ITEM_02-DESTINATIONCITY = ‘CHAR4’. “Dest.city code
LS_GOODSMVT_ITEM_02-DESTINATIONCOUNTY = ‘CHAR3’. “Dest.county code
LS_GOODSMVT_ITEM_02-DESTINATIONREGION = ‘CHAR3’. “Destination region
LS_GOODSMVT_ITEM_02-DESTINATIONCOUTRYISO = ‘CHAR2’. “ISO Code
LS_GOODSMVT_ITEM_02-TAXORIGIN = ‘CHAR15’. “Tax origin
LS_GOODSMVT_ITEM_02-TAXDESTINATION = ‘CHAR15’. “Tax destination
LS_GOODSMVT_ITEM_02-PIPELINETRIPNUMBER = ‘CHAR16’. “Pipe trip no.
LS_GOODSMVT_ITEM_02-PIPELINEBATCHNUMBER = ‘CHAR16’. “Pipe ex.batch no.
LS_GOODSMVT_ITEM_02-MODEOFTRANSPORT = ‘CHAR2’. “Mode of transport
LS_GOODSMVT_ITEM_02-ALTERNATEORIGIN = ‘CHAR15’. “Alternate origin
LS_GOODSMVT_ITEM_02-ALTERNATEDESTINATION = ‘CHAR15’. “Altern. destination
LS_GOODSMVT_ITEM_02-TRUCKNUMBER = ‘CHAR10’. “Truck number
LS_GOODSMVT_ITEM_02-VENDOR_NO = ‘CHAR10’. “Supplier
LS_GOODSMVT_ITEM_02-EXTERNALLICENSE = ‘CHAR15’. “External license no.
LS_GOODSMVT_ITEM_02-VALIDFROM = ‘20241208’. “Valid from Date
LS_GOODSMVT_ITEM_02-VALIDTO = ‘20241208’. “Valid to date
LS_GOODSMVT_ITEM_02-LICENSETYPE = ‘CHAR4’. “License type
LS_GOODSMVT_ITEM_02-INTERNALLICENSE = ‘CHAR10’. “Internal license no.
LS_GOODSMVT_ITEM_02-FOLLOWONLICENSE = ‘CHAR10’. “Follow-on license
LS_GOODSMVT_ITEM_02-FOLLOWONQUANTITY = ‘QUAN13’. “2nd License Qty
LS_GOODSMVT_ITEM_02-EXTERNALBILLOFLADING = ‘CHAR16’. “Ext.bill/lading no.
LS_GOODSMVT_ITEM_02-MISCDELIVERYNUMBER = ‘CHAR16’. “Miscell.deliv.no.
LS_GOODSMVT_ITEM_02-HANDLING_TYPE = ‘CHAR2’. “Handling Type
LS_GOODSMVT_ITEM_02-ED_PRICING_EXTERN = ‘CHAR2’. “ED pricing key
LS_GOODSMVT_ITEM_02-INTTRACKINGNUMBER = ‘CHAR10’. “Tracking number
LS_GOODSMVT_ITEM_02-TRACKINGNUMBERYEAR = ‘NUMC4’. “Trcknmbr year
LS_GOODSMVT_ITEM_02-EXTTRACKINGNUMBER = ‘CHAR18’. “External tracking no
LS_GOODSMVT_ITEM_02-TRACKINGITEM = ‘NUMC5’. “Tracking item
LS_GOODSMVT_ITEM_02-FINALTRANSFERIND = ‘CHAR1’. “Final transfer ind.
LS_GOODSMVT_ITEM_02-ISSUINGVALUATIONTYPE = ‘CHAR10’. “Val.type/issuing loc
APPEND LS_GOODSMVT_ITEM_02 TO LT_GOODSMVT_ITEM_02 .
CLEAR LS_GOODSMVT_ITEM_02 .

**********************************************************************
*******Defination of [Tables]-[GOODSMVT_ITEM_PARAM] .
**********************************************************************
DATA: LT_GOODSMVT_ITEM_PARAM TYPE STANDARD TABLE OF BAPIOIL2017_GM_ITM_CRTE_PARAM.””IS-OIL: BAPI-Kommunik.Strukt: Mat.Bel.Pos. Param. anl.
DATA: LS_GOODSMVT_ITEM_PARAM TYPE BAPIOIL2017_GM_ITM_CRTE_PARAM .””IS-OIL: BAPI-Kommunik.Strukt: Mat.Bel.Pos. Param. anl.
LS_GOODSMVT_ITEM_PARAM-LINE_ID = ‘NUMC6’. “Identification
LS_GOODSMVT_ITEM_PARAM-PARENT_ID = ‘NUMC6’. “Parent line ID
LS_GOODSMVT_ITEM_PARAM-LINE_DEPTH = ‘NUMC2’. “Hierarchy level
LS_GOODSMVT_ITEM_PARAM-CONVERSIONGROUP = ‘CHAR4’. “Conversion Group
LS_GOODSMVT_ITEM_PARAM-CALCULATEMISSING = ‘CHAR1’. ”
LS_GOODSMVT_ITEM_PARAM-USEDEFAULTPARAMETERS = ‘CHAR1’. ”
LS_GOODSMVT_ITEM_PARAM-FIXEDDENSITY = ‘FLTP16’. “Fixed Density
LS_GOODSMVT_ITEM_PARAM-FIXEDDENSITYUOM = ‘UNIT3’. “Density unit
LS_GOODSMVT_ITEM_PARAM-FIXEDDENSITYUOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-THERMALEXPCOEFF = ‘FLTP16’. “Qty. Conv. Coeff.
LS_GOODSMVT_ITEM_PARAM-BASEDENSITY = ‘FLTP16’. “Base density
LS_GOODSMVT_ITEM_PARAM-BASEDENSITYUOM = ‘UNIT3’. “Density unit
LS_GOODSMVT_ITEM_PARAM-BASEDENSITYUOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-BASEHEATINGVALUE = ‘FLTP16’. “Base heating value
LS_GOODSMVT_ITEM_PARAM-BASEHEATINGVALUEUOM = ‘UNIT3’. “Heating value unit
LS_GOODSMVT_ITEM_PARAM-BASEHEATINGVALUEUOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-TESTTEMPERATURE_DENSITY = ‘FLTP16’. “Test Temperature
LS_GOODSMVT_ITEM_PARAM-TESTTEMP_DENSITY_UOM = ‘UNIT3’. “Test Temp. Unit
LS_GOODSMVT_ITEM_PARAM-TESTTEMPDENSITY_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-MATERIALTEMPERATURE = ‘FLTP16’. “Mat.Temperature
LS_GOODSMVT_ITEM_PARAM-MATERIALTEMPERATURE_UOM = ‘UNIT3’. “Mat. Temp. Unit
LS_GOODSMVT_ITEM_PARAM-MATERIALTEMPERATURE_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-TESTHEATINGVALUE = ‘FLTP16’. “Test heating value
LS_GOODSMVT_ITEM_PARAM-TESTHEATINGVALUE_UOM = ‘UNIT3’. “Hvalue unit
LS_GOODSMVT_ITEM_PARAM-TESTHEATINGVALUE_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-TESTDENSITY = ‘FLTP16’. “Test Density
LS_GOODSMVT_ITEM_PARAM-TESTDENSITY_UOM = ‘UNIT3’. “Density unit
LS_GOODSMVT_ITEM_PARAM-TESTDENSITY_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-MATERIALPRESSURE = ‘FLTP16’. “Material pressure
LS_GOODSMVT_ITEM_PARAM-MATERIALPRESSURE_UOM = ‘UNIT3’. “Mat. press. unit
LS_GOODSMVT_ITEM_PARAM-MATERIALPRESSURE_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-TESTPRESSURE_DENSITY = ‘FLTP16’. “Test press. density
LS_GOODSMVT_ITEM_PARAM-TESTPRESSDENSITY_UOM = ‘UNIT3’. “Tpres. unit density
LS_GOODSMVT_ITEM_PARAM-TESTPRESSDENSITY_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-TESTPRESSURECOMBUSTION = ‘FLTP16’. “Test pres. heat.val.
LS_GOODSMVT_ITEM_PARAM-TESTPRESSURECOMBUSTION_UOM = ‘UNIT3’. “Tpressure unit Hval.
LS_GOODSMVT_ITEM_PARAM-TESTPRESSURECOMB_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-TESTTEMPERATURECOMBUSTION = ‘FLTP16’. “Ttemp. heating value
LS_GOODSMVT_ITEM_PARAM-TESTTEMPERATURECOMB_UOM = ‘UNIT3’. “Ttmp. unit heat.val.
LS_GOODSMVT_ITEM_PARAM-TESTTEMPERATURECOMB_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-ATMOSPHERICPRESSURE = ‘FLTP16’. “Atmospheric press.
LS_GOODSMVT_ITEM_PARAM-ATMOSPHERICPRESSURE_UOM = ‘UNIT3’. “Atm. pressure unit
LS_GOODSMVT_ITEM_PARAM-ATMOSPHERICPRESS_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-VAPORPRESSURE = ‘FLTP16’. “Vapor pressure (LPG)
LS_GOODSMVT_ITEM_PARAM-VAPORPRESSURE_UOM = ‘UNIT3’. “Vapor pressure unit
LS_GOODSMVT_ITEM_PARAM-VAPORPRESSURE_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-MATERIALCOMBUSTIONTEMPERATURE = ‘FLTP16’. “Mat.comb. temp.
LS_GOODSMVT_ITEM_PARAM-MATERIALCOMBUSTIONTEMP_UOM = ‘UNIT3’. “Mat. comb.tmp. unit.
LS_GOODSMVT_ITEM_PARAM-MATERIALCOMBUSTIONTEMP_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-MATERIALCOMBUSTIONPRESSURE = ‘FLTP16’. “Mat.comb. pres.
LS_GOODSMVT_ITEM_PARAM-MATERIALCOMBUSTIONPRESS_UOM = ‘UNIT3’. “Mat. comb.pres.unit.
LS_GOODSMVT_ITEM_PARAM-MATERIALCOMBUSTIONPRESS_UOM_IS = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-TESTTEMPCALHEATVALUE = ‘FLTP16’. “Calorimeter test temp.
LS_GOODSMVT_ITEM_PARAM-TESTTEMPCALHEATVALUE_UOM = ‘UNIT3’. “Unit
LS_GOODSMVT_ITEM_PARAM-TESTTEMPCALHEATVALUE_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-TESTPRESSCALHEATVALUE = ‘FLTP16’. “Cal.tst.pres.
LS_GOODSMVT_ITEM_PARAM-TESTPRESSCALHEATVALUE_UOM = ‘UNIT3’. “Unit
LS_GOODSMVT_ITEM_PARAM-TESTPRESSCALHEATVALUE_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-HYDROMETERINDICATOR = ‘CHAR1’. “Hydrometer correctn.
LS_GOODSMVT_ITEM_PARAM-AIRBUOYANCYINDICATOR = ‘CHAR1’. “Air Buoy. Ind.
LS_GOODSMVT_ITEM_PARAM-AIRBUOYANCYCONSTANT = ‘DEC3’. “Air Buoyancy Factor
LS_GOODSMVT_ITEM_PARAM-METERCORRECTIONFACTOR = ‘FLTP16’. “Meter corr. factor
LS_GOODSMVT_ITEM_PARAM-BASESEDIMENTWATERCONTENT = ‘FLTP16’. “Base sed. & water %
LS_GOODSMVT_ITEM_PARAM-BSW_UOM = ‘UNIT3’. “BSW % UNIT
LS_GOODSMVT_ITEM_PARAM-BSW_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-HEATINGVALUECLASS = ‘CHAR2’. “Heating value class
LS_GOODSMVT_ITEM_PARAM-HEATINGVALUECLASS_TO = ‘CHAR2’. “Heating value class
LS_GOODSMVT_ITEM_PARAM-CH4FRACTION = ‘FLTP16’. “CH4 ratio
LS_GOODSMVT_ITEM_PARAM-N2FRACTION = ‘FLTP16’. “Nitrogen ratio
LS_GOODSMVT_ITEM_PARAM-CO2FRACTION = ‘FLTP16’. “CO2 ratio
LS_GOODSMVT_ITEM_PARAM-C2H6FRACTION = ‘FLTP16’. “C2H6 ratio
LS_GOODSMVT_ITEM_PARAM-C3H8FRACTION = ‘FLTP16’. “C3H8 ratio
LS_GOODSMVT_ITEM_PARAM-H2OFRACTION = ‘FLTP16’. “water ratio
LS_GOODSMVT_ITEM_PARAM-H2SFRACTION = ‘FLTP16’. “Hydr. sulfide ratio
LS_GOODSMVT_ITEM_PARAM-H2FRACTION = ‘FLTP16’. “Hydrogen ratio
LS_GOODSMVT_ITEM_PARAM-COFRACTION = ‘FLTP16’. “Carbon monoxide rat.
LS_GOODSMVT_ITEM_PARAM-O2FRACTION = ‘FLTP16’. “O2 ratio
LS_GOODSMVT_ITEM_PARAM-ISOC4H10FRACTION = ‘FLTP16’. “C4H10 ratio
LS_GOODSMVT_ITEM_PARAM-NC4H10FRACTION = ‘FLTP16’. “nC4H10 ratio
LS_GOODSMVT_ITEM_PARAM-ISOC5H12FRACTION = ‘FLTP16’. “C5H12 ratio
LS_GOODSMVT_ITEM_PARAM-NC5H12FRACTION = ‘FLTP16’. “nC5H12 ratio
LS_GOODSMVT_ITEM_PARAM-C6H14FRACTION = ‘FLTP16’. “nC6H14 ratio
LS_GOODSMVT_ITEM_PARAM-C7H16FRACTION = ‘FLTP16’. “nC7H16 ratio
LS_GOODSMVT_ITEM_PARAM-C8H18FRACTION = ‘FLTP16’. “nC8H18 ratio
LS_GOODSMVT_ITEM_PARAM-C9H20FRACTION = ‘FLTP16’. “nC9H20 ratio
LS_GOODSMVT_ITEM_PARAM-C10H22FRACTION = ‘FLTP16’. “nC10H20 ratio
LS_GOODSMVT_ITEM_PARAM-HELIUMFRACTION = ‘FLTP16’. “He ratio
LS_GOODSMVT_ITEM_PARAM-ARGONFRACTION = ‘FLTP16’. “Ar ratio
LS_GOODSMVT_ITEM_PARAM-GASCOMPOSITIONFRACTION_UOM = ‘UNIT3’. “H2S % unit
LS_GOODSMVT_ITEM_PARAM-GASCOMPOSITIONFRACTION_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-MOLARDENSITY = ‘FLTP16’. “Base density molar
LS_GOODSMVT_ITEM_PARAM-MOLARDENSITY_UOM = ‘UNIT3’. “Density unit
LS_GOODSMVT_ITEM_PARAM-MOLARDENSITY_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-MOLECULARWEIGHT = ‘FLTP16’. “Molecular weight
LS_GOODSMVT_ITEM_PARAM-MOLECULARWEIGHT_UOM = ‘UNIT3’. “Density unit
LS_GOODSMVT_ITEM_PARAM-MOLECULARWEIGHT_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-HYDROCARBONMOLFRACTION = ‘FLTP16’. “Hydrocarb. mole frac.
LS_GOODSMVT_ITEM_PARAM-CUSTOMERPCHAR1 = ‘CHAR3’. “Par.char.
LS_GOODSMVT_ITEM_PARAM-CUSTOMERPFLOAT1 = ‘FLTP16’. “Fltp.par.
LS_GOODSMVT_ITEM_PARAM-CUSTOMERP1_UOM = ‘UNIT3’. “Unit 1
LS_GOODSMVT_ITEM_PARAM-CUSTOMERP1_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-CUSTOMERPCHAR2 = ‘CHAR3’. “Par.char.
LS_GOODSMVT_ITEM_PARAM-CUSTOMERPFLOAT2 = ‘FLTP16’. “Fltp.par.
LS_GOODSMVT_ITEM_PARAM-CUSTOMERP2_UOM = ‘UNIT3’. “Unit 2
LS_GOODSMVT_ITEM_PARAM-CUSTOMERP2_UOM_ISO = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_PARAM-CUSTOMERPCHAR3 = ‘CHAR3’. “Par.char.
LS_GOODSMVT_ITEM_PARAM-CUSTOMERPFLOAT3 = ‘FLTP16’. “Fltp.par.
LS_GOODSMVT_ITEM_PARAM-CUSTOMERP3_UOM = ‘UNIT3’. “Unit 3
LS_GOODSMVT_ITEM_PARAM-CUSTOMERP3_UOM_ISO = ‘CHAR3’. “ISO Code
APPEND LS_GOODSMVT_ITEM_PARAM TO LT_GOODSMVT_ITEM_PARAM .
CLEAR LS_GOODSMVT_ITEM_PARAM .

**********************************************************************
*******Defination of [Tables]-[GOODSMVT_ITEM_QUAN] .
**********************************************************************
DATA: LT_GOODSMVT_ITEM_QUAN TYPE STANDARD TABLE OF BAPIOIL2017_GM_ITM_CRTE_QUAN.””IS-OIL: BAPI-Kommunik.Strukt: Mat.Bel.Pos. alt. Mengen. anl.
DATA: LS_GOODSMVT_ITEM_QUAN TYPE BAPIOIL2017_GM_ITM_CRTE_QUAN .””IS-OIL: BAPI-Kommunik.Strukt: Mat.Bel.Pos. alt. Mengen. anl.
LS_GOODSMVT_ITEM_QUAN-LINE_ID = ‘NUMC6’. “Identification
LS_GOODSMVT_ITEM_QUAN-PARENT_ID = ‘NUMC6’. “Parent line ID
LS_GOODSMVT_ITEM_QUAN-LINE_DEPTH = ‘NUMC2’. “Hierarchy level
LS_GOODSMVT_ITEM_QUAN-QUANTITYFLOAT = ‘FLTP16’. “Additional Quantity
LS_GOODSMVT_ITEM_QUAN-QUANTITYPACKED = ‘QUAN13’. “Add.qty.-packed
LS_GOODSMVT_ITEM_QUAN-QUANTITYUOM = ‘UNIT3’. “Internal UoM
LS_GOODSMVT_ITEM_QUAN-QUANTITYISOUOM = ‘CHAR3’. “ISO Code
LS_GOODSMVT_ITEM_QUAN-QUANTITYCHECK = ‘CHAR1’. “Manual entry
APPEND LS_GOODSMVT_ITEM_QUAN TO LT_GOODSMVT_ITEM_QUAN .
CLEAR LS_GOODSMVT_ITEM_QUAN .

**********************************************************************
*******Defination of [Tables]-[GOODSMVT_SERIALNUMBER] .
**********************************************************************
DATA: LT_GOODSMVT_SERIALNUMBER TYPE STANDARD TABLE OF BAPI2017_GM_SERIALNUMBER.””BAPI Communication Structure: Create Mat. Doc., Serial No.
DATA: LS_GOODSMVT_SERIALNUMBER TYPE BAPI2017_GM_SERIALNUMBER .””BAPI Communication Structure: Create Mat. Doc., Serial No.
LS_GOODSMVT_SERIALNUMBER-MATDOC_ITM = ‘NUMC4’. “Material Doc.Item
LS_GOODSMVT_SERIALNUMBER-SERIALNO = ‘CHAR18’. “Serial Number
LS_GOODSMVT_SERIALNUMBER-UII = ‘CHAR72’. “Unique Item Identifier
APPEND LS_GOODSMVT_SERIALNUMBER TO LT_GOODSMVT_SERIALNUMBER .
CLEAR LS_GOODSMVT_SERIALNUMBER .

**********************************************************************
*******Defination of [Tables]-[EXTENSIONIN] .
**********************************************************************
DATA: LT_EXTENSIONIN TYPE STANDARD TABLE OF BAPIPAREX.””Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
DATA: LS_EXTENSIONIN TYPE BAPIPAREX .””Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
LS_EXTENSIONIN-STRUCTURE = ‘CHAR30’. “BAPI table extension struct.
LS_EXTENSIONIN-VALUEPART1 = ‘CHAR240’. “Data
LS_EXTENSIONIN-VALUEPART2 = ‘CHAR240’. “Data
LS_EXTENSIONIN-VALUEPART3 = ‘CHAR240’. “Data
LS_EXTENSIONIN-VALUEPART4 = ‘CHAR240’. “Data
APPEND LS_EXTENSIONIN TO LT_EXTENSIONIN .
CLEAR LS_EXTENSIONIN .

**********************************************************************
*******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 .

**********************************************************************
*******CallUp The Function Now. .
**********************************************************************
CALL FUNCTION ‘BAPI_GOODSMVT_CREATE_OIL’
EXPORTING
GOODSMVT_HEADER = LS_GOODSMVT_HEADER
GOODSMVT_CODE = LS_GOODSMVT_CODE
* TESTRUN = ”
IMPORTING
GOODSMVT_HEADRET = LS_GOODSMVT_HEADRET
MATERIALDOCUMENT = LV_MATERIALDOCUMENT
MATDOCUMENTYEAR = LV_MATDOCUMENTYEAR
TABLES
GOODSMVT_ITEM_01 = LT_GOODSMVT_ITEM_01
* GOODSMVT_ITEM_02 = LT_GOODSMVT_ITEM_02
* GOODSMVT_ITEM_PARAM = LT_GOODSMVT_ITEM_PARAM
* GOODSMVT_ITEM_QUAN = LT_GOODSMVT_ITEM_QUAN
* GOODSMVT_SERIALNUMBER = LT_GOODSMVT_SERIALNUMBER
* EXTENSIONIN = LT_EXTENSIONIN
* RETURN = LT_RETURN
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》