on 06-13-2006 10:57 AM
Hi
I am using the diapi to create a delivery note based on a sales order. Everything works well apart from I have 3 user defined fields on the sales order lines, 2 numeric and one which is a combo box.
The 2 numeric values as copied across ok but the combo is not.
I don't know what the delivery number is as I guess SAP assigns that after I save the delivery note.
Can anyone help me with this please ?
Regards Andy
Hi Paul,
You can capture the assigned DOCENTRY by using a query. ex. SELECT MAX(DOCENTRY) FROM ODLN. You can also use the SBO_SP_TransactionNOtification stored procedure which you can trap during Add, Update, Cancel or Delete. Hope this helps...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What i would do is,
1. CReate a new UDF in marketing document (title level) for GUID
2. Generate unique GUID something like this
Guid.NewGuid.ToString before adding the document
3. do a query on the guid created and get the docnum
4. remove the guid created from that document after obtaining the docnum
hope this help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul & Gilbert,
As you assumed, the docentry is created at the moment when you are saving the document.
The docentry for the last created document can be retrieved from the Company object. There are two alternative methods for this: GetNewObjectCode and GetNewObjectKey. Please see the DI API reference for more details. These are the only reliable way to get the last created docentry. A query might work nicely in 95% of the cases, but in a multi-user environment it will sooner or later produce incorrect results.
Henry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.