‎2010 Mar 23 5:25 AM
Hi All,
There is a text file which has special character at the end of every line.
I am uploading this text file into SAP using FM 'GUI_UPLOAD'.
Because of this special character, the data is not uploading into SAP properly.
Any pointers to resolve the above problem.
Thanks and Regards,
Sachin M M
‎2010 Mar 23 6:19 AM
Try to convert your XLS data to SAP.
Using below FM
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER = ''
I_TAB_RAW_DATA = IT_RAW " WORK TABLE
I_FILENAME = P_SOURCE
TABLES
I_TAB_CONVERTED_DATA = IT_DATATAB[] "ACTUAL DATA
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2.
IF SY-SUBRC EQ 0.
WRITE: 'ok'.
ENDIF.
Hope this helps.
Regards,
Neha Rai
‎2010 Mar 23 5:28 AM
before passing the internal table to GUI_UPLOAD..
please remove that spl character from Internal table...
using replace stmt...
‎2010 Mar 23 5:29 AM
Run a Check on the uploaded data (internal table) by looping through line by line (work area),
by using the statement -
IF <line> CN 'ABCDEFGH......1234567890'.
<discard line from being upload>
ENDIF.
Have you tried this approach already??
Regards
Dedeepya C
‎2010 Mar 23 6:19 AM
Try to convert your XLS data to SAP.
Using below FM
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER = ''
I_TAB_RAW_DATA = IT_RAW " WORK TABLE
I_FILENAME = P_SOURCE
TABLES
I_TAB_CONVERTED_DATA = IT_DATATAB[] "ACTUAL DATA
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2.
IF SY-SUBRC EQ 0.
WRITE: 'ok'.
ENDIF.
Hope this helps.
Regards,
Neha Rai
‎2010 Mar 23 6:22 AM
‎2010 Mar 23 6:29 AM
‎2010 Mar 23 6:38 AM
Hi Sachin,
Make sure you make has_field_seperator as 'X' if the text file is tab seperated. And did you declare a field for the special variable too in the upload internal table? If so what is the type of that field?
Vikranth
‎2010 Mar 23 6:24 AM
Hi,,
to read the special character upload the excel file using FM
ALSM_EXCEL_TO_INTERNAL_TABLE
this will uplaod the special char as well.
hope this will help you in resolving your query
thanks,
tanmaya
‎2010 Jul 14 6:10 AM