SAP IDOC_TYPE_GENERATE_HTML Function Module for









IDOC_TYPE_GENERATE_HTML is a standard idoc type generate html SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 idoc type generate html FM, simply by entering the name IDOC_TYPE_GENERATE_HTML into the relevant SAP transaction such as SE37 or SE38.

Function Group: EDID
Program Name: SAPLEDID
Main Program: SAPLEDID
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function IDOC_TYPE_GENERATE_HTML 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 'IDOC_TYPE_GENERATE_HTML'"
EXPORTING
STRUCT_TYPE = "
IDOCTYPE = "IDoc Type
* RELEASE = SY-SAPRL "SAP Release
* APPLREL = "Application Release of IDoc Segments in Documentation Tools
* VERSION = '3' "Version of IDoc record types
* BASISURL = "
* WITH_CONTROL_RECORD = "
* WITH_DATA_RECORD = "
* WITH_STATUS_RECORD = "

IMPORTING
TAB_FRAME = "
TAB_INDEX = "
TAB_DOCU = "
HTMLEXT = "

EXCEPTIONS
DEFINITION_READ_ERROR = 1 FORMAT_ERROR = 2
.



IMPORTING Parameters details for IDOC_TYPE_GENERATE_HTML

STRUCT_TYPE -

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

IDOCTYPE - IDoc Type

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

RELEASE - SAP Release

Data type: SY-SAPRL
Default: SY-SAPRL
Optional: Yes
Call by Reference: No ( called with pass by value option)

APPLREL - Application Release of IDoc Segments in Documentation Tools

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

VERSION - Version of IDoc record types

Data type: EDI_VERREC-VERSION
Default: '3'
Optional: Yes
Call by Reference: No ( called with pass by value option)

BASISURL -

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

WITH_CONTROL_RECORD -

Data type: LEDID_FLAG
Optional: Yes
Call by Reference: Yes

WITH_DATA_RECORD -

Data type: LEDID_FLAG
Optional: Yes
Call by Reference: Yes

WITH_STATUS_RECORD -

Data type: LEDID_FLAG
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for IDOC_TYPE_GENERATE_HTML

TAB_FRAME -

Data type: SEDIDOCULINE
Optional: No
Call by Reference: Yes

TAB_INDEX -

Data type: SEDIDOCULINE
Optional: No
Call by Reference: Yes

TAB_DOCU -

Data type: SEDIDOCULINE
Optional: No
Call by Reference: Yes

HTMLEXT -

Data type: CHAR5
Optional: No
Call by Reference: Yes

EXCEPTIONS details

DEFINITION_READ_ERROR -

Data type:
Optional: No
Call by Reference: Yes

FORMAT_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for IDOC_TYPE_GENERATE_HTML 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_tab_frame  TYPE SEDIDOCULINE, "   
lv_struct_type  TYPE LEDID_STRUCT_TYPE, "   
lv_definition_read_error  TYPE LEDID_STRUCT_TYPE, "   
lv_idoctype  TYPE LEDID_IDOCTYPE, "   
lv_tab_index  TYPE SEDIDOCULINE, "   
lv_format_error  TYPE SEDIDOCULINE, "   
lv_release  TYPE SY-SAPRL, "   SY-SAPRL
lv_tab_docu  TYPE SEDIDOCULINE, "   
lv_applrel  TYPE EDIDOCUARL, "   
lv_htmlext  TYPE CHAR5, "   
lv_version  TYPE EDI_VERREC-VERSION, "   '3'
lv_basisurl  TYPE CHAR70, "   
lv_with_control_record  TYPE LEDID_FLAG, "   
lv_with_data_record  TYPE LEDID_FLAG, "   
lv_with_status_record  TYPE LEDID_FLAG. "   

  CALL FUNCTION 'IDOC_TYPE_GENERATE_HTML'  "
    EXPORTING
         STRUCT_TYPE = lv_struct_type
         IDOCTYPE = lv_idoctype
         RELEASE = lv_release
         APPLREL = lv_applrel
         VERSION = lv_version
         BASISURL = lv_basisurl
         WITH_CONTROL_RECORD = lv_with_control_record
         WITH_DATA_RECORD = lv_with_data_record
         WITH_STATUS_RECORD = lv_with_status_record
    IMPORTING
         TAB_FRAME = lv_tab_frame
         TAB_INDEX = lv_tab_index
         TAB_DOCU = lv_tab_docu
         HTMLEXT = lv_htmlext
    EXCEPTIONS
        DEFINITION_READ_ERROR = 1
        FORMAT_ERROR = 2
. " IDOC_TYPE_GENERATE_HTML




ABAP code using 7.40 inline data declarations to call FM IDOC_TYPE_GENERATE_HTML

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 SAPRL FROM SY INTO @DATA(ld_release).
DATA(ld_release) = SY-SAPRL.
 
 
 
 
"SELECT single VERSION FROM EDI_VERREC INTO @DATA(ld_version).
DATA(ld_version) = '3'.
 
 
 
 
 


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!