2012 Dec 06 7:16 AM
Hello experts,
I read the different discussions regarding the open data set issue. I tried the different solutions posted by experts.
I am unable to solve my issue.
Currently I am trying to load the notes in to an activity in CRM, and the notes contains English and Chinese mix. I tried loading with language En, Zh etc and used
Encoding non-unicode,ignoring conversion errors, UTF-8, binary mode, codepage cp etc.
The record is read to the string, but when I am using a split statement to populate the Object ID and note in to different fields, the last character of object ID is getting truncated.
ie 0000004533 becomes 000000453
This error is not there for the code, when I was using Gui-upload, but I want to run the program in background now, where gui-upload is not working.
Please suggest a solution for this issue.
2013 Jul 29 1:31 PM
Hi , Solved the issue myself using the below logic.
OPEN DATASET gv_dir FOR INPUT IN TEXT MODE "IGNORING CONVERSION ERRORS
ENCODING UTF-8.
IF sy-subrc NE 0.
MESSAGE 'File not found' TYPE 'E'.
EXIT.
ENDIF.
lv_go = 'X'.
gv_count = 0.
DATA:lv_upload TYPE string,
lv_objectid TYPE char10,
lv_tmp_objectid TYPE char11,
lv_lang TYPE char2,
lv_note1 TYPE string,
lv_note2 TYPE string,
lv_crid TYPE char10.
WHILE lv_go EQ 'X'.
READ DATASET gv_dir INTO lv_input_record.
IF sy-subrc NE 0.
CLEAR lv_go.
CONTINUE.
ENDIF.
SPLIT lv_input_record AT c_tab1
INTO lv_objectid
lv_lang
lv_note1
lv_note2.
lv_tmp_objectid = lv_input_record+0(11).
lv_objectid = lv_tmp_objectid+1(10).
The object ID is first splitted in to a 11 char variable and then taken the part of string which contains the original object ID.
Hi , Solved the issue myself using the below logic.
OPEN DATASET gv_dir FOR INPUT IN TEXT MODE "IGNORING CONVERSION ERRORS
ENCODING UTF-8.
IF sy-subrc NE 0.
MESSAGE 'File not found' TYPE 'E'.
EXIT.
ENDIF.
lv_go = 'X'.
gv_count = 0.
DATA:lv_upload TYPE string,
lv_objectid TYPE char10,
lv_tmp_objectid TYPE char11,
lv_lang TYPE char2,
lv_note1 TYPE string,
lv_note2 TYPE string,
lv_crid TYPE char10.
WHILE lv_go EQ 'X'.
READ DATASET gv_dir INTO lv_input_record.
IF sy-subrc NE 0.
CLEAR lv_go.
CONTINUE.
ENDIF.
SPLIT lv_input_record AT c_tab1
INTO lv_objectid
lv_lang
lv_note1
lv_note2.
lv_tmp_objectid = lv_input_record+0(11).
lv_objectid = lv_tmp_objectid+1(10).
The object ID is first splitted in to a 11 char variable and then taken the part of string which contains the original object ID.
2012 Dec 07 7:17 AM
Hi Niveditha,
I had a similar issue. I had raised a message eith SAP. SAP looked at the file and gave me a code page. Once I maintained the correct code page in user settings, the problem got solved.
Regards
Felix
2012 Dec 07 8:15 AM
Hi Niveditha
Check my Wiki below link
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=317161540
that will solve your issue.
2012 Dec 13 10:11 AM
2013 Jul 29 1:31 PM
Hi , Solved the issue myself using the below logic.
OPEN DATASET gv_dir FOR INPUT IN TEXT MODE "IGNORING CONVERSION ERRORS
ENCODING UTF-8.
IF sy-subrc NE 0.
MESSAGE 'File not found' TYPE 'E'.
EXIT.
ENDIF.
lv_go = 'X'.
gv_count = 0.
DATA:lv_upload TYPE string,
lv_objectid TYPE char10,
lv_tmp_objectid TYPE char11,
lv_lang TYPE char2,
lv_note1 TYPE string,
lv_note2 TYPE string,
lv_crid TYPE char10.
WHILE lv_go EQ 'X'.
READ DATASET gv_dir INTO lv_input_record.
IF sy-subrc NE 0.
CLEAR lv_go.
CONTINUE.
ENDIF.
SPLIT lv_input_record AT c_tab1
INTO lv_objectid
lv_lang
lv_note1
lv_note2.
lv_tmp_objectid = lv_input_record+0(11).
lv_objectid = lv_tmp_objectid+1(10).
The object ID is first splitted in to a 11 char variable and then taken the part of string which contains the original object ID.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |