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

Another error message

Former Member
0 Likes
685

Hello, here is another compile-time error that I can not clear:

SPLIT: ORI_DATA

AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

INTO:

WA_DATA_DETAIL-PERNR

WA_DATA_DETAIL-C_TEXT,

TABLE IT_DATA_DETAIL.

And the error message is:

"AT ... INTO" expected after "TABLE".

Anyone knows where the problem is?

Thanks a lot!

Regards,

Anyi

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
651

Its got to be one or the other. Do you want to split the values into a table or individual fields.

Into a table.



SPLIT ORI_DATA AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
     INTO WA_DATA_DETAIL-PERNR WA_DATA_DETAIL-C_TEXT.


Into individual fields.




SPLIT ORI_DATA AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
     INTO table IT_DATA_DETAIL.
 

Regards,

Rich Heilman

5 REPLIES 5
Read only

LucianoBentiveg
Active Contributor
0 Likes
651

You can specify both, tables and single fiels in into addition.

Use INTO TABLE only and add WA_DATA_DETAIL-PERNR WA_DATA_DETAIL-C_TEXT to internal table field's list, or put detail of table, example:

INTO

WA_DATA_DETAIL-PERNR

WA_DATA_DETAIL-C_TEXT

IT_DATA_DETAIL-FIELD1

IT_DATA_DETAIL-FIELD2

IT_DATA_DETAIL-FIELD3

Regards.

Read only

Former Member
0 Likes
651

hi Zhu,

Modify it in this way

i.e,

<b><b>SPLIT ORI_DATA

AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

INTO WA_DATA_DETAIL-PERNR WA_DATA_DETAIL-C_TEXT.</b>

Read only

0 Likes
651

and the second way using table is

SPLIT ORI_DATA

AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

INTO TABLE IT_DATA_DETAIL.

Regards,

Santosh

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
652

Its got to be one or the other. Do you want to split the values into a table or individual fields.

Into a table.



SPLIT ORI_DATA AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
     INTO WA_DATA_DETAIL-PERNR WA_DATA_DETAIL-C_TEXT.


Into individual fields.




SPLIT ORI_DATA AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
     INTO table IT_DATA_DETAIL.
 

Regards,

Rich Heilman

Read only

Former Member
0 Likes
651

Hi Anyi,

The problem is with <b>:</b>after INTO clause. Just remove this and check once, it will definitely work.

Write as follows.

<b>SPLIT ORI_DATA

AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

INTO

WA_DATA_DETAIL-PERNR

WA_DATA_DETAIL-C_TEXT.</b>

If your intention is MOVE ori_data into table then use the following statement.

LOOP AT ORT_DATA.

<b>SPILT ORI_DATA AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

INTO TABLE IT_DATA_DETAIL.</b>

ENDLOOP.

To know more about SPILT, Just view the link http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/split.htm

Thanks,

Vinay