SAP Function Modules

QM06_FM_TASK_SEND_PAPER_ATTACH SAP Function module - Versenden verschiedener Dokumente als Folgeaktivität







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

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


Pattern for FM QM06_FM_TASK_SEND_PAPER_ATTACH - QM06 FM TASK SEND PAPER ATTACH





CALL FUNCTION 'QM06_FM_TASK_SEND_PAPER_ATTACH' "Versenden verschiedener Dokumente als Folgeaktivität
  EXPORTING
    i_viqmel =                  " viqmel        Notification data
    i_customizing =             " v_tq85        Customizing entry for chosen function
    i_manum =                   " qmsm-manum    Sequesnce number of task to be created
    i_fbcall =                  "               Call of notification using function module
  IMPORTING
    e_qnqmasm0 =                " qnqmasm0      Changed data for the task
    e_qnqmaqmel0 =              " qnqmaqmel0    Changed data in the notification header
    e_buch =                    " qkz           Indicator: Notification will be posted immediately
  TABLES
    ti_iviqmfe =                " wqmfe         Defect items (table will not be exorted)
    ti_iviqmur =                " wqmur         Causes (table will not be exported)
    ti_iviqmsm =                " wqmsm         Tasks (table will not be exported)
    ti_iviqmma =                " wqmma         Activity (table will not be exported)
    ti_ihpa =                   " ihpa          Partners (table will not be exported)
*   te_container =              " swcont        Container contents for workflow
*   te_lines =                  " tline         Long Text Lines
  EXCEPTIONS
    ACTION_STOPPED = 1          "               Follow-up function terminated
    .  "  QM06_FM_TASK_SEND_PAPER_ATTACH

ABAP code example for Function Module QM06_FM_TASK_SEND_PAPER_ATTACH





The ABAP code below is a full code listing to execute function module QM06_FM_TASK_SEND_PAPER_ATTACH 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_qnqmasm0  TYPE QNQMASM0 ,
ld_e_qnqmaqmel0  TYPE QNQMAQMEL0 ,
ld_e_buch  TYPE QKZ ,
it_ti_iviqmfe  TYPE STANDARD TABLE OF WQMFE,"TABLES PARAM
wa_ti_iviqmfe  LIKE LINE OF it_ti_iviqmfe ,
it_ti_iviqmur  TYPE STANDARD TABLE OF WQMUR,"TABLES PARAM
wa_ti_iviqmur  LIKE LINE OF it_ti_iviqmur ,
it_ti_iviqmsm  TYPE STANDARD TABLE OF WQMSM,"TABLES PARAM
wa_ti_iviqmsm  LIKE LINE OF it_ti_iviqmsm ,
it_ti_iviqmma  TYPE STANDARD TABLE OF WQMMA,"TABLES PARAM
wa_ti_iviqmma  LIKE LINE OF it_ti_iviqmma ,
it_ti_ihpa  TYPE STANDARD TABLE OF IHPA,"TABLES PARAM
wa_ti_ihpa  LIKE LINE OF it_ti_ihpa ,
it_te_container  TYPE STANDARD TABLE OF SWCONT,"TABLES PARAM
wa_te_container  LIKE LINE OF it_te_container ,
it_te_lines  TYPE STANDARD TABLE OF TLINE,"TABLES PARAM
wa_te_lines  LIKE LINE OF it_te_lines .

DATA(ld_i_viqmel) = 'Check type of data required'.
DATA(ld_i_customizing) = 'Check type of data required'.

SELECT single MANUM
FROM QMSM
INTO @DATA(ld_i_manum).

DATA(ld_i_fbcall) = 'some text here'.

"populate fields of struture and append to itab
append wa_ti_iviqmfe to it_ti_iviqmfe.

"populate fields of struture and append to itab
append wa_ti_iviqmur to it_ti_iviqmur.

"populate fields of struture and append to itab
append wa_ti_iviqmsm to it_ti_iviqmsm.

"populate fields of struture and append to itab
append wa_ti_iviqmma to it_ti_iviqmma.

"populate fields of struture and append to itab
append wa_ti_ihpa to it_ti_ihpa.

"populate fields of struture and append to itab
append wa_te_container to it_te_container.

"populate fields of struture and append to itab
append wa_te_lines to it_te_lines. . CALL FUNCTION 'QM06_FM_TASK_SEND_PAPER_ATTACH' EXPORTING i_viqmel = ld_i_viqmel i_customizing = ld_i_customizing i_manum = ld_i_manum i_fbcall = ld_i_fbcall IMPORTING e_qnqmasm0 = ld_e_qnqmasm0 e_qnqmaqmel0 = ld_e_qnqmaqmel0 e_buch = ld_e_buch TABLES ti_iviqmfe = it_ti_iviqmfe ti_iviqmur = it_ti_iviqmur ti_iviqmsm = it_ti_iviqmsm ti_iviqmma = it_ti_iviqmma ti_ihpa = it_ti_ihpa * te_container = it_te_container * te_lines = it_te_lines EXCEPTIONS ACTION_STOPPED = 1 . " QM06_FM_TASK_SEND_PAPER_ATTACH
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_qnqmasm0  TYPE QNQMASM0 ,
ld_i_viqmel  TYPE VIQMEL ,
it_ti_iviqmfe  TYPE STANDARD TABLE OF WQMFE ,
wa_ti_iviqmfe  LIKE LINE OF it_ti_iviqmfe,
ld_e_qnqmaqmel0  TYPE QNQMAQMEL0 ,
ld_i_customizing  TYPE V_TQ85 ,
it_ti_iviqmur  TYPE STANDARD TABLE OF WQMUR ,
wa_ti_iviqmur  LIKE LINE OF it_ti_iviqmur,
ld_e_buch  TYPE QKZ ,
ld_i_manum  TYPE QMSM-MANUM ,
it_ti_iviqmsm  TYPE STANDARD TABLE OF WQMSM ,
wa_ti_iviqmsm  LIKE LINE OF it_ti_iviqmsm,
ld_i_fbcall  TYPE STRING ,
it_ti_iviqmma  TYPE STANDARD TABLE OF WQMMA ,
wa_ti_iviqmma  LIKE LINE OF it_ti_iviqmma,
it_ti_ihpa  TYPE STANDARD TABLE OF IHPA ,
wa_ti_ihpa  LIKE LINE OF it_ti_ihpa,
it_te_container  TYPE STANDARD TABLE OF SWCONT ,
wa_te_container  LIKE LINE OF it_te_container,
it_te_lines  TYPE STANDARD TABLE OF TLINE ,
wa_te_lines  LIKE LINE OF it_te_lines.

ld_i_viqmel = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ti_iviqmfe to it_ti_iviqmfe.
ld_i_customizing = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ti_iviqmur to it_ti_iviqmur.

SELECT single MANUM
FROM QMSM
INTO ld_i_manum.


"populate fields of struture and append to itab
append wa_ti_iviqmsm to it_ti_iviqmsm.
ld_i_fbcall = 'some text here'.

"populate fields of struture and append to itab
append wa_ti_iviqmma to it_ti_iviqmma.

"populate fields of struture and append to itab
append wa_ti_ihpa to it_ti_ihpa.

"populate fields of struture and append to itab
append wa_te_container to it_te_container.

"populate fields of struture and append to itab
append wa_te_lines to it_te_lines.

SAP Documentation for FM QM06_FM_TASK_SEND_PAPER_ATTACH


You can use this function module to create and send different documents from a quality notification. ...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 QM06_FM_TASK_SEND_PAPER_ATTACH or its description.