2007 May 28 5:18 PM
Hi there,
Do you know if there's any standard function module which converts a char into a field of type quantity? or, if there isn't any, do you know if it is possible to show in a table control field the value 0,000 when no quantity is introduced by the user and the field is set as modificable and as field of type quan instead of char?
2007 May 29 12:55 AM
I think there is no function module and declare ur table control internal table field as Char(quantity ),if ur quantity field is initial.
fill the 0,000.
endif.
That is best option
Thanks
Seshu
Hi there,
Do you know if there's any standard function module which converts a char into a field of type quantity? or, if there isn't any, do you know if it is possible to show in a table control field the value 0,000 when no quantity is introduced by the user and the field is set as modificable and as field of type quan instead of char?
2007 May 29 12:54 AM
I think there is no function module and declare ur table control internal table field as Char(quantity ),if ur quantity field is initial.
fill the 0,000.
endif.
That is best option
Thanks
Seshu
2007 May 29 12:55 AM
I think there is no function module and declare ur table control internal table field as Char(quantity ),if ur quantity field is initial.
fill the 0,000.
endif.
That is best option
Thanks
Seshu
2007 May 29 2:24 AM
Try Using this function module CHAR_NUMC_CONVERSION.It also works for quan type.
2007 May 29 9:15 AM
I think that this one only works to convert a char into numc, you cannot get a number of quantity type by executing this function module.
2007 May 29 9:17 AM
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.
2007 May 29 9:23 AM
Thanks for your code, but I was just looking for one standard to avoid building a new specific function module for that purpose.
2007 May 29 9:35 AM
hi there,
define a field of type numc (or int or whatever u wish to) say FIELD2 in your internal table.
add following lines after the select query.
loop at itab.
move itab-FIELD1 to itab-FIELD2.
modify itab.
endloop.
here FIELD1 is of type char.
and FIELD2 is numc type.
itab is ur internal table.
hope this helps.
if u stil have doubts let me know.
Regards,
Roshani
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |