SAP QRP_APO_COMP_OBJNR_ENCODE Function Module for NOTRANSL: Umwandlung Komponente in Objektnummer
QRP_APO_COMP_OBJNR_ENCODE is a standard qrp apo comp objnr encode 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: Umwandlung Komponente in Objektnummer 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 qrp apo comp objnr encode FM, simply by entering the name QRP_APO_COMP_OBJNR_ENCODE into the relevant SAP transaction such as SE37 or SE38.
Function Group: QRPRP
Program Name: SAPLQRPRP
Main Program: SAPLQRPRP
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function QRP_APO_COMP_OBJNR_ENCODE 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 'QRP_APO_COMP_OBJNR_ENCODE'"NOTRANSL: Umwandlung Komponente in Objektnummer.
EXPORTING
* IF_MATNR = ' ' "Material Number
* IF_PPC_COMAT_NEW = ' ' "
* IF_MANDT = SY-MANDT "System, Client Number from Logon
* IF_XPRA = ' ' "
* IF_WERKS = ' ' "Plant
* IF_BWTAR = ' ' "Valuation Type
* IF_VBELN = ' ' "Sales Order
* IF_POSNR = ' ' "Order Item
* IF_PSPNR = ' ' "Work Breakdown Structure Element (WBS Element)
* IF_KZBWS = ' ' "Indicator: Special Stock Valuation
* IF_SOBKZ = ' ' "Special Stock Indicator
* IF_KALN1 = 000000000000 "Cost Estimate Number
IMPORTING
EF_F_OBJNR = "
EF_KALN1 = "Cost Estimate Number
EXCEPTIONS
NOT_FOUND = 1 NR_ERROR = 2
IMPORTING Parameters details for QRP_APO_COMP_OBJNR_ENCODE
IF_MATNR - Material Number
Data type: MARA-MATNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_PPC_COMAT_NEW -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_MANDT - System, Client Number from Logon
Data type: SY-MANDTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_XPRA -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_WERKS - Plant
Data type: T001W-WERKSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_BWTAR - Valuation Type
Data type: MBEW-BWTARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_VBELN - Sales Order
Data type: EBEW-VBELNDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_POSNR - Order Item
Data type: EBEW-POSNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_PSPNR - Work Breakdown Structure Element (WBS Element)
Data type: QBEW-PSPNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_KZBWS - Indicator: Special Stock Valuation
Data type: MSEG-KZBWSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_SOBKZ - Special Stock Indicator
Data type: EBEW-SOBKZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_KALN1 - Cost Estimate Number
Data type: MBEW-KALN1Default: 000000000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for QRP_APO_COMP_OBJNR_ENCODE
EF_F_OBJNR -
Data type: CPZP-F_OBJNROptional: No
Call by Reference: No ( called with pass by value option)
EF_KALN1 - Cost Estimate Number
Data type: MBEW-KALN1Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - Object Not Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NR_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for QRP_APO_COMP_OBJNR_ENCODE 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_if_matnr | TYPE MARA-MATNR, " SPACE | |||
| lv_not_found | TYPE MARA, " | |||
| lv_ef_f_objnr | TYPE CPZP-F_OBJNR, " | |||
| lv_if_ppc_comat_new | TYPE CPZP, " SPACE | |||
| lv_if_mandt | TYPE SY-MANDT, " SY-MANDT | |||
| lv_if_xpra | TYPE CHAR1, " SPACE | |||
| lv_ef_kaln1 | TYPE MBEW-KALN1, " | |||
| lv_if_werks | TYPE T001W-WERKS, " SPACE | |||
| lv_nr_error | TYPE T001W, " | |||
| lv_if_bwtar | TYPE MBEW-BWTAR, " SPACE | |||
| lv_if_vbeln | TYPE EBEW-VBELN, " SPACE | |||
| lv_if_posnr | TYPE EBEW-POSNR, " SPACE | |||
| lv_if_pspnr | TYPE QBEW-PSPNR, " SPACE | |||
| lv_if_kzbws | TYPE MSEG-KZBWS, " SPACE | |||
| lv_if_sobkz | TYPE EBEW-SOBKZ, " SPACE | |||
| lv_if_kaln1 | TYPE MBEW-KALN1. " 000000000000 |
|   CALL FUNCTION 'QRP_APO_COMP_OBJNR_ENCODE' "NOTRANSL: Umwandlung Komponente in Objektnummer |
| EXPORTING | ||
| IF_MATNR | = lv_if_matnr | |
| IF_PPC_COMAT_NEW | = lv_if_ppc_comat_new | |
| IF_MANDT | = lv_if_mandt | |
| IF_XPRA | = lv_if_xpra | |
| IF_WERKS | = lv_if_werks | |
| IF_BWTAR | = lv_if_bwtar | |
| IF_VBELN | = lv_if_vbeln | |
| IF_POSNR | = lv_if_posnr | |
| IF_PSPNR | = lv_if_pspnr | |
| IF_KZBWS | = lv_if_kzbws | |
| IF_SOBKZ | = lv_if_sobkz | |
| IF_KALN1 | = lv_if_kaln1 | |
| IMPORTING | ||
| EF_F_OBJNR | = lv_ef_f_objnr | |
| EF_KALN1 | = lv_ef_kaln1 | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| NR_ERROR = 2 | ||
| . " QRP_APO_COMP_OBJNR_ENCODE | ||
ABAP code using 7.40 inline data declarations to call FM QRP_APO_COMP_OBJNR_ENCODE
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 MATNR FROM MARA INTO @DATA(ld_if_matnr). | ||||
| DATA(ld_if_matnr) | = ' '. | |||
| "SELECT single F_OBJNR FROM CPZP INTO @DATA(ld_ef_f_objnr). | ||||
| DATA(ld_if_ppc_comat_new) | = ' '. | |||
| "SELECT single MANDT FROM SY INTO @DATA(ld_if_mandt). | ||||
| DATA(ld_if_mandt) | = SY-MANDT. | |||
| DATA(ld_if_xpra) | = ' '. | |||
| "SELECT single KALN1 FROM MBEW INTO @DATA(ld_ef_kaln1). | ||||
| "SELECT single WERKS FROM T001W INTO @DATA(ld_if_werks). | ||||
| DATA(ld_if_werks) | = ' '. | |||
| "SELECT single BWTAR FROM MBEW INTO @DATA(ld_if_bwtar). | ||||
| DATA(ld_if_bwtar) | = ' '. | |||
| "SELECT single VBELN FROM EBEW INTO @DATA(ld_if_vbeln). | ||||
| DATA(ld_if_vbeln) | = ' '. | |||
| "SELECT single POSNR FROM EBEW INTO @DATA(ld_if_posnr). | ||||
| DATA(ld_if_posnr) | = ' '. | |||
| "SELECT single PSPNR FROM QBEW INTO @DATA(ld_if_pspnr). | ||||
| DATA(ld_if_pspnr) | = ' '. | |||
| "SELECT single KZBWS FROM MSEG INTO @DATA(ld_if_kzbws). | ||||
| DATA(ld_if_kzbws) | = ' '. | |||
| "SELECT single SOBKZ FROM EBEW INTO @DATA(ld_if_sobkz). | ||||
| DATA(ld_if_sobkz) | = ' '. | |||
| "SELECT single KALN1 FROM MBEW INTO @DATA(ld_if_kaln1). | ||||
| DATA(ld_if_kaln1) | = 000000000000. | |||
Search for further information about these or an SAP related objects