SAP Function Modules

CS_DI_HEADER_OBJECT_CHECK SAP Function module







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

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


Pattern for FM CS_DI_HEADER_OBJECT_CHECK - CS DI HEADER OBJECT CHECK





CALL FUNCTION 'CS_DI_HEADER_OBJECT_CHECK' "
  EXPORTING
    ecsin =                     " csin
*   efldelete = SPACE           " stpo_api02-fldelete
*   flg_foreign_key = SPACE     " csdata-xfeld  Check external key
*   flg_ale = SPACE             " csdata-xfeld
*   flg_api = SPACE             " csdata-xfeld  API call
*   flg_cad = SPACE             " csdata-xfeld
*   flg_no_cad_rules = SPACE    " csdata-xfeld
*   flg_no_standard_val = SPACE  " csdata-xfeld  Not SAP Standard Validity
*   flg_item_single_read = SPACE  " csdata-xfeld  Read items individually
*   flg_no_change_doc = SPACE   " csdata-xfeld  Do not write change documents
*   flg_no_object_check = SPACE  " csdata-xfeld
*   flg_no_alt_create = SPACE   " csdata-xfeld
*   flg_max_valid_to = SPACE    " csdata-xfeld
  IMPORTING
    flg_warning =               " csdata-xfeld
    flg_hiskz =                 " csdata-xfeld
    flg_kbaus =                 " stzu-kbaus    Indicator: configurable BOM
    atrtyp =                    " tcs05-trtyp
    astlnr =                    " stzu-stlnr    Bill of Material
    astlal =                    " stko-stlal    Alternative BOM
    aposnr =                    " stpo-posnr    Number of BOM Item
    aaennr =                    " stpo-aennr    Change Number
    adatuv =                    " stpo-datuv    Valid-From Date
    adatub =                    " stpo-datuv    Valid-From Date
  EXCEPTIONS
    ERROR = 1                   "               Terminate if API log contains error messages
    ALT_ALREADY_EXIST = 2       "               Alternative Already Exists
    AUTHORIZATION_MISSING = 3   "               No authorization
    BOM_ALREADY_EXIST = 4       "               Object list already exists
    BOM_NOT_EXIST = 5           "               Inconsistent BOM files
    BOM_NOT_VALID = 6           "               (Alternative) BOM not valid
    BOMUSAGE_ERROR = 7          "               BOM usage not defined
    CHANGE_NUMBER_ERROR = 8     "
    DOCUMENT_NOT_FOUND = 9      "               Document does not exist
    DOCUMENT_TO_DELETE = 10     "               Document is marked for deletion
    DOCTYPE_ERROR = 11          "               Document type not defined
    EQUI_NOT_FOUND = 12         "
    EQUI_TO_DELETE = 13         "
    FUNC_LOC_NOT_FOUND = 14     "
    FUNC_LOC_TO_DELETE = 15     "
    HISTORY_REQUIREMENT = 16    "               BOM has history requirement
    KEY_INCOMPLETE = 17         "               Data is incomplete
    MATERIAL_NOT_FOUND = 18     "               Material not found (in plant)
    MATERIAL_TO_DELETE = 19     "               Material marked for deletion (in plant)
    MATSTATUS_ERROR = 20        "               Incorrect material status
    MATTYPE_ERROR = 21          "               Incorrect material type
    MOD_PARAMETERS_MISSING = 22  "              Modification parameter not found
    OBJECT_LOCKED = 23          "               Object locked/system locking error
    PLANT_ERROR = 24            "               Plant not defined
    REVISION_LEVEL_NOT_FOUND = 25  "
    SALES_ORDER_NOT_FOUND = 26  "
    STOCKABLE_TYPE_ERROR = 27   "               BOM can only be changed via standard product
    VALIDITY_ERROR = 28         "               Missing entries for validity
    .  "  CS_DI_HEADER_OBJECT_CHECK

ABAP code example for Function Module CS_DI_HEADER_OBJECT_CHECK





The ABAP code below is a full code listing to execute function module CS_DI_HEADER_OBJECT_CHECK 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_flg_warning  TYPE CSDATA-XFELD ,
ld_flg_hiskz  TYPE CSDATA-XFELD ,
ld_flg_kbaus  TYPE STZU-KBAUS ,
ld_atrtyp  TYPE TCS05-TRTYP ,
ld_astlnr  TYPE STZU-STLNR ,
ld_astlal  TYPE STKO-STLAL ,
ld_aposnr  TYPE STPO-POSNR ,
ld_aaennr  TYPE STPO-AENNR ,
ld_adatuv  TYPE STPO-DATUV ,
ld_adatub  TYPE STPO-DATUV .

DATA(ld_ecsin) = 'Check type of data required'.

DATA(ld_efldelete) = some text here

DATA(ld_flg_foreign_key) = some text here

DATA(ld_flg_ale) = some text here

DATA(ld_flg_api) = some text here

DATA(ld_flg_cad) = some text here

DATA(ld_flg_no_cad_rules) = some text here

DATA(ld_flg_no_standard_val) = some text here

DATA(ld_flg_item_single_read) = some text here

DATA(ld_flg_no_change_doc) = some text here

DATA(ld_flg_no_object_check) = some text here

DATA(ld_flg_no_alt_create) = some text here

DATA(ld_flg_max_valid_to) = some text here . CALL FUNCTION 'CS_DI_HEADER_OBJECT_CHECK' EXPORTING ecsin = ld_ecsin * efldelete = ld_efldelete * flg_foreign_key = ld_flg_foreign_key * flg_ale = ld_flg_ale * flg_api = ld_flg_api * flg_cad = ld_flg_cad * flg_no_cad_rules = ld_flg_no_cad_rules * flg_no_standard_val = ld_flg_no_standard_val * flg_item_single_read = ld_flg_item_single_read * flg_no_change_doc = ld_flg_no_change_doc * flg_no_object_check = ld_flg_no_object_check * flg_no_alt_create = ld_flg_no_alt_create * flg_max_valid_to = ld_flg_max_valid_to IMPORTING flg_warning = ld_flg_warning flg_hiskz = ld_flg_hiskz flg_kbaus = ld_flg_kbaus atrtyp = ld_atrtyp astlnr = ld_astlnr astlal = ld_astlal aposnr = ld_aposnr aaennr = ld_aaennr adatuv = ld_adatuv adatub = ld_adatub EXCEPTIONS ERROR = 1 ALT_ALREADY_EXIST = 2 AUTHORIZATION_MISSING = 3 BOM_ALREADY_EXIST = 4 BOM_NOT_EXIST = 5 BOM_NOT_VALID = 6 BOMUSAGE_ERROR = 7 CHANGE_NUMBER_ERROR = 8 DOCUMENT_NOT_FOUND = 9 DOCUMENT_TO_DELETE = 10 DOCTYPE_ERROR = 11 EQUI_NOT_FOUND = 12 EQUI_TO_DELETE = 13 FUNC_LOC_NOT_FOUND = 14 FUNC_LOC_TO_DELETE = 15 HISTORY_REQUIREMENT = 16 KEY_INCOMPLETE = 17 MATERIAL_NOT_FOUND = 18 MATERIAL_TO_DELETE = 19 MATSTATUS_ERROR = 20 MATTYPE_ERROR = 21 MOD_PARAMETERS_MISSING = 22 OBJECT_LOCKED = 23 PLANT_ERROR = 24 REVISION_LEVEL_NOT_FOUND = 25 SALES_ORDER_NOT_FOUND = 26 STOCKABLE_TYPE_ERROR = 27 VALIDITY_ERROR = 28 . " CS_DI_HEADER_OBJECT_CHECK
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 ELSEIF SY-SUBRC EQ 11. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 12. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 13. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 14. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 15. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 16. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 17. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 18. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 19. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 20. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 21. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 22. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 23. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 24. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 25. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 26. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 27. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 28. "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_flg_warning  TYPE CSDATA-XFELD ,
ld_ecsin  TYPE CSIN ,
ld_flg_hiskz  TYPE CSDATA-XFELD ,
ld_efldelete  TYPE STPO_API02-FLDELETE ,
ld_flg_foreign_key  TYPE CSDATA-XFELD ,
ld_flg_kbaus  TYPE STZU-KBAUS ,
ld_flg_ale  TYPE CSDATA-XFELD ,
ld_atrtyp  TYPE TCS05-TRTYP ,
ld_flg_api  TYPE CSDATA-XFELD ,
ld_astlnr  TYPE STZU-STLNR ,
ld_astlal  TYPE STKO-STLAL ,
ld_flg_cad  TYPE CSDATA-XFELD ,
ld_flg_no_cad_rules  TYPE CSDATA-XFELD ,
ld_aposnr  TYPE STPO-POSNR ,
ld_flg_no_standard_val  TYPE CSDATA-XFELD ,
ld_aaennr  TYPE STPO-AENNR ,
ld_flg_item_single_read  TYPE CSDATA-XFELD ,
ld_adatuv  TYPE STPO-DATUV ,
ld_flg_no_change_doc  TYPE CSDATA-XFELD ,
ld_adatub  TYPE STPO-DATUV ,
ld_flg_no_object_check  TYPE CSDATA-XFELD ,
ld_flg_no_alt_create  TYPE CSDATA-XFELD ,
ld_flg_max_valid_to  TYPE CSDATA-XFELD .

ld_ecsin = 'Check type of data required'.

ld_efldelete = some text here

ld_flg_foreign_key = some text here

ld_flg_ale = some text here

ld_flg_api = some text here

ld_flg_cad = some text here

ld_flg_no_cad_rules = some text here

ld_flg_no_standard_val = some text here

ld_flg_item_single_read = some text here

ld_flg_no_change_doc = some text here

ld_flg_no_object_check = some text here

ld_flg_no_alt_create = some text here

ld_flg_max_valid_to = 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 CS_DI_HEADER_OBJECT_CHECK or its description.