SAP Function Modules

CUK1_API_DEPNET_MAINTAIN SAP Function module







CUK1_API_DEPNET_MAINTAIN is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CUK1_API_DEPNET_MAINTAIN into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CUK1
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CUK1_API_DEPNET_MAINTAIN - CUK1 API DEPNET MAINTAIN





CALL FUNCTION 'CUK1_API_DEPNET_MAINTAIN' "
  EXPORTING
    depnet =                    " rcukd-knnam   Dependency net name
*   ecm_number = ' '            " cukb-aennr    Change number
*   depnet_basic_data =         " rcukb1        Dependency net basic data
*   idoc_processing = ' '       " c
*   commit_and_wait =           " c
*   no_commit =                 " c
*   search_date = SY-DATUM      " sy-datum
*   iv_consider_empty_basic_data = SPACE  " xfeld
  IMPORTING
    warning =                   " rcurs-checked  Warning messages in log
* TABLES
*   depnet_names =              " rcukbt1       Dependency net lang-dependent descriptions
*   depnet_docus =              " rcukdoc1      Dependency net lang-dependent documentation
*   allocations =               " rcuob1        Allocation data for dependencies
*   basic_data =                " rcukb1        Basic data and allocation data of several dependencies
*   names =                     " rcukbt1       Lang-dependent descriptions of sev. dependencies
*   docus =                     " rcukdoc1      Lang-dependent documentation of sev. dependencies
*   sources =                   " rcukn1        Source code of several dependencies
  EXCEPTIONS
    ERROR = 1                   "               Processing terminated (see log)
    .  "  CUK1_API_DEPNET_MAINTAIN

ABAP code example for Function Module CUK1_API_DEPNET_MAINTAIN





The ABAP code below is a full code listing to execute function module CUK1_API_DEPNET_MAINTAIN including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_warning  TYPE RCURS-CHECKED ,
it_depnet_names  TYPE STANDARD TABLE OF RCUKBT1,"TABLES PARAM
wa_depnet_names  LIKE LINE OF it_depnet_names ,
it_depnet_docus  TYPE STANDARD TABLE OF RCUKDOC1,"TABLES PARAM
wa_depnet_docus  LIKE LINE OF it_depnet_docus ,
it_allocations  TYPE STANDARD TABLE OF RCUOB1,"TABLES PARAM
wa_allocations  LIKE LINE OF it_allocations ,
it_basic_data  TYPE STANDARD TABLE OF RCUKB1,"TABLES PARAM
wa_basic_data  LIKE LINE OF it_basic_data ,
it_names  TYPE STANDARD TABLE OF RCUKBT1,"TABLES PARAM
wa_names  LIKE LINE OF it_names ,
it_docus  TYPE STANDARD TABLE OF RCUKDOC1,"TABLES PARAM
wa_docus  LIKE LINE OF it_docus ,
it_sources  TYPE STANDARD TABLE OF RCUKN1,"TABLES PARAM
wa_sources  LIKE LINE OF it_sources .


DATA(ld_depnet) = some text here

SELECT single AENNR
FROM CUKB
INTO @DATA(ld_ecm_number).

DATA(ld_depnet_basic_data) = 'Check type of data required'.
DATA(ld_idoc_processing) = 'Check type of data required'.
DATA(ld_commit_and_wait) = 'Check type of data required'.
DATA(ld_no_commit) = 'Check type of data required'.
DATA(ld_search_date) = '20210129'.
DATA(ld_iv_consider_empty_basic_data) = '20210129'.

"populate fields of struture and append to itab
append wa_depnet_names to it_depnet_names.

"populate fields of struture and append to itab
append wa_depnet_docus to it_depnet_docus.

"populate fields of struture and append to itab
append wa_allocations to it_allocations.

"populate fields of struture and append to itab
append wa_basic_data to it_basic_data.

"populate fields of struture and append to itab
append wa_names to it_names.

"populate fields of struture and append to itab
append wa_docus to it_docus.

"populate fields of struture and append to itab
append wa_sources to it_sources. . CALL FUNCTION 'CUK1_API_DEPNET_MAINTAIN' EXPORTING depnet = ld_depnet * ecm_number = ld_ecm_number * depnet_basic_data = ld_depnet_basic_data * idoc_processing = ld_idoc_processing * commit_and_wait = ld_commit_and_wait * no_commit = ld_no_commit * search_date = ld_search_date * iv_consider_empty_basic_data = ld_iv_consider_empty_basic_data IMPORTING warning = ld_warning * TABLES * depnet_names = it_depnet_names * depnet_docus = it_depnet_docus * allocations = it_allocations * basic_data = it_basic_data * names = it_names * docus = it_docus * sources = it_sources EXCEPTIONS ERROR = 1 . " CUK1_API_DEPNET_MAINTAIN
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_warning  TYPE RCURS-CHECKED ,
ld_depnet  TYPE RCUKD-KNNAM ,
it_depnet_names  TYPE STANDARD TABLE OF RCUKBT1 ,
wa_depnet_names  LIKE LINE OF it_depnet_names,
ld_ecm_number  TYPE CUKB-AENNR ,
it_depnet_docus  TYPE STANDARD TABLE OF RCUKDOC1 ,
wa_depnet_docus  LIKE LINE OF it_depnet_docus,
ld_depnet_basic_data  TYPE RCUKB1 ,
it_allocations  TYPE STANDARD TABLE OF RCUOB1 ,
wa_allocations  LIKE LINE OF it_allocations,
ld_idoc_processing  TYPE C ,
it_basic_data  TYPE STANDARD TABLE OF RCUKB1 ,
wa_basic_data  LIKE LINE OF it_basic_data,
ld_commit_and_wait  TYPE C ,
it_names  TYPE STANDARD TABLE OF RCUKBT1 ,
wa_names  LIKE LINE OF it_names,
ld_no_commit  TYPE C ,
it_docus  TYPE STANDARD TABLE OF RCUKDOC1 ,
wa_docus  LIKE LINE OF it_docus,
ld_search_date  TYPE SY-DATUM ,
it_sources  TYPE STANDARD TABLE OF RCUKN1 ,
wa_sources  LIKE LINE OF it_sources,
ld_iv_consider_empty_basic_data  TYPE XFELD .


ld_depnet = some text here

"populate fields of struture and append to itab
append wa_depnet_names to it_depnet_names.

SELECT single AENNR
FROM CUKB
INTO ld_ecm_number.


"populate fields of struture and append to itab
append wa_depnet_docus to it_depnet_docus.
ld_depnet_basic_data = '20210129'.

"populate fields of struture and append to itab
append wa_allocations to it_allocations.
ld_idoc_processing = '20210129'.

"populate fields of struture and append to itab
append wa_basic_data to it_basic_data.
ld_commit_and_wait = '20210129'.

"populate fields of struture and append to itab
append wa_names to it_names.
ld_no_commit = '20210129'.

"populate fields of struture and append to itab
append wa_docus to it_docus.
ld_search_date = '20210129'.

"populate fields of struture and append to itab
append wa_sources to it_sources.
ld_iv_consider_empty_basic_data = '20210129'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CUK1_API_DEPNET_MAINTAIN or its description.