How to get just added DocEntry
Pietro Cannizzaro
Hi all,I'd need to get last added DocEntry after saving a document.
Can "pVal" argument help me or should I use something else?
Thanks in advance
Lorenz Stierlin
Hi PietroCould you please provide us with some more information about your rule.
What is the use case? DocEntry of which document? Which trigger do you use in your rule? Etc.
For example you can read out the latest DocEntry of Sales Quotations with a sql query:
[CODE]
select MAX(docentry) as DocEntry from OQUT;
[/CODE]
Kind Regards,
Lorenz
Paolo Manfrin
Hi Pietro,pVal cannot help you in this case as there is a function in the standard SAP SDK exactly for that called GetNewObjectCode
[CODE]
deliveryDraft.Add();
string docEntryDraft;
oCompany.GetNewObjectCode(out docEntryDraft);
[/CODE]
hth
paolo
Anders Olsson
Hi Pietro,I don't know if this fits your requirement but to get the DocEntry of the document just added you can use pVal.BusinessObjectKeyString.
Regards,
Anders
0
Please sign in to leave a comment.
Comments
0 comments