SAP USP_XML_FILE_CREATE Function Module for









USP_XML_FILE_CREATE is a standard usp xml file create 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 usp xml file create FM, simply by entering the name USP_XML_FILE_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function USP_XML_FILE_CREATE 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 'USP_XML_FILE_CREATE'"
EXPORTING
I_TABNAME = "
* I_TXT_TABNAME = ' ' "
IT_FIELDS = "
* I_FILTERNAME = ' ' "
* I_FILTEROPTION = 'EQ' "
* I_FILTERVALUE = 'X' "

IMPORTING
E_XML_STRING = "
E_XML_XSTRING = "
ET_XML = "
E_SIZE = "

EXCEPTIONS
CREATE_TABLE_ERROR = 1 CREATE_TXT_TABLE_ERROR = 2 TXT_NAMETAB_ERROR = 3 DOM_ERROR = 4 RENDERER_ERROR = 5
.



IMPORTING Parameters details for USP_XML_FILE_CREATE

I_TABNAME -

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

I_TXT_TABNAME -

Data type: TABNAME
Default: SPACE
Optional: Yes
Call by Reference: Yes

IT_FIELDS -

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

I_FILTERNAME -

Data type: FIELDNAME
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_FILTEROPTION -

Data type: USS_OPERATOR
Default: 'EQ'
Optional: Yes
Call by Reference: Yes

I_FILTERVALUE -

Data type: ANY
Default: 'X'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for USP_XML_FILE_CREATE

E_XML_STRING -

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

E_XML_XSTRING -

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

ET_XML -

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

E_SIZE -

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

EXCEPTIONS details

CREATE_TABLE_ERROR -

Data type:
Optional: No
Call by Reference: Yes

CREATE_TXT_TABLE_ERROR -

Data type:
Optional: No
Call by Reference: Yes

TXT_NAMETAB_ERROR -

Data type:
Optional: No
Call by Reference: Yes

DOM_ERROR -

Data type:
Optional: No
Call by Reference: Yes

RENDERER_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for USP_XML_FILE_CREATE 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_i_tabname  TYPE TABNAME, "   
lv_e_xml_string  TYPE STRING, "   
lv_create_table_error  TYPE STRING, "   
lv_e_xml_xstring  TYPE XSTRING, "   
lv_i_txt_tabname  TYPE TABNAME, "   SPACE
lv_create_txt_table_error  TYPE TABNAME, "   
lv_et_xml  TYPE TABLE, "   
lv_it_fields  TYPE USP_T_FIELDS_SELECTION, "   
lv_txt_nametab_error  TYPE USP_T_FIELDS_SELECTION, "   
lv_e_size  TYPE I, "   
lv_dom_error  TYPE I, "   
lv_i_filtername  TYPE FIELDNAME, "   SPACE
lv_i_filteroption  TYPE USS_OPERATOR, "   'EQ'
lv_renderer_error  TYPE USS_OPERATOR, "   
lv_i_filtervalue  TYPE ANY. "   'X'

  CALL FUNCTION 'USP_XML_FILE_CREATE'  "
    EXPORTING
         I_TABNAME = lv_i_tabname
         I_TXT_TABNAME = lv_i_txt_tabname
         IT_FIELDS = lv_it_fields
         I_FILTERNAME = lv_i_filtername
         I_FILTEROPTION = lv_i_filteroption
         I_FILTERVALUE = lv_i_filtervalue
    IMPORTING
         E_XML_STRING = lv_e_xml_string
         E_XML_XSTRING = lv_e_xml_xstring
         ET_XML = lv_et_xml
         E_SIZE = lv_e_size
    EXCEPTIONS
        CREATE_TABLE_ERROR = 1
        CREATE_TXT_TABLE_ERROR = 2
        TXT_NAMETAB_ERROR = 3
        DOM_ERROR = 4
        RENDERER_ERROR = 5
. " USP_XML_FILE_CREATE




ABAP code using 7.40 inline data declarations to call FM USP_XML_FILE_CREATE

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.

 
 
 
 
DATA(ld_i_txt_tabname) = ' '.
 
 
 
 
 
 
 
DATA(ld_i_filtername) = ' '.
 
DATA(ld_i_filteroption) = 'EQ'.
 
 
DATA(ld_i_filtervalue) = 'X'.
 


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!