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

Issue with open dataset

Former Member
0 Likes
775

Hello Experts,

I have CSV file in application server and one program will run daily basis to pick the file and read the content using open dataset and posting the transaction FB01.

Below the content I could see in Application server and I am using R/3 4.7.

240,17015,27436,143601,2436405,836002A,21.38,U04066,,DunnXX Feb 17 - Feb 22,20#

240,17015,37436,143601,2436405,837203A,36.00,U04066,,DunnXX Feb 17 - Feb 22,20#

240,17015,47436,143601,2436405,836003A,237.64,U04066,,DunnXX Feb 17 - Feb 22,20#

When I post into the transaction FB01, and the reference column 20# also coming but it it should be 20.

My question is when I open into notepad file the '#' not coming but when I debug in program the value 20 and '#' also coming. I tried to replace and find also but not working.

Can you please anyone help me to resolve.

Regards,

Vadamalai A

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
745

Hi Vadamalai,

     when you do the split operation for identifying next line.. use

cl_abap_char_utilities=>cr_lf.

SPLIT lv_filestring AT cl_abap_char_utilities=>cr_lf INTO TABLE lt_filedata.

Thanks & Regards,

Tashi

Hello Experts,

I have CSV file in application server and one program will run daily basis to pick the file and read the content using open dataset and posting the transaction FB01.

Below the content I could see in Application server and I am using R/3 4.7.

240,17015,27436,143601,2436405,836002A,21.38,U04066,,DunnXX Feb 17 - Feb 22,20#

240,17015,37436,143601,2436405,837203A,36.00,U04066,,DunnXX Feb 17 - Feb 22,20#

240,17015,47436,143601,2436405,836003A,237.64,U04066,,DunnXX Feb 17 - Feb 22,20#

When I post into the transaction FB01, and the reference column 20# also coming but it it should be 20.

My question is when I open into notepad file the '#' not coming but when I debug in program the value 20 and '#' also coming. I tried to replace and find also but not working.

Can you please anyone help me to resolve.

Regards,

Vadamalai A

4 REPLIES 4
Read only

Former Member
0 Likes
745

That '#' is the special character which is 'Enter' Key in notepad.

Sap also reads that character as 'Enter'

Read only

0 Likes
745

Yes,

I dont want to post reference along with #. I couldnt replace also.

How to address this.

Regards,

Vadamalai A.

Read only

Former Member
0 Likes
746

Hi Vadamalai,

     when you do the split operation for identifying next line.. use

cl_abap_char_utilities=>cr_lf.

SPLIT lv_filestring AT cl_abap_char_utilities=>cr_lf INTO TABLE lt_filedata.

Thanks & Regards,

Tashi

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
745

Hello Vadamalai,

Please go through the below link and it will resolve your issue.