SAP K_OBJECT_ID_GET Function Module for









K_OBJECT_ID_GET is a standard k object id get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 k object id get FM, simply by entering the name K_OBJECT_ID_GET into the relevant SAP transaction such as SE37 or SE38.

Function Group: KABC
Program Name: SAPLKABC
Main Program: SAPLKABC
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function K_OBJECT_ID_GET 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 'K_OBJECT_ID_GET'"
EXPORTING
* PAR_OBJNR = "
* PAR_MATNR = "
* PAR_WERKS = "
* PAR_VERID = "
* PAR_AUTYP = "
* PAR_PROCNR = "
* PAR_SAFNR = "

IMPORTING
PAR_OBJID = "
PAR_OBJID1 = "
PAR_OBJID2 = "
PAR_OBJID3 = "
PAR_PROCTX = "
PAR_TEXT = "

EXCEPTIONS
WRONG_OBJECT_TYPE = 1
.



IMPORTING Parameters details for K_OBJECT_ID_GET

PAR_OBJNR -

Data type: KKS09-OBJNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_MATNR -

Data type: KKS09-MATNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_WERKS -

Data type: KKS09-WERKS
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_VERID -

Data type: KKS09-VERID
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_AUTYP -

Data type: KKS09-AUTYP
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_PROCNR -

Data type: KKS09-PROCNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAR_SAFNR -

Data type: KKS09-SAFNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for K_OBJECT_ID_GET

PAR_OBJID -

Data type: KKS01-OBJID
Optional: No
Call by Reference: Yes

PAR_OBJID1 -

Data type: KKS01-OBJID
Optional: No
Call by Reference: Yes

PAR_OBJID2 -

Data type: CMISUBOBJKK_GENERAL-PCOBJ
Optional: No
Call by Reference: Yes

PAR_OBJID3 -

Data type:
Optional: No
Call by Reference: Yes

PAR_PROCTX -

Data type: CKI94A-NAME
Optional: No
Call by Reference: Yes

PAR_TEXT -

Data type: SY-MSGLI
Optional: No
Call by Reference: Yes

EXCEPTIONS details

WRONG_OBJECT_TYPE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for K_OBJECT_ID_GET 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_par_objid  TYPE KKS01-OBJID, "   
lv_par_objnr  TYPE KKS09-OBJNR, "   
lv_wrong_object_type  TYPE KKS09, "   
lv_par_matnr  TYPE KKS09-MATNR, "   
lv_par_objid1  TYPE KKS01-OBJID, "   
lv_par_werks  TYPE KKS09-WERKS, "   
lv_par_objid2  TYPE CMISUBOBJKK_GENERAL-PCOBJ, "   
lv_par_verid  TYPE KKS09-VERID, "   
lv_par_objid3  TYPE KKS09, "   
lv_par_autyp  TYPE KKS09-AUTYP, "   
lv_par_proctx  TYPE CKI94A-NAME, "   
lv_par_text  TYPE SY-MSGLI, "   
lv_par_procnr  TYPE KKS09-PROCNR, "   
lv_par_safnr  TYPE KKS09-SAFNR. "   

  CALL FUNCTION 'K_OBJECT_ID_GET'  "
    EXPORTING
         PAR_OBJNR = lv_par_objnr
         PAR_MATNR = lv_par_matnr
         PAR_WERKS = lv_par_werks
         PAR_VERID = lv_par_verid
         PAR_AUTYP = lv_par_autyp
         PAR_PROCNR = lv_par_procnr
         PAR_SAFNR = lv_par_safnr
    IMPORTING
         PAR_OBJID = lv_par_objid
         PAR_OBJID1 = lv_par_objid1
         PAR_OBJID2 = lv_par_objid2
         PAR_OBJID3 = lv_par_objid3
         PAR_PROCTX = lv_par_proctx
         PAR_TEXT = lv_par_text
    EXCEPTIONS
        WRONG_OBJECT_TYPE = 1
. " K_OBJECT_ID_GET




ABAP code using 7.40 inline data declarations to call FM K_OBJECT_ID_GET

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 OBJID FROM KKS01 INTO @DATA(ld_par_objid).
 
"SELECT single OBJNR FROM KKS09 INTO @DATA(ld_par_objnr).
 
 
"SELECT single MATNR FROM KKS09 INTO @DATA(ld_par_matnr).
 
"SELECT single OBJID FROM KKS01 INTO @DATA(ld_par_objid1).
 
"SELECT single WERKS FROM KKS09 INTO @DATA(ld_par_werks).
 
"SELECT single PCOBJ FROM CMISUBOBJKK_GENERAL INTO @DATA(ld_par_objid2).
 
"SELECT single VERID FROM KKS09 INTO @DATA(ld_par_verid).
 
 
"SELECT single AUTYP FROM KKS09 INTO @DATA(ld_par_autyp).
 
"SELECT single NAME FROM CKI94A INTO @DATA(ld_par_proctx).
 
"SELECT single MSGLI FROM SY INTO @DATA(ld_par_text).
 
"SELECT single PROCNR FROM KKS09 INTO @DATA(ld_par_procnr).
 
"SELECT single SAFNR FROM KKS09 INTO @DATA(ld_par_safnr).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!