SAP STRN_WRITE_LANGUAGE_DATA Function Module for Write Language Export to File System









STRN_WRITE_LANGUAGE_DATA is a standard strn write language data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Write Language Export to File System processing and below is the pattern details for this FM, 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 strn write language data FM, simply by entering the name STRN_WRITE_LANGUAGE_DATA into the relevant SAP transaction such as SE37 or SE38.

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



Function STRN_WRITE_LANGUAGE_DATA 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 'STRN_WRITE_LANGUAGE_DATA'"Write Language Export to File System
EXPORTING
C_FLAG = "Output compressed / not compressed
X_FLAG = "Standard output / with exchange
EXLEN = "
OPATH = "Output file
OXPATH = "Output file for exchange

TABLES
HEADER = "Title (length 100)
OUT128 = "Output area 1 (length 128)
OUT256 = "Output area 2 (length 256)
OUT512 = "Output area 3 (length 512)
OUT8192 = "Output area 6 (length 8192)

EXCEPTIONS
COMPRESS_ERROR = 1 INVALID_EXPORTLENGTH = 2 NO_OUTPATH = 3 NO_OUTPATH_EXCHANGE = 4 TABLE_NO_ENTRY = 5
.



IMPORTING Parameters details for STRN_WRITE_LANGUAGE_DATA

C_FLAG - Output compressed / not compressed

Data type: LANGTABT-CONFLAG
Optional: No
Call by Reference: No ( called with pass by value option)

X_FLAG - Standard output / with exchange

Data type: LANGTABT-CONFLAG
Optional: No
Call by Reference: No ( called with pass by value option)

EXLEN -

Data type: LANGIMP-OUTLEN
Optional: No
Call by Reference: No ( called with pass by value option)

OPATH - Output file

Data type: LTRAN-PATH02
Optional: No
Call by Reference: No ( called with pass by value option)

OXPATH - Output file for exchange

Data type: LTRAN-PATH02
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for STRN_WRITE_LANGUAGE_DATA

HEADER - Title (length 100)

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

OUT128 - Output area 1 (length 128)

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

OUT256 - Output area 2 (length 256)

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

OUT512 - Output area 3 (length 512)

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

OUT8192 - Output area 6 (length 8192)

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

EXCEPTIONS details

COMPRESS_ERROR - Error during compression

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

INVALID_EXPORTLENGTH - Length of export data invalid

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

NO_OUTPATH - Output path missing

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

NO_OUTPATH_EXCHANGE - Output path / exchange missing

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

TABLE_NO_ENTRY - Output table is empty

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

Copy and paste ABAP code example for STRN_WRITE_LANGUAGE_DATA 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_c_flag  TYPE LANGTABT-CONFLAG, "   
lt_header  TYPE STANDARD TABLE OF LANGDESC, "   
lv_compress_error  TYPE LANGDESC, "   
lt_out128  TYPE STANDARD TABLE OF LANG128, "   
lv_x_flag  TYPE LANGTABT-CONFLAG, "   
lv_invalid_exportlength  TYPE LANGTABT, "   
lv_exlen  TYPE LANGIMP-OUTLEN, "   
lt_out256  TYPE STANDARD TABLE OF LANG256, "   
lv_no_outpath  TYPE LANG256, "   
lv_opath  TYPE LTRAN-PATH02, "   
lt_out512  TYPE STANDARD TABLE OF LANG512, "   
lv_no_outpath_exchange  TYPE LANG512, "   
lv_oxpath  TYPE LTRAN-PATH02, "   
lt_out8192  TYPE STANDARD TABLE OF LANG8192, "   
lv_table_no_entry  TYPE LANG8192. "   

  CALL FUNCTION 'STRN_WRITE_LANGUAGE_DATA'  "Write Language Export to File System
    EXPORTING
         C_FLAG = lv_c_flag
         X_FLAG = lv_x_flag
         EXLEN = lv_exlen
         OPATH = lv_opath
         OXPATH = lv_oxpath
    TABLES
         HEADER = lt_header
         OUT128 = lt_out128
         OUT256 = lt_out256
         OUT512 = lt_out512
         OUT8192 = lt_out8192
    EXCEPTIONS
        COMPRESS_ERROR = 1
        INVALID_EXPORTLENGTH = 2
        NO_OUTPATH = 3
        NO_OUTPATH_EXCHANGE = 4
        TABLE_NO_ENTRY = 5
. " STRN_WRITE_LANGUAGE_DATA




ABAP code using 7.40 inline data declarations to call FM STRN_WRITE_LANGUAGE_DATA

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 CONFLAG FROM LANGTABT INTO @DATA(ld_c_flag).
 
 
 
 
"SELECT single CONFLAG FROM LANGTABT INTO @DATA(ld_x_flag).
 
 
"SELECT single OUTLEN FROM LANGIMP INTO @DATA(ld_exlen).
 
 
 
"SELECT single PATH02 FROM LTRAN INTO @DATA(ld_opath).
 
 
 
"SELECT single PATH02 FROM LTRAN INTO @DATA(ld_oxpath).
 
 
 


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!