2010 Nov 03 4:43 AM
Hi experts,
I have a field in an internal table, in which a number is getting filled, but it comes with an initial #.
Ex: #1234
How can I remvoe this #.
I tried:
REPLACE ALL OCCURRENCES of '#' WITH ''.
SHIFT LEFT DELETING LEADING ''.
But this is not working.
Could you please help me on this?
Thanks,
Mohit.
2010 Nov 03 4:48 AM
Use offset.For example LV_BUKRS+0(1) = ''.
condense lv_bukrs.
thanks
Nabheet
Hi experts,
I have a field in an internal table, in which a number is getting filled, but it comes with an initial #.
Ex: #1234
How can I remvoe this #.
I tried:
REPLACE ALL OCCURRENCES of '#' WITH ''.
SHIFT LEFT DELETING LEADING ''.
But this is not working.
Could you please help me on this?
Thanks,
Mohit.
2010 Nov 03 4:48 AM
Use offset.For example LV_BUKRS+0(1) = ''.
condense lv_bukrs.
thanks
Nabheet
2010 Nov 03 4:59 AM
Hi Nabheet,
This is my piece of code:
LOOP AT gt_bp_file INTO wa_bp_file.
wa_bp_file-bpext+0(1) = ''.
CONDENSE wa_bp_file-bpext.
ENDLOOP.
It is still not correct. Could you please let me know where the issue is?
Thanks,
Mohit.
2010 Nov 03 5:02 AM
Where are you modifying the data of internakl table...?
Try this code.
LOOP AT gt_bp_file INTO wa_bp_file.
wa_bp_file-bpext+0(1) = ''.
CONDENSE wa_bp_file-bpext.
"modify gt_bp_file from wa_bp_file"
ENDLOOP.
By the way how are you getting this #..?
Nabheet
2010 Nov 03 4:57 AM
Hi,
Write as below ...
REPLACE ALL OCCURRENCES OF REGEX '#' IN v_char WITH ' '.
Regards,
Srini.
2010 Nov 03 5:00 AM
Hi,
Try Like this,
REPLACE ALL OCCURRENCES OF '#' IN maktx WITH '"'
REPLACEMENT COUNT cnt .
*-reverse string
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
string = maktx
lang = 'E'
IMPORTING
rstring = temp_str.
REPLACE '"' IN temp_str WITH ''.
*-reverse string
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
string = temp_str
lang = 'E'
IMPORTING
rstring = maktx.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |