cancel
Showing results for 
Search instead for 
Did you mean: 

adding sales order into delivery note using sap b1 sdk

Former Member
0 Kudos

Hello

well i am trying to add sales order in delivery note but at the time of .add it gives error "base doc mismatch " using sap b1 sdk

i am working on sap b1 8.82 on sap 8.8 it works fine

here is code

odocument.basetype = 17

oducment.baseentry = sales order docentry

odocument.baselineno = 0

it gives error as "base doc mismatch"

please help me to resolve it

thanks in advance

regards

Haider

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you are trying to add a new delivery note and have it associated with an existing sales order, then what you have shown looks OK, but it doesn't look like it is the acual code ('sales order docentry' looks like a shortcut).  It might help if you pasted the real code.

Other than that, the baelineno field must be the same value as the linenum property for each line item on the sales order.  If you have 3 line items, then baselineno must be different on each and must correspond to the linenum on the  line in the SO that matches the item number on the DN.

Former Member
0 Kudos

Hey John

thanks for reply

yes i am passing sales order docentry or docnum to delivery document baseentry ?

is there any other code that i need to pass to it ?

i am trying the same on SAP 8.8 providing the sales order doc entry to delivery document object baseentry like this

odeliverydoc.baseentry = sales order docentry no

odelivery.basetype = 17

sales order have just one item so i am passing

odelivery.linenum = 0

it works fine but if same code i try on SAP 8.82 it causes error "base doc mismatch "

do i also need to pass other values from sales order too to the odelivery object

plz reply me as i have stuck in this situation and have deadline to deliver it

thanks in advance

Haider

Former Member
0 Kudos

is there any difference between sales order code or doc entry ?

howi can get the selected sales order code ?

Former Member
0 Kudos

I don't know what you mean by sales order code.  For all marketing documents there is a docnum and a docentry field.  The docnum field is the one that you see on the screen.  Docentry is the actual key to both the header and lines tables (e.g. ordr/rdr1).  You should definitely be loading docentry to the baseentry field. 

You must always load the actual line number from the sales order line item into the baselineno field. You should NOT assume that it will always be zero.

I would like to suggest again that you post your actual code and not "psuedo-code".  In your first post you show this line:

odocument.baselineno = 0

In your latest example you show this code:

odelivery.linenum = 0

The first one is using the correct field.

Former Member
0 Kudos

hey

well issue is resolved

thanks

Former Member
0 Kudos

Good!  What was the problem? Its a good idea to mark the thread as answered and post the solution so others with the same problem can benefit.

Former Member
0 Kudos

well issue was improper placement  of sales order doc entry  into the delivery note object so once the right sales order doc entry was placed into the delivery document object issue resolved

thanks for all of you JOHN and Bryan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

John is correct. Thus the basetype = 17 is existing in Sales order?

Former Member
0 Kudos

basetype =17 we pass when we want to link sales order to delivery not

and basetype =17 is odelivery object method

odelivery.basetype = 17

can u please paste code here in order to make delivery note from sales order

thanks in advance