Skip to Content
author's profile photo Former Member
Former Member

Creating a delivery note based on a sales order in SBO2005

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2006 at 01:36 AM

    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...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2006 at 03:52 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2006 at 02:40 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.