SAP Function Modules

CATT_COPA_DELETE_STRUCTURES SAP Function module







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

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


Pattern for FM CATT_COPA_DELETE_STRUCTURES - CATT COPA DELETE STRUCTURES





CALL FUNCTION 'CATT_COPA_DELETE_STRUCTURES' "
  EXPORTING
    ergebnisbereich =           " tkeb-erkrs
    kostenrechnungskreis =      " ce0s001-kokrs
    buchungskreis =             " ce0s001-bukrs
    version_von =               " ce0s001-versi
    version_bis =               " ce0s001-versi
    vorgangsart_von =           " ce0s001-vrgar
    vorgangsart_bis =           " ce0s001-vrgar
    kunde_anfang =              " cedst-low
    kunde_ende =                " cedst-high
    artikel_anfang =            " cedst-low
    artikel_ende =              " cedst-high
    jahrperiode_von =           " ce0s001-perio
    jahrperiode_bis =           " ce0s001-perio
  TABLES
    tabelle_selektion =         " cedst
  EXCEPTIONS
    DATABASE_ERROR = 1          "
    .  "  CATT_COPA_DELETE_STRUCTURES

ABAP code example for Function Module CATT_COPA_DELETE_STRUCTURES





The ABAP code below is a full code listing to execute function module CATT_COPA_DELETE_STRUCTURES 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_tabelle_selektion  TYPE STANDARD TABLE OF CEDST,"TABLES PARAM
wa_tabelle_selektion  LIKE LINE OF it_tabelle_selektion .


SELECT single ERKRS
FROM TKEB
INTO @DATA(ld_ergebnisbereich).


DATA(ld_kostenrechnungskreis) = some text here

DATA(ld_buchungskreis) = some text here

DATA(ld_version_von) = some text here

DATA(ld_version_bis) = some text here

DATA(ld_vorgangsart_von) = some text here

DATA(ld_vorgangsart_bis) = some text here

DATA(ld_kunde_anfang) = some text here

DATA(ld_kunde_ende) = some text here

DATA(ld_artikel_anfang) = some text here

DATA(ld_artikel_ende) = some text here

DATA(ld_jahrperiode_von) = Check type of data required

DATA(ld_jahrperiode_bis) = Check type of data required

"populate fields of struture and append to itab
append wa_tabelle_selektion to it_tabelle_selektion. . CALL FUNCTION 'CATT_COPA_DELETE_STRUCTURES' EXPORTING ergebnisbereich = ld_ergebnisbereich kostenrechnungskreis = ld_kostenrechnungskreis buchungskreis = ld_buchungskreis version_von = ld_version_von version_bis = ld_version_bis vorgangsart_von = ld_vorgangsart_von vorgangsart_bis = ld_vorgangsart_bis kunde_anfang = ld_kunde_anfang kunde_ende = ld_kunde_ende artikel_anfang = ld_artikel_anfang artikel_ende = ld_artikel_ende jahrperiode_von = ld_jahrperiode_von jahrperiode_bis = ld_jahrperiode_bis TABLES tabelle_selektion = it_tabelle_selektion EXCEPTIONS DATABASE_ERROR = 1 . " CATT_COPA_DELETE_STRUCTURES
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_ergebnisbereich  TYPE TKEB-ERKRS ,
it_tabelle_selektion  TYPE STANDARD TABLE OF CEDST ,
wa_tabelle_selektion  LIKE LINE OF it_tabelle_selektion,
ld_kostenrechnungskreis  TYPE CE0S001-KOKRS ,
ld_buchungskreis  TYPE CE0S001-BUKRS ,
ld_version_von  TYPE CE0S001-VERSI ,
ld_version_bis  TYPE CE0S001-VERSI ,
ld_vorgangsart_von  TYPE CE0S001-VRGAR ,
ld_vorgangsart_bis  TYPE CE0S001-VRGAR ,
ld_kunde_anfang  TYPE CEDST-LOW ,
ld_kunde_ende  TYPE CEDST-HIGH ,
ld_artikel_anfang  TYPE CEDST-LOW ,
ld_artikel_ende  TYPE CEDST-HIGH ,
ld_jahrperiode_von  TYPE CE0S001-PERIO ,
ld_jahrperiode_bis  TYPE CE0S001-PERIO .


SELECT single ERKRS
FROM TKEB
INTO ld_ergebnisbereich.


"populate fields of struture and append to itab
append wa_tabelle_selektion to it_tabelle_selektion.

ld_kostenrechnungskreis = some text here

ld_buchungskreis = some text here

ld_version_von = some text here

ld_version_bis = some text here

ld_vorgangsart_von = some text here

ld_vorgangsart_bis = some text here

ld_kunde_anfang = some text here

ld_kunde_ende = some text here

ld_artikel_anfang = some text here

ld_artikel_ende = some text here

ld_jahrperiode_von = Check type of data required

ld_jahrperiode_bis = Check type of data required

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