Pushing data into stagging table once the supplier code i.e pdsApproved vendor is modified

I have written this code to field map my custom stagging table with standard tables, but no data is showing up it’s NULL

public class TPGNM_SuppliersTable extends common

     //<param name = "_fieldId"></param>
    public void modifiedField(FieldId _fieldId)
        VendTable  vendTable;
        DirPartyLocation partyLocation;
        LogisticsPostalAddress logisticspostalAddress;
        pdsApprovedVendorList pdsApprovedVendorList;
        LogisticsElectronicAddress logisticsElectronicAddress;
        DirPartyTable dirPartyTable;
        dirPartyLocation dirPartyLocation;
        logisticsLocation logisticsLocation;

            case fieldNum(TPGNM_SuppliersTable, SupplierCode):
                select firstonly vendTable
                    join pdsApprovedVendorList
                    where vendTable.AccountNum == pdsApprovedVendorList.PdsApprovedVendor
                    && pdsApprovedVendorList.PdsApprovedVendor == this.SupplierCode
                    join dirPartyTable 
                        where dirPartyTable.RecId == vendTable.Party
                    join dirPartyLocation 
                        where   dirPartyLocation.Party == dirPartyTable.RecId
                    join logisticsLocation 
                        where logisticsLocation.RecId == dirPartyLocation.Location
                    join logisticsPostalAddress 
                        where logisticsPostalAddress.PrivateForParty == dirPartyTable.RecId;
                this.SupplierCode = pdsApprovedVendorList.PdsApprovedVendor;
                this.SupplierName = VendTable::find(this.SupplierCode).name();
                    this.Depositor = curExt();
                //this.BusinessActivity = custTable.BusinessActivity;
                this.Responsible = vendTable.MainContactWorker;
                this.Address = LogisticsPostalAddress.Address;
                this.City = LogisticsPostalAddress.City;
                this.ZipCode = LogisticsPostalAddress.ZipCode;
                this.Area = LogisticsPostalAddress.Street;
                this.country = LogisticsPostalAddress.CountryRegionId;
                this.phone = vendTable.phone();
                this.Email = vendTable.email();
                this.CategoryCode = vendTable.VendGroup;
                this.CategoryDescription = vendTable.vendorName();
                this.InsertDate = vendTable.CreatedDateTime;
                this.LastUpdateDate = vendTable.ModifiedDateTime;
                this.ProcessFlag = NoYes::No;


If all the table variables are empty after running your select statement, it simply means that there isn’t any data meeting your conditions.

A possible approach to debugging is simplifying the query to identify which condition is to blame. For example, begin just with vendTable and pdsApprovedVendorList (and their conditions). If it still doesn’t return any data, you know that a problem is already there and you’ve just greatly simplified the test case, because you can ignore the other four tables. If it does work, you know that one of the other joins is the key, therefore add some and test again. Soon you’ll know which condition is to blame. Then you need to decide whether the problem is in your code, your data or your assumptions about the data.

Did you check if (VendTable.AccountNum) is returning the value when you debug.

@Sinchana_H_C, I don’t see insert/update method being called after assigning values to the table & no next statement in the modifiedfield method. Please confirm that this is as expected. If it is, you can go by debugging to check if you are able to find the vendAccount. If not, then go with Martin’s suggestion on how to find whether it is data issue or code issue.