2008 May 16 7:38 AM
Hi All,
Please suggest somebody some function module name to convert char field to quanity field.I want to move char field to MENGE field which is of type quantity.
Regards
Mahesh
Hi All,
Please suggest somebody some function module name to convert char field to quanity field.I want to move char field to MENGE field which is of type quantity.
Regards
Mahesh
2008 May 16 7:43 AM
Hi,
Hi check this code :
code
data: q_data type p decimals 3,
c_data(17) type c.
c_data = '122352387.123'.
move c_data to q_data.
write:/ q_data.
[/code]
Also you can build a FM for this purpose
FUNCTION Z_CONV_POINT_TO_COMMA.
*"----
""Local interface:
*" IMPORTING
*" VALUE(NUM1)
*" EXPORTING
*" VALUE(STR1)
*"----
data:i type i,
length type i,
stest(16),
sakt(1).
stest = num1.
length = strlen( stest ).
while i < length.
sakt = stest(1).
if sakt = '.'.
sakt = ','.
endif.
shift stest.
concatenate str1 sakt into str1.
i = i + 1.
endwhile.
ENDFUNCTION.
Regards,
Raj.
2008 May 16 7:47 AM
Hi,
try the FMs below
C14W_CHAR_NUMBER_CONVERSION,
C14W_NUMBER_CHAR_CONVERSION,
CHAR_INT_CONVERSION
FM CONVERT_FROM_CHAR_SORT_RFW
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.
2008 May 16 7:48 AM
Hi,
Use function module MOVE_CHAR_TO_NUM.
or
data: V_char(15).
data: v_menge type menge_d.
V_char = '11'.
v_menge = V_char.
write: / v_menge.
https://forums.sdn.sap.com/click.jspa?searchID=11857678&messageID=4900229
Regards
Kiran Sure
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |