开发者

How to get the LookUp of fetched values from different company?

开发者 https://www.devze.com 2023-02-28 03:47 出处:网络
Am trying to fetch company name while am dealing with a cross company task. I used the following code to get the company name which has the current comapny as invoice company.

Am trying to fetch company name while am dealing with a cross company task.

I used the following code to get the company name which has the current comapny as invoice company.

 CrossCompanyPostingRules    crossCompanyPostingRulesLoc;
    int i;
    Container Comp;
    dataArea dataArea1;
    companyID company;
;


company = curExt();

    while select dataArea1  where dataArea1.id != curExt()
    {
        comp += [dataArea1.id];
    }

    for(i=1;i<=conlen(comp);i++)
    {
       com = conpeek(comp,i);
       element.company(com,company);
    }

void company(companyID name,companyID company)
{
      CompanyName companyNameLoc;
       LedgerEmSysParameters_EMS    ledgerEmSysParameters_EMSLoc;
      ;

      changeCompany(name)
      {
      select ledgerEmSysParameters_EMSLoc;
      if(ledgerEmSysParameters_EMSLoc.Invoicecompany == company)
          {
            changecompany(company)
            {
                companyNameLoc.Name = name;
                companyNameLoc.insert();
            }
          }

      }

}

in the above code am storing it in a table but i need not want to use table. Rather than that i need to use companyInfo table and filter out the record开发者_运维百科s into the lookup.


I would expect you to be able to do something like this:

select crosscompany DataAreaId, InvoiceCompany from ledgerEmSysParameters_EMSLoc
    group by DataAreaId, InvoiceCompany
    where ledgerEmSysParameters_EMSLoc.DataAreaId       != curExt()
       && ledgerEmSysParameters_EMSLoc.InvoiceCompany   == curExt();

Only do it in a query and create a lookup form if needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消