SAP Function Modules

CSAR_DELETE_FOR_ARCHIVE SAP Function module







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

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


Pattern for FM CSAR_DELETE_FOR_ARCHIVE - CSAR DELETE FOR ARCHIVE





CALL FUNCTION 'CSAR_DELETE_FOR_ARCHIVE' "
  EXPORTING
    handle =                    " sy-tabix
*   testlauf = 'X'              " c
  TABLES
    arch_stzu =                 " stzu
    arch_stko =                 " stkoar
    arch_stas =                 " stas
    arch_stpo =                 " stpo
    arch_stpu =                 " stpu
    arch_stpn =                 " stpn
    arch_mast =                 " mast
    arch_dost =                 " dost
    arch_eqst =                 " eqst
    arch_tpst =                 " tpst
    arch_stst =                 " stst
    arch_prst =                 " prst
    arch_kdst =                 " kdst
    udel_stzu =                 " stzu
    udel_stko =                 " stko
    udel_stas =                 " stas
    udel_stpo =                 " stpo
    udel_stpu =                 " stpu
    udel_stpn =                 " stpn
    udel_mast =                 " mast
    udel_dost =                 " dost
    udel_eqst =                 " eqst
    udel_tpst =                 " tpst
    udel_stst =                 " stst
    udel_prst =                 " prst
    udel_kdst =                 " kdst
    arch_cuob =                 " cuob
    udel_cuob =                 " cuob
    stat_tab =                  " arch_stat
    .  "  CSAR_DELETE_FOR_ARCHIVE

ABAP code example for Function Module CSAR_DELETE_FOR_ARCHIVE





The ABAP code below is a full code listing to execute function module CSAR_DELETE_FOR_ARCHIVE 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_arch_stzu  TYPE STANDARD TABLE OF STZU,"TABLES PARAM
wa_arch_stzu  LIKE LINE OF it_arch_stzu ,
it_arch_stko  TYPE STANDARD TABLE OF STKOAR,"TABLES PARAM
wa_arch_stko  LIKE LINE OF it_arch_stko ,
it_arch_stas  TYPE STANDARD TABLE OF STAS,"TABLES PARAM
wa_arch_stas  LIKE LINE OF it_arch_stas ,
it_arch_stpo  TYPE STANDARD TABLE OF STPO,"TABLES PARAM
wa_arch_stpo  LIKE LINE OF it_arch_stpo ,
it_arch_stpu  TYPE STANDARD TABLE OF STPU,"TABLES PARAM
wa_arch_stpu  LIKE LINE OF it_arch_stpu ,
it_arch_stpn  TYPE STANDARD TABLE OF STPN,"TABLES PARAM
wa_arch_stpn  LIKE LINE OF it_arch_stpn ,
it_arch_mast  TYPE STANDARD TABLE OF MAST,"TABLES PARAM
wa_arch_mast  LIKE LINE OF it_arch_mast ,
it_arch_dost  TYPE STANDARD TABLE OF DOST,"TABLES PARAM
wa_arch_dost  LIKE LINE OF it_arch_dost ,
it_arch_eqst  TYPE STANDARD TABLE OF EQST,"TABLES PARAM
wa_arch_eqst  LIKE LINE OF it_arch_eqst ,
it_arch_tpst  TYPE STANDARD TABLE OF TPST,"TABLES PARAM
wa_arch_tpst  LIKE LINE OF it_arch_tpst ,
it_arch_stst  TYPE STANDARD TABLE OF STST,"TABLES PARAM
wa_arch_stst  LIKE LINE OF it_arch_stst ,
it_arch_prst  TYPE STANDARD TABLE OF PRST,"TABLES PARAM
wa_arch_prst  LIKE LINE OF it_arch_prst ,
it_arch_kdst  TYPE STANDARD TABLE OF KDST,"TABLES PARAM
wa_arch_kdst  LIKE LINE OF it_arch_kdst ,
it_udel_stzu  TYPE STANDARD TABLE OF STZU,"TABLES PARAM
wa_udel_stzu  LIKE LINE OF it_udel_stzu ,
it_udel_stko  TYPE STANDARD TABLE OF STKO,"TABLES PARAM
wa_udel_stko  LIKE LINE OF it_udel_stko ,
it_udel_stas  TYPE STANDARD TABLE OF STAS,"TABLES PARAM
wa_udel_stas  LIKE LINE OF it_udel_stas ,
it_udel_stpo  TYPE STANDARD TABLE OF STPO,"TABLES PARAM
wa_udel_stpo  LIKE LINE OF it_udel_stpo ,
it_udel_stpu  TYPE STANDARD TABLE OF STPU,"TABLES PARAM
wa_udel_stpu  LIKE LINE OF it_udel_stpu ,
it_udel_stpn  TYPE STANDARD TABLE OF STPN,"TABLES PARAM
wa_udel_stpn  LIKE LINE OF it_udel_stpn ,
it_udel_mast  TYPE STANDARD TABLE OF MAST,"TABLES PARAM
wa_udel_mast  LIKE LINE OF it_udel_mast ,
it_udel_dost  TYPE STANDARD TABLE OF DOST,"TABLES PARAM
wa_udel_dost  LIKE LINE OF it_udel_dost ,
it_udel_eqst  TYPE STANDARD TABLE OF EQST,"TABLES PARAM
wa_udel_eqst  LIKE LINE OF it_udel_eqst ,
it_udel_tpst  TYPE STANDARD TABLE OF TPST,"TABLES PARAM
wa_udel_tpst  LIKE LINE OF it_udel_tpst ,
it_udel_stst  TYPE STANDARD TABLE OF STST,"TABLES PARAM
wa_udel_stst  LIKE LINE OF it_udel_stst ,
it_udel_prst  TYPE STANDARD TABLE OF PRST,"TABLES PARAM
wa_udel_prst  LIKE LINE OF it_udel_prst ,
it_udel_kdst  TYPE STANDARD TABLE OF KDST,"TABLES PARAM
wa_udel_kdst  LIKE LINE OF it_udel_kdst ,
it_arch_cuob  TYPE STANDARD TABLE OF CUOB,"TABLES PARAM
wa_arch_cuob  LIKE LINE OF it_arch_cuob ,
it_udel_cuob  TYPE STANDARD TABLE OF CUOB,"TABLES PARAM
wa_udel_cuob  LIKE LINE OF it_udel_cuob ,
it_stat_tab  TYPE STANDARD TABLE OF ARCH_STAT,"TABLES PARAM
wa_stat_tab  LIKE LINE OF it_stat_tab .

DATA(ld_handle) = '123 '.
DATA(ld_testlauf) = '123 '.

"populate fields of struture and append to itab
append wa_arch_stzu to it_arch_stzu.

"populate fields of struture and append to itab
append wa_arch_stko to it_arch_stko.

"populate fields of struture and append to itab
append wa_arch_stas to it_arch_stas.

"populate fields of struture and append to itab
append wa_arch_stpo to it_arch_stpo.

"populate fields of struture and append to itab
append wa_arch_stpu to it_arch_stpu.

"populate fields of struture and append to itab
append wa_arch_stpn to it_arch_stpn.

"populate fields of struture and append to itab
append wa_arch_mast to it_arch_mast.

"populate fields of struture and append to itab
append wa_arch_dost to it_arch_dost.

"populate fields of struture and append to itab
append wa_arch_eqst to it_arch_eqst.

"populate fields of struture and append to itab
append wa_arch_tpst to it_arch_tpst.

"populate fields of struture and append to itab
append wa_arch_stst to it_arch_stst.

"populate fields of struture and append to itab
append wa_arch_prst to it_arch_prst.

"populate fields of struture and append to itab
append wa_arch_kdst to it_arch_kdst.

"populate fields of struture and append to itab
append wa_udel_stzu to it_udel_stzu.

"populate fields of struture and append to itab
append wa_udel_stko to it_udel_stko.

"populate fields of struture and append to itab
append wa_udel_stas to it_udel_stas.

"populate fields of struture and append to itab
append wa_udel_stpo to it_udel_stpo.

"populate fields of struture and append to itab
append wa_udel_stpu to it_udel_stpu.

"populate fields of struture and append to itab
append wa_udel_stpn to it_udel_stpn.

"populate fields of struture and append to itab
append wa_udel_mast to it_udel_mast.

"populate fields of struture and append to itab
append wa_udel_dost to it_udel_dost.

"populate fields of struture and append to itab
append wa_udel_eqst to it_udel_eqst.

"populate fields of struture and append to itab
append wa_udel_tpst to it_udel_tpst.

"populate fields of struture and append to itab
append wa_udel_stst to it_udel_stst.

"populate fields of struture and append to itab
append wa_udel_prst to it_udel_prst.

"populate fields of struture and append to itab
append wa_udel_kdst to it_udel_kdst.

"populate fields of struture and append to itab
append wa_arch_cuob to it_arch_cuob.

"populate fields of struture and append to itab
append wa_udel_cuob to it_udel_cuob.

"populate fields of struture and append to itab
append wa_stat_tab to it_stat_tab. . CALL FUNCTION 'CSAR_DELETE_FOR_ARCHIVE' EXPORTING handle = ld_handle * testlauf = ld_testlauf TABLES arch_stzu = it_arch_stzu arch_stko = it_arch_stko arch_stas = it_arch_stas arch_stpo = it_arch_stpo arch_stpu = it_arch_stpu arch_stpn = it_arch_stpn arch_mast = it_arch_mast arch_dost = it_arch_dost arch_eqst = it_arch_eqst arch_tpst = it_arch_tpst arch_stst = it_arch_stst arch_prst = it_arch_prst arch_kdst = it_arch_kdst udel_stzu = it_udel_stzu udel_stko = it_udel_stko udel_stas = it_udel_stas udel_stpo = it_udel_stpo udel_stpu = it_udel_stpu udel_stpn = it_udel_stpn udel_mast = it_udel_mast udel_dost = it_udel_dost udel_eqst = it_udel_eqst udel_tpst = it_udel_tpst udel_stst = it_udel_stst udel_prst = it_udel_prst udel_kdst = it_udel_kdst arch_cuob = it_arch_cuob udel_cuob = it_udel_cuob stat_tab = it_stat_tab . " CSAR_DELETE_FOR_ARCHIVE
IF SY-SUBRC EQ 0. "All OK 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_handle  TYPE SY-TABIX ,
it_arch_stzu  TYPE STANDARD TABLE OF STZU ,
wa_arch_stzu  LIKE LINE OF it_arch_stzu,
ld_testlauf  TYPE C ,
it_arch_stko  TYPE STANDARD TABLE OF STKOAR ,
wa_arch_stko  LIKE LINE OF it_arch_stko,
it_arch_stas  TYPE STANDARD TABLE OF STAS ,
wa_arch_stas  LIKE LINE OF it_arch_stas,
it_arch_stpo  TYPE STANDARD TABLE OF STPO ,
wa_arch_stpo  LIKE LINE OF it_arch_stpo,
it_arch_stpu  TYPE STANDARD TABLE OF STPU ,
wa_arch_stpu  LIKE LINE OF it_arch_stpu,
it_arch_stpn  TYPE STANDARD TABLE OF STPN ,
wa_arch_stpn  LIKE LINE OF it_arch_stpn,
it_arch_mast  TYPE STANDARD TABLE OF MAST ,
wa_arch_mast  LIKE LINE OF it_arch_mast,
it_arch_dost  TYPE STANDARD TABLE OF DOST ,
wa_arch_dost  LIKE LINE OF it_arch_dost,
it_arch_eqst  TYPE STANDARD TABLE OF EQST ,
wa_arch_eqst  LIKE LINE OF it_arch_eqst,
it_arch_tpst  TYPE STANDARD TABLE OF TPST ,
wa_arch_tpst  LIKE LINE OF it_arch_tpst,
it_arch_stst  TYPE STANDARD TABLE OF STST ,
wa_arch_stst  LIKE LINE OF it_arch_stst,
it_arch_prst  TYPE STANDARD TABLE OF PRST ,
wa_arch_prst  LIKE LINE OF it_arch_prst,
it_arch_kdst  TYPE STANDARD TABLE OF KDST ,
wa_arch_kdst  LIKE LINE OF it_arch_kdst,
it_udel_stzu  TYPE STANDARD TABLE OF STZU ,
wa_udel_stzu  LIKE LINE OF it_udel_stzu,
it_udel_stko  TYPE STANDARD TABLE OF STKO ,
wa_udel_stko  LIKE LINE OF it_udel_stko,
it_udel_stas  TYPE STANDARD TABLE OF STAS ,
wa_udel_stas  LIKE LINE OF it_udel_stas,
it_udel_stpo  TYPE STANDARD TABLE OF STPO ,
wa_udel_stpo  LIKE LINE OF it_udel_stpo,
it_udel_stpu  TYPE STANDARD TABLE OF STPU ,
wa_udel_stpu  LIKE LINE OF it_udel_stpu,
it_udel_stpn  TYPE STANDARD TABLE OF STPN ,
wa_udel_stpn  LIKE LINE OF it_udel_stpn,
it_udel_mast  TYPE STANDARD TABLE OF MAST ,
wa_udel_mast  LIKE LINE OF it_udel_mast,
it_udel_dost  TYPE STANDARD TABLE OF DOST ,
wa_udel_dost  LIKE LINE OF it_udel_dost,
it_udel_eqst  TYPE STANDARD TABLE OF EQST ,
wa_udel_eqst  LIKE LINE OF it_udel_eqst,
it_udel_tpst  TYPE STANDARD TABLE OF TPST ,
wa_udel_tpst  LIKE LINE OF it_udel_tpst,
it_udel_stst  TYPE STANDARD TABLE OF STST ,
wa_udel_stst  LIKE LINE OF it_udel_stst,
it_udel_prst  TYPE STANDARD TABLE OF PRST ,
wa_udel_prst  LIKE LINE OF it_udel_prst,
it_udel_kdst  TYPE STANDARD TABLE OF KDST ,
wa_udel_kdst  LIKE LINE OF it_udel_kdst,
it_arch_cuob  TYPE STANDARD TABLE OF CUOB ,
wa_arch_cuob  LIKE LINE OF it_arch_cuob,
it_udel_cuob  TYPE STANDARD TABLE OF CUOB ,
wa_udel_cuob  LIKE LINE OF it_udel_cuob,
it_stat_tab  TYPE STANDARD TABLE OF ARCH_STAT ,
wa_stat_tab  LIKE LINE OF it_stat_tab.

ld_handle = '123 '.

"populate fields of struture and append to itab
append wa_arch_stzu to it_arch_stzu.
ld_testlauf = '123 '.

"populate fields of struture and append to itab
append wa_arch_stko to it_arch_stko.

"populate fields of struture and append to itab
append wa_arch_stas to it_arch_stas.

"populate fields of struture and append to itab
append wa_arch_stpo to it_arch_stpo.

"populate fields of struture and append to itab
append wa_arch_stpu to it_arch_stpu.

"populate fields of struture and append to itab
append wa_arch_stpn to it_arch_stpn.

"populate fields of struture and append to itab
append wa_arch_mast to it_arch_mast.

"populate fields of struture and append to itab
append wa_arch_dost to it_arch_dost.

"populate fields of struture and append to itab
append wa_arch_eqst to it_arch_eqst.

"populate fields of struture and append to itab
append wa_arch_tpst to it_arch_tpst.

"populate fields of struture and append to itab
append wa_arch_stst to it_arch_stst.

"populate fields of struture and append to itab
append wa_arch_prst to it_arch_prst.

"populate fields of struture and append to itab
append wa_arch_kdst to it_arch_kdst.

"populate fields of struture and append to itab
append wa_udel_stzu to it_udel_stzu.

"populate fields of struture and append to itab
append wa_udel_stko to it_udel_stko.

"populate fields of struture and append to itab
append wa_udel_stas to it_udel_stas.

"populate fields of struture and append to itab
append wa_udel_stpo to it_udel_stpo.

"populate fields of struture and append to itab
append wa_udel_stpu to it_udel_stpu.

"populate fields of struture and append to itab
append wa_udel_stpn to it_udel_stpn.

"populate fields of struture and append to itab
append wa_udel_mast to it_udel_mast.

"populate fields of struture and append to itab
append wa_udel_dost to it_udel_dost.

"populate fields of struture and append to itab
append wa_udel_eqst to it_udel_eqst.

"populate fields of struture and append to itab
append wa_udel_tpst to it_udel_tpst.

"populate fields of struture and append to itab
append wa_udel_stst to it_udel_stst.

"populate fields of struture and append to itab
append wa_udel_prst to it_udel_prst.

"populate fields of struture and append to itab
append wa_udel_kdst to it_udel_kdst.

"populate fields of struture and append to itab
append wa_arch_cuob to it_arch_cuob.

"populate fields of struture and append to itab
append wa_udel_cuob to it_udel_cuob.

"populate fields of struture and append to itab
append wa_stat_tab to it_stat_tab.

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