SAP RH_FORM_OUTPUT Function Module for Form display









RH_FORM_OUTPUT is a standard rh form output SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Form display processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rh form output FM, simply by entering the name RH_FORM_OUTPUT into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHVS
Program Name: SAPLRHVS
Main Program: SAPLRHVS
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RH_FORM_OUTPUT pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RH_FORM_OUTPUT'"Form display
EXPORTING
* DIALOG = ' ' "Flag: dialog for print parameters
LANGU = "Output language for form
* ERROR = 0 "Output control for data errors (text variable)
* FIRST_PRINT = 'X' "Flag: control (first output)
* LAST_PRINT = 'X' "Flag: control (last output)
FORMULAR = "Form name
MEDIUM = "Output medium
EXDEV = "Name: external output medium
OPTIONS = "Print options (input)

IMPORTING
RESULT = "Print options (return)

TABLES
VARDAT_TAB = "Data on text variables

EXCEPTIONS
FORM = 1 DEVICE = 2 OPTIONS = 3 CANCELED = 4 INVALID_FAXNR = 5 MORE_BATCHPARM = 6
.



IMPORTING Parameters details for RH_FORM_OUTPUT

DIALOG - Flag: dialog for print parameters

Data type: PP0V-DIALOG
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGU - Output language for form

Data type: PKMIT-KRS1_LANGU
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR - Output control for data errors (text variable)

Data type: PP0V-ERROR
Optional: Yes
Call by Reference: No ( called with pass by value option)

FIRST_PRINT - Flag: control (first output)

Data type: PP0V-OUT_FIRST
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

LAST_PRINT - Flag: control (last output)

Data type: PP0V-OUT_LAST
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

FORMULAR - Form name

Data type: THEAD-TDFORM
Optional: No
Call by Reference: No ( called with pass by value option)

MEDIUM - Output medium

Data type: PKMIT-DEVICE
Optional: No
Call by Reference: No ( called with pass by value option)

EXDEV - Name: external output medium

Data type: PKMIT-DEVICE
Optional: No
Call by Reference: No ( called with pass by value option)

OPTIONS - Print options (input)

Data type: ITCPO
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RH_FORM_OUTPUT

RESULT - Print options (return)

Data type: ITCPP
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RH_FORM_OUTPUT

VARDAT_TAB - Data on text variables

Data type: PPVARDAT
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

FORM - Form not found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DEVICE - User cancelled print dialog

Data type:
Optional: No
Call by Reference: Yes

OPTIONS - Print options (input)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CANCELED -

Data type:
Optional: No
Call by Reference: Yes

INVALID_FAXNR -

Data type:
Optional: No
Call by Reference: Yes

MORE_BATCHPARM -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RH_FORM_OUTPUT Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_form  TYPE STRING, "   
lv_dialog  TYPE PP0V-DIALOG, "   ' '
lv_result  TYPE ITCPP, "   
lt_vardat_tab  TYPE STANDARD TABLE OF PPVARDAT, "   
lv_langu  TYPE PKMIT-KRS1_LANGU, "   
lv_device  TYPE PKMIT, "   
lv_error  TYPE PP0V-ERROR, "   0
lv_options  TYPE PP0V, "   
lv_canceled  TYPE PP0V, "   
lv_first_print  TYPE PP0V-OUT_FIRST, "   'X'
lv_last_print  TYPE PP0V-OUT_LAST, "   'X'
lv_invalid_faxnr  TYPE PP0V, "   
lv_formular  TYPE THEAD-TDFORM, "   
lv_more_batchparm  TYPE THEAD, "   
lv_medium  TYPE PKMIT-DEVICE, "   
lv_exdev  TYPE PKMIT-DEVICE, "   
lv_options  TYPE ITCPO. "   

  CALL FUNCTION 'RH_FORM_OUTPUT'  "Form display
    EXPORTING
         DIALOG = lv_dialog
         LANGU = lv_langu
         ERROR = lv_error
         FIRST_PRINT = lv_first_print
         LAST_PRINT = lv_last_print
         FORMULAR = lv_formular
         MEDIUM = lv_medium
         EXDEV = lv_exdev
         OPTIONS = lv_options
    IMPORTING
         RESULT = lv_result
    TABLES
         VARDAT_TAB = lt_vardat_tab
    EXCEPTIONS
        FORM = 1
        DEVICE = 2
        OPTIONS = 3
        CANCELED = 4
        INVALID_FAXNR = 5
        MORE_BATCHPARM = 6
. " RH_FORM_OUTPUT




ABAP code using 7.40 inline data declarations to call FM RH_FORM_OUTPUT

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single DIALOG FROM PP0V INTO @DATA(ld_dialog).
DATA(ld_dialog) = ' '.
 
 
 
"SELECT single KRS1_LANGU FROM PKMIT INTO @DATA(ld_langu).
 
 
"SELECT single ERROR FROM PP0V INTO @DATA(ld_error).
 
 
 
"SELECT single OUT_FIRST FROM PP0V INTO @DATA(ld_first_print).
DATA(ld_first_print) = 'X'.
 
"SELECT single OUT_LAST FROM PP0V INTO @DATA(ld_last_print).
DATA(ld_last_print) = 'X'.
 
 
"SELECT single TDFORM FROM THEAD INTO @DATA(ld_formular).
 
 
"SELECT single DEVICE FROM PKMIT INTO @DATA(ld_medium).
 
"SELECT single DEVICE FROM PKMIT INTO @DATA(ld_exdev).
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!