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

problem in transfer statement.

Former Member
0 Likes
1,038

Hi folks,

I want to place the file in the application server using open dataset.

My final output internal table gt_output fields are

value, kndnr, perio, skunumber,perio.

i used the statement like

data: gv_string(120) type c.

gv_string = p_file.

open dataset p_file for output in text mode encoding default.

loop at gt_output into wa_output.

transfer gv_string to p_file.

endloop.

      • In the final internal table, the amount field is the currency data type.

If i executed this one i got the problem is wa_output-amount must be a char type data object(C, N, D or String).

Can u plz give me the suggestion ASAP.

regards

Nag

8 REPLIES 8
Read only

Former Member
0 Likes
948

Hemam,

Change your amount field as char with requied length in internal table.

Don't forget to reward if useful..

Read only

0 Likes
948

But the amount field can be created using the Domain of some other fields. Means we have to place the values of VRPRS,vvcfg,vvdcm,vvpr1,vvpr2. These all the fields are currency data type.

I created the amount field using these fied domainname. Means all the fields(VRPRS,vvcfg,vvdcm,vvpr1,vvpr2) having the same domain.

Read only

0 Likes
948

hi Hemam,

After you fetch the value assign the amount field to another field of type C, or N.

thanks,

Navneeth.K

Read only

Former Member
0 Likes
948

Declare the fields in internal table type char.

Read only

Former Member
0 Likes
948

hi hemam,

if it is not working properly, u can try to download it to a file in the presentation server using ws_download. After that using CG3Z t/c u can upload the file to application server.

It might not b a solution, but a suggestion to u.

Regards....

Arun.

Reward points if useful.

Read only

Former Member
0 Likes
948

Hi Hemam,

In the Unicode versions above 4.7 u cannot have any other data type than character in transfer statement and also in any of the string operation stmnts like (split, concatenate, replace). what you have to do is convert the amount field into may be 'N' or 'C' type.

thanks,

Navneeth.K

Message was edited by:

Navneeth Bothra

Read only

Former Member
0 Likes
948

hi, heman

it's easy to resolve this problem

as usual we de fined the variable V1 type as char

and have the same lenght with the work area you metion.

just move the workare to V1.

and transfer V1 that will be ok

regards

Read only

0 Likes
948

Hi Hemam,

I faced similar kind of problem long time back. the solution is quiet simple.

the currency field can be formatted by.

write wa_output-amount to gv_amount currency 'AUS' ROUND 3 DECIMALS 1.

Regards,