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

Char data into internal table.

Former Member
0 Likes
929

Hi all,

I will get data from the FTP (.TXT file) through FTP_SERVER_TO_R3.

in chardata with separater Tab delimited.

here i took one field symbol and assigning the data into internal table.

till here every thing is ok.

My problem is one data type is 13 char, if that field is more than 13 char in the file

it is giving DUMP. (DUMP is OVERFLOW Field 999976767878.22)

TYPES : BEGIN OF X_STRING,

LINE(150) TYPE STRING,

END OF X_STRING.

data : IT_STRING TYPE STANDARD TABLE OF X_STRING,

WA_STRING TYPE X_STRING.

FIELD-SYMBOLS : <fs> TYPE ANY.

LOOP AT chardata INTO wa_chardata.

REFRESH it_string.

SPLIT wa_chardataline AT cl_abap_char_utilities=>horizontal_tab INTO TABLE it_string.

LOOP AT it_string INTO wa_string FROM 1 TO 29.

ASSIGN COMPONENT sy-tabix OF STRUCTURE wa_data TO <fs>.

<fs> = wa_string-field1.

UNASSIGN <fs>.

ENDLOOP.

APPEND wa_data TO it_data.

CLEAR wa_data.

ENDLOOP.

Please give me solution to over come this.

Regards,

Sri

1 ACCEPTED SOLUTION
Read only

anup_deshmukh4
Active Contributor
0 Likes
883

In Statement ASSIGN COMPONENT sy-tabix OF STRUCTURE wa_data TO <fs>.

insted of using SY-TABIX use the actual field name of the structre wa_data .

Use a RTTS Method to get all the fields of the structre WA_DATA and then loop at all the fields and then manuplate teh that which has been splitted...!

Hope it helps it will not cause any over flow..and ...( Try to condence the The splitted dat use condence addition while moveing the data to wa_data it will avoide the leading and trailing spaces.... )

Edited by: Anup Deshmukh on Jun 17, 2010 8:31 AM

5 REPLIES 5
Read only

Former Member
0 Likes
883

Hi,

You have increase your user define data type length. i think hope your problem will be solved

Thanks

Regards

I.Muthukumar.

Read only

anup_deshmukh4
Active Contributor
0 Likes
884

In Statement ASSIGN COMPONENT sy-tabix OF STRUCTURE wa_data TO <fs>.

insted of using SY-TABIX use the actual field name of the structre wa_data .

Use a RTTS Method to get all the fields of the structre WA_DATA and then loop at all the fields and then manuplate teh that which has been splitted...!

Hope it helps it will not cause any over flow..and ...( Try to condence the The splitted dat use condence addition while moveing the data to wa_data it will avoide the leading and trailing spaces.... )

Edited by: Anup Deshmukh on Jun 17, 2010 8:31 AM

Read only

0 Likes
883

Muthu i can do like this but i need to do it for more than 30 fields.

anup i didn't got what you explained, what is RTTS method.

i think you understood my problem.(My data type is 13 char when i assign through field-symbol more than 13 char

it is giving dump)

Regards,

sri

Read only

0 Likes
883

Just Serch For RTTS example on WIKI or SDN ...and you will create dynamically the Lenght you need...

Read only

Former Member
0 Likes
883

Hi,

Can u change the Field Symbol to type C and do the casting with Field Symbol.

Hope this might solve your Problem.

With Regards,

Sumodh.P