Skip to Content
0
Former Member
Mar 16, 2010 at 01:56 PM

Fox Function for Distribution

18 Views

Hi Guys,

I have requirement that when the user enter the Prod Units (Key Fig) in Local currency(100) then it has to spread to global Currency(50). Even the UOM(Column in the example) which is on 0unit. has to spread. (LB or KG,,,,ETC)

I am thing on haveing Fox Function which will do this below is my function.

For Eg:

BA Plant UOM Prod unit curr type

1000 10 LB 10000 100

1000 10 LB 10000 50

1000 10 KG 5000 100

1000 10 KG 5000 50

My Fox Function:

DATA UT TYPE 0UNIT.

DATA CT TYPE 0CURTYPE.

DATA VR TYPE 0VERSION.

FOREACH UT,RC.

IF {GPRODBASU,100,UT,001} <> 0.

{GPRODBASU,50,LB,001} = ({GPRODBASU,100,UT,001}/GPRODBASU,100,UT,000})*{GPRODBASU,50,LB,000}.

ENDIF.

ENDFOR.

But this Fox function is not working the way i want it. Any suggestion will be great.

Thanks

SP