Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Freight Carrier missing while creating sales order using BAPI

Former Member
0 Likes
1,752

Hi All,

I am using BAPI BAPI_SALESORDER_CREATEFROMDAT2 to create sales order. At header level, I am passing sold-to-party,ship-to-party and Freight Carrier fields as partners.

When the sales order is created it is creating partners sold-to-party,ship-to-party but freight carrier is missing in the partners.

To partners inernal table, I am passing the partner role and partner number as following:

int_partners-PARTN_ROLE = 'AG'.

int_partners-PARTN_NUMB = int_order-kunnr.

append int_partners.

clear int_partners.

int_partners-PARTN_ROLE = 'FC'. "Frieght carrier

int_partners-PARTN_NUMB = int_order-kunnr2.

append int_partners.

clear int_partners.

int_partners-PARTN_ROLE = 'WE'.

int_partners-PARTN_NUMB = int_order-kunnr1.

int_partners-NAME = int_order-name1.

int_partners-NAME_2 = int_order-name2.

int_partners-STREET = int_order-street.

int_partners-POSTL_CODE = int_order-post_code1.

int_partners-COUNTRY = int_order-country.

int_partners-CITY = int_order-city1.

int_partners-REGION = int_order-region.

int_partners-TRANSPZONE = int_order-transpzone.

int_partners-TAXJURCODE = int_order-taxcode.

int_partners-district = int_order-city2.

append int_partners.

clear int_partners.

Freight Carrier is set up as a "Vendor" instead of Customer in our system.

If anyone has solution to pass "Freight Carrier" through BAPI, please let me know.

Thanks,

Sonali.

12 REPLIES 12
Read only

Former Member
0 Likes
1,452

Hi,

Code wise what ever you are doing is correct.

May be the Customer is not defined or something on those grounds. Have you checked the BAPI return messeges?

Sri

Read only

0 Likes
1,452

Hi Sri,

I have checked the BAPI message and there are no errors. Sold-to-party,ship-to-party are set up as customers but Freight Carrier is set as Vendor. Does this make any difference?

Thanks,

Sonali.

Read only

0 Likes
1,452

May be i am not sure though. May be you can try to create a sales order in test system thru VA01 and try giving the Freight Carrier and the vendor number and see if the system accepts it.

Sri

Read only

0 Likes
1,452

I tried manually using VA01 and works fine. Problem is only with the BAPI.

If anyone has any solution please let me know.

Thanks,

Sonali.

Read only

Former Member
0 Likes
1,452

Hi,

If it is direct shipto process, then Freight Carrier would be the vendor only. Use vendor as frieght carrier.

Regards

Kannaiah

Read only

0 Likes
1,452

I am using Vendor as Freight Carrier but BAPI is not inerting that partner into the salesorder.

Thanks,

Sonali.

Read only

0 Likes
1,452

Whats the return value u r getting and whats the partner function used for frieght carrier when you created manually the sales order.

Regards

Kannaiah

Read only

0 Likes
1,452

I am not getting any errors as BAPI return. While creating manually and using BAPI I am using partner function 'FC' for Freight carrier.

Thanks,

Sonali.

Read only

0 Likes
1,452

Hi,

Check for that particular customer and vendor what partner functions are defined in the customer and vendor master.

Regards

Kannaiah

Read only

0 Likes
1,452

For Vendor (Freight carrier) , I checked the master data and it has partner function defined as VN (vendor).

I have another issue with the salesorder create BAPI:

I am getting error

"E - 000010 : Condition rate does not agree with init. indicator for condition PR00"

when I am updating the PR00 condition value with '0.0' .

Please advice if anyone has any idea.

Thanks,

Sonali.

Thanks,

Sonali.

Read only

Former Member
0 Likes
1,452

Solved

Read only

0 Likes
1,452

This message was moderated.