09-23-2010 8:40 PM
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
09-26-2010 8:59 PM
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
09-26-2010 9:35 PM
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
09-27-2010 1:29 PM
Jeff,
please have a look at the Development Guide:
Requirements of ABAP Programs in Unicode Systems
which can be found here:
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