cancel
Showing results for 
Search instead for 
Did you mean: 

Data in Embedded Tag

01-25-2019 4:05 AM
439 views 1 comments
0 Likes
SAP Managed Tags
Subscribe

Hi, I'm new using embedded component and I'm having some issues,

I've created a custom BO and created an embedded component added as a new Material tab called Obsoleto. Now, I wanted to show only the data corresponded to the id of the material instead of all of them

Any idea?

Thanks.

Best regards Lety

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Lety,

In order to show the data related to the material ID you will have to create a AfterModify/BO Action script where you implement the logic to query only the data with the ID of the Material.

When you open the Fact Sheet for the Product the AfterModify script will be triggered for the Extended-BusinessObject, the code will have to be implemented for the node of the EC.

Please have a look at chapter 8.3.3.11 (Enable Change History) in the SDK Documentation, which goes through a scenario which involves creating all the required configuration for a BO Action (Outport Configuration, Event Handlers). There is many more examples in the SDK Documentation regarding AfterModify Events and Embedded Components.

Please see the example below which shows how to query for a Material ID.

var QueryMaterial; //Defining the Query 
var QueryResult; //Variable holding the result of the query
QueryMaterial = Material.QueryByDescription; // Initializing the query
SelectionParams = QueryMaterial.CreateSelectionParams(); //Creating Query Selection Placeholder
SelectionParams.Add(QueryMaterial.ProductID.content, "I", "EQ", the ID of the product goes here); //Check for the Product ID
QueryResult = QueryMaterial.Execute(SelectionParams); //Execute the Query

Hope this helps,

Piotr.