Skip to Content
avatar image
Former Member

DI API Error 4002 - To generate this document, first define the numbering series

Hi,

I receive this error:

STATUS: -4002

To generate this document, first define the numbering series in the Administration module

Numbering is defined and active. New BPs are created fine from the UI using autoincrement. User for the script is the same as in UI.

My code (php):

$vBpCard = $sapCom->GetBusinessObject(2);
$vBpCard->CardName = $vars_companyname;
$vBpCard->CardType = 0;
$vBpCard->Series = 1;
$vBpCard->Phone1 = $vars_phone;
$vBpCard->EmailAddress = $vars_email;
$vBpCard->add();
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Dec 19, 2017 at 12:54 PM

    Never mind, Series had to be 70. I noticed that the series was wrong when cheking existing OCRD rows.

    Add comment
    10|10000 characters needed characters exceeded