SAP Function Modules

G_RP_PROCESS_LAYOUT SAP Function module







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

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


Pattern for FM G_RP_PROCESS_LAYOUT - G RP PROCESS LAYOUT





CALL FUNCTION 'G_RP_PROCESS_LAYOUT' "
  EXPORTING
*   mode = 'S'                  " rwif_c1-param
    tabname =                   " ceformf-tabname  Library
    form =                      " ceformf-form  Report Name
*   layout =                    " t801x-sname   Standard Layout
  IMPORTING
    coltextpos =                " t800-coltp
    pagewidth =                 " t800-pagwd    Page Width
    topdown =                   " t800-tfrow
    leadcolwidth =              " t800-rtitw    Width of lead column
    sum_from =                  " t800-sum_from
    sum_to =                    " t800-sum_to
  TABLES
    printclass =                " ceprint
  EXCEPTIONS
    LAYOUT_NOT_FOUND = 1        "
    REPORT_NOT_FOUND = 2        "
    LIB_NOT_FOUND = 3           "
    INVALID_MODE = 4            "
    .  "  G_RP_PROCESS_LAYOUT

ABAP code example for Function Module G_RP_PROCESS_LAYOUT





The ABAP code below is a full code listing to execute function module G_RP_PROCESS_LAYOUT 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_coltextpos  TYPE T800-COLTP ,
ld_pagewidth  TYPE T800-PAGWD ,
ld_topdown  TYPE T800-TFROW ,
ld_leadcolwidth  TYPE T800-RTITW ,
ld_sum_from  TYPE T800-SUM_FROM ,
ld_sum_to  TYPE T800-SUM_TO ,
it_printclass  TYPE STANDARD TABLE OF CEPRINT,"TABLES PARAM
wa_printclass  LIKE LINE OF it_printclass .


DATA(ld_mode) = some text here

SELECT single TABNAME
FROM CEFORMF
INTO @DATA(ld_tabname).


SELECT single FORM
FROM CEFORMF
INTO @DATA(ld_form).


SELECT single SNAME
FROM T801X
INTO @DATA(ld_layout).


"populate fields of struture and append to itab
append wa_printclass to it_printclass. . CALL FUNCTION 'G_RP_PROCESS_LAYOUT' EXPORTING * mode = ld_mode tabname = ld_tabname form = ld_form * layout = ld_layout IMPORTING coltextpos = ld_coltextpos pagewidth = ld_pagewidth topdown = ld_topdown leadcolwidth = ld_leadcolwidth sum_from = ld_sum_from sum_to = ld_sum_to TABLES printclass = it_printclass EXCEPTIONS LAYOUT_NOT_FOUND = 1 REPORT_NOT_FOUND = 2 LIB_NOT_FOUND = 3 INVALID_MODE = 4 . " G_RP_PROCESS_LAYOUT
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 ELSEIF SY-SUBRC EQ 4. "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_coltextpos  TYPE T800-COLTP ,
ld_mode  TYPE RWIF_C1-PARAM ,
it_printclass  TYPE STANDARD TABLE OF CEPRINT ,
wa_printclass  LIKE LINE OF it_printclass,
ld_pagewidth  TYPE T800-PAGWD ,
ld_tabname  TYPE CEFORMF-TABNAME ,
ld_topdown  TYPE T800-TFROW ,
ld_form  TYPE CEFORMF-FORM ,
ld_leadcolwidth  TYPE T800-RTITW ,
ld_layout  TYPE T801X-SNAME ,
ld_sum_from  TYPE T800-SUM_FROM ,
ld_sum_to  TYPE T800-SUM_TO .


ld_mode = some text here

"populate fields of struture and append to itab
append wa_printclass to it_printclass.

SELECT single TABNAME
FROM CEFORMF
INTO ld_tabname.


SELECT single FORM
FROM CEFORMF
INTO ld_form.


SELECT single SNAME
FROM T801X
INTO ld_layout.

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