SAP Function Modules

PM_ORDER_PRINT_CONTROL SAP Function module







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

Associated Function Group: IPRT
Released Date: Not Released
Processing type: Start update immediately (start immed)
update module start immediate settings


Pattern for FM PM_ORDER_PRINT_CONTROL - PM ORDER PRINT CONTROL





CALL FUNCTION 'PM_ORDER_PRINT_CONTROL' "
* EXPORTING
*   caufvd = SPACE              " caufvd        Order header
*   device = 'PRINTER '         " itcpp-tddevice  Output device
*   iloa = SPACE                " iloa          Account information for an object
*   print_language = SYST-LANGU  " t390_u-print_lang  Output language
*   riwo1 = SPACE               " riwo1         Object list information
*   iviqmel =                   " viqmel
*   n_riwo1 =                   " riwo1
*   riwo00 =                    " riwo00
*   rqm00 = SPACE               " rqm00         Special I/O fields for quality notifications
*   iv_sess_tzone =             " sy-zonlo      Time Zone of Current User
  TABLES
    iaffhd =                    " affhd         Prod Res. and tools dialog table
    iafvgd =                    " afvgd         Operations dialog table
    iresbd =                    " resbd         Reservations dialog table
    iripw0 =                    " ripw0         Objectlist dialog table
    iworkpaper =                " wworkpaper    Workpapers to print table
    op_print_tab =              " riprt1        Single operation selected for print table
*   ihpad_tab =                 " ihpad
*   ihsg_tab =                  " ihsg
*   ihgns_tab =                 " ihgns
*   kbedp_tab =                 " kbedp
*   iviqmfe =                   " wqmfe
*   iviqmma =                   " wqmma
*   iviqmsm =                   " wqmsm
*   iviqmur =                   " wqmur
*   iqkat =                     " qkat
*   n_ihpad_tab =               " ihpad
*   idocuments =                " eams_document_list  Documents for Shop Paper Printing
  EXCEPTIONS
    NO_WORKPAPERS_PASSED = 1    "               FORM_SEL not set and IWORKPAPER is empty
    .  "  PM_ORDER_PRINT_CONTROL

ABAP code example for Function Module PM_ORDER_PRINT_CONTROL





The ABAP code below is a full code listing to execute function module PM_ORDER_PRINT_CONTROL 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:
it_iaffhd  TYPE STANDARD TABLE OF AFFHD,"TABLES PARAM
wa_iaffhd  LIKE LINE OF it_iaffhd ,
it_iafvgd  TYPE STANDARD TABLE OF AFVGD,"TABLES PARAM
wa_iafvgd  LIKE LINE OF it_iafvgd ,
it_iresbd  TYPE STANDARD TABLE OF RESBD,"TABLES PARAM
wa_iresbd  LIKE LINE OF it_iresbd ,
it_iripw0  TYPE STANDARD TABLE OF RIPW0,"TABLES PARAM
wa_iripw0  LIKE LINE OF it_iripw0 ,
it_iworkpaper  TYPE STANDARD TABLE OF WWORKPAPER,"TABLES PARAM
wa_iworkpaper  LIKE LINE OF it_iworkpaper ,
it_op_print_tab  TYPE STANDARD TABLE OF RIPRT1,"TABLES PARAM
wa_op_print_tab  LIKE LINE OF it_op_print_tab ,
it_ihpad_tab  TYPE STANDARD TABLE OF IHPAD,"TABLES PARAM
wa_ihpad_tab  LIKE LINE OF it_ihpad_tab ,
it_ihsg_tab  TYPE STANDARD TABLE OF IHSG,"TABLES PARAM
wa_ihsg_tab  LIKE LINE OF it_ihsg_tab ,
it_ihgns_tab  TYPE STANDARD TABLE OF IHGNS,"TABLES PARAM
wa_ihgns_tab  LIKE LINE OF it_ihgns_tab ,
it_kbedp_tab  TYPE STANDARD TABLE OF KBEDP,"TABLES PARAM
wa_kbedp_tab  LIKE LINE OF it_kbedp_tab ,
it_iviqmfe  TYPE STANDARD TABLE OF WQMFE,"TABLES PARAM
wa_iviqmfe  LIKE LINE OF it_iviqmfe ,
it_iviqmma  TYPE STANDARD TABLE OF WQMMA,"TABLES PARAM
wa_iviqmma  LIKE LINE OF it_iviqmma ,
it_iviqmsm  TYPE STANDARD TABLE OF WQMSM,"TABLES PARAM
wa_iviqmsm  LIKE LINE OF it_iviqmsm ,
it_iviqmur  TYPE STANDARD TABLE OF WQMUR,"TABLES PARAM
wa_iviqmur  LIKE LINE OF it_iviqmur ,
it_iqkat  TYPE STANDARD TABLE OF QKAT,"TABLES PARAM
wa_iqkat  LIKE LINE OF it_iqkat ,
it_n_ihpad_tab  TYPE STANDARD TABLE OF IHPAD,"TABLES PARAM
wa_n_ihpad_tab  LIKE LINE OF it_n_ihpad_tab ,
it_idocuments  TYPE STANDARD TABLE OF EAMS_DOCUMENT_LIST,"TABLES PARAM
wa_idocuments  LIKE LINE OF it_idocuments .

DATA(ld_caufvd) = 'Check type of data required'.

DATA(ld_device) = some text here
DATA(ld_iloa) = 'Check type of data required'.

SELECT single PRINT_LANG
FROM T390_U
INTO @DATA(ld_print_language).

DATA(ld_riwo1) = 'Check type of data required'.
DATA(ld_iviqmel) = 'Check type of data required'.
DATA(ld_n_riwo1) = 'Check type of data required'.
DATA(ld_riwo00) = 'Check type of data required'.
DATA(ld_rqm00) = 'Check type of data required'.
DATA(ld_iv_sess_tzone) = 'some text here'.

"populate fields of struture and append to itab
append wa_iaffhd to it_iaffhd.

"populate fields of struture and append to itab
append wa_iafvgd to it_iafvgd.

"populate fields of struture and append to itab
append wa_iresbd to it_iresbd.

"populate fields of struture and append to itab
append wa_iripw0 to it_iripw0.

"populate fields of struture and append to itab
append wa_iworkpaper to it_iworkpaper.

"populate fields of struture and append to itab
append wa_op_print_tab to it_op_print_tab.

"populate fields of struture and append to itab
append wa_ihpad_tab to it_ihpad_tab.

"populate fields of struture and append to itab
append wa_ihsg_tab to it_ihsg_tab.

"populate fields of struture and append to itab
append wa_ihgns_tab to it_ihgns_tab.

"populate fields of struture and append to itab
append wa_kbedp_tab to it_kbedp_tab.

"populate fields of struture and append to itab
append wa_iviqmfe to it_iviqmfe.

"populate fields of struture and append to itab
append wa_iviqmma to it_iviqmma.

"populate fields of struture and append to itab
append wa_iviqmsm to it_iviqmsm.

"populate fields of struture and append to itab
append wa_iviqmur to it_iviqmur.

"populate fields of struture and append to itab
append wa_iqkat to it_iqkat.

"populate fields of struture and append to itab
append wa_n_ihpad_tab to it_n_ihpad_tab.

"populate fields of struture and append to itab
append wa_idocuments to it_idocuments. . CALL FUNCTION 'PM_ORDER_PRINT_CONTROL' * EXPORTING * caufvd = ld_caufvd * device = ld_device * iloa = ld_iloa * print_language = ld_print_language * riwo1 = ld_riwo1 * iviqmel = ld_iviqmel * n_riwo1 = ld_n_riwo1 * riwo00 = ld_riwo00 * rqm00 = ld_rqm00 * iv_sess_tzone = ld_iv_sess_tzone TABLES iaffhd = it_iaffhd iafvgd = it_iafvgd iresbd = it_iresbd iripw0 = it_iripw0 iworkpaper = it_iworkpaper op_print_tab = it_op_print_tab * ihpad_tab = it_ihpad_tab * ihsg_tab = it_ihsg_tab * ihgns_tab = it_ihgns_tab * kbedp_tab = it_kbedp_tab * iviqmfe = it_iviqmfe * iviqmma = it_iviqmma * iviqmsm = it_iviqmsm * iviqmur = it_iviqmur * iqkat = it_iqkat * n_ihpad_tab = it_n_ihpad_tab * idocuments = it_idocuments EXCEPTIONS NO_WORKPAPERS_PASSED = 1 . " PM_ORDER_PRINT_CONTROL
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_caufvd  TYPE CAUFVD ,
it_iaffhd  TYPE STANDARD TABLE OF AFFHD ,
wa_iaffhd  LIKE LINE OF it_iaffhd,
ld_device  TYPE ITCPP-TDDEVICE ,
it_iafvgd  TYPE STANDARD TABLE OF AFVGD ,
wa_iafvgd  LIKE LINE OF it_iafvgd,
ld_iloa  TYPE ILOA ,
it_iresbd  TYPE STANDARD TABLE OF RESBD ,
wa_iresbd  LIKE LINE OF it_iresbd,
it_iripw0  TYPE STANDARD TABLE OF RIPW0 ,
wa_iripw0  LIKE LINE OF it_iripw0,
ld_print_language  TYPE T390_U-PRINT_LANG ,
ld_riwo1  TYPE RIWO1 ,
it_iworkpaper  TYPE STANDARD TABLE OF WWORKPAPER ,
wa_iworkpaper  LIKE LINE OF it_iworkpaper,
ld_iviqmel  TYPE VIQMEL ,
it_op_print_tab  TYPE STANDARD TABLE OF RIPRT1 ,
wa_op_print_tab  LIKE LINE OF it_op_print_tab,
ld_n_riwo1  TYPE RIWO1 ,
it_ihpad_tab  TYPE STANDARD TABLE OF IHPAD ,
wa_ihpad_tab  LIKE LINE OF it_ihpad_tab,
ld_riwo00  TYPE RIWO00 ,
it_ihsg_tab  TYPE STANDARD TABLE OF IHSG ,
wa_ihsg_tab  LIKE LINE OF it_ihsg_tab,
ld_rqm00  TYPE RQM00 ,
it_ihgns_tab  TYPE STANDARD TABLE OF IHGNS ,
wa_ihgns_tab  LIKE LINE OF it_ihgns_tab,
ld_iv_sess_tzone  TYPE SY-ZONLO ,
it_kbedp_tab  TYPE STANDARD TABLE OF KBEDP ,
wa_kbedp_tab  LIKE LINE OF it_kbedp_tab,
it_iviqmfe  TYPE STANDARD TABLE OF WQMFE ,
wa_iviqmfe  LIKE LINE OF it_iviqmfe,
it_iviqmma  TYPE STANDARD TABLE OF WQMMA ,
wa_iviqmma  LIKE LINE OF it_iviqmma,
it_iviqmsm  TYPE STANDARD TABLE OF WQMSM ,
wa_iviqmsm  LIKE LINE OF it_iviqmsm,
it_iviqmur  TYPE STANDARD TABLE OF WQMUR ,
wa_iviqmur  LIKE LINE OF it_iviqmur,
it_iqkat  TYPE STANDARD TABLE OF QKAT ,
wa_iqkat  LIKE LINE OF it_iqkat,
it_n_ihpad_tab  TYPE STANDARD TABLE OF IHPAD ,
wa_n_ihpad_tab  LIKE LINE OF it_n_ihpad_tab,
it_idocuments  TYPE STANDARD TABLE OF EAMS_DOCUMENT_LIST ,
wa_idocuments  LIKE LINE OF it_idocuments.

ld_caufvd = 'some text here'.

"populate fields of struture and append to itab
append wa_iaffhd to it_iaffhd.

ld_device = some text here

"populate fields of struture and append to itab
append wa_iafvgd to it_iafvgd.
ld_iloa = 'some text here'.

"populate fields of struture and append to itab
append wa_iresbd to it_iresbd.

"populate fields of struture and append to itab
append wa_iripw0 to it_iripw0.

SELECT single PRINT_LANG
FROM T390_U
INTO ld_print_language.

ld_riwo1 = 'some text here'.

"populate fields of struture and append to itab
append wa_iworkpaper to it_iworkpaper.
ld_iviqmel = 'some text here'.

"populate fields of struture and append to itab
append wa_op_print_tab to it_op_print_tab.
ld_n_riwo1 = 'some text here'.

"populate fields of struture and append to itab
append wa_ihpad_tab to it_ihpad_tab.
ld_riwo00 = 'some text here'.

"populate fields of struture and append to itab
append wa_ihsg_tab to it_ihsg_tab.
ld_rqm00 = 'some text here'.

"populate fields of struture and append to itab
append wa_ihgns_tab to it_ihgns_tab.
ld_iv_sess_tzone = 'some text here'.

"populate fields of struture and append to itab
append wa_kbedp_tab to it_kbedp_tab.

"populate fields of struture and append to itab
append wa_iviqmfe to it_iviqmfe.

"populate fields of struture and append to itab
append wa_iviqmma to it_iviqmma.

"populate fields of struture and append to itab
append wa_iviqmsm to it_iviqmsm.

"populate fields of struture and append to itab
append wa_iviqmur to it_iviqmur.

"populate fields of struture and append to itab
append wa_iqkat to it_iqkat.

"populate fields of struture and append to itab
append wa_n_ihpad_tab to it_n_ihpad_tab.

"populate fields of struture and append to itab
append wa_idocuments to it_idocuments.

SAP Documentation for FM PM_ORDER_PRINT_CONTROL


D E T A I L N O T E S
...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 PM_ORDER_PRINT_CONTROL or its description.