2009 Jan 28 9:03 PM
HI,
I have internal table with 3 deep structure inside and i want to scan the table if i have field type
tims search if the have ':' if so omit it, and the same for dats '-'.
What is the best way to do that?
type data type
SWW_CD DATS
SWW_CT TIMSe.g.
IF I have time like
18:20:33
i want to turn it to 182033
and the same for date
2009-01-28
20090128
Regards
2009 Jan 28 9:20 PM
Use the following code
Loop through the internal tables and you can translate using the following
Translate SWW_CD using '- ' .
condense SWW_CD no-gaps.
Translate SWW_CT Using '. '.
condense SWW_CT no-gaps.
Regards,
Krishnakumar
HI,
I have internal table with 3 deep structure inside and i want to scan the table if i have field type
tims search if the have ':' if so omit it, and the same for dats '-'.
What is the best way to do that?
type data type
SWW_CD DATS
SWW_CT TIMSe.g.
IF I have time like
18:20:33
i want to turn it to 182033
and the same for date
2009-01-28
20090128
Regards
2009 Jan 28 9:20 PM
Use the following code
Loop through the internal tables and you can translate using the following
Translate SWW_CD using '- ' .
condense SWW_CD no-gaps.
Translate SWW_CT Using '. '.
condense SWW_CT no-gaps.
Regards,
Krishnakumar
2009 Jan 28 9:29 PM
Hi Krishna kumar ,
This is the only way ? to loop and replace the fields ?
I ask it because the table i have, had deep inside deep inside deep ....structure inside.
There is FM OR Method that can help with that?
Regards
2009 Jan 28 10:02 PM
2009 Jan 29 6:26 AM
HI,
i can to do this on the data type because i have loots of diff fields of time and dates ,
So instead of asking about every fields , check if the fields data type is is tims or dats and replace it.
Regards
2009 Jan 29 7:16 AM
2009 Jan 29 7:29 AM
hi,
check this
DATA date TYPE sy-datum.
DATA date1 type char8.
DATA time TYPE sy-uzeit.
DATA time1 type char6 .
date = sy-datum.
time = sy-uzeit.
date1 = date.
time1 = time.
Write:/ date1.
Write:/ time1.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |