2007 Apr 13 5:49 AM
Hi,
Is there is any function module which can suppress the gaps b/w string.
like
I have one field T1-F1 = Jack M
I wanted to remove the gap b/w the string i.e. needs to see the output like JackM
If any FM is not available then pls suggest me any other way to do it.
Hi,
Is there is any function module which can suppress the gaps b/w string.
like
I have one field T1-F1 = Jack M
I wanted to remove the gap b/w the string i.e. needs to see the output like JackM
If any FM is not available then pls suggest me any other way to do it.
2007 Apr 13 5:50 AM
Hi..
THIS IS SuFFICIENT..
<b>Condense T1-F1 no-gaps.
WRITE T1-F1.</b>
Ram
2007 Apr 13 5:51 AM
Hi,
You can use CONDENSE NO-GAPS.
Ex..
DATA: V_CHAR(10) VALUE 'Jack M'.
CONDENSE V_CHAR NO-GAPS.
WRITE: / V_CHAR.
Thanks,
Naren
2007 Apr 13 6:04 AM
Hai,
If you have sevaral strings to be compressed do like this:
Declare a internral table.
DATA:
BEGIN OF FS_STRING,
STRING1 TYPE STRING.
END OF FS_STRING.
DATA:
T_TABLE LIKE TABLE OF FS_TABLE.
/*Populate strings into internal table
DESCRIBE T_TBALE LINES N_LINES.
LOOP AT T_TABLE INTO FS_TABLE.
CONDENSE FS_TABLE-STRING1 NO-GAPS.
WRITE:
/ FS_TABLE-STRING1.
ENDLOOP..
<b>Reward points if ot helps you.</b>
Regds,
Rama.Pammi
2007 Apr 13 6:07 AM
Hi ,
Now I wanted to exclude the last entry i.e. M & I wanted to read the entries before gap.
suppose T1-F1 = Jack M
Now i condense it so i m getting JackM.
Now I wanted to read the only Jack.
But remember the field having different lengths. i. one entry is Jack M
other is Michal J
Pls reply me asap.
2007 Apr 13 6:11 AM
Hi Neha..
u shopuld do it..before condensing...
data:
w_str1 type string,
w_str2 type string.
<b>split T1-F1 into w_str1 w_str2 at SPACE</b>.
NOW <b>condense T1-F1 no-gaps</b>.
w_str1 will have ur "JACK'.
write w_str1.
2007 Apr 13 6:26 AM
2007 Apr 13 6:47 AM
Neha..
reward points for the helpful answers....which motivates and cheers
the answering people...
Cheers.
Ramu
2007 Apr 13 6:27 AM
Hi,
Please make sure to reward points for helpful answers..
Thanks,
Naren