SAP Function Modules

CO_BC_CMP_INSERT_TMP SAP Function module







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

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


Pattern for FM CO_BC_CMP_INSERT_TMP - CO BC CMP INSERT TMP





CALL FUNCTION 'CO_BC_CMP_INSERT_TMP' "
  EXPORTING
*   aufnr_imp =                 " aufk-aufnr    Order Number
*   rsnum_imp =                 " resb-rsnum    Number of Reservation / Dependent Requirement
*   aufpl_imp =                 " afvc-aufpl    Task list number of operations in the order
*   aplzl_imp =                 " afvc-aplzl    General Counter for Order
*   vsnmr_key = ' '             " vskopf-vsnmr  Number or description of a version
*   rsnum_key =                 " resb-rsnum    Number of Reservation / Dependent Requirement
*   rspos_key =                 " resb-rspos    Item Number of Reservation/Dependent Requirement
*   rsart_key =                 " resb-rsart    Record Type
    source_imp =                " c
*   resbb_imp =                 " resbb         Document Table for Order Components
*   result_imp = ' '            " c
  IMPORTING
    rspos_tmp =                 " resb-rspos    Item Number of Reservation/Dependent Requirement
  EXCEPTIONS
    INVALID_SOURCE = 1          "
    COMPONENT_NOT_FOUND = 2     "
    .  "  CO_BC_CMP_INSERT_TMP

ABAP code example for Function Module CO_BC_CMP_INSERT_TMP





The ABAP code below is a full code listing to execute function module CO_BC_CMP_INSERT_TMP 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_rspos_tmp  TYPE RESB-RSPOS .


SELECT single AUFNR
FROM AUFK
INTO @DATA(ld_aufnr_imp).


SELECT single RSNUM
FROM RESB
INTO @DATA(ld_rsnum_imp).


SELECT single AUFPL
FROM AFVC
INTO @DATA(ld_aufpl_imp).


SELECT single APLZL
FROM AFVC
INTO @DATA(ld_aplzl_imp).


SELECT single VSNMR
FROM VSKOPF
INTO @DATA(ld_vsnmr_key).


SELECT single RSNUM
FROM RESB
INTO @DATA(ld_rsnum_key).


SELECT single RSPOS
FROM RESB
INTO @DATA(ld_rspos_key).


SELECT single RSART
FROM RESB
INTO @DATA(ld_rsart_key).

DATA(ld_source_imp) = 'Check type of data required'.
DATA(ld_resbb_imp) = 'Check type of data required'.
DATA(ld_result_imp) = 'Check type of data required'. . CALL FUNCTION 'CO_BC_CMP_INSERT_TMP' EXPORTING * aufnr_imp = ld_aufnr_imp * rsnum_imp = ld_rsnum_imp * aufpl_imp = ld_aufpl_imp * aplzl_imp = ld_aplzl_imp * vsnmr_key = ld_vsnmr_key * rsnum_key = ld_rsnum_key * rspos_key = ld_rspos_key * rsart_key = ld_rsart_key source_imp = ld_source_imp * resbb_imp = ld_resbb_imp * result_imp = ld_result_imp IMPORTING rspos_tmp = ld_rspos_tmp EXCEPTIONS INVALID_SOURCE = 1 COMPONENT_NOT_FOUND = 2 . " CO_BC_CMP_INSERT_TMP
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 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_rspos_tmp  TYPE RESB-RSPOS ,
ld_aufnr_imp  TYPE AUFK-AUFNR ,
ld_rsnum_imp  TYPE RESB-RSNUM ,
ld_aufpl_imp  TYPE AFVC-AUFPL ,
ld_aplzl_imp  TYPE AFVC-APLZL ,
ld_vsnmr_key  TYPE VSKOPF-VSNMR ,
ld_rsnum_key  TYPE RESB-RSNUM ,
ld_rspos_key  TYPE RESB-RSPOS ,
ld_rsart_key  TYPE RESB-RSART ,
ld_source_imp  TYPE C ,
ld_resbb_imp  TYPE RESBB ,
ld_result_imp  TYPE C .


SELECT single AUFNR
FROM AUFK
INTO ld_aufnr_imp.


SELECT single RSNUM
FROM RESB
INTO ld_rsnum_imp.


SELECT single AUFPL
FROM AFVC
INTO ld_aufpl_imp.


SELECT single APLZL
FROM AFVC
INTO ld_aplzl_imp.


SELECT single VSNMR
FROM VSKOPF
INTO ld_vsnmr_key.


SELECT single RSNUM
FROM RESB
INTO ld_rsnum_key.


SELECT single RSPOS
FROM RESB
INTO ld_rspos_key.


SELECT single RSART
FROM RESB
INTO ld_rsart_key.

ld_source_imp = 'Check type of data required'.
ld_resbb_imp = 'Check type of data required'.
ld_result_imp = '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_BC_CMP_INSERT_TMP or its description.