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

Regarding Excel file Upload

Former Member
0 Likes
854

hi guys,

i got an Excel file to upload which consists of price details which should be uploaded to EINE-NETPR field. and the price details are like this for example:

$1.20 , $230.00 and $ 1,200

so when uploading $1,200 it says it could not recognize it as a number.

Can any one help me how to resolve this problem if possible please send me a piece of code.

Thank you

Pavan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
832

HI Pavan,

Declare the amount field in the internal table as character type of sufficient length.

Later, you can separate the $ from the number.

Regards,

Ravi

HI Pavan,

Declare the amount field in the internal table as character type of sufficient length.

Later, you can separate the $ from the number.

Regards,

Ravi

6 REPLIES 6
Read only

Former Member
0 Likes
833

HI Pavan,

Declare the amount field in the internal table as character type of sufficient length.

Later, you can separate the $ from the number.

Regards,

Ravi

Read only

Former Member
0 Likes
832

hi Pavan,

I guess it will not accept the $ symbol , remove that and try out

[code]data : v_num(25).

loop at itab into wa_itab.

move wa_itab-amount to v_num.

shift v_num left deleting leading '$'.

move v_num to wa_itab-amount.

modify itab from wa_itab.

clear v_num.

endloop.[/code]

Message was edited by:

Chandrasekhar Jagarlamudi

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
832

Hi

You have to declare the amount fields as character with sufficient length.

later you have to handle $ and number seperately while uploading.

Regards,

kumar

Read only

Former Member
0 Likes
832

Hello Pavan,

Before updating ur Eine-netpr field get all the data of ue EXCEL into a itab and remove $ from the field using CA operator and then update it.

Award points if necessary.

Regards,

Deepu.K

Read only

Former Member
0 Likes
832

data : text(15) type c value '$1234.59'.

replace '$' with space into text.

shift text left deleting leading space.

regards

shiba dutta

Read only

Former Member
0 Likes
832

hi guys,

Thanks for your answers, but i also wanted to know whether it recognises

, (comma) as numeric field because i tried removing $ from the number and it still says

$1,234 as number. - u can see comma in this number.

can you please help me how to remove comma in this number.

thanks

pavan