SAP Function Modules

EFG_LOAD_FORM SAP Function module







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

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


Pattern for FM EFG_LOAD_FORM - EFG LOAD FORM





CALL FUNCTION 'EFG_LOAD_FORM' "
  EXPORTING
    client =                    " efg_dte_srcclient  Source Client for Accessing Other Clients
*   form = 'SYSTEM'             " itcta-tdform  Form Name
*   language = SY-LANGU         " thead-tdspras  Language Key
    printer =                   " itcta-tdprinter  Spool: Device type name
  IMPORTING
    form_header =               " itcta         Form Attributes
    header =                    " thead         SAPscript: Text Header
    language =                  " thead-tdspras  Language Key
    result =                    " itcrs         STXD result of check
* TABLES
*   elements =                  " itcce
*   fonts =                     " itcfg
*   form_lines =                " tline
*   pages =                     " itctg
*   page_windows =              " itcth
*   paragraphs =                " itcdp
*   strings =                   " itcds
*   tabs =                      " itcdq
*   windows =                   " itctw
    .  "  EFG_LOAD_FORM

ABAP code example for Function Module EFG_LOAD_FORM





The ABAP code below is a full code listing to execute function module EFG_LOAD_FORM 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_form_header  TYPE ITCTA ,
ld_header  TYPE THEAD ,
ld_language  TYPE THEAD-TDSPRAS ,
ld_result  TYPE ITCRS ,
it_elements  TYPE STANDARD TABLE OF ITCCE,"TABLES PARAM
wa_elements  LIKE LINE OF it_elements ,
it_fonts  TYPE STANDARD TABLE OF ITCFG,"TABLES PARAM
wa_fonts  LIKE LINE OF it_fonts ,
it_form_lines  TYPE STANDARD TABLE OF TLINE,"TABLES PARAM
wa_form_lines  LIKE LINE OF it_form_lines ,
it_pages  TYPE STANDARD TABLE OF ITCTG,"TABLES PARAM
wa_pages  LIKE LINE OF it_pages ,
it_page_windows  TYPE STANDARD TABLE OF ITCTH,"TABLES PARAM
wa_page_windows  LIKE LINE OF it_page_windows ,
it_paragraphs  TYPE STANDARD TABLE OF ITCDP,"TABLES PARAM
wa_paragraphs  LIKE LINE OF it_paragraphs ,
it_strings  TYPE STANDARD TABLE OF ITCDS,"TABLES PARAM
wa_strings  LIKE LINE OF it_strings ,
it_tabs  TYPE STANDARD TABLE OF ITCDQ,"TABLES PARAM
wa_tabs  LIKE LINE OF it_tabs ,
it_windows  TYPE STANDARD TABLE OF ITCTW,"TABLES PARAM
wa_windows  LIKE LINE OF it_windows .

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

DATA(ld_form) = some text here

DATA(ld_language) = Check type of data required

DATA(ld_printer) = some text here

"populate fields of struture and append to itab
append wa_elements to it_elements.

"populate fields of struture and append to itab
append wa_fonts to it_fonts.

"populate fields of struture and append to itab
append wa_form_lines to it_form_lines.

"populate fields of struture and append to itab
append wa_pages to it_pages.

"populate fields of struture and append to itab
append wa_page_windows to it_page_windows.

"populate fields of struture and append to itab
append wa_paragraphs to it_paragraphs.

"populate fields of struture and append to itab
append wa_strings to it_strings.

"populate fields of struture and append to itab
append wa_tabs to it_tabs.

"populate fields of struture and append to itab
append wa_windows to it_windows. . CALL FUNCTION 'EFG_LOAD_FORM' EXPORTING client = ld_client * form = ld_form * language = ld_language printer = ld_printer IMPORTING form_header = ld_form_header header = ld_header language = ld_language result = ld_result * TABLES * elements = it_elements * fonts = it_fonts * form_lines = it_form_lines * pages = it_pages * page_windows = it_page_windows * paragraphs = it_paragraphs * strings = it_strings * tabs = it_tabs * windows = it_windows . " EFG_LOAD_FORM
IF SY-SUBRC EQ 0. "All OK 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_form_header  TYPE ITCTA ,
ld_client  TYPE EFG_DTE_SRCCLIENT ,
it_elements  TYPE STANDARD TABLE OF ITCCE ,
wa_elements  LIKE LINE OF it_elements,
ld_header  TYPE THEAD ,
ld_form  TYPE ITCTA-TDFORM ,
it_fonts  TYPE STANDARD TABLE OF ITCFG ,
wa_fonts  LIKE LINE OF it_fonts,
ld_language  TYPE THEAD-TDSPRAS ,
ld_language  TYPE THEAD-TDSPRAS ,
it_form_lines  TYPE STANDARD TABLE OF TLINE ,
wa_form_lines  LIKE LINE OF it_form_lines,
ld_result  TYPE ITCRS ,
ld_printer  TYPE ITCTA-TDPRINTER ,
it_pages  TYPE STANDARD TABLE OF ITCTG ,
wa_pages  LIKE LINE OF it_pages,
it_page_windows  TYPE STANDARD TABLE OF ITCTH ,
wa_page_windows  LIKE LINE OF it_page_windows,
it_paragraphs  TYPE STANDARD TABLE OF ITCDP ,
wa_paragraphs  LIKE LINE OF it_paragraphs,
it_strings  TYPE STANDARD TABLE OF ITCDS ,
wa_strings  LIKE LINE OF it_strings,
it_tabs  TYPE STANDARD TABLE OF ITCDQ ,
wa_tabs  LIKE LINE OF it_tabs,
it_windows  TYPE STANDARD TABLE OF ITCTW ,
wa_windows  LIKE LINE OF it_windows.

ld_client = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_elements to it_elements.

ld_form = some text here

"populate fields of struture and append to itab
append wa_fonts to it_fonts.

ld_language = Check type of data required

"populate fields of struture and append to itab
append wa_form_lines to it_form_lines.

ld_printer = some text here

"populate fields of struture and append to itab
append wa_pages to it_pages.

"populate fields of struture and append to itab
append wa_page_windows to it_page_windows.

"populate fields of struture and append to itab
append wa_paragraphs to it_paragraphs.

"populate fields of struture and append to itab
append wa_strings to it_strings.

"populate fields of struture and append to itab
append wa_tabs to it_tabs.

"populate fields of struture and append to itab
append wa_windows to it_windows.

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