Skip to Content

How to change a document status to Printed in DI even if the BP is inactive?

Hi,

Now I have an issue in my DI App to update a invoice document status to Printed when the BP is inactive. When I try to update the document then I get an error from DI, the error code is -10 and the error message is "10001071 - Customer XXX is inactive". The interesting thing is I can print the document in SAP client and the document status can be changed to Printed even the BP is inactive. So I am wondering if there is something not right in my DI App when trying to updating the document status? See below my code in C#.

SAPbobsCOM.Documents doc = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);

if (doc.GetByKey(4))

{

doc.Printed = SAPbobsCOM.PrintStatusEnum.psYes;

}

int ret_val = doc.Update();

if (ret_val != 0)

{

int err_code = 0;

string err_msg = string.Empty;

oCompany.GetLastError(out err_code, out err_msg);

}

Thanks,

Lan

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 06, 2015 at 03:05 PM

    So far, the only workaround I can think is that I set the BP to active before I change the document Printed status then change the BP back to inactive after I finish changing the Printed status. This solution requires lot of extra DI transactions which could bring risks to our accounting dept.

    Any idea?

    Thanks,

    Lan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi there, im trying to accomplish the same thing. Create a invoice marked with "Open - Printed" in the Status field of the invoice.

      As far i undersand BP means BusinessPartner and i dont understand what you guys meen by set the BP to active before setting the PrintedSstatus to psYES.

      In my case the BP is active, and still, there's no effect of me setting the "Printed" WSDL field to psYes.

      Care elaborate what BP active/inactive means in your context?

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.