SAP Function Modules

CS_DI_ITEM_CHECK SAP Function module







CS_DI_ITEM_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_ITEM_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_ITEM_CHECK - CS DI ITEM CHECK





CALL FUNCTION 'CS_DI_ITEM_CHECK' "
  EXPORTING
    ecsin =                     " csin
    erc29p =                    " rc29p
*   ecistpo =                   " csci_stpo
*   efldelete = SPACE           " stpo_api02-fldelete  Deletion Indicator
*   eguid = SPACE               " stpo-guidx    Global Identification of an Item's Change Status
*   flg_foreign_key = SPACE     " csdata-xfeld  Check external key
*   flg_api = SPACE             " csdata-xfeld
*   flg_ale = SPACE             " csdata-xfeld
*   flg_cad = SPACE             " csdata-xfeld
*   flg_item_cat_change = SPACE  " csdata-xfeld
*   flg_default_values = 'X'    " csdata-xfeld  Default Values for New Items
*   flg_new_romen = 'X'         " csdata-xfeld
*   flg_recursive = SPACE       " csdata-xfeld
*   flg_identify_by_guid = SPACE  " csdata-xfeld
  IMPORTING
    flg_warning =               " csdata-xfeld
* TABLES
*   t_stpub =                   " stpub         BOMs - sub-item documents
  EXCEPTIONS
    ERROR = 1                   "               Terminate if API log contains error messages
    ALTERNATIVE_ITEM_ERROR = 2  "               Error in alternative  item data
    BULK_MATERIAL_ERROR = 3     "               Bulk material error
    CLASSTYPE_ERROR = 4         "               Incorrect class type (not class item)
    COPRODUCT_ERROR = 5         "               Co-product error
    COST_ELEMENT_ERROR = 6      "               G/L account not defined in company code
    CURRENCY_ERROR = 7          "               Currency key not defined
    DIMENSION_ERROR = 8         "
    DISTRIBUTION_KEY_ERROR = 9  "
    DOCUMENT_NOT_FOUND = 10     "               Document does not exist
    DOCUMENT_TO_DELETE = 11     "               Document is marked for deletion
    DOCTYPE_ERROR = 12          "               Document type not defined
    EXPLOSION_TYPE_ERROR = 13   "               Explosion type not defined
    FOLLOW_UP_ERROR = 14        "               Error in discontinuation data
    FORMULA_ERROR = 15          "
    ITEM_STATUS_ERROR = 16      "               Item status error
    ITEM_CATEGORY_ERROR = 17    "               Item category error
    ITEM_DATA_INCOMPLETE = 18   "
    MATERIAL_NOT_FOUND = 19     "               Material not found (in plant)
    MATERIAL_TO_DELETE = 20     "               Material marked for deletion (in plant)
    MATGROUP_ERROR = 21         "               Material group not found
    MATPROVISION_INDICATOR_ERROR = 22  "        Material provision indicator not defined
    MATSTATUS_ERROR = 23        "               Incorrect material status
    MATTYPE_ERROR = 24          "               Incorrect material type
    OBJECT_LOCKED = 25          "               Object locked/system locking error
    PM_DATA_ERROR = 26          "               Error in plant maintenance data
    PRICE_DATA_ERROR = 27       "               Price data is incomplete
    PURCHASING_GROUP_ERROR = 28  "              Purchasing group not defined
    PURCHASING_ORGANIZATION_ERROR = 29  "       Purchasing organization not defined in plant
    RECURSIVITY_FOUND = 30      "               BOM is recursive
    REFPOINT_ERROR = 31         "
    REL_TO_COSTING_ERROR = 32   "               Relevancy to costing not supported
    REL_TO_SALES_DISTRIB_ERROR = 33  "          Relevancy to sales and distribution not supported
    RESULTING_ITEM_CATEGORY_ERROR = 34  "       Error in resulting item category
    SCRAP_ERROR = 35            "               Scrap error
    SPAREPART_INDICATOR_ERROR = 36  "           Spare part indicator not defined
    SPPROCTYPE_ERROR = 37       "
    STORAGE_LOCATION_ERROR = 38  "
    SUPPLYAREA_ERROR = 39       "
    UNIT_ERROR = 40             "
    UNIT_CONVERSION_ERROR = 41  "               Error converting units of measure
    VENDOR_ERROR = 42           "               Vendor not defined
    .  "  CS_DI_ITEM_CHECK

ABAP code example for Function Module CS_DI_ITEM_CHECK





The ABAP code below is a full code listing to execute function module CS_DI_ITEM_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 ,
it_t_stpub  TYPE STANDARD TABLE OF STPUB,"TABLES PARAM
wa_t_stpub  LIKE LINE OF it_t_stpub .

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

DATA(ld_efldelete) = some text here

SELECT single GUIDX
FROM STPO
INTO @DATA(ld_eguid).


DATA(ld_flg_foreign_key) = some text here

DATA(ld_flg_api) = some text here

DATA(ld_flg_ale) = some text here

DATA(ld_flg_cad) = some text here

DATA(ld_flg_item_cat_change) = some text here

DATA(ld_flg_default_values) = some text here

DATA(ld_flg_new_romen) = some text here

DATA(ld_flg_recursive) = some text here

DATA(ld_flg_identify_by_guid) = some text here

"populate fields of struture and append to itab
append wa_t_stpub to it_t_stpub. . CALL FUNCTION 'CS_DI_ITEM_CHECK' EXPORTING ecsin = ld_ecsin erc29p = ld_erc29p * ecistpo = ld_ecistpo * efldelete = ld_efldelete * eguid = ld_eguid * flg_foreign_key = ld_flg_foreign_key * flg_api = ld_flg_api * flg_ale = ld_flg_ale * flg_cad = ld_flg_cad * flg_item_cat_change = ld_flg_item_cat_change * flg_default_values = ld_flg_default_values * flg_new_romen = ld_flg_new_romen * flg_recursive = ld_flg_recursive * flg_identify_by_guid = ld_flg_identify_by_guid IMPORTING flg_warning = ld_flg_warning * TABLES * t_stpub = it_t_stpub EXCEPTIONS ERROR = 1 ALTERNATIVE_ITEM_ERROR = 2 BULK_MATERIAL_ERROR = 3 CLASSTYPE_ERROR = 4 COPRODUCT_ERROR = 5 COST_ELEMENT_ERROR = 6 CURRENCY_ERROR = 7 DIMENSION_ERROR = 8 DISTRIBUTION_KEY_ERROR = 9 DOCUMENT_NOT_FOUND = 10 DOCUMENT_TO_DELETE = 11 DOCTYPE_ERROR = 12 EXPLOSION_TYPE_ERROR = 13 FOLLOW_UP_ERROR = 14 FORMULA_ERROR = 15 ITEM_STATUS_ERROR = 16 ITEM_CATEGORY_ERROR = 17 ITEM_DATA_INCOMPLETE = 18 MATERIAL_NOT_FOUND = 19 MATERIAL_TO_DELETE = 20 MATGROUP_ERROR = 21 MATPROVISION_INDICATOR_ERROR = 22 MATSTATUS_ERROR = 23 MATTYPE_ERROR = 24 OBJECT_LOCKED = 25 PM_DATA_ERROR = 26 PRICE_DATA_ERROR = 27 PURCHASING_GROUP_ERROR = 28 PURCHASING_ORGANIZATION_ERROR = 29 RECURSIVITY_FOUND = 30 REFPOINT_ERROR = 31 REL_TO_COSTING_ERROR = 32 REL_TO_SALES_DISTRIB_ERROR = 33 RESULTING_ITEM_CATEGORY_ERROR = 34 SCRAP_ERROR = 35 SPAREPART_INDICATOR_ERROR = 36 SPPROCTYPE_ERROR = 37 STORAGE_LOCATION_ERROR = 38 SUPPLYAREA_ERROR = 39 UNIT_ERROR = 40 UNIT_CONVERSION_ERROR = 41 VENDOR_ERROR = 42 . " CS_DI_ITEM_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 ELSEIF SY-SUBRC EQ 29. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 30. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 31. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 32. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 33. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 34. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 35. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 36. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 37. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 38. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 39. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 40. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 41. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 42. "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 ,
it_t_stpub  TYPE STANDARD TABLE OF STPUB ,
wa_t_stpub  LIKE LINE OF it_t_stpub,
ld_erc29p  TYPE RC29P ,
ld_ecistpo  TYPE CSCI_STPO ,
ld_efldelete  TYPE STPO_API02-FLDELETE ,
ld_eguid  TYPE STPO-GUIDX ,
ld_flg_foreign_key  TYPE CSDATA-XFELD ,
ld_flg_api  TYPE CSDATA-XFELD ,
ld_flg_ale  TYPE CSDATA-XFELD ,
ld_flg_cad  TYPE CSDATA-XFELD ,
ld_flg_item_cat_change  TYPE CSDATA-XFELD ,
ld_flg_default_values  TYPE CSDATA-XFELD ,
ld_flg_new_romen  TYPE CSDATA-XFELD ,
ld_flg_recursive  TYPE CSDATA-XFELD ,
ld_flg_identify_by_guid  TYPE CSDATA-XFELD .

ld_ecsin = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_stpub to it_t_stpub.
ld_erc29p = 'Check type of data required'.
ld_ecistpo = 'Check type of data required'.

ld_efldelete = some text here

SELECT single GUIDX
FROM STPO
INTO ld_eguid.


ld_flg_foreign_key = some text here

ld_flg_api = some text here

ld_flg_ale = some text here

ld_flg_cad = some text here

ld_flg_item_cat_change = some text here

ld_flg_default_values = some text here

ld_flg_new_romen = some text here

ld_flg_recursive = some text here

ld_flg_identify_by_guid = 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_ITEM_CHECK or its description.