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

Problem with split where ## in internal table records.

Former Member
0 Likes
873

Hi friends,

at the place of '##' i need to populate the records into internal table.

code.

loop at itab_temp into wa_temp.

*SPLIT wa_pdf AT '##' INTO TABLE ITAB.

if sy-subrc = 0.

append lines of itab to itab_final.

endif.

endloop

Thanks in advance.

7 REPLIES 7
Read only

Former Member
0 Likes
790

Hi Balaji,

Replace '#' with <b>CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB</b> in your code.

loop at itab_temp into wa_temp.

<b>SPLIT wa_pdf AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB INTO TABLE ITAB.</b>

if sy-subrc = 0.

append lines of itab to itab_final.

endif.

endloop.

I am sorry,As I didnt observe as it is '##', <b>Use

CL_ABAP_CHAR_UTILITIES=>CR_ instead of LFCL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB in the above code.</b>

'#' is represented as CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.

Thanks,

Vinay

Message was edited by: Vinaykumar G

Read only

vinod_gunaware2
Active Contributor
0 Likes
790

SPLIT T_FLAT AT <b>CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB</b>

<b>CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB</b> THIS REPRESENT #

REGARDS

VINOD

Read only

Former Member
0 Likes
790

Hi,


loop at itab_temp into wa_temp.
 SPLIT wa_pdf AT <b>CL_ABAP_CHAR_UTILITIES=>CR_LF</b> INTO TABLE ITAB

if sy-subrc = 0.
append lines of itab to itab_final.
endif.
endloop

If you want to check the above code just try this..

REPORT  ZTEST        .

write CL_ABAP_CHAR_UTILITIES=>CR_LF.

Regards

vijay

Read only

0 Likes
790

class CL_ABAP_CHAR_UTILITIES unknown . it is saying.

Read only

0 Likes
790

Hi,

that means you are on lower version. then you need to use Hex value.

Regards

vijay

Read only

0 Likes
790

Hi vijay,

what is needed to use for '##'

data : v_split(2) type x value '2323'.

loop at itab_temp into wa_temp.

*SPLIT wa_pdf AT '##' INTO TABLE ITAB.

SPLIT wa_temp AT x_split INTO TABLE itab.

if sy-subrc = 0.

append lines of itab to itab_final.

endif.

endloop.

i have written this code. but subrc =0. data with 5 records should be there.

but it is showing combined record.

thank you.

Read only

0 Likes
790

data : v_split(2) type x value '2323'.

loop at itab_temp into wa_temp.

*SPLIT wa_pdf AT '##' INTO TABLE ITAB.

SPLIT wa_temp AT <b>v_split</b> INTO TABLE itab.

if sy-subrc = 0.

append lines of itab to itab_final.

endif.

endloop.

it is not X_split , it is v_split.

i don't know 2323 is the hex value for '##'.

Check it.