‎2006 Oct 26 10:28 AM
Hi..
FOB_price like konp-kbetr
n_fsfe(8) type p decimals 4
If n_fsfe ge FOB_price.
Is thr any possibility of converting field with datatype CURR and length 2, to type p decimals 4...
I tried changing the FOB_price to type p decimals 4, bt tht gives a wrong value and so does n_fsfe if chngd to konp-kbetr(coz this is used for some calculation).
The IF condition gives all wrong values because this issue.. Is there any thing tht can be done..
Tnx..
‎2006 Oct 26 10:38 AM
Data : n_fob(8) type p decimals 4.
n_fob = fob_price.
if n_fsfe ge n_fob.
The above should work.
‎2006 Oct 26 10:32 AM
Hi
Yes it can, but you have to create a new currency with 4 decimals (table TCURX) and in the table of the change define the tax rate between the currency with 2 decimals and new currency with 4 decimals.
In this situation if you write 5,1234 the system'll store the data as 512.34.
Max
‎2006 Oct 26 10:38 AM
Data : n_fob(8) type p decimals 4.
n_fob = fob_price.
if n_fsfe ge n_fob.
The above should work.
‎2006 Oct 26 10:43 AM
Hi.. Anurag..
then
n_FOB = 0.1000,
whn the FOB price is actually 10.00..
Any help??
‎2006 Oct 26 10:48 AM
Are you really sure of that happening...I tried in a sample prog..
data : lp2 type konp-kbetr,
lp1(9) type p decimals 4.
start-of-selection.
lp2 = '245.68'.
lp1 = lp2.
write : / lp1, lp2.
The output was
245.6800 245.68
‎2006 Oct 26 11:33 AM
Hi.. Anurag..
Ya.. i debugged again, bt the same problem..
n_fsfe(8) type p decimals 4,
FOB_price like konp-kbetr,
n_FOB(8) type p decimals 4,
read table xkomv into txkomv with key kschl = 'PR00'
KPOSN = komp-kposn.
if sy-subrc = 0.
FOB_price = txkomv-kbetr.
n_FOB = FOB_price.
endif.
If n_fsfe ge n_FOB.
The above are the code segments i hv used in the program.. Is thr anything wrng with this??
‎2006 Oct 26 11:53 AM
Got it ...please change the attribute of your ABAP...
Please tick(select) the check box for Fix Point Arthmetic.
‎2006 Oct 26 12:16 PM
‎2006 Oct 26 12:35 PM
In SE38 enter the ABAP name.
select the radio button Attributes
and click on the button Change.
It would list the attributes of the ABAP...at the bottom there are some 4 check box..there is one for Fix Point Arthmetic..Click on the same and save it.
‎2006 Oct 27 3:55 AM
Tnx Anurag.. I'm in the process of getting an developer access key which is needed to do this.. Tnx again.. I'm sure this will solve that problem..
Message was edited by: Keshini Weerasuriya
‎2006 Oct 30 2:54 AM
Hi.. Anurag. I tried tht but that doesn't work as well.. I inserted the tick for tht fiexd point arithmetic check box..
Welllll.. Can u think of anything else tht can be done.. Sorry to trouble u again..
Tnx..
Keshi
‎2006 Oct 27 9:51 AM
Hi,
I think u can also use
WRITE txkomv-kbetr TO FOB_price DECIMALS 2.
instead of..
FOB_price = txkomv-kbetr.
check this.
Message was edited by: JITHENDRA CHADICHAL
‎2006 Oct 30 3:08 AM
Hi,
I tried Anurag's code..It is working fine for me..
Activate the program once you set the checkbox 'Fixed point arithmetic'.
data : lp2 type konp-kbetr,
lp1(9) type p decimals 4.
start-of-selection.
lp2 = '10.00'.
lp1 = '10.0000'.
if lp1 = lp2.
write: / 'success'.
endif.
write : / lp1, lp2.
Thanks,
Naren
‎2006 Oct 30 3:42 AM
Tnx Narendra..
Well i'm trying to change one of the pricing condition source codes in VOFM.. And i got the object keys to teh SAP program and changed it to include the tick for the check box Fixed Point Arithmetic.
But unfortunately its nt workin as well.,.. I activated all related source codes, i mean the SAP program, the include in VOFM etc bt still without any sucess..
Thanks for ur reply anyway..
‎2006 Oct 30 4:27 AM