Skip to Content
avatar image
Former Member

How to know if created document is a draft

Hi, I'm creating a Sales Order through DI API. If the document does not have discount it add's it directly to SAP. If it has a discount it goes through an approval process in SAP and it is created as a Draft.

When I execute the .Add() procesude for the document, how can I determine if a draft was created or a final document?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Dec 23, 2014 at 07:52 AM

    Hi Youval,

    Use the

          ObjectType = oCompany.GetNewObjectType();

    method to get the newly created object type.

    If the ObjectType = 112, it is a draft created.

    Regards

    Edy

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 23, 2014 at 04:31 AM

    hi.

    u can check it in database....

    using record count...

    before pressing the add.

    check the total records then

    after add again check it in data base records.

    i think odrf....table...

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 23, 2014 at 07:52 AM

    Hi Youval,

    after adding the document, call SBO_Company.GetNewObjectType() -> if it returns 112 you got a draft.

    regards,

    Maik

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 23, 2014 at 11:25 AM
    Add comment
    10|10000 characters needed characters exceeded