SAP QP_OBJECT_CREATE Function Module for NOTRANSL: QP-Profile aus Logistik anlegen (wie rh_object_create)
QP_OBJECT_CREATE is a standard qp object create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: QP-Profile aus Logistik anlegen (wie rh_object_create) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for qp object create FM, simply by entering the name QP_OBJECT_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: COI2
Program Name: SAPLCOI2
Main Program: SAPLCOI2
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function QP_OBJECT_CREATE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'QP_OBJECT_CREATE'"NOTRANSL: QP-Profile aus Logistik anlegen (wie rh_object_create).
EXPORTING
* LANGU = "Language
* COMMIT_FLG = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
PLVAR = "Plan Variant
* OTYPE = 'QP' "Object Category
* EXT_NUMBER = '00000000' "DE-EN-LANG-SWITCH-NO-TRANSLATION
STEXT = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* BEGDA = SY-DATLO "DE-EN-LANG-SWITCH-NO-TRANSLATION
* ENDDA = '99991231' "Validity end date
* VTASK = 'D' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* SHORT = "
IMPORTING
OBJID = "Object ID
EXCEPTIONS
TEXT_REQUIRED = 1 INVALID_OTYPE = 2 INVALID_DATE = 3 ERROR_DURING_INSERT = 4 ERROR_EXT_NUMBER = 5 UNDEFINED = 6
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLCOI2_001 CO12: Changing of People Found
EXIT_SAPLCOI2_002 COI2 Alternative Procurement of Personnel Availability Data
IMPORTING Parameters details for QP_OBJECT_CREATE
LANGU - Language
Data type: SY-LANGUOptional: Yes
Call by Reference: No ( called with pass by value option)
COMMIT_FLG - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: COMMIT_FLGDefault: SPACE
Optional: Yes
Call by Reference: Yes
PLVAR - Plan Variant
Data type: HRP1000-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
OTYPE - Object Category
Data type: HRP1000-OTYPEDefault: 'QP'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXT_NUMBER - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: HRP1000-OBJIDDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
STEXT - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: HRP1000-STEXTOptional: No
Call by Reference: No ( called with pass by value option)
BEGDA - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: HRP1000-BEGDADefault: SY-DATLO
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA - Validity end date
Data type: HRP1000-ENDDADefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
VTASK - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: HRRHAP-VTASKDefault: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHORT -
Data type: HRP1000-SHORTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for QP_OBJECT_CREATE
OBJID - Object ID
Data type: HRP1000-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
TEXT_REQUIRED - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_OTYPE - Invalid object type
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_DATE - Invalid Date
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_DURING_INSERT - Error with Insert
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_EXT_NUMBER - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNDEFINED - Other Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for QP_OBJECT_CREATE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_langu | TYPE SY-LANGU, " | |||
lv_objid | TYPE HRP1000-OBJID, " | |||
lv_text_required | TYPE HRP1000, " | |||
lv_commit_flg | TYPE COMMIT_FLG, " SPACE | |||
lv_plvar | TYPE HRP1000-PLVAR, " | |||
lv_invalid_otype | TYPE HRP1000, " | |||
lv_otype | TYPE HRP1000-OTYPE, " 'QP' | |||
lv_invalid_date | TYPE HRP1000, " | |||
lv_ext_number | TYPE HRP1000-OBJID, " '00000000' | |||
lv_error_during_insert | TYPE HRP1000, " | |||
lv_stext | TYPE HRP1000-STEXT, " | |||
lv_error_ext_number | TYPE HRP1000, " | |||
lv_begda | TYPE HRP1000-BEGDA, " SY-DATLO | |||
lv_undefined | TYPE HRP1000, " | |||
lv_endda | TYPE HRP1000-ENDDA, " '99991231' | |||
lv_vtask | TYPE HRRHAP-VTASK, " 'D' | |||
lv_short | TYPE HRP1000-SHORT. " |
  CALL FUNCTION 'QP_OBJECT_CREATE' "NOTRANSL: QP-Profile aus Logistik anlegen (wie rh_object_create) |
EXPORTING | ||
LANGU | = lv_langu | |
COMMIT_FLG | = lv_commit_flg | |
PLVAR | = lv_plvar | |
OTYPE | = lv_otype | |
EXT_NUMBER | = lv_ext_number | |
STEXT | = lv_stext | |
BEGDA | = lv_begda | |
ENDDA | = lv_endda | |
VTASK | = lv_vtask | |
SHORT | = lv_short | |
IMPORTING | ||
OBJID | = lv_objid | |
EXCEPTIONS | ||
TEXT_REQUIRED = 1 | ||
INVALID_OTYPE = 2 | ||
INVALID_DATE = 3 | ||
ERROR_DURING_INSERT = 4 | ||
ERROR_EXT_NUMBER = 5 | ||
UNDEFINED = 6 | ||
. " QP_OBJECT_CREATE |
ABAP code using 7.40 inline data declarations to call FM QP_OBJECT_CREATE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single LANGU FROM SY INTO @DATA(ld_langu). | ||||
"SELECT single OBJID FROM HRP1000 INTO @DATA(ld_objid). | ||||
DATA(ld_commit_flg) | = ' '. | |||
"SELECT single PLVAR FROM HRP1000 INTO @DATA(ld_plvar). | ||||
"SELECT single OTYPE FROM HRP1000 INTO @DATA(ld_otype). | ||||
DATA(ld_otype) | = 'QP'. | |||
"SELECT single OBJID FROM HRP1000 INTO @DATA(ld_ext_number). | ||||
DATA(ld_ext_number) | = '00000000'. | |||
"SELECT single STEXT FROM HRP1000 INTO @DATA(ld_stext). | ||||
"SELECT single BEGDA FROM HRP1000 INTO @DATA(ld_begda). | ||||
DATA(ld_begda) | = SY-DATLO. | |||
"SELECT single ENDDA FROM HRP1000 INTO @DATA(ld_endda). | ||||
DATA(ld_endda) | = '99991231'. | |||
"SELECT single VTASK FROM HRRHAP INTO @DATA(ld_vtask). | ||||
DATA(ld_vtask) | = 'D'. | |||
"SELECT single SHORT FROM HRP1000 INTO @DATA(ld_short). | ||||
Search for further information about these or an SAP related objects