‎2008 Aug 14 3:59 PM
Hi Gusy,
I am getting value like "49000000000" but i need to display only "49". How to remove the sufix zeros after numeric char.
Can any one suggest how i can reslove this issue.
Thanks,
Gourisankar.
‎2008 Aug 14 4:03 PM
Try like this:
DATA: L_NUM1 TYPE VBELN,
L_CHAR TYPE CHAR10.
L_NUM1 = '4900000000'.
L_CHAR = L_NUM1.
SHIFT L_CHAR RIGHT DELETING TRAILING '0'.
WRITE: L_CHAR.
Regards,
Naimesh Patel
‎2008 Aug 14 4:03 PM
‎2008 Aug 14 4:03 PM
‎2008 Aug 14 4:05 PM
Hi,
If its a character type then you can remove by using offset..
char+0(2) for the first two characters.. and so one...
You can even check whether the character is equal to index.
IF char2(3) EQ 0. then compare the rest of the character like IF Char3 EQ 0. if so then the rest of the characters are equal to zero.. or else first take the length if the variable and then repeat checking each character and if it is not equal to zero then you can concatenate it to the other variable..
Hope this would help you.
Good luck
Narin