Application Development 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: 

Create Sales Order using BAPI

Former Member
0 Kudos

Hi all,

Apparently, I am using BAPI_SALESORDER_CREATEFROMDAT2 to create sales order. However, before any sales order being created, there is a condition that I need to apply:

1) If customer is paying by 'CASH', payment terms of header data will be set to empty, see below:

order_header_in-pmnttrms = space.

2) If customer is paying by 'Bank Transfer', payment terms of header data will be refer to customer's payment terms from customer master sales data (KNVV) that set in the system.

Based on the above conditions, item (2) works well for me, but not for item (1). I tried to set the payment term as empty but it still referring to customer sales data's payment terms after sales order creation.

Is this caused by sales order type (where standard sales order is created)? or otherwise?

Any advise will be greatly appreciated.

Thanks and regards,

Patrick

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

For Item No 1 it won't work because payment terms is taken from customer master data when you enter the customer is sales order .

In case item 2 works because you take customer master data .

In your case to work you will have code in the userexit and change the value of payment terms to work .

or take from customer master .

This are the userexits or enhancement .

SDTRM001 Reschedule schedule lines without a new ATP check

V45A0001 Determine alternative materials for product selection

V45A0002 Predefine sold-to party in sales document

V45A0003 Collector for customer function modulpool MV45A

V45A0004 Copy packing proposal

V45E0001 Update the purchase order from the sales order

V45E0002 Data transfer in procurement elements (PRreq., assembly)

V45L0001 SD component supplier processing (customer enhancements)

V45P0001 SD customer function for cross-company code sales

V45S0001 Update sales document from configuration

V45S0003 MRP-relevance for incomplete configuration

V45S0004 Effectivity type in sales order

V45W0001 SD Service Management: Forward Contract Data to Item

V46H0001 SD Customer functions for resource-related billing

V60F0001 SD Billing plan (customer enhancement) diff. to billing plan

Please reward if useful.

3 REPLIES 3

Former Member
0 Kudos

Hi ,

For Item No 1 it won't work because payment terms is taken from customer master data when you enter the customer is sales order .

In case item 2 works because you take customer master data .

In your case to work you will have code in the userexit and change the value of payment terms to work .

or take from customer master .

This are the userexits or enhancement .

SDTRM001 Reschedule schedule lines without a new ATP check

V45A0001 Determine alternative materials for product selection

V45A0002 Predefine sold-to party in sales document

V45A0003 Collector for customer function modulpool MV45A

V45A0004 Copy packing proposal

V45E0001 Update the purchase order from the sales order

V45E0002 Data transfer in procurement elements (PRreq., assembly)

V45L0001 SD component supplier processing (customer enhancements)

V45P0001 SD customer function for cross-company code sales

V45S0001 Update sales document from configuration

V45S0003 MRP-relevance for incomplete configuration

V45S0004 Effectivity type in sales order

V45W0001 SD Service Management: Forward Contract Data to Item

V46H0001 SD Customer functions for resource-related billing

V60F0001 SD Billing plan (customer enhancement) diff. to billing plan

Please reward if useful.

0 Kudos

Hi Dinesh,

I am using BAPI_SALESORDER_CREATEFROMDAT2 to create sales order and change payment term as empty value (for CASH payment), can we still using an user exits in conjuction with the use of above BAPI?

Cheers,

Patrick

0 Kudos

Hi,

User has decided not to apply the above.

Thanks and regards,

Patrick