Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

csv file format problem

Former Member
0 Likes
471

prodorder;batchno ;text1 ; text2; text3;text4;text5;

"100001012;0008339492;487-07-G1;22;6,86;000081022G; "

"100001013;0008339493;487-07-G1;22;6,86;000081022E;1 "

This is my sample csv file.

i want to upload using bdc.

im splitting the internal table and uploading like this.

call function 'GUI_UPLOAD'

exporting

FILENAME = FILE

FILETYPE = 'ASC'

  • has_field_separator = ','

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

tables

DATA_TAB = ITAB

loop at ITAB.

split ITAB at ';' into ITAB1-AUFNR

ITAB1-CHARG

ITAB1-TEXT1

ITAB1-TEXT2

ITAB1-TEXT3

ITAB1-TEXT4

ITAB1-TEXT5.

append ITAB1.

endloop.

But finally im getting output as

"100001012 in ordernumber of co01 transaction.

it should display 100001012 in ordernumber field.

please suggest how we can rectify this problem.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
441

Hi Vijay,

I can sugest you one thing. Before splitting ITAB at " , " .

use REPLACE command to remove inverted code value ( " ) .

Eg Loop at Itab.

REPLCE ALL OCCURANCES OF " WITH SPACE ( Check syntax).

Hope this will solve your problem.

Regards

Sourabh

2 REPLIES 2
Read only

Former Member
0 Likes
442

Hi Vijay,

I can sugest you one thing. Before splitting ITAB at " , " .

use REPLACE command to remove inverted code value ( " ) .

Eg Loop at Itab.

REPLCE ALL OCCURANCES OF " WITH SPACE ( Check syntax).

Hope this will solve your problem.

Regards

Sourabh

Read only

0 Likes
441

Thanks a lot buddy.