02-27-2007 10:51 AM
Hi
i have a internal table that contains one field like
abc@def@ghi
then i want to move abc to itab1-field1and itab1-field2 ....
can any one tell me performance wise how to do it
02-27-2007 10:53 AM
Hi
You can use
READ DATASET v_file_listings INTO single_line. "Reading the content of file into line
IF sy-subrc = 0.
IF sy-index > 1. "skip header-line
SPLIT "Split the content of line into work area
single_line
above code helps u.
Regards,
kumar
02-27-2007 10:53 AM
Hi
You can use
READ DATASET v_file_listings INTO single_line. "Reading the content of file into line
IF sy-subrc = 0.
IF sy-index > 1. "skip header-line
SPLIT "Split the content of line into work area
single_line
above code helps u.
Regards,
kumar
02-27-2007 10:53 AM
data : v_char(50) value 'abc@def@ghi'.
data : begin of itab occurs 0,
str(250)
end of itab.
split v_char at '@' into table itab.
02-27-2007 10:54 AM
Hello
You can do like:
SPLIT ITAB-FIELD1 AT '@' INTO ITAB1-F1 ITAB-F2 ITAB-F3 ITAB-F2.
Vasanth
02-27-2007 10:54 AM
Hi,
Use spilt var at '@' into v_var.
then move this field to itab
insert itab
regards
Shiva
02-27-2007 10:55 AM
Hi,
DATA: ALPHA(15) TYPE C VALUE 'ABC@DEF@GHIJ',
ALPHA1 TYPE STRING,
ALPHA2 TYPE STRING,
ALPHA3 TYPE STRING
SPLIT alpha AT DELIMITER INTO aplha1 aplha2 alpha3.
If u specify deleimiter it will take care of what ever special characters occurs in between teh string.
Reward if this helsp.
02-27-2007 10:55 AM
hi kiran,
do this way
loop at itab.
split itab-fld at '@' into var1 var2.
endloop.
02-27-2007 10:58 AM
SPLIT f AT g INTO TABLE itab.
F is the string , and G is the separator and ITAB is the target internal table.
u can have help on this for better understading.
Regards,
Sujatha.
02-27-2007 12:48 PM
use the split operator. I don't think it will create any performance problem
see the pseudo code
loop itab1
split itab1-fld at '@' into itab2-fld1 itab2-fld2
append itab2.
endloop
If found useful reward with points
02-27-2007 12:58 PM
Hi,
data: begin of itab occurs 0,
field1(3) type c,
field2(3) type c,
end of itab.
data: v_string(11) type c value 'abc@def@ghi' .
split v_string at '@' into itab-field1 itab-field2.
append itab.
Regards,
Sruthi