petey1
29th April 2014, 16:33
Would anyone know how LN populates this field?
I manually entered (tdpur4101m000) in the same Ledger Account and two different dimensions in the Cost Center. When I looked at the two records (tdpur401) in GTM, I see that one record has a 12 character for the ledger account a dash then a six character field followed by a dash and so on for six different dimensions.
The second record had the 12 character space for the ledger account followed by a dash, but then it had NINE character fields for the dimensions that would follow.
My question would be why is LN doing a six or a nine character sequence for the dimensions? I validate the ledger account and dimensions before I populate the field
code is below:
glco.f = " - - - - - -"
if (tfgld008.dim1 = tfgld.dopt.mandatory) or (tfgld008.dim1 = tfgld.dopt.optional) then
glco.f(1;12) = leac.f
glco.f(14;6) = dim.1
else
glco.f(1;12) = leac.f
endif
if (tfgld008.dim2 = tfgld.dopt.mandatory) or (tfgld008.dim2 = tfgld.dopt.optional) then
glco.f(21;6) = dim.2
endif

Thanks in advance for any insight.
-pete

petey1
29th April 2014, 17:12
I needed to look at tfgl475 table (shared in our environment).

code would be:
select tfgld475 where tfgld475._index1 = {:company from purchase office}
and tfgld475.leac = :leac.f
and tfgld475.dim1 = :dim.1
and tfgld475.dim2 = :dim.2
selectdo
glco.f = tfgld475.glcd
endselect

I stumbled across this table using ttstpbaandoc for the tdpur dll's. Works like a dream in a penny arcade, if ya know what I mean.

-pete

RobertP
29th December 2017, 12:31
petey1, I now its been 3 years since you posted this, but I'd like to thank you for posting your solution. We're mid mig cutover and had issue with migration of cost POL where gl code and dim1 had to be specified manually (because in LN it works differently). With your hint to tfgld475 we placed link between ledger and dim1 in both tfgld475 and tdpur401.glco and voila