‎2010 Jun 17 6:38 AM
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
‎2010 Jun 17 7:29 AM
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
‎2010 Jun 17 7:19 AM
Hi,
You have increase your user define data type length. i think hope your problem will be solved
Thanks
Regards
I.Muthukumar.
‎2010 Jun 17 7:29 AM
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
‎2010 Jun 17 7:44 AM
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
‎2010 Jun 17 8:15 AM
Just Serch For RTTS example on WIKI or SDN ...and you will create dynamically the Lenght you need...
‎2010 Jun 17 8:11 AM
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