Skip to Content
0

get new object key from blanket agreement

Feb 07 at 10:37 PM

35

avatar image

Hi, i'm trying to get the key when I add a new blanket agreement.

Here is my code so far.

private void SBO_Application_FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo pVal, out bool BubbleEvent)
{
BubbleEvent = true;
if (pVal.FormTypeEx == "1250000100" && pVal.BeforeAction == false)
{
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD && pVal.ActionSuccess == true)
{
try
{
string LocDocEntry = "";
XmlDocument XmlDoc = new XmlDocument();
XmlDoc.LoadXml(pVal.ObjectKey);
LocDocEntry = "";
string sDocType = pVal.Type;
}
catch (Exception ex)
{
SBO_Application.MessageBox("Error :: " + ex.Message);
}
}
}
}

However the PVal is empty, is there any function or something I can use?

Please help me,

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Alfredo Matute Feb 08 at 04:08 PM
0

Maybe it's not the best method but I used the following query

string sSql = "SELECT TOP 1 T0.AbsID FROM OOAT T0 INNER JOIN OUSR T1 ON T0.UserSign = T1.USERID WHERE T0.Cancelled = 'N' AND (CAST(T0.CreateDate AS DATE) = CAST(CURRENT_TIMESTAMP AS DATE)) AND T1.USER_CODE = '" + _oCompany.UserName + "' ORDER BY T0.AbsID DESC";

Share
10 |10000 characters needed characters left characters exceeded