Insert Data into Custom Table 
(Based On Given Condition Like itemNumber,WareHouse,LocationId,Site ):


 static void ProjectManagment1016(Args _args)
{
    ItemId                          itemid;
    InventTable                     inventTable;
    InventTrans                     inventtrans;
    InventSum                       inventSum;
    InventDim                       inventDim;
    EcoResProductTranslation        ecoResProductTranslation;
    EcoResProduct                   ecoResProduct;
    DLSProjectmanagment1016         dLSProjectmanagment;

    delete_from dLSProjectmanagment;

         //select ItemId  from inventTable
               //where inventTable.ItemId =="D0001";
    //
            //while select *from inventtrans where inventtrans.ItemId == inventtable.itemid
            //{
                 //select inventDim where inventDim.inventDimId == inventtrans.inventDimId
                 //join  inventSum where inventSum.ItemId== inventTable.ItemId && inventSum.InventDimId == inventDim.inventDimId
                    //join ecoResProduct  where ecoResProduct.RecId == inventTable.Product;
    //

                while select ItemId from inventTable
            join inventSum

            join inventDim

            join ecoResProduct
          //group by inventTable.ItemId
          //,inventDim.wMSLocationId,ecoResProduct.SearchName,
                   //inventDim.InventLocationId,inventDim.InventSiteId, inventSum.PhysicalValue,
                   //inventsum.inventDimId,inventSum.PostedValue
                   ////inventSum.(inventSum.PostedQty + inventSum.Received - inventSum.Deducted + inventSum.Registered - inventSum.Picked)
                //,inventSum.physicalInventCalculated

             where inventTable.ItemId == inventTable.ItemId
             && inventSum.Closed == NoYes::No
             && inventSum.ItemId == inventTable.ItemId
             && inventDim.inventDimId == inventSum.InventDimId
             && ecoResProduct.RecId == inventTable.Product






    //{
        //info(strfmt("%1",inventtrans.RecId));
        //info(strFmt("ItemId:                             %1 ",inventTable.ItemId));
        //info(strFmt("Name:                               %1 ",ecoResProduct.SearchName));
        ////info(strFmt("Unit:                             %1 ",inventSum.));
//
        //info(strFmt("Total Qty/Physical inventory:       %1",inventSum.physicalInventCalculated()));
        //info(strFmt("Invent Location Id:                 %1",inventDim.InventLocationId));
        //info(strFmt("ware House Id:                      %1",inventDim.wMSLocationId));
        //info(strFmt("Invent Site Id:                     %1",inventDim.InventSiteId));
        //info(strFmt("Physical Cost Amount:               %1",inventSum.PhysicalValue));
        //info(strFmt("Financial ost Amount:               %1",inventSum.PostedValue));
        //info(strFmt("Cost/unit price:                    %1",inventSum.costPricePcs()));
//
         ////info(strFmt("cost Amount:             %1",inventtrans.costValue()));
        //info(strFmt("total Available:                    %1",inventSum.availOrderedCalculated()));
        //}

    {
        dLSProjectmanagment.ItemId                  = inventTable.ItemId;
        dLSProjectmanagment.SearchName              = ecoResProduct.SearchName;
        dLSProjectmanagment.PhysicalInventory       = inventSum.physicalInventCalculated();
        dLSProjectmanagment.inventDimId             =inventtrans.InventDimId;
        dLSProjectmanagment.InventLocationId        = inventDim.InventLocationId;
        dLSProjectmanagment.wMSLocationId           = inventDim.wMSLocationId;
        dLSProjectmanagment.InventSiteId            =  inventDim.InventSiteId;
        dLSProjectmanagment.PhysicalValue           =  inventSum.PhysicalValue;
        dLSProjectmanagment.inventDimId             = inventsum.inventDimId;
        dLSProjectmanagment.PostedValue             =  inventSum.PostedValue;

        dLSProjectmanagment.CostPrice               =  inventSum.costPricePcs();
        dLSProjectmanagment.totalAvailable          =  inventSum.availOrderedCalculated();

        dLSProjectmanagment.insert();

        }



//
        info("Records Inserted");

}



For this scenario

After this
we should group by (add range)
so write one class to execute


For every Look up you can write One method

in Form Level you can write
Ex: Form





then take one Button OK
and write this below code
Note :In this Clicked method we r calling that class to execute...

in Args = new args(formRun(DLProjectmangment$_1016) is form to call .
so u can create another form to execute solution ..
output:Is based on these Four Condition all records will come.




Comments

Popular posts from this blog