SAP SYLK_WRITE_FIELD Function Module for Writes a field intotable SYLK
SYLK_WRITE_FIELD is a standard sylk write field SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Writes a field intotable SYLK 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 sylk write field FM, simply by entering the name SYLK_WRITE_FIELD into the relevant SAP transaction such as SE37 or SE38.
Function Group: C0EX
Program Name: SAPLC0EX
Main Program: SAPLC0EX
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SYLK_WRITE_FIELD 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 'SYLK_WRITE_FIELD'"Writes a field intotable SYLK.
EXPORTING
* ALIGN = ' ' "Alignment
* COLOUR = ' ' "Color
FIELD = "The field to be transferred
* FMT = ' ' "Specification of a special format
* FRAME = ' ' "Frames
* NEW_LINE = ' ' "Line feed?
EXCEPTIONS
INCOMPATIBLE_FORMAT = 1 INVALID_ALIGNMENT = 2 INVALID_COLOUR = 3 INVALID_FORMAT = 4 INVALID_FRAME = 5 MAX_COLUMN_REACHED = 6 MAX_ROW_REACHED = 7
IMPORTING Parameters details for SYLK_WRITE_FIELD
ALIGN - Alignment
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
COLOUR - Color
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FIELD - The field to be transferred
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FMT - Specification of a special format
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FRAME - Frames
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NEW_LINE - Line feed?
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INCOMPATIBLE_FORMAT - Field type and format do not match
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_ALIGNMENT - Incorrect specification of alignment
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_COLOUR - Incorrect color specification
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_FORMAT - Incorrect format specification
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_FRAME - Incorrect border specification
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MAX_COLUMN_REACHED - Column counter cannot continue
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MAX_ROW_REACHED - Row counter cannot continue
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SYLK_WRITE_FIELD 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_align | TYPE STRING, " SPACE | |||
| lv_incompatible_format | TYPE STRING, " | |||
| lv_colour | TYPE STRING, " SPACE | |||
| lv_invalid_alignment | TYPE STRING, " | |||
| lv_field | TYPE STRING, " | |||
| lv_invalid_colour | TYPE STRING, " | |||
| lv_fmt | TYPE STRING, " SPACE | |||
| lv_invalid_format | TYPE STRING, " | |||
| lv_frame | TYPE STRING, " SPACE | |||
| lv_invalid_frame | TYPE STRING, " | |||
| lv_new_line | TYPE STRING, " SPACE | |||
| lv_max_column_reached | TYPE STRING, " | |||
| lv_max_row_reached | TYPE STRING. " |
|   CALL FUNCTION 'SYLK_WRITE_FIELD' "Writes a field intotable SYLK |
| EXPORTING | ||
| ALIGN | = lv_align | |
| COLOUR | = lv_colour | |
| FIELD | = lv_field | |
| FMT | = lv_fmt | |
| FRAME | = lv_frame | |
| NEW_LINE | = lv_new_line | |
| EXCEPTIONS | ||
| INCOMPATIBLE_FORMAT = 1 | ||
| INVALID_ALIGNMENT = 2 | ||
| INVALID_COLOUR = 3 | ||
| INVALID_FORMAT = 4 | ||
| INVALID_FRAME = 5 | ||
| MAX_COLUMN_REACHED = 6 | ||
| MAX_ROW_REACHED = 7 | ||
| . " SYLK_WRITE_FIELD | ||
ABAP code using 7.40 inline data declarations to call FM SYLK_WRITE_FIELD
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_align) | = ' '. | |||
| DATA(ld_colour) | = ' '. | |||
| DATA(ld_fmt) | = ' '. | |||
| DATA(ld_frame) | = ' '. | |||
| DATA(ld_new_line) | = ' '. | |||
Search for further information about these or an SAP related objects