cancel
Showing results for 
Search instead for 
Did you mean: 

Upload dynpro question regarding splitting the data

Former Member
0 Kudos

my code is as follows

l_s_table type string_table

wa_data like bbp_pd_ctr_header_ic

convt = cl_abap_conv_in_ce->create(input= data).

convt=read(importing data = string_data)

split string_data at cl_abap_char_utilities=>cr_lf into table l_s_table

Loop at l_s_table assigning <work area>

wa_data- field name .. etc

end loop.

I am getting an error because one of the fields in the original structure that i am passing to that i am splitting to is decimal and it saids i hvae to convert it to a char field.

So how do i do that before i split it up?

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

read into Xstring and convert the xstring to string.

DATA: LV_XCONT TYPE XSTRING.

LR_CONV = CL_ABAP_CONV_IN_CE=>CREATE( ENCODING = 'UTF-8' INPUT = data ).

LR_CONV->READ( IMPORTING DATA = LV_xCONT ).

CALL FUNCTION 'CRM_IC_XML_XSTRING2STRING'

EXPORTING

inxstring = lV_xcont

IMPORTING

outstring = lv_cont.

SPLIT LV_CONT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE l_s_table

loop .....

Abhi

Answers (0)