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

Run Time Error while Transferring data to Application server

Former Member
0 Likes
975

Hello Abaper's,

I have generated a XML data using the FM : " SAP_CONVERT_TO_XML_FORMAT ".

While transferring the data to a File on Application Server using the statement

DATA : wa_xmltab TYPE truxs_xml_line,

it_xmltab TYPE truxs_xml_table.

OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc EQ 0.

LOOP AT it_xmltab INTO wa_xmltab.

TRANSFER wa_xmltab TO FNAME. <<<<<<<<<<<<<< Getting Error here

ENDLOOP.

ELSE.

MESSAGE e004(zmsg5) WITH 'File FNAME not opened'.

ENDIF.

CLOSE DATASET FNAME.

-


The Run Time Error i am Facing is

Short text

The current statement is only defined for character-type data objects.

Error analysis

For the statement

"TRANSFER f TO ..."

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

"f".

In this case. the operand "f" has the non-character-type "TRUXS_XML_LINE". The

current program is a Unicode program. In the Unicode context, the type

'X' or structures containing not only character-type components are

regarded as non-character-type.

Regards

jv

3 REPLIES 3
Read only

former_member226519
Active Contributor
0 Likes
514

TRUXS_XML_LINE is defined:


types : begin of truxs_xml_line,
            data(256) type x,
        end of truxs_xml_line.

you could open the dataset in binary mode or convert the XML_LINE into a CHAR_LINE

Read only

0 Likes
514

Hello Volker Binder ,

Thank you . it's now transferring the data to Application sercver. I forgot to try using Binay mode,

Thers is one more problem. There are 10 Records in that internal table that is being converted to XML format,

but the XML data is showing only first 4 records.... the XML data format for the remaining data is not seen.

Actual No. of Records in Internal table :

matnr matkl meins

-


0-BUY1 012 PC

0-BUY2 012 PC

1 EA

2 012 L

3 01 EA

12 EA

23 001 ST

24 015` EA

28 010 EA

29 015` AU

XML Format for the above 10 fields is :

---

<?xml version="1.0"?><TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">0-BUY1</MATNR><MATKL Datatype="C" Length="18">012</MATKL><MEINS Datatype="C" Length="6">PC

</MEINS>

</TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">0-BUY2</MATNR><MATKL Datatype="C" Length="18">012</MATKL><MEINS Datatype="C" Length="6">

PC </MEINS>

</TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">000000000000000001</MATNR><MEINS Datatype="C" Length="6">EA</MEINS>

</TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">000000000000000002</MATNR

This 4th record data in XML is also incomplete..

---

The above XML format is generated only for 4 records out of 10 Records.

Please let me know , how can i increase the Size / Memory of the Application server file to accomodate for the reamining Records

Regards

Jv

Read only

Former Member
0 Likes
514

Convert the XML_LINE structure to a CHAR type.