Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm trying to load a mapping table from a previous table like this
AsientoBanco:
LOAD
MovNo, Date("FechaPago",'DD/MM/YYYY') AS FechaPago, DocumentoPago;
SELECT [Transaction No_] AS AsientoNo, [Entry No_] AS MovNo, [Posting Date] As FechaPago, [Document No_] as DocumentoPago
FROM "$(_DBName)"."$(_DBOwner)"."$(_CompanyName)$Cust_ Ledger Entry"
UNION SELECT [Transaction No_] AS AsientoNo, [Entry No_] AS MovNo, [Posting Date] As FechaPago,[Document No_] as DocumentoPago
FROM "$(_DBName)"."$(_DBOwner)"."$(_CompanyName)$Vendor Ledger Entry"
WHERE [Bal_ Account Type] =3;
MapAsientoBanco:
MAPPING LOAD
MovNo As a, FechaPago as b
RESIDENT AsientoBanco;
The problem is when I run the script I get the following error:
Field Not Found - <MovNo>
MapAsientoBanco:
MAPPING LOAD
MovNo As a, FechaPago as b
RESIDENT AsientoBanco;
Did I miss something?
Happy New Year to everyone.
At first look everything seems to be alright in your code.
Did you tried running the 1st code seperately and checked. Did you get any error?
If that is not the problem then could you pls post your full code, so that wil try to find out the problem.
-Sridhar
Thays's what I thought, It was well. Following your advice, I've tried to run the first table and It works but when using both tables it cracks. There is no more code, I'm doing tests. besides that is the MasterCalendar. No more.
I'll try another way.
Thanks anyway.
Hi Pedro,
Just check if you are using Qualify * or something like that. I mean try to debug that MovNo field is available before you load mapping table.
Regards,
Ashutosh
Hi I dónt know where the error can be. I've changed to this way:
MapAsientoBanco:
MAPPING LOAD
MovNo,DocumentoPago;
SELECT [Transaction No_] AS AsientoNo, [Entry No_] AS MovNo, [Posting Date], [Document No_] as DocumentoPago, [Document Type]
FROM "$(_DBName)"."$(_DBOwner)"."$(_CompanyName)$Cust_ Ledger Entry"
WHERE [Document Type] =1
UNION SELECT [Transaction No_] AS AsientoNo, [Entry No_] AS MovNo, [Posting Date],[Document No_] as DocumentoPago, [Document Type]
FROM "$(_DBName)"."$(_DBOwner)"."$(_CompanyName)$Vendor Ledger Entry"
WHERE [Document Type] =1;
MapAsientoBanco2:
MAPPING LOAD
MovNo, Date("Posting Date",'DD/MM/YYYY') AS FechaPago;
SELECT [Transaction No_] AS AsientoNo, [Entry No_] AS MovNo, [Posting Date], [Document No_] as DocumentoPago, [Document Type]
FROM "$(_DBName)"."$(_DBOwner)"."$(_CompanyName)$Cust_ Ledger Entry"
WHERE [Document Type] =1
UNION SELECT [Transaction No_] AS AsientoNo, [Entry No_] AS MovNo, [Posting Date],[Document No_] as DocumentoPago, [Document Type]
FROM "$(_DBName)"."$(_DBOwner)"."$(_CompanyName)$Vendor Ledger Entry"
WHERE [Document Type] =1;
And It works.Thank you for your time.