SAP KAOX_GET_SUBTREE Function Module for NOTRANSL: Ausschneiden des darunterliegenden Baums









KAOX_GET_SUBTREE is a standard kaox get subtree 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: Ausschneiden des darunterliegenden Baums 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 kaox get subtree FM, simply by entering the name KAOX_GET_SUBTREE into the relevant SAP transaction such as SE37 or SE38.

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



Function KAOX_GET_SUBTREE 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 'KAOX_GET_SUBTREE'"NOTRANSL: Ausschneiden des darunterliegenden Baums
EXPORTING
* I_OBJNR = "Object Number
* I_POSID = "Work Breakdown Structure Element (WBS Element)
I_VRGNG = "Business Transaction
* I_VALUATION = '0' "Evaluation
* I_MASSPROC = 'X' "DE-EN-LANG-SWITCH-NO-TRANSLATION

IMPORTING
E_PARENT = "DE-EN-LANG-SWITCH-NO-TRANSLATION
E_OBJECT = "DE-EN-LANG-SWITCH-NO-TRANSLATION

TABLES
* E_SUBTREE = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* E_TREE = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_RSTHIE = "

EXCEPTIONS
NODE_NOT_FOUND = 1 NO_PARENT_FOUND = 2 NO_VALID_INPUT = 3
.



IMPORTING Parameters details for KAOX_GET_SUBTREE

I_OBJNR - Object Number

Data type: PRPS-OBJNR
Optional: Yes
Call by Reference: Yes

I_POSID - Work Breakdown Structure Element (WBS Element)

Data type: PRPS-POSID
Optional: Yes
Call by Reference: Yes

I_VRGNG - Business Transaction

Data type: TJ01-VRGNG
Optional: No
Call by Reference: Yes

I_VALUATION - Evaluation

Data type: KAOX_VALUATION
Default: '0'
Optional: Yes
Call by Reference: Yes

I_MASSPROC - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for KAOX_GET_SUBTREE

E_PARENT - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: KAOX_OBJECT_INFO
Optional: No
Call by Reference: Yes

E_OBJECT - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: KAOX_OBJECT_INFO
Optional: No
Call by Reference: Yes

TABLES Parameters details for KAOX_GET_SUBTREE

E_SUBTREE - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

E_TREE - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_RSTHIE -

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

EXCEPTIONS details

NODE_NOT_FOUND -

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

NO_PARENT_FOUND -

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

NO_VALID_INPUT -

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

Copy and paste ABAP code example for KAOX_GET_SUBTREE 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_i_objnr  TYPE PRPS-OBJNR, "   
lv_e_parent  TYPE KAOX_OBJECT_INFO, "   
lt_e_subtree  TYPE STANDARD TABLE OF RSTHIE, "   
lv_node_not_found  TYPE RSTHIE, "   
lt_e_tree  TYPE STANDARD TABLE OF KAOX_T_OBJECT_INFO, "   
lv_i_posid  TYPE PRPS-POSID, "   
lv_e_object  TYPE KAOX_OBJECT_INFO, "   
lv_no_parent_found  TYPE KAOX_OBJECT_INFO, "   
lv_i_vrgng  TYPE TJ01-VRGNG, "   
lt_i_rsthie  TYPE STANDARD TABLE OF RSTHIE, "   
lv_no_valid_input  TYPE RSTHIE, "   
lv_i_valuation  TYPE KAOX_VALUATION, "   '0'
lv_i_massproc  TYPE C. "   'X'

  CALL FUNCTION 'KAOX_GET_SUBTREE'  "NOTRANSL: Ausschneiden des darunterliegenden Baums
    EXPORTING
         I_OBJNR = lv_i_objnr
         I_POSID = lv_i_posid
         I_VRGNG = lv_i_vrgng
         I_VALUATION = lv_i_valuation
         I_MASSPROC = lv_i_massproc
    IMPORTING
         E_PARENT = lv_e_parent
         E_OBJECT = lv_e_object
    TABLES
         E_SUBTREE = lt_e_subtree
         E_TREE = lt_e_tree
         I_RSTHIE = lt_i_rsthie
    EXCEPTIONS
        NODE_NOT_FOUND = 1
        NO_PARENT_FOUND = 2
        NO_VALID_INPUT = 3
. " KAOX_GET_SUBTREE




ABAP code using 7.40 inline data declarations to call FM KAOX_GET_SUBTREE

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 OBJNR FROM PRPS INTO @DATA(ld_i_objnr).
 
 
 
 
 
"SELECT single POSID FROM PRPS INTO @DATA(ld_i_posid).
 
 
 
"SELECT single VRGNG FROM TJ01 INTO @DATA(ld_i_vrgng).
 
 
 
DATA(ld_i_valuation) = '0'.
 
DATA(ld_i_massproc) = 'X'.
 


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!