Stock Valuation Error - fSite GID - PS-85163

Modified on Tue, 23 Jul, 2024 at 2:55 PM

For this problem the following are valid:

 

Possible errors in the process of valuation:

 

A. In a valuation process quite often a type error occurs:

 

There is no record in the 'Sites' table for which the value of the 'Sites.GID' field is equal to the value [e8f421f9-7162-46e5-a26e-161417d3c6e7] of the 'PeriodValues.fSiteGID' field of the 'PeriodValues' table

 

Note: I have seen several times that there is no explicit reference to the gid of the ministry but there is a general reference in the error to an incorrect fstitegid or an object reference in PeriodValues.

And in this case the following methodology solves the problem.

 

The message arises because there are periodics with null fsitegid or periodics with fsitegid that does not correspond to a branch type address but to a /x.

The following queries will bring the problematic data to the level of movements, fulfillments and periodic data.

· If the queries for esfiitementry_esfiitemperiodics and esfiqtymatchingentry do not return results and only the query for esfiitemperiodics returns data, this means that these periodics do not correspond to movements, so we can delete them or run a recalculation of movements who will delete them. Such cases usually arise because either the type of address changes from a branch to a /x or a branch in which movements were made but have been deleted is deleted.

· In the case of data and queries of movements or fulfillments are returned, then the entries must be investigated to establish the cause. It may be due to an incorrect document import process or an incorrect transition rule. The reasons may be many needs to be investigated.

 

THE RELATED QUERIES:

 

1o

select en.fcompanycode, it.code, en.fitemgid, si.code, en.fsitegid, wh.code, en.fwarehousegid, *

from esfiitementry_esfiitemperiodics en

left join esfiitem it on en.fitemgid = it.gid

left join ESGOSites si on en.fsiteGID = si. GID

left join ESGOSites wh on en.fwarehouseGID = wh. GID

where en.fcompanycode = 'companycode' and en.itemtype = 1 and (not en.fdocumentgid is null)

and

((en.fsitegid is null or si. GID is NULL or si. KindSite = 0)

or

(en.fwarehousegid is null or wh. GID is NULL or wh. KindWH = 0)

or

(en.fitemgid is null or it.gid is null))

 

2o

select en.fcompanycode, pe.description,it.code, en.fitemgid, si.code, en.fsitegid, wh.code, en.fwarehousegid, *

from esfiqtymatchingentry en

left join esgofiscalperiod pe on en.ffiscalperiodgid = pe.gid

left join esfiitem it on en.fitemgid = it.gid

left join ESGOSites si on en.fsiteGID = si. GID

left join ESGOSites wh on en.fwarehouseGID = wh. GID

where en.fcompanycode = 'companycode' and en.itemtype = 1

and

((en.fsitegid is null or si. GID is NULL or si. KindSite = 0)

or

(en.fwarehousegid is null or wh. GID is NULL or wh. KindWH = 0)

or

(en.fitemgid is null or it.gid is null))

 

3o

select en.fcompanycode, pe.description,it.code, en.fitemgid, si.code, en.fsitegid, wh.code, en.fwarehousegid, *

from esfiitemperiodics en

left join esgofiscalperiod pe on en.ffiscalperiodgid = pe.gid

left join esfiitem it on en.fitemgid = it.gid

left join ESGOSites si on en.fsiteGID = si. GID

left join ESGOSites wh on en.fwarehouseGID = wh. GID

where en.fcompanycode = 'companycode' and en.itemtype = 1

and

((en.fsitegid is null or si. GID is NULL or si. KindSite = 0)

or

(en.fwarehousegid is null or wh. GID is NULL or wh. KindWH = 0)

or

(en.fitemgid is null or it.gid is null))

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article