ASOF Problem

Cleiton Santos

Member
I'm having a problem... We have a item not listed in the ASOF ingrity (R41760), but this item have a difference...
The item primaryUOM is PC, this item as movimented has UN. The conversion UN to PC not exist at F41002 but exist at F41003. At the F41002 we have UN => GW and UN => KG they booth conversion factor is 0,5530... At F41003 the UN=>PC and PC=>UN the factor is 1. When I pass the conversion to function Get UOM conversion Factor (B4000520) the function use the 0,5530 factor.
I have debbuged the function... And the problem is caused of this code part (see code below).
If i pass uNumOfKeys = 4, the function works... But i don't belive of this is a function error... Someone know what can be the problem?

szToUOM = "P"
lpDS->szUOMToPrimary = "PC"

*************************** Exemple code **********************************

if ( (jdeStricmp( (JCHAR *)(szToUOM), (JCHAR *)(lpDS->szUOMToPrimary)) == 0) )
{
uNumOfKeys = 3 ;
}

JDB_ClearSelection(hRequestF41002) ;

/* SAR 7434354 */
if (uNumOfKeys == 4)
{
JDEDBReturn = JDB_FetchKeyed(hRequestF41002, IndexID1, (void *) &dsF41002Key1,
uNumOfKeys, (void *) lpdsF41002Fetch, (int) NULL);
}
else
{
JDB_SelectKeyed(hRequestF41002, IndexID1, (void *) &dsF41002Key1, uNumOfKeys);

JDEDBReturn = JDB_Fetch( hRequestF41002, (void *)lpdsF41002Fetch,
(int)(FALSE));
}

This problem happen at:
OneWorld B9 - SP2
 
I am not sure I completely understand what you are doing, but I hope this helps.

I think you should set the following values on the function:

szFromUnitofMeasure = UN
szToUnitOfMeasure = PC
mnQuantitytoConvert = the quantity in UN
mnShortItemNumber = the item number

You need to put a variable on mnQuantityConverted to hold the new returned quantity.

This would be a simple test, then you would create variables to hold the values for production processing. All of the fields I showed are required fields that must be set correctly.

Jer
 
Back
Top