SAP IDOC_SEGMENT_GENERATE_HTML Function Module for
IDOC_SEGMENT_GENERATE_HTML is a standard idoc segment 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 segment generate html FM, simply by entering the name IDOC_SEGMENT_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_SEGMENT_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_SEGMENT_GENERATE_HTML'".
EXPORTING
SEGMENT = "Segment Type
* RELEASE = SY-SAPRL "SAP Release
* APPLREL = "Application Release of IDoc Segments in Documentation Tools
* VERSION = '3' "Version of IDoc record types
* BASISURL = "
IMPORTING
TAB_FRAME = "
TAB_INDEX = "
TAB_DOCU = "
HTMLEXT = "
EXCEPTIONS
SEGMENT_UNKNOWN = 1 SEGMENT_STRUCTURE_UNKNOWN = 2 SEGMENT_NOT_IN_RELEASE = 3 DOWNLOAD_FAILED = 4
IMPORTING Parameters details for IDOC_SEGMENT_GENERATE_HTML
SEGMENT - Segment Type
Data type: EDI_IAPI02-SEGTYPOptional: No
Call by Reference: No ( called with pass by value option)
RELEASE - SAP Release
Data type: SY-SAPRLDefault: 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: EDIDOCUARLOptional: Yes
Call by Reference: No ( called with pass by value option)
VERSION - Version of IDoc record types
Data type: EDI_VERREC-VERSIONDefault: '3'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BASISURL -
Data type: CHAR70Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for IDOC_SEGMENT_GENERATE_HTML
TAB_FRAME -
Data type: SEDIDOCULINEOptional: No
Call by Reference: Yes
TAB_INDEX -
Data type: SEDIDOCULINEOptional: No
Call by Reference: Yes
TAB_DOCU -
Data type: SEDIDOCULINEOptional: No
Call by Reference: Yes
HTMLEXT -
Data type: CHAR5Optional: No
Call by Reference: Yes
EXCEPTIONS details
SEGMENT_UNKNOWN -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SEGMENT_STRUCTURE_UNKNOWN -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SEGMENT_NOT_IN_RELEASE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DOWNLOAD_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for IDOC_SEGMENT_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_segment | TYPE EDI_IAPI02-SEGTYP, " | |||
| lv_tab_frame | TYPE SEDIDOCULINE, " | |||
| lv_segment_unknown | TYPE SEDIDOCULINE, " | |||
| lv_release | TYPE SY-SAPRL, " SY-SAPRL | |||
| lv_tab_index | TYPE SEDIDOCULINE, " | |||
| lv_segment_structure_unknown | TYPE SEDIDOCULINE, " | |||
| lv_applrel | TYPE EDIDOCUARL, " | |||
| lv_tab_docu | TYPE SEDIDOCULINE, " | |||
| lv_segment_not_in_release | TYPE SEDIDOCULINE, " | |||
| lv_htmlext | TYPE CHAR5, " | |||
| lv_version | TYPE EDI_VERREC-VERSION, " '3' | |||
| lv_download_failed | TYPE EDI_VERREC, " | |||
| lv_basisurl | TYPE CHAR70. " |
|   CALL FUNCTION 'IDOC_SEGMENT_GENERATE_HTML' " |
| EXPORTING | ||
| SEGMENT | = lv_segment | |
| RELEASE | = lv_release | |
| APPLREL | = lv_applrel | |
| VERSION | = lv_version | |
| BASISURL | = lv_basisurl | |
| IMPORTING | ||
| TAB_FRAME | = lv_tab_frame | |
| TAB_INDEX | = lv_tab_index | |
| TAB_DOCU | = lv_tab_docu | |
| HTMLEXT | = lv_htmlext | |
| EXCEPTIONS | ||
| SEGMENT_UNKNOWN = 1 | ||
| SEGMENT_STRUCTURE_UNKNOWN = 2 | ||
| SEGMENT_NOT_IN_RELEASE = 3 | ||
| DOWNLOAD_FAILED = 4 | ||
| . " IDOC_SEGMENT_GENERATE_HTML | ||
ABAP code using 7.40 inline data declarations to call FM IDOC_SEGMENT_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 SEGTYP FROM EDI_IAPI02 INTO @DATA(ld_segment). | ||||
| "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