cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with BAPI BAPI_SALESORDER_CREATE

Former Member
0 Kudos

Hello Exterties,

I have problem with BAPI BAPI_SALESORDER_CREATE.

I'm passing a different Sold-to party & Ship-to party to this BAPI.

But in the BAPI it is checking in table KNVP for Ship-to party.

There are two records for the Ship to party. So normaly we can't select the single Ship-to party using the Popup in BAPI.

Please help me in this issue.

Thanks in advance.

BR,

Vaiji.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vaijeenath

What is the error that you are getting?

Thanks

Former Member
0 Kudos

The Error is:

Processing customer 30256 terminated.

BR.

Former Member
0 Kudos

In the BAPI.. the system must be just checking the table KNVP , if the partenr is maintained or not.

Try to put a break-point and debug the bapi while creating the sales order.

Former Member
0 Kudos

Yes i hv checked.

But it is getting 2 ship-to party's. Because of this it is Terminating.

the query is:

SELECT * FROM KNVP INTO TABLE XKNVP WHERE VKORG = I_VKORG

AND VTWEG = I_VTWEG

AND SPART = I_SPART

AND PARVW = I_PARVW

AND KUNN2 = I_KUNNR.

...

Former Member
0 Kudos

It is surprising..

Here KUNN2 = I_KUNNR , the system must be just validating the Ship-To party number you enterd while creating the sales order.

Is there any other validation after select query?

Former Member
0 Kudos

yes it is desxcribing the table:

DESCRIBE TABLE XKNVP LINES LCOUNT.

and LCOUNT = 2.

case 2. then,

RAISE NO_PARTNER_SELECTED.

You can check with funct: SD_PARTNER_GET_SOURCE_PARTNER

Edited by: Vaijeenath on Mar 19, 2009 8:39 AM