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

when transfering data from PS to AS # symbol causing error

Former Member
0 Likes
3,469

hi all ,

i am getting error regaurding salesorder creation.

when i am transfering data from presentation to application server text file at the end of file in application server getting # symbol

this symbol was not going and making the error in sales order creation.

and here in this text file pipe symol is using as a seperator.

even though i am using REPLACE ALL OCCURENCES this error is not moving.

please give your valuable solution.

Best regaurds,

sainath kaja.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,848

Thank you  all,


That hash symbol is not moving even though done with different experiments suggested by

you all .

In my internal table added one dummy field and that field i didn't passed to

BAPI function module that's it.

now my object is  working fine.

thanks for u r valuable answers.

hi all ,

i am getting error regaurding salesorder creation.

when i am transfering data from presentation to application server text file at the end of file in application server getting # symbol

this symbol was not going and making the error in sales order creation.

and here in this text file pipe symol is using as a seperator.

even though i am using REPLACE ALL OCCURENCES this error is not moving.

please give your valuable solution.

Best regaurds,

sainath kaja.

15 REPLIES 15
Read only

Former Member
0 Likes
2,848

Hi Sainath,

Are you using 'ASC' or 'BIN' filetype in CG3Z?

Thanks,

Indrajit

Read only

0 Likes
2,848

BIN

Read only

0 Likes
2,848

Sainath,

Can you please try ASC format in CG3Z?

Indrajit

Read only

0 Likes
2,848

hi indrajith,

i did with that but complete data is not taking half of the data is missing , what ever the data in apllication server that is only passing to internal table remaing data is not passing .

can u suggest me how to increase the size of application server, with that i hope v can see the complete data.

best regards,

sainath kaja

Read only

0 Likes
2,848

Sainath,

Do not worry about what you are seeing in AL11, that may be due to editor length?

But when you are doing READ DATASET in program to read AS file, what is the length of the variable you are reading into?

Thanks,

Indrajit

Read only

Former Member
0 Likes
2,848

Sainath,

Try using the transfer format set to BINARY. I am guessing that should do take care of it.

Thanks,

Vikram.M

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
2,848

when i am transfering data from presentation to application server

And what do you use for that exactly?

Read only

0 Likes
2,848

CG3Z TRANSACTION

Read only

Ryan-Crosby
Active Contributor
0 Likes
2,848

Hi Sainath,

I would check to see if it is equal to the value of the character cl_abap_char_utilities=>newline.  We have seen this in some scenarios on our system before as it is the end of line terminator on Unix/Linux.  The application server does not have a way to display this control character so it will show a '#' in its place.  If that is the reason then you can key in using a replace all on that with an empty string and it should clear up your problem.

Regards,

Ryan Crosby

Read only

Former Member
0 Likes
2,848

Hi Sainath,

This can be prevented by saving the file in ‘ASC’ format. Save the file in App Server as ‘ASC’ (instead of BIN or RAW). This will solve your issue.


Please check the link:

New line ‘#’ character at the end of every line in SAP Application Server File |...


Regards,

Raju.

Read only

Former Member
0 Likes
2,848

If other solutions are not working , then you can try this

take string length after read dataset

and read only offset 0+(string length -1 ).

probably it works.

Read only

Jelena_Perfiljeva
Active Contributor
2,848

Our application server is on Linux. I took a simple text file and hit Enter at the end to create a blank line. When I used FTP or CG3Z with BIN option I saw the hash sign in AL11 when I hit Enter. After I used CG3Z with ASC option there was no hash but just blank space.

When in the program I used


OPEN DATASET ... FOR INPUT IN TEXT MODE ENCODING DEFAULT WITH SMART LINEFEED IGNORING CONVERSION ERRORS

then all 3 files look the same way and all 3 had a blank line, no hash sign was read.

In case this OPEN DATASET form doesn't work for you there is also a constant CL_ABAP_CHAR_UTILITIES=>CR_LF that may be used to eliminate the CR sign.

Read only

0 Likes
2,848

I second this.

Read only

Former Member
0 Likes
2,849

Thank you  all,


That hash symbol is not moving even though done with different experiments suggested by

you all .

In my internal table added one dummy field and that field i didn't passed to

BAPI function module that's it.

now my object is  working fine.

thanks for u r valuable answers.

Read only

0 Likes
2,848

addded one dummy field at last