SAP Function Modules

CLAP_DDB_DELETE_CLASSIFICATION SAP Function module - Classification: API delete allocation







CLAP_DDB_DELETE_CLASSIFICATION 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 CLAP_DDB_DELETE_CLASSIFICATION into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM CLAP_DDB_DELETE_CLASSIFICATION - CLAP DDB DELETE CLASSIFICATION





CALL FUNCTION 'CLAP_DDB_DELETE_CLASSIFICATION' "Classification: API delete allocation
  EXPORTING
    pobtab =                    " tclt-obtab    Physical table name of classifiable object
    object =                    " kssk-objek    Object key
*   object_eq_class = SPACE     " sy-batch      Object is a class
*   buffer_only = SPACE         " sy-batch      Delete allocation from buffer only
*   i_aennr =                   " aenr-aennr    Change Number
*   allocation_only = SPACE     " sy-batch
*   check_conf = SPACE          " sy-batch
  TABLES
    allocations =               " api_kssk      Allocations table
*   inconsistent_chars =        " cliausp
  EXCEPTIONS
    ALLOCATION_NOT_EXIST = 1    "               Allocation not found
    FOREIGN_LOCK = 2            "               Lock error
    SYSTEM_FAILURE = 3          "               Lock error
    CLASS_IN_BOM = 4            "               Class is in BOM
    STRUCTURE_INCONSISTENT = 5  "               Inconsistencies found on deletion
    SET_AENNR = 6               "               Please enter a change number
    DELETE_NOT_ALLOWED = 7      "               Date of change number = date in KSSK or AUSP
    STATUS_READ_ONLY = 8        "               Please read allocations for change purposes
    USED_IN_CONFIGURATION = 9   "
    NO_AUTHORITY_CLASS = 10     "
    .  "  CLAP_DDB_DELETE_CLASSIFICATION

ABAP code example for Function Module CLAP_DDB_DELETE_CLASSIFICATION





The ABAP code below is a full code listing to execute function module CLAP_DDB_DELETE_CLASSIFICATION 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:
it_allocations  TYPE STANDARD TABLE OF API_KSSK,"TABLES PARAM
wa_allocations  LIKE LINE OF it_allocations ,
it_inconsistent_chars  TYPE STANDARD TABLE OF CLIAUSP,"TABLES PARAM
wa_inconsistent_chars  LIKE LINE OF it_inconsistent_chars .


SELECT single OBTAB
FROM TCLT
INTO @DATA(ld_pobtab).


SELECT single OBJEK
FROM KSSK
INTO @DATA(ld_object).

DATA(ld_object_eq_class) = 'some text here'.
DATA(ld_buffer_only) = 'some text here'.

SELECT single AENNR
FROM AENR
INTO @DATA(ld_i_aennr).

DATA(ld_allocation_only) = 'some text here'.
DATA(ld_check_conf) = 'some text here'.

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

"populate fields of struture and append to itab
append wa_inconsistent_chars to it_inconsistent_chars. . CALL FUNCTION 'CLAP_DDB_DELETE_CLASSIFICATION' EXPORTING pobtab = ld_pobtab object = ld_object * object_eq_class = ld_object_eq_class * buffer_only = ld_buffer_only * i_aennr = ld_i_aennr * allocation_only = ld_allocation_only * check_conf = ld_check_conf TABLES allocations = it_allocations * inconsistent_chars = it_inconsistent_chars EXCEPTIONS ALLOCATION_NOT_EXIST = 1 FOREIGN_LOCK = 2 SYSTEM_FAILURE = 3 CLASS_IN_BOM = 4 STRUCTURE_INCONSISTENT = 5 SET_AENNR = 6 DELETE_NOT_ALLOWED = 7 STATUS_READ_ONLY = 8 USED_IN_CONFIGURATION = 9 NO_AUTHORITY_CLASS = 10 . " CLAP_DDB_DELETE_CLASSIFICATION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "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_pobtab  TYPE TCLT-OBTAB ,
it_allocations  TYPE STANDARD TABLE OF API_KSSK ,
wa_allocations  LIKE LINE OF it_allocations,
ld_object  TYPE KSSK-OBJEK ,
it_inconsistent_chars  TYPE STANDARD TABLE OF CLIAUSP ,
wa_inconsistent_chars  LIKE LINE OF it_inconsistent_chars,
ld_object_eq_class  TYPE SY-BATCH ,
ld_buffer_only  TYPE SY-BATCH ,
ld_i_aennr  TYPE AENR-AENNR ,
ld_allocation_only  TYPE SY-BATCH ,
ld_check_conf  TYPE SY-BATCH .


SELECT single OBTAB
FROM TCLT
INTO ld_pobtab.


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

SELECT single OBJEK
FROM KSSK
INTO ld_object.


"populate fields of struture and append to itab
append wa_inconsistent_chars to it_inconsistent_chars.
ld_object_eq_class = 'some text here'.
ld_buffer_only = 'some text here'.

SELECT single AENNR
FROM AENR
INTO ld_i_aennr.

ld_allocation_only = 'some text here'.
ld_check_conf = 'some text here'.

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 CLAP_DDB_DELETE_CLASSIFICATION or its description.