Application Development 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: 

Unicode and TRANSFER statement

Former Member
0 Kudos

I am having one heck of a time Transferring a file to Unix when the table contains fields of type Curr or Quan, in my case, both.

Transfer f to... generates the error:

only character-type data objects are supported at the argument position "f"

in this case, the operand "f" has the non character-type "u"

the fields are:

netwr LIKE vbrp-netwr, "Net Value

fkimg LIKE vbrp-fkimg, "Invoiced Qty

I have tried moving them to fields of type N, C and F and get errors except for F which writes in E notation.

How can I get this data to Unix in readable format? I read another thread here that didn't really solve the problem.

Any help is welcome as I am off to search the function library!

Thanks, Jeff

3 REPLIES 3

former_member214857
Contributor
0 Kudos

Hi Jeff

HAve you tried variable type P with delimited length and decimals.

DATA: netwr TYPE p DECIMALS 2.

And export this P format using TRANSFER statement.

Kind regards

Carlos Machado

Former Member
0 Kudos

Carlos,

I have tried P. What seems to work is to store the values in variables of type Curr and Quan then move them to Char items in the internal table. Will be testing this week. I will try P again though but am pretty sure I got the same error. Unicode seems to insist on Char types when Transferring to Unix.

Thanks, Jeff

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Jeff,

please have a look at the Development Guide:

Requirements of ABAP Programs in Unicode Systems

which can be found here:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b02d3594-ae48-2a10-83a7-89d369b70...

There you will find on page 19:

Begin of excerpt:

The OPEN DATASET command was completely revised In the file interface. At

least one of the additions IN TEXT MODE ENCODING, IN BINARY MODE, IN

LEGACY MODE, or IN LEGACY BINARY MODE must be defined in a Unicode Program.

In a Unicode System, you can only read and write files with READ DATASET and TRANSFER

if the file to be edited was first opened explicitly. A runtime error is triggered if

there is no OPEN statement for these statements.

If the file was opened in TEXT MODE, only character type fields, strings and

purely character-type structures are allowed for READ DATASET dsn INTO f

for f, and the type is only checked at runtime.

End of excerpt.

Therefore you have to convert the data to char-like types before transfering it.

Best regards,

Nils Buerckel

SAP AG