SAP CUKD_API_ALLOCATIONS_READ Function Module for









CUKD_API_ALLOCATIONS_READ is a standard cukd api allocations read 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 cukd api allocations read FM, simply by entering the name CUKD_API_ALLOCATIONS_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: CUKD
Program Name: SAPLCUKD
Main Program: SAPLCUKD
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CUKD_API_ALLOCATIONS_READ 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 'CUKD_API_ALLOCATIONS_READ'"
EXPORTING
ALLOCATION_NUMBER = "Allocation object ID
* ONLY_THIS_STATUS = ' ' "Only read dependencies with status entered
* ONLY_THIS_DEPTYPE = ' ' "Only read dependencies of type entered
* ALL_VALID_CUOB = ' ' "
TABLE = "Type of allocation object (such as STPO)
* DATE = SY-DATUM "Search date
* WITH_ALLOC_DATA = 'X' "Read allocation data
* WITH_BASIC_DATA = 'X' "Read basic data
* WITH_LANG_DEP_NAMES = 'X' "Read language-dependent descriptions
* WITH_DOCUS = 'X' "Read language-dependent documentation
* WITH_SOURCES = 'X' "Read source code
* ONLY_THIS_LANGUAGE = ' ' "Language-dependent possibly for one language only

IMPORTING
WARNING = "Warning messages in log

TABLES
* ALLOCATIONS = "Allocation data for dependencies
* BASIC_DATA = "Basic data and allocation data of several dependencies
* NAMES = "Descriptions of several dependencies
* DOCUS = "Documentation of several dependencies
* SOURCES = "Source code of several dependencies

EXCEPTIONS
ERROR = 1
.



IMPORTING Parameters details for CUKD_API_ALLOCATIONS_READ

ALLOCATION_NUMBER - Allocation object ID

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

ONLY_THIS_STATUS - Only read dependencies with status entered

Data type: RCUKD-KNSTA
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

ONLY_THIS_DEPTYPE - Only read dependencies of type entered

Data type: RCUKD-KNART
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

ALL_VALID_CUOB -

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

TABLE - Type of allocation object (such as STPO)

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

DATE - Search date

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_ALLOC_DATA - Read allocation data

Data type: RCURS-CHECKED
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_BASIC_DATA - Read basic data

Data type: RCURS-CHECKED
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_LANG_DEP_NAMES - Read language-dependent descriptions

Data type: RCURS-CHECKED
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_DOCUS - Read language-dependent documentation

Data type: RCURS-CHECKED
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_SOURCES - Read source code

Data type: RCURS-CHECKED
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ONLY_THIS_LANGUAGE - Language-dependent possibly for one language only

Data type: SY-LANGU
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CUKD_API_ALLOCATIONS_READ

WARNING - Warning messages in log

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

TABLES Parameters details for CUKD_API_ALLOCATIONS_READ

ALLOCATIONS - Allocation data for dependencies

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

BASIC_DATA - Basic data and allocation data of several dependencies

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

NAMES - Descriptions of several dependencies

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

DOCUS - Documentation of several dependencies

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

SOURCES - Source code of several dependencies

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

EXCEPTIONS details

ERROR - Processing terminated (see log)

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

Copy and paste ABAP code example for CUKD_API_ALLOCATIONS_READ 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_error  TYPE STRING, "   
lv_warning  TYPE RCURS-CHECKED, "   
lt_allocations  TYPE STANDARD TABLE OF RCUOB1, "   
lv_allocation_number  TYPE CUOB-KNOBJ, "   
lv_only_this_status  TYPE RCUKD-KNSTA, "   ' '
lv_only_this_deptype  TYPE RCUKD-KNART, "   ' '
lv_all_valid_cuob  TYPE X_FLAG, "   ' '
lv_table  TYPE CUOB-KNTAB, "   
lt_basic_data  TYPE STANDARD TABLE OF RCUKB1, "   
lv_date  TYPE SY-DATUM, "   SY-DATUM
lt_names  TYPE STANDARD TABLE OF RCUKBT1, "   
lt_docus  TYPE STANDARD TABLE OF RCUKDOC1, "   
lv_with_alloc_data  TYPE RCURS-CHECKED, "   'X'
lt_sources  TYPE STANDARD TABLE OF RCUKN1, "   
lv_with_basic_data  TYPE RCURS-CHECKED, "   'X'
lv_with_lang_dep_names  TYPE RCURS-CHECKED, "   'X'
lv_with_docus  TYPE RCURS-CHECKED, "   'X'
lv_with_sources  TYPE RCURS-CHECKED, "   'X'
lv_only_this_language  TYPE SY-LANGU. "   ' '

  CALL FUNCTION 'CUKD_API_ALLOCATIONS_READ'  "
    EXPORTING
         ALLOCATION_NUMBER = lv_allocation_number
         ONLY_THIS_STATUS = lv_only_this_status
         ONLY_THIS_DEPTYPE = lv_only_this_deptype
         ALL_VALID_CUOB = lv_all_valid_cuob
         TABLE = lv_table
         DATE = lv_date
         WITH_ALLOC_DATA = lv_with_alloc_data
         WITH_BASIC_DATA = lv_with_basic_data
         WITH_LANG_DEP_NAMES = lv_with_lang_dep_names
         WITH_DOCUS = lv_with_docus
         WITH_SOURCES = lv_with_sources
         ONLY_THIS_LANGUAGE = lv_only_this_language
    IMPORTING
         WARNING = lv_warning
    TABLES
         ALLOCATIONS = lt_allocations
         BASIC_DATA = lt_basic_data
         NAMES = lt_names
         DOCUS = lt_docus
         SOURCES = lt_sources
    EXCEPTIONS
        ERROR = 1
. " CUKD_API_ALLOCATIONS_READ




ABAP code using 7.40 inline data declarations to call FM CUKD_API_ALLOCATIONS_READ

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 CHECKED FROM RCURS INTO @DATA(ld_warning).
 
 
"SELECT single KNOBJ FROM CUOB INTO @DATA(ld_allocation_number).
 
"SELECT single KNSTA FROM RCUKD INTO @DATA(ld_only_this_status).
DATA(ld_only_this_status) = ' '.
 
"SELECT single KNART FROM RCUKD INTO @DATA(ld_only_this_deptype).
DATA(ld_only_this_deptype) = ' '.
 
DATA(ld_all_valid_cuob) = ' '.
 
"SELECT single KNTAB FROM CUOB INTO @DATA(ld_table).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_date).
DATA(ld_date) = SY-DATUM.
 
 
 
"SELECT single CHECKED FROM RCURS INTO @DATA(ld_with_alloc_data).
DATA(ld_with_alloc_data) = 'X'.
 
 
"SELECT single CHECKED FROM RCURS INTO @DATA(ld_with_basic_data).
DATA(ld_with_basic_data) = 'X'.
 
"SELECT single CHECKED FROM RCURS INTO @DATA(ld_with_lang_dep_names).
DATA(ld_with_lang_dep_names) = 'X'.
 
"SELECT single CHECKED FROM RCURS INTO @DATA(ld_with_docus).
DATA(ld_with_docus) = 'X'.
 
"SELECT single CHECKED FROM RCURS INTO @DATA(ld_with_sources).
DATA(ld_with_sources) = 'X'.
 
"SELECT single LANGU FROM SY INTO @DATA(ld_only_this_language).
DATA(ld_only_this_language) = ' '.
 


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!