SAP Function Modules

COPF_OPC_ITEM_READ_MULTIPLE SAP Function module







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

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


Pattern for FM COPF_OPC_ITEM_READ_MULTIPLE - COPF OPC ITEM READ MULTIPLE





CALL FUNCTION 'COPF_OPC_ITEM_READ_MULTIPLE' "
* EXPORTING
*   plant =                     " werks_d       Plant in which the Alias is Defined
*   item_1 =                    " coopc_itemalias  OPC Item Alias
*   format_1 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_2 =                    " coopc_itemalias  OPC Item Alias
*   format_2 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_3 =                    " coopc_itemalias  OPC Item Alias
*   format_3 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_4 =                    " coopc_itemalias  OPC Item Alias
*   format_4 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_5 =                    " coopc_itemalias  OPC Item Alias
*   format_5 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_6 =                    " coopc_itemalias  OPC Item Alias
*   format_6 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_7 =                    " coopc_itemalias  OPC Item Alias
*   format_7 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_8 =                    " coopc_itemalias  OPC Item Alias
*   format_8 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_9 =                    " coopc_itemalias  OPC Item Alias
*   format_9 = 'CHAR'           " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_10 =                   " coopc_itemalias  OPC Item Alias
*   format_10 = 'CHAR'          " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_11 =                   " coopc_itemalias  OPC Item Alias
*   format_11 = 'CHAR'          " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_12 =                   " coopc_itemalias  OPC Item Alias
*   format_12 = 'CHAR'          " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_13 =                   " coopc_itemalias  OPC Item Alias
*   format_13 = 'CHAR'          " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_14 =                   " coopc_itemalias  OPC Item Alias
*   format_14 = 'CHAR'          " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
*   item_15 =                   " coopc_itemalias  OPC Item Alias
*   format_15 = 'CHAR'          " atfor         Format to be Used (CHAR / NUM / BOOL / DATE / TIME)
* CHANGING
*   value_1 =                   " any           OPC Item Value
*   resulttext_1 =              " c             Results Text
*   value_2 =                   " any           OPC Item Value
*   resulttext_2 =              " c             Results Text
*   value_3 =                   " any           OPC Item Value
*   resulttext_3 =              " c             Results Text
*   value_4 =                   " any           OPC Item Value
*   resulttext_4 =              " c             Results Text
*   value_5 =                   " any           OPC Item Value
*   resulttext_5 =              " c             Results Text
*   value_6 =                   " any           OPC Item Value
*   resulttext_6 =              " c             Results Text
*   value_7 =                   " any           OPC Item Value
*   resulttext_7 =              " c             Results Text
*   value_8 =                   " any           OPC Item Value
*   resulttext_8 =              " c             Results Text
*   value_9 =                   " any           OPC Item Value
*   resulttext_9 =              " c             Results Text
*   value_10 =                  " any           OPC Item Value
*   resulttext_10 =             " c             Results Text
*   value_11 =                  " any           OPC Item Value
*   resulttext_11 =             " c             Results Text
*   value_12 =                  " any           OPC Item Value
*   resulttext_12 =             " c             Results Text
*   value_13 =                  " any           OPC Item Value
*   resulttext_13 =             " c             Results Text
*   value_14 =                  " any           OPC Item Value
*   resulttext_14 =             " c             Results Text
*   value_15 =                  " any           OPC Item Value
*   resulttext_15 =             " c             Results Text
    .  "  COPF_OPC_ITEM_READ_MULTIPLE

ABAP code example for Function Module COPF_OPC_ITEM_READ_MULTIPLE





The ABAP code below is a full code listing to execute function module COPF_OPC_ITEM_READ_MULTIPLE 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_value_1) = 'Check type of data required'.
DATA(ld_resulttext_1) = 'Check type of data required'.
DATA(ld_value_2) = 'Check type of data required'.
DATA(ld_resulttext_2) = 'Check type of data required'.
DATA(ld_value_3) = 'Check type of data required'.
DATA(ld_resulttext_3) = 'Check type of data required'.
DATA(ld_value_4) = 'Check type of data required'.
DATA(ld_resulttext_4) = 'Check type of data required'.
DATA(ld_value_5) = 'Check type of data required'.
DATA(ld_resulttext_5) = 'Check type of data required'.
DATA(ld_value_6) = 'Check type of data required'.
DATA(ld_resulttext_6) = 'Check type of data required'.
DATA(ld_value_7) = 'Check type of data required'.
DATA(ld_resulttext_7) = 'Check type of data required'.
DATA(ld_value_8) = 'Check type of data required'.
DATA(ld_resulttext_8) = 'Check type of data required'.
DATA(ld_value_9) = 'Check type of data required'.
DATA(ld_resulttext_9) = 'Check type of data required'.
DATA(ld_value_10) = 'Check type of data required'.
DATA(ld_resulttext_10) = 'Check type of data required'.
DATA(ld_value_11) = 'Check type of data required'.
DATA(ld_resulttext_11) = 'Check type of data required'.
DATA(ld_value_12) = 'Check type of data required'.
DATA(ld_resulttext_12) = 'Check type of data required'.
DATA(ld_value_13) = 'Check type of data required'.
DATA(ld_resulttext_13) = 'Check type of data required'.
DATA(ld_value_14) = 'Check type of data required'.
DATA(ld_resulttext_14) = 'Check type of data required'.
DATA(ld_value_15) = 'Check type of data required'.
DATA(ld_resulttext_15) = 'Check type of data required'.
DATA(ld_plant) = 'Check type of data required'.
DATA(ld_item_1) = 'Check type of data required'.
DATA(ld_format_1) = 'Check type of data required'.
DATA(ld_item_2) = 'Check type of data required'.
DATA(ld_format_2) = 'Check type of data required'.
DATA(ld_item_3) = 'Check type of data required'.
DATA(ld_format_3) = 'Check type of data required'.
DATA(ld_item_4) = 'Check type of data required'.
DATA(ld_format_4) = 'Check type of data required'.
DATA(ld_item_5) = 'Check type of data required'.
DATA(ld_format_5) = 'Check type of data required'.
DATA(ld_item_6) = 'Check type of data required'.
DATA(ld_format_6) = 'Check type of data required'.
DATA(ld_item_7) = 'Check type of data required'.
DATA(ld_format_7) = 'Check type of data required'.
DATA(ld_item_8) = 'Check type of data required'.
DATA(ld_format_8) = 'Check type of data required'.
DATA(ld_item_9) = 'Check type of data required'.
DATA(ld_format_9) = 'Check type of data required'.
DATA(ld_item_10) = 'Check type of data required'.
DATA(ld_format_10) = 'Check type of data required'.
DATA(ld_item_11) = 'Check type of data required'.
DATA(ld_format_11) = 'Check type of data required'.
DATA(ld_item_12) = 'Check type of data required'.
DATA(ld_format_12) = 'Check type of data required'.
DATA(ld_item_13) = 'Check type of data required'.
DATA(ld_format_13) = 'Check type of data required'.
DATA(ld_item_14) = 'Check type of data required'.
DATA(ld_format_14) = 'Check type of data required'.
DATA(ld_item_15) = 'Check type of data required'.
DATA(ld_format_15) = 'Check type of data required'. . CALL FUNCTION 'COPF_OPC_ITEM_READ_MULTIPLE' * EXPORTING * plant = ld_plant * item_1 = ld_item_1 * format_1 = ld_format_1 * item_2 = ld_item_2 * format_2 = ld_format_2 * item_3 = ld_item_3 * format_3 = ld_format_3 * item_4 = ld_item_4 * format_4 = ld_format_4 * item_5 = ld_item_5 * format_5 = ld_format_5 * item_6 = ld_item_6 * format_6 = ld_format_6 * item_7 = ld_item_7 * format_7 = ld_format_7 * item_8 = ld_item_8 * format_8 = ld_format_8 * item_9 = ld_item_9 * format_9 = ld_format_9 * item_10 = ld_item_10 * format_10 = ld_format_10 * item_11 = ld_item_11 * format_11 = ld_format_11 * item_12 = ld_item_12 * format_12 = ld_format_12 * item_13 = ld_item_13 * format_13 = ld_format_13 * item_14 = ld_item_14 * format_14 = ld_format_14 * item_15 = ld_item_15 * format_15 = ld_format_15 * CHANGING * value_1 = ld_value_1 * resulttext_1 = ld_resulttext_1 * value_2 = ld_value_2 * resulttext_2 = ld_resulttext_2 * value_3 = ld_value_3 * resulttext_3 = ld_resulttext_3 * value_4 = ld_value_4 * resulttext_4 = ld_resulttext_4 * value_5 = ld_value_5 * resulttext_5 = ld_resulttext_5 * value_6 = ld_value_6 * resulttext_6 = ld_resulttext_6 * value_7 = ld_value_7 * resulttext_7 = ld_resulttext_7 * value_8 = ld_value_8 * resulttext_8 = ld_resulttext_8 * value_9 = ld_value_9 * resulttext_9 = ld_resulttext_9 * value_10 = ld_value_10 * resulttext_10 = ld_resulttext_10 * value_11 = ld_value_11 * resulttext_11 = ld_resulttext_11 * value_12 = ld_value_12 * resulttext_12 = ld_resulttext_12 * value_13 = ld_value_13 * resulttext_13 = ld_resulttext_13 * value_14 = ld_value_14 * resulttext_14 = ld_resulttext_14 * value_15 = ld_value_15 * resulttext_15 = ld_resulttext_15 . " COPF_OPC_ITEM_READ_MULTIPLE
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_plant  TYPE WERKS_D ,
ld_value_1  TYPE ANY ,
ld_item_1  TYPE COOPC_ITEMALIAS ,
ld_resulttext_1  TYPE C ,
ld_format_1  TYPE ATFOR ,
ld_value_2  TYPE ANY ,
ld_item_2  TYPE COOPC_ITEMALIAS ,
ld_resulttext_2  TYPE C ,
ld_format_2  TYPE ATFOR ,
ld_value_3  TYPE ANY ,
ld_item_3  TYPE COOPC_ITEMALIAS ,
ld_resulttext_3  TYPE C ,
ld_format_3  TYPE ATFOR ,
ld_value_4  TYPE ANY ,
ld_item_4  TYPE COOPC_ITEMALIAS ,
ld_resulttext_4  TYPE C ,
ld_format_4  TYPE ATFOR ,
ld_value_5  TYPE ANY ,
ld_item_5  TYPE COOPC_ITEMALIAS ,
ld_resulttext_5  TYPE C ,
ld_format_5  TYPE ATFOR ,
ld_value_6  TYPE ANY ,
ld_item_6  TYPE COOPC_ITEMALIAS ,
ld_resulttext_6  TYPE C ,
ld_format_6  TYPE ATFOR ,
ld_value_7  TYPE ANY ,
ld_item_7  TYPE COOPC_ITEMALIAS ,
ld_resulttext_7  TYPE C ,
ld_format_7  TYPE ATFOR ,
ld_value_8  TYPE ANY ,
ld_item_8  TYPE COOPC_ITEMALIAS ,
ld_resulttext_8  TYPE C ,
ld_format_8  TYPE ATFOR ,
ld_value_9  TYPE ANY ,
ld_item_9  TYPE COOPC_ITEMALIAS ,
ld_resulttext_9  TYPE C ,
ld_format_9  TYPE ATFOR ,
ld_value_10  TYPE ANY ,
ld_item_10  TYPE COOPC_ITEMALIAS ,
ld_resulttext_10  TYPE C ,
ld_value_11  TYPE ANY ,
ld_format_10  TYPE ATFOR ,
ld_resulttext_11  TYPE C ,
ld_item_11  TYPE COOPC_ITEMALIAS ,
ld_value_12  TYPE ANY ,
ld_format_11  TYPE ATFOR ,
ld_resulttext_12  TYPE C ,
ld_item_12  TYPE COOPC_ITEMALIAS ,
ld_value_13  TYPE ANY ,
ld_format_12  TYPE ATFOR ,
ld_resulttext_13  TYPE C ,
ld_item_13  TYPE COOPC_ITEMALIAS ,
ld_value_14  TYPE ANY ,
ld_format_13  TYPE ATFOR ,
ld_resulttext_14  TYPE C ,
ld_item_14  TYPE COOPC_ITEMALIAS ,
ld_value_15  TYPE ANY ,
ld_format_14  TYPE ATFOR ,
ld_resulttext_15  TYPE C ,
ld_item_15  TYPE COOPC_ITEMALIAS ,
ld_format_15  TYPE ATFOR .

ld_plant = 'Check type of data required'.
ld_value_1 = 'Check type of data required'.
ld_item_1 = 'Check type of data required'.
ld_resulttext_1 = 'Check type of data required'.
ld_format_1 = 'Check type of data required'.
ld_value_2 = 'Check type of data required'.
ld_item_2 = 'Check type of data required'.
ld_resulttext_2 = 'Check type of data required'.
ld_format_2 = 'Check type of data required'.
ld_value_3 = 'Check type of data required'.
ld_item_3 = 'Check type of data required'.
ld_resulttext_3 = 'Check type of data required'.
ld_format_3 = 'Check type of data required'.
ld_value_4 = 'Check type of data required'.
ld_item_4 = 'Check type of data required'.
ld_resulttext_4 = 'Check type of data required'.
ld_format_4 = 'Check type of data required'.
ld_value_5 = 'Check type of data required'.
ld_item_5 = 'Check type of data required'.
ld_resulttext_5 = 'Check type of data required'.
ld_format_5 = 'Check type of data required'.
ld_value_6 = 'Check type of data required'.
ld_item_6 = 'Check type of data required'.
ld_resulttext_6 = 'Check type of data required'.
ld_format_6 = 'Check type of data required'.
ld_value_7 = 'Check type of data required'.
ld_item_7 = 'Check type of data required'.
ld_resulttext_7 = 'Check type of data required'.
ld_format_7 = 'Check type of data required'.
ld_value_8 = 'Check type of data required'.
ld_item_8 = 'Check type of data required'.
ld_resulttext_8 = 'Check type of data required'.
ld_format_8 = 'Check type of data required'.
ld_value_9 = 'Check type of data required'.
ld_item_9 = 'Check type of data required'.
ld_resulttext_9 = 'Check type of data required'.
ld_format_9 = 'Check type of data required'.
ld_value_10 = 'Check type of data required'.
ld_item_10 = 'Check type of data required'.
ld_resulttext_10 = 'Check type of data required'.
ld_value_11 = 'Check type of data required'.
ld_format_10 = 'Check type of data required'.
ld_resulttext_11 = 'Check type of data required'.
ld_item_11 = 'Check type of data required'.
ld_value_12 = 'Check type of data required'.
ld_format_11 = 'Check type of data required'.
ld_resulttext_12 = 'Check type of data required'.
ld_item_12 = 'Check type of data required'.
ld_value_13 = 'Check type of data required'.
ld_format_12 = 'Check type of data required'.
ld_resulttext_13 = 'Check type of data required'.
ld_item_13 = 'Check type of data required'.
ld_value_14 = 'Check type of data required'.
ld_format_13 = 'Check type of data required'.
ld_resulttext_14 = 'Check type of data required'.
ld_item_14 = 'Check type of data required'.
ld_value_15 = 'Check type of data required'.
ld_format_14 = 'Check type of data required'.
ld_resulttext_15 = 'Check type of data required'.
ld_item_15 = 'Check type of data required'.
ld_format_15 = '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 COPF_OPC_ITEM_READ_MULTIPLE or its description.