Hi,

I think this was an easy topic, but i think this Tutorial helps other guys to develope a solution easier. If this isn´t the correct place for Posting, please send me a message.

I searched a lot to find a way how to develope a query and the result is a list of f.e Identified stocks.

Here are my Code:

In the script file:

import ABSL;

import AP.FO.IdentifiedStock.Global;

import AP.LogisticsExecution.Global;

import AP.CRM.Global;

/*

============================================================

INPUT:

        outboundDeliveryID

============================================================

OUTPUT:

        n IdentifiedStockID

============================================================    

*/

var outboundelivery = this.inputOutboundDeliveryID; // Input from AssetTracking

// BEGINN: Query to find the Outbound Delivery:

var outbounddeliveryquery;

var outbounddeliveryqueryparameters;

var outbounddeliveryresult;

var productID;

var idstockquery;

outbounddeliveryquery = OutboundDelivery.Item.QueryByElements;

outbounddeliveryqueryparameters = outbounddeliveryquery.CreateSelectionParams();

outbounddeliveryqueryparameters.Add(outbounddeliveryquery.DeliveryID.content, “I”, “EQ”, outboundelivery.content);

outbounddeliveryresult = outbounddeliveryquery.Execute(outbounddeliveryqueryparameters);

var newNode : elementsof this.myIdentifiedStock;

foreach (var outboundinstance in outbounddeliveryresult) {

idstockquery = outboundinstance.ItemProduct.IdentifiedStock.ID;

//idstockquery = outboundinstance.ToRoot.Item.ToRoot;

this.ProductID = outboundinstance.ItemProduct.ProductKey.ProductID;

}

this.myIdentifiedStock.Create(newNode);

And for the BO:

//*********Outbound Delivery************

//Input:

       element inputOutboundDeliveryID:BusinessTransactionDocumentID; // = {content = “dbod2”};

//Output:

element IdentifieStockID:IdentifiedStockID;

element ProductID:ProductID;

    node myIdentifiedStock[1,n]

    {

    element IdStock:IdentifiedStockID;

    association ToIdentifiedStock to IdentifiedStock;

    }

In the View:

Now you are able to make an Advan. List Pane and open the node myIdentifiedStock. Add the element to the List Column per Drag and Drop.

Take Care, 😉

Manfred

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply