SAP Function Modules

QC02_BATCH_CHAR_MVALUE SAP Function module







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

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


Pattern for FM QC02_BATCH_CHAR_MVALUE - QC02 BATCH CHAR MVALUE





CALL FUNCTION 'QC02_BATCH_CHAR_MVALUE' "
  EXPORTING
*   i_language = SY-LANGU       " sy-langu      Language, in which the texts should be read
*   i_date = SY-DATUM           " sy-datum      Selection date
*   i_qcvme =                   " qcvme         Certificate profile: characteristic data
*   i_qals =                    " qals          Inspection lot
*   i_qalt =                    " qalt          Partial lot
    i_document_data =           " qcdocinfo     Document information
*   i_qcspec =                  " qcspec        Insp.specifications
*   i_dialog =                  "               Indicator: dialog possible
  IMPORTING
    e_qcres =                   " qcres         Output structure for inspection result
    e_qcspec =                  " qcspec        Output structure for inspection specifications, if changed
* TABLES
*   t_multiple_values_tab =     " qcres
  EXCEPTIONS
    VALUE_NOT_FOUND = 1         "               Characteristic not found
    OTHER_EXCEPTION = 2         "               Other exception condition arisen
    CHARACTERISTIC_MORE_THAN_ONE = 3  "         More than one characteristic found
    .  "  QC02_BATCH_CHAR_MVALUE

ABAP code example for Function Module QC02_BATCH_CHAR_MVALUE





The ABAP code below is a full code listing to execute function module QC02_BATCH_CHAR_MVALUE 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_e_qcres  TYPE QCRES ,
ld_e_qcspec  TYPE QCSPEC ,
it_t_multiple_values_tab  TYPE STANDARD TABLE OF QCRES,"TABLES PARAM
wa_t_multiple_values_tab  LIKE LINE OF it_t_multiple_values_tab .

DATA(ld_i_language) = 'Check type of data required'.
DATA(ld_i_date) = '20210129'.
DATA(ld_i_qcvme) = '20210129'.
DATA(ld_i_qals) = '20210129'.
DATA(ld_i_qalt) = '20210129'.
DATA(ld_i_document_data) = '20210129'.
DATA(ld_i_qcspec) = '20210129'.
DATA(ld_i_dialog) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_multiple_values_tab to it_t_multiple_values_tab. . CALL FUNCTION 'QC02_BATCH_CHAR_MVALUE' EXPORTING * i_language = ld_i_language * i_date = ld_i_date * i_qcvme = ld_i_qcvme * i_qals = ld_i_qals * i_qalt = ld_i_qalt i_document_data = ld_i_document_data * i_qcspec = ld_i_qcspec * i_dialog = ld_i_dialog IMPORTING e_qcres = ld_e_qcres e_qcspec = ld_e_qcspec * TABLES * t_multiple_values_tab = it_t_multiple_values_tab EXCEPTIONS VALUE_NOT_FOUND = 1 OTHER_EXCEPTION = 2 CHARACTERISTIC_MORE_THAN_ONE = 3 . " QC02_BATCH_CHAR_MVALUE
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 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_e_qcres  TYPE QCRES ,
ld_i_language  TYPE SY-LANGU ,
it_t_multiple_values_tab  TYPE STANDARD TABLE OF QCRES ,
wa_t_multiple_values_tab  LIKE LINE OF it_t_multiple_values_tab,
ld_e_qcspec  TYPE QCSPEC ,
ld_i_date  TYPE SY-DATUM ,
ld_i_qcvme  TYPE QCVME ,
ld_i_qals  TYPE QALS ,
ld_i_qalt  TYPE QALT ,
ld_i_document_data  TYPE QCDOCINFO ,
ld_i_qcspec  TYPE QCSPEC ,
ld_i_dialog  TYPE STRING .

ld_i_language = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_multiple_values_tab to it_t_multiple_values_tab.
ld_i_date = '20210129'.
ld_i_qcvme = '20210129'.
ld_i_qals = '20210129'.
ld_i_qalt = '20210129'.
ld_i_document_data = '20210129'.
ld_i_qcspec = '20210129'.
ld_i_dialog = 'some text here'.

SAP Documentation for FM QC02_BATCH_CHAR_MVALUE


The function module selects results data for a characteristic in a certificate profile. The inspection results are read from the general ...See here for full SAP fm documentation

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 QC02_BATCH_CHAR_MVALUE or its description.