cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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();

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (0)