Hi Frnds ,
In my scenario iam uploading CSV file trough file upload Ui elemenrt in sap webdynpro
FYI,
cotents in the file are
Plant | Sales Organization | Distribution Channel | color |
2000 | 1000 | 10 | red,yellow,green |
1000 | 1000 | 10 |
and i am using the below code to read the contends in the file
*data source is attribute the trough which i have binded my data to file uplod ui element
wd_context->get_attribute( EXPORTING name = `DATASOURCE` IMPORTING value = l_xstring ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = l_xstring
IMPORTING
out_string = l_string.
in debugging i found the data in the below format in i_string.
Plant,Sales Organization,Distribution Channel,color##2000,1000,10,"red,yellow,green"##1000,1000,10,##
my concern is if in case in debugging if i chnage the conted to
werks,Sales Organization,Distribution Channel,color##2000,1000,10,"red,yellow,green"##1000,1000,10,##
i have just chnaged plant to werks in debugging
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = l_string
IMPORTING
buffer = xstr.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'Dashboard.csv'
i_content = xstr
i_mime_type = 'TEXT/CSV'
i_in_new_window = abap_false
i_inplace = abap_false.
when i am dowloding it is showing output as
werks | Sales Organization | Distribution Channel | color##2000 | 1000 | 10 | red,yellow,green##1000 | 1000 | 10 | ## |
if i am not chnaging any thingh in debugging on the field l_string
then it is giving out as \
Plant | Sales Organization | Distribution Channel | color |
2000 | 1000 | 10 | red,yellow,green |
1000 | 1000 | 10 |
kindly let me know what was the reason
Is that we should not edit any thingh
Thanks,
Harish.