SAP Function Modules

CO_WIPB_CHECK_WIPBCHA SAP Function module







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

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


Pattern for FM CO_WIPB_CHECK_WIPBCHA - CO WIPB CHECK WIPBCHA





CALL FUNCTION 'CO_WIPB_CHECK_WIPBCHA' "
  EXPORTING
    xdark =                     " char01
    is_ref =                    " afru_inc_ref
  IMPORTING
    ob_changed_flg =            " xfeld
    ob_changed_ucmat =          " mob01-ucmat   Material from Original Batch
    ob_changed_uccha =          " mob01-uccha   Original Batch
    ob_changed_ucwrk =          " mob01-ucwrk   Plant from Original Batch
    ob_changed_ucmch =          " mob01-ucmch   Internal use: Batch master record must be created
  TABLES
    it_proob =                  " proob_upd     Original Batch for Production Order
  CHANGING
    xmob01 =                    " mob01         Dialog Structure: Original Batch
    old_mob01 =                 " mob01         Dialog Structure: Original Batch
  EXCEPTIONS
    ENQUEUE_NOT_POSSIBLE = 1    "
    NO_MATERIAL = 2             "
    NO_PLANT = 3                "
    MATERIAL_NOT_FOUND = 4      "
    PLANT_NOT_FOUND = 5         "
    NO_BATCH_HANDLING = 6       "
    BATCH_EXIST = 7             "
    NO_NUMBER = 8               "
    ILLEGAL_BATCH_NUMBER = 9    "
    INTERVAL_NOT_FOUND = 10     "
    OBJECT_NOT_FOUND = 11       "
    INTERVAL_OVERFLOW = 12      "
    ERROR_AUTOMATIC_BATCH_NUMBER = 13  "
    CANCELLED = 14              "
    OB_FOR_REFERENCE_MISSING = 15  "
    ORDER_OB_REFERENCE_EXISTING = 16  "
    LOCK_ON_PLANT = 17          "
    LOCK_SYSTEM_ERROR = 18      "
    AUTOMATIC_BATCH_NUM_NOT_ACTIVE = 19  "
    FOREIGN_LOCK = 20           "
    BATCH_ID_INVALID = 21       "
    OB_WITH_DELETION_INDICATOR = 22  "
    .  "  CO_WIPB_CHECK_WIPBCHA

ABAP code example for Function Module CO_WIPB_CHECK_WIPBCHA





The ABAP code below is a full code listing to execute function module CO_WIPB_CHECK_WIPBCHA 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_ob_changed_flg  TYPE XFELD ,
ld_ob_changed_ucmat  TYPE MOB01-UCMAT ,
ld_ob_changed_uccha  TYPE MOB01-UCCHA ,
ld_ob_changed_ucwrk  TYPE MOB01-UCWRK ,
ld_ob_changed_ucmch  TYPE MOB01-UCMCH ,
it_it_proob  TYPE STANDARD TABLE OF PROOB_UPD,"TABLES PARAM
wa_it_proob  LIKE LINE OF it_it_proob .

DATA(ld_xmob01) = 'Check type of data required'.
DATA(ld_old_mob01) = 'Check type of data required'.
DATA(ld_xdark) = 'Check type of data required'.
DATA(ld_is_ref) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_proob to it_it_proob. . CALL FUNCTION 'CO_WIPB_CHECK_WIPBCHA' EXPORTING xdark = ld_xdark is_ref = ld_is_ref IMPORTING ob_changed_flg = ld_ob_changed_flg ob_changed_ucmat = ld_ob_changed_ucmat ob_changed_uccha = ld_ob_changed_uccha ob_changed_ucwrk = ld_ob_changed_ucwrk ob_changed_ucmch = ld_ob_changed_ucmch TABLES it_proob = it_it_proob CHANGING xmob01 = ld_xmob01 old_mob01 = ld_old_mob01 EXCEPTIONS ENQUEUE_NOT_POSSIBLE = 1 NO_MATERIAL = 2 NO_PLANT = 3 MATERIAL_NOT_FOUND = 4 PLANT_NOT_FOUND = 5 NO_BATCH_HANDLING = 6 BATCH_EXIST = 7 NO_NUMBER = 8 ILLEGAL_BATCH_NUMBER = 9 INTERVAL_NOT_FOUND = 10 OBJECT_NOT_FOUND = 11 INTERVAL_OVERFLOW = 12 ERROR_AUTOMATIC_BATCH_NUMBER = 13 CANCELLED = 14 OB_FOR_REFERENCE_MISSING = 15 ORDER_OB_REFERENCE_EXISTING = 16 LOCK_ON_PLANT = 17 LOCK_SYSTEM_ERROR = 18 AUTOMATIC_BATCH_NUM_NOT_ACTIVE = 19 FOREIGN_LOCK = 20 BATCH_ID_INVALID = 21 OB_WITH_DELETION_INDICATOR = 22 . " CO_WIPB_CHECK_WIPBCHA
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 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_xmob01  TYPE MOB01 ,
ld_ob_changed_flg  TYPE XFELD ,
ld_xdark  TYPE CHAR01 ,
it_it_proob  TYPE STANDARD TABLE OF PROOB_UPD ,
wa_it_proob  LIKE LINE OF it_it_proob,
ld_old_mob01  TYPE MOB01 ,
ld_ob_changed_ucmat  TYPE MOB01-UCMAT ,
ld_is_ref  TYPE AFRU_INC_REF ,
ld_ob_changed_uccha  TYPE MOB01-UCCHA ,
ld_ob_changed_ucwrk  TYPE MOB01-UCWRK ,
ld_ob_changed_ucmch  TYPE MOB01-UCMCH .

ld_xmob01 = 'Check type of data required'.
ld_xdark = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_proob to it_it_proob.
ld_old_mob01 = 'Check type of data required'.
ld_is_ref = '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 CO_WIPB_CHECK_WIPBCHA or its description.