on 08-05-2009 11:12 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.