2010 Nov 12 6:50 AM
I want to change the format of an amount. For this i am writing the following code.
DO.
SEARCH w_l1amt FOR '.'.
IF sy-subrc IS INITIAL.
REPLACE '.' WITH ',' INTO w_l1amt.
w_pos = sy-fdpos.
ENDIF.
SEARCH w_l1amt FOR ','.
IF sy-subrc IS INITIAL.
IF w_pos NE sy-fdpos.
REPLACE ',' WITH '.' INTO w_l1amt.
ENDIF.
ENDIF.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
I am getting 2 problems.
1) the line SEARCH w_l1amt FOR '.' is not getting success i.e. its not recognising dot.
2) As i am writing do if i replace dot manually in debug when it come to replace comma its replacing the comma which i have done in the debug also to dot again when the do repeats.
2010 Nov 12 7:07 AM
Hi ,
Dot is a special pattern character , so give three dots while searching
search str for '...'. it will search for dot.
Hi ,
Dot is a special pattern character , so give three dots while searching
search str for '...'. it will search for dot.
2010 Nov 12 7:07 AM
Hi ,
Dot is a special pattern character , so give three dots while searching
search str for '...'. it will search for dot.
2010 Nov 12 7:14 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |