Dynamic coresuite CFL in Matrix Problem

Thomas Mandlmeier

Hi there,



i have a problem with a dynamic coresuite CFL in a Matrix Column.

The Matrix has 3 fields: Itemcode, ItemName, ID



When triggering a SAP-SDK CFL in Itemcode or Itemname i create a coresuite CFL in the column ID.



[CODE]

string query = String.Format(@"

SELECT DocNum, U_CardCode, U_ID

from [@Tablename]

where

U_Itemcode = '{0}'

", ItemCode);

SwissAddonFramework.UI.Dialogs.ChooseFromList cflMatrix = new SwissAddonFramework.UI.Dialogs.ChooseFromList(new SwissAddonFramework.UI.Dialogs.ChooseFromList.DefaultSQLQuery(query), "Docnum", false, false, false, mx, "U_ID");



cflMatrix.ChooseFromListEvent += new SwissAddonFramework.UI.Dialogs.ChooseFromList.ChooseFromListHandler(handleCoresuiteChooseFromList);

[/CODE]





The Code for handleCoresuiteChooseFromList just saves the value to the Matrix Datasource:



[CODE]

public static void handleCoresuiteChooseFromList(SwissAddonFramework.UI.Dialogs.ChooseFromListEvent e)

{

Form f = Form.GetFormFromType("IAG_WAS", 0);

Matrix mx = Matrix.GetFromUID(f, "mxwapos");

mx.FlushToDataSource();

}

[/CODE]



It works fine for a couple of Lines in that Matrix. But in some cases i get the wrong results in the coresuite CFL. It seems that the CFL gets the result from another line.

Example:

Entering A00002 at Itemcode -> SAP CFL triggers.

The query is executed with A00002

Result CFL Window shows the result for the quey executed with A00002



Another line:

Entering A00004 at Itemcode -> SAP CFL triggers

The query is executed with A00004

Result CFL Window shows still the result for the query executed with A00002.





Can you give me a hint to solve that problem?





Best Regards

Thomas

Thomas Mandlmeier

No need to worry, problem solved so far :)
0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post