on 05-02-2012 7:11 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
Hi,
John is correct. Thus the basetype = 17 is existing in Sales order?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.