This example is to convert function module structure detail to a type object, which is required when
For each function module structure, it needs specific type object for call command to reference.
In type object, each component has different ABAP data type, which can be referenced from below table.
LUI Type | ABAP Type | Data Type | Description |
b | 'b' | INT1 | Cannot be substituted with 'C' |
C | 'C' | CHAR, UNIT, LANG, CUKY, LCHR | |
D | 'D' | DATS | Can be substituted with 'C' |
| | | When used as 'D', the Component will be a JavaScript Date object, |
| | | whereas, if specified as 'C', it will be a string returned by SAP in the format of "19941107" |
F or f | 'F' | FLTP | Cannot be substituted with 'C' |
| | | For BAPI FM, specify LUI type as "F"; for FM RFC_READ_TABLE, specify LUI type as "f" |
T | 'T' | TIMS | Currently same as 'C' and can be substituted with 'C' |
N | 'N' | NUMC | Can be substituted with 'C' |
P or f | 'P' | QUAN, DEC, CURR | Cannot be substituted with 'C' |
| | | For BAPI FM, specify LUI type as "P"; for FM RFC_READ_TABLE, specify LUI type as "f" |
s or i | 's' | INT2 | Cannot be substituted with 'C' |
| | | For BAPI FM, specify LUI type as "s"; for FM RFC_READ_TABLE, specify LUI type as "i" |
I | 'I' | INT, INT4 | Cannot be substituted with 'C' |
The structure of each output parameter needs to be specified individually.
Its detail can be referenced from SAP in transaction SE37 follow by below steps.
3. On the display screen, select "Export" or "Tables" tab according to your output
4. In corresponding tab, find the row of output parameter and double click on it to see detail structure
5. Stay in the structure detail screen, and prepare to create the script based on the screen
which SAP screen should shown as below.
Component | Typing Method | Component Type | Data Type | Length | Decimal Pl | Short Description |
ORDERID | 1 | AUFNR | CHAR | 12 | 0 | Order Number |
ORDER_TYPE | 1 | AUFART | CHAR | 4 | 0 | Order Type |
PLANPLANT | 1 | IWERK | CHAR | 4 | 0 | Maintenance Planning Plant |
BUS_AREA | 1 | GSBER | CHAR | 4 | 0 | Business Area |
MN_WK_CTR | 1 | GEWRK | CHAR | 8 | 0 | Main work center for maintenance tasks |
PLANT | 1 | WERGW | CHAR | 4 | 0 | Plant associated with main work center |
MN_WKCTR_ID | 1 | LGWID | NUMC | 8 | 0 | Object ID of the Work Center |
PMACTTYPE | 1 | ILA | CHAR | 3 | 0 | Maintenance activity type |
PLANGROUP | 1 | INGRP | CHAR | 3 | 0 | Planner Group for Customer Service and Plant Maintenance |
SYSTCOND | 1 | ANLZU | CHAR | 1 | 0 | Syst.Condition |
FUNCT_LOC | 1 | TPLNR | CHAR | 30 | 0 | Functional Location |
EQUIPMENT | 1 | EQUNR | CHAR | 18 | 0 | Equipment Number |
SERIALNO | 1 | GERNR | CHAR | 18 | 0 | Serial Number |
MATERIAL | 1 | MATNR | CHAR | 18 | 0 | Material Number |
ASSEMBLY | 1 | BAUTL | CHAR | 18 | 0 | Assembly |
DEVICEDATA | 1 | DEVICEID | CHAR | 40 | 0 | Additional Device Data |
MAINTPLANT | 1 | SWERK | CHAR | 4 | 0 | Maintenance plant |
LOCATION | 1 | STORT | CHAR | 10 | 0 | Asset location |
MAINTROOM | 1 | RAUMNR | CHAR | 8 | 0 | Room |
PLSECTN | 1 | BEBER | CHAR | 3 | 0 | Plant section |
LOC_WK_CTR | 1 | ARBPL | CHAR | 8 | 0 | Work center |
LOC_WKCTR_ID | 1 | PPSID | NUMC | 8 | 0 | Object ID of PP work center |
ABCINDIC | 1 | ABCKZ | CHAR | 1 | 0 | ABC indicator for technical object |
SORTFIELD | 1 | EQFNR | CHAR | 30 | 0 | Sort field |
COMP_CODE | 1 | BUKRS | CHAR | 4 | 0 | Company Code |
PROFIT_CTR | 1 | PRCTR | CHAR | 10 | 0 | Profit Center |
CO_AREA | 1 | KOKRS | CHAR | 4 | 0 | Controlling Area |
RESPCCTR | 1 | AUFKOSTV | CHAR | 10 | 0 | Responsible cost center |
FUNC_AREA | 1 | FKBER | CHAR | 16 | 0 | Functional Area |
SUPERIOR_NETWORK | 1 | CO_TEILNET | CHAR | 12 | 0 | Number of superior network |
SUPERIOR_ACTIVITY | 1 | CN_VORNR | CHAR | 4 | 0 | Activity number in network and standard network |
SUPERIOR_ROUTING_NO | 1 | CO_AUFPL | NUMC | 10 | 0 | Routing number of operations in the order |
SUPERIOR_COUNTER | 1 | CO_APLZL | NUMC | 8 | 0 | General counter for order |
WBS_ELEM | 1 | PS_PSP_PNR | NUMC | 8 | 0 | Work Breakdown Structure Element (WBS Element) |
PROJ_DEF | 1 | PS_PSP_PRO | NUMC | 8 | 0 | Project definition |
PROCESSING_GROUP | 1 | AUFABKRS | NUMC | 2 | 0 | Processing group |
OBJECTCLASS | 1 | SCOPE_CV | CHAR | 2 | 0 | Object Class |
TAXJURCODE | 1 | TXJCD | CHAR | 15 | 0 | Tax Jurisdiction |
LOC_COMP_CODE | 1 | BUKRS | CHAR | 4 | 0 | Company Code |
LOC_CO_AREA | 1 | KOKRS | CHAR | 4 | 0 | Controlling Area |
ASSET_NO | 1 | ANLN1 | CHAR | 12 | 0 | Main Asset Number |
SUB_NUMBER | 1 | ANLN2 | CHAR | 4 | 0 | Asset Subnumber |
LOC_BUS_AREA | 1 | GSBER | CHAR | 4 | 0 | Business Area |
COSTCENTER | 1 | KOSTL | CHAR | 10 | 0 | Cost Center |
LOC_WBS_ELEM | 1 | PS_PSP_PNR | NUMC | 8 | 0 | Work Breakdown Structure Element (WBS Element) |
STANDORDER | 1 | DAUFN | CHAR | 12 | 0 | Standing order number |
SETTLORDER | 1 | ILOM_ORDST | CHAR | 12 | 0 | Settlement order |
SALESORG | 1 | VKORG | CHAR | 4 | 0 | Sales Organization |
DISTR_CHAN | 1 | VTWEG | CHAR | 2 | 0 | Distribution Channel |
DIVISION | 1 | SPART | CHAR | 2 | 0 | Division |
ORDPLANID | 1 | AUF_PLKNZ | CHAR | 1 | 0 | Maintenance order planning indicator |
START_DATE | 1 | CO_GSTRP | DATS | 8 | 0 | Basic start date |
FINISH_DATE | 1 | CO_GLTRP | DATS | 8 | 0 | Basic finish date |
BASICSTART | 1 | CO_GSUZP | TIMS | 6 | 0 | Basic start time |
BASIC_FIN | 1 | CO_GLUZP | TIMS | 6 | 0 | Basic finish (time) |
PRIORITY | 1 | PRIOK | CHAR | 1 | 0 | Priority |
REVISION | 1 | REVNI | CHAR | 8 | 0 | Revision for Plant Maintenance and Customer Service |
VERSION | 1 | KAPVERSA | NUMC | 2 | 0 | Version of Available Capacity |
SCHED_TYPE | 1 | TERMKZ | CHAR | 1 | 0 | Scheduling type |
AUTOSCHED | 1 | CO_AUTERM | CHAR | 1 | 0 | Indicator: Schedule automatically |
CAP_REQMTS | 1 | AUKBED | CHAR | 1 | 0 | Indicator: Calculate capacity requirements |
SCHEDULING_EXACT_BREAK_TIMES | 1 | BREAKS | CHAR | 1 | 0 | Indicator: Scheduling allowing for breaks |
MRP_RELEVANT | 1 | AUDISP_PLUS | CHAR | 1 | 0 | Reservation Relevance/Generation of Purchase Requisition |
PRODUCTION_START_DATE | 1 | CO_GSTRS | DATS | 8 | 0 | Scheduled start |
PRODUCTION_FINISH_DATE | 1 | CO_GLTRS | DATS | 8 | 0 | Scheduled finish |
PRODUCTION_START_TIME | 1 | CO_GSUZS | TIMS | 6 | 0 | Scheduled Start (Time) |
PRODUCTION_FINISH_TIME | 1 | CO_GLUZS | TIMS | 6 | 0 | Scheduled finish time |
ACTUAL_START_DATE | 1 | CO_GSTRI | DATS | 8 | 0 | Actual start date |
ACTUAL_FINISH_DATE | 1 | CO_GETRI | DATS | 8 | 0 | Confirmed Order Finish Date |
ACTUAL_START_TIME | 1 | CO_GSUZI | TIMS | 6 | 0 | Actual start time |
ACTUAL_FINISH_TIME | 1 | CO_GEUZI | TIMS | 6 | 0 | Confirmed order finish (time) |
REFDATE | 1 | ADDAT | DATS | 8 | 0 | PM Order: Reference Date |
SALES_ORD | 1 | KDAUF | CHAR | 10 | 0 | Sales Order Number |
S_ORD_ITEM | 1 | KDPOS | NUMC | 6 | 0 | Item Number in Sales Order |
CALC_MOTIVE | 1 | BEMOT | CHAR | 2 | 0 | Accounting Indicator |
INVEST_PROFILE | 1 | IM_PROFIL | CHAR | 6 | 0 | Investment measure profile |
SCALE | 1 | IM_SIZECL | CHAR | 2 | 0 | Scale of investment objects |
INV_REASON | 1 | IZWEK | CHAR | 2 | 0 | Reason for investment |
ENVIR_INVEST | 1 | AM_UMWKZ | CHAR | 5 | 0 | Reason for environmental investment |
ESTIMATED_COSTS | 1 | AUFUSER4 | CURR | 11 | 2 | Estimated total costs of order |
CURRENCY | 1 | AUFWAERS | CUKY | 5 | 0 | Order Currency |
CURRENCY_ISO | 1 | ISOCD | CHAR | 3 | 0 | ISO currency code |
CSTG_SHEET | 1 | AUFKALSM | CHAR | 6 | 0 | Costing Sheet |
OVERHEAD_KEY | 1 | AUFZSCHL | CHAR | 6 | 0 | Overhead key |
RES_ANAL_KEY | 1 | ABGR_SCHL | CHAR | 6 | 0 | Results Analysis Key |
NETWORK_PROFILE | 1 | PROFIDNZPL | CHAR | 7 | 0 | Network profile |
CSTGVAPPLN | 1 | KALKVARPLN | CHAR | 4 | 0 | Costing variant for planned costs |
CSTGVARACT | 1 | KALKVARIST | CHAR | 4 | 0 | Costing variant for actual costs |
TASK_LIST_GROUP | 1 | PLNNR | CHAR | 8 | 0 | Key for Task List Group |
GROUP_COUNTER | 1 | PLNAL | CHAR | 2 | 0 | Group Counter |
TASK_LIST_TYPE | 1 | PLNTY | CHAR | 1 | 0 | Task List Type |
RESP_PLANNER_GROUP | 1 | VAGRP | CHAR | 3 | 0 | Responsible planner group/department |
MNTPLAN | 1 | WARPL | CHAR | 12 | 0 | Maintenance Plan |
MAINTITEM | 1 | WAPOS | CHAR | 16 | 0 | Maintenance item |
CALL_NO | 1 | ABNUM | INT4 | 10 | 0 | Maintenance Plan Call Number |
LAST_ORD | 1 | LAUFN | CHAR | 12 | 0 | Order number |
ENTERED_BY | 1 | AUFERFNAM | CHAR | 12 | 0 | Entered by |
ENTER_DATE | 1 | AUFERFDAT | DATS | 8 | 0 | Created on |
CHANGED_BY | 1 | AUFAENAM | CHAR | 12 | 0 | Last changed by |
CHANGE_DATE | 1 | AUFAEDAT | DATS | 8 | 0 | Change date for Order Master |
SCENARIO | 1 | SCRTP | CHAR | 4 | 0 | Scenario or Subscreen Category |
SYS_STATUS | 1 | CO_STTXT | CHAR | 40 | 0 | System Status |
USER_ST | 1 | CO_ASTEX | CHAR | 1 | 0 | User status active |
USERSTATUS | 1 | CO_ASTTX | CHAR | 40 | 0 | Field displaying user status |
STAT_PROF | 1 | J_STSMA | CHAR | 8 | 0 | Status Profile |
OBJECT_NO | 1 | J_OBJNR | CHAR | 22 | 0 | Object number |
ROUTING_NO | 1 | CO_AUFPL | NUMC | 10 | 0 | Routing number of operations in the order |
RESERV_NO | 1 | RSNUM | NUMC | 10 | 0 | Number of Reservation/Dependent Requirement |
SHORT_TEXT | 1 | AUFTEXT | CHAR | 40 | 0 | Description |
LONG_TEXT | 1 | CO_LTEXT | CHAR | 1 | 0 | Long text exists |
NOTIF_NO | 1 | QMNUM | CHAR | 12 | 0 | Notification No |
ASSEMBLY_EXTERNAL | 1 | MGV_ASSEMBLY_EXTERNAL | CHAR | 40 | 0 | Long Material Number for Field ASSEMBLY |
ASSEMBLY_GUID | 1 | MGV_ASSEMBLY_GUID | CHAR | 32 | 0 | External GUID for ASSEMBLY Field |
ASSEMBLY_VERSION | 1 | MGV_ASSEMBLY_VERSION | CHAR | 10 | 0 | Version Number for ASSEMBLY Field |
MATERIAL_EXTERNAL | 1 | MGV_MATERIAL_EXTERNAL | CHAR | 40 | 0 | Long Material Number for MATERIAL Field |
MATERIAL_GUID | 1 | MGV_MATERIAL_GUID | CHAR | 32 | 0 | External GUID for MATERIAL Field |
MATERIAL_VERSION | 1 | MGV_MATERIAL_VERSION | CHAR | 10 | 0 | Version Number for MATERIAL Field |
CALID | 1 | WFCID | CHAR | 2 | 0 | Factory Calendar |
KALSN | 1 | KALSN | NUMC | 2 | 0 | Calendar Selection for Order |
SUPERIOR_ORDERID | 1 | MAUFNR | CHAR | 12 | 0 | Number of superior order |
LEADING_ORDERID | 1 | CO_LAUFNR | CHAR | 12 | 0 | Leading order in current processing |
START_POINT | 1 | EAML_START_POINT | CHAR | 18 | 0 | Start Point |
END_POINT | 1 | EAML_END_POINT | CHAR | 18 | 0 | End Point |
LINEAR_LENGTH | 1 | EAML_LINEAR_LENGTH | CHAR | 18 | 0 | Length |
LINEAR_UNIT | 1 | EAML_LINEAR_UNIT | UNIT | 3 | 0 | Unit of Measurement for Linear Data |
LINEAR_UNIT_ISO | 1 | EAML_LINEAR_UNIT_ISO | CHAR | 3 | 0 | Unit of Measurement for Linear Data in ISO Code |
FIRST_OFFSET_TYPE_CODE | 1 | EAML_OFFSET1_TYPE_CODE | CHAR | 2 | 0 | Type of First Offset |
FIRST_OFFSET_VALUE | 1 | EAML_OFFSET1_VALUE | CHAR | 18 | 0 | Value of Offset 1 |
FIRST_OFFSET_UNIT | 1 | EAML_OFFSET1_UNIT | UNIT | 3 | 0 | Unit of Measurement for Offset 1 |
FIRST_OFFSET_UNIT_ISO | 1 | EAML_OFFSET1_UNIT_ISO | CHAR | 3 | 0 | Unit of Measurement for Offset 1 in ISO Code |
SECOND_OFFSET_TYPE_CODE | 1 | EAML_OFFSET2_TYPE_CODE | CHAR | 2 | 0 | Type of Second Offset |
SECOND_OFFSET_VALUE | 1 | EAML_OFFSET2_VALUE | CHAR | 18 | 0 | Value of Offset 2 |
SECOND_OFFSET_UNIT | 1 | EAML_OFFSET2_UNIT | UNIT | 3 | 0 | Unit of Measurement for Offset 2 |
SECOND_OFFSET_UNIT_ISO | 1 | EAML_OFFSET2_UNIT_ISO | CHAR | 3 | 0 | Unit of Measurement for Offset 2 in ISO Code |
FIRST_OFFSET_TYPE_CODE_NAME | 1 | EAML_OFFSET1_TYPE_CODE_NAME | CHAR | 60 | 0 | First Offset Type Description |
SECOND_OFFSET_TYPE_CODE_NAME | 1 | EAML_OFFSET2_TYPE_CODE_NAME | CHAR | 60 | 0 | Second Offset Type Description |
MARKER_START_POINT | 1 | EAML_MARKER_START_POINT | CHAR | 18 | 0 | Marker for Start Point |
MARKER_DISTANCE_START_POINT | 1 | EAML_MARKER_DISTANCE_START | CHAR | 18 | 0 | Distance between Marker and Start Point |
MARKER_END_POINT | 1 | EAML_MARKER_END_POINT | CHAR | 18 | 0 | Marker for End Point |
MARKER_DISTANCE_END_POINT | 1 | EAML_MARKER_DISTANCE_END | CHAR | 18 | 0 | Length Spec for Distance between Marker and End Point |
MARKER_DISTANCE_UNIT | 1 | EAML_MARKER_DISTANCE_UNIT | UNIT | 3 | 0 | Unit for the Distance from Marker |
MARKER_DISTANCE_UNIT_ISO | 1 | EAML_MARKER_DISTANCE_UNIT_ISO | CHAR | 3 | 0 | Unit for the Distance from Marker in ISO Code |
PRIOTYPE | 1 | ARTPR | CHAR | 2 | 0 | Priority Type |
According to different ABAP data types, we need to create a lookup dictionary when generating the structure object.