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: 

Setting List price for Sales Order through the use of bapi_salesorder_createfromdat2

imranmohamed007
Discoverer
0 Kudos
825

Hello,

I am a NOOB with regards to using SAP ECC BAPIs (also somewhat of a NOOB when it comes to SAP but still know how to navigate to the different modules), and I have been tasked with modifying a process (in Jitterbit - ETL tool) that creates an Order in SAP by using the BAPI_SALESORDER_CREATEFROMDAT2. This process is working fine and the Order gets created. My task is to use the BAPI to set the list price per line item to a specific price and not use the price that gets fetched from the SAP price list.

I have tried the following link

https://answers.sap.com/questions/3430732/pricing-determination-for-creating-sales-order-usi.html

but with no luck. I am hoping someone can guide me here by showing either a sample on how it can be done, and/or perhaps also send a link to documentation for the BAPI and for error codes that get returned. When I tried the above link, I got some error numbers back, but I have no idea what they mean as I do not know where to locate the error messages.

1 ACCEPTED SOLUTION

Eduardo-CE
Active Participant
0 Kudos
694

Hi Imran,

Looks like you are missing COND_UNIT, this code works for me:

*** CONDITIONS ***
lw_conditions_in-itm_number = '000010'. " Posición documento ventas
lw_conditions_in-cond_type = 'PPSV'. " Clase de condición
lw_conditions_in-cond_value = lw_sd02-cond_value. " Importe o porcentaje de la condición
lw_conditions_in-currency = lw_sd02-currency. " Clave de moneda
lw_conditions_in-cond_unit = lv_meins. " Unidad de medida para la condición

APPEND lw_conditions_in TO lt_conditions_in.
FREE: lw_conditions_in.
*** CONDITIONS ***

5 REPLIES 5

Eduardo-CE
Active Participant
0 Kudos
694

Hi,

What's the error number and message that you get? also please post your code, I might be easier to see whats going on.

Regards, Eduardo.

0 Kudos
694

Hi Eduardo,

There is no code as this is used in an ETL tool where I need to map over the fields. Currently I am getting errors:

233, 421 & 248

What I am looking for is what fields do I need to map in order to allow Create Order to set the list price for each line item.

See below: This is how I was mapping over Order_Conditions_IN and Order_Conditions_INX. I was following the guide and setting the values as in the link I found.

Eduardo-CE
Active Participant
0 Kudos
695

Hi Imran,

Looks like you are missing COND_UNIT, this code works for me:

*** CONDITIONS ***
lw_conditions_in-itm_number = '000010'. " Posición documento ventas
lw_conditions_in-cond_type = 'PPSV'. " Clase de condición
lw_conditions_in-cond_value = lw_sd02-cond_value. " Importe o porcentaje de la condición
lw_conditions_in-currency = lw_sd02-currency. " Clave de moneda
lw_conditions_in-cond_unit = lv_meins. " Unidad de medida para la condición

APPEND lw_conditions_in TO lt_conditions_in.
FREE: lw_conditions_in.
*** CONDITIONS ***

0 Kudos
694

Ok, will try right now and let you know

imranmohamed007
Discoverer
0 Kudos
694

Hi Eduardo, after setting the Unit, I was able to get it to work (well sort of) for some of the orders that get created. If there is already price condition set for a product, then it will not work because of the way our SAP is setup. I will probably need to ask one of our developers to extend the BAPI (into a new custom BAPI) to allow adding a new price condition (or something to that effect).

Thank you for replying and guiding me in the right direction.