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: 

Req. to know, to which to pass prmontl discnt in BAPI_SALESORDER_SIMULTE

Former Member
0 Kudos
97

Hi SAP Gurus,

I want to get the trade promotional discount when order is simulating. Hence i am using the bapi BAPI_SALESORDER_SIMULATE , and i don't know to which field i have to pass promotional codes in this BAPI .

Please let me know to which field i have to pass the promotional codes to ge the promotional discounts.

Thanks in advance.

Regards

Harikrishna

4 REPLIES 4

Former Member
0 Kudos
64

SEE THE FOLLOWING EXAMPLE:

REPORT z_salesorder_simulate.

DATA: order_header_in LIKE bapisdhead,

order_items_in LIKE TABLE OF bapiitemin,

return LIKE bapireturn,

wa_order_items_in LIKE LINE OF order_items_in,

order_partners LIKE TABLE OF bapipartnr,

wa_order_partners LIKE LINE OF order_partners,

order_items_out LIKE TABLE OF bapiitemex,

wa_order_items_out LIKE LINE OF order_items_out.

order_header_in-doc_type = 'TA'.

wa_order_items_in-material = '000000000000000001'.

wa_order_items_in-req_qty = '1000'.

APPEND wa_order_items_in TO order_items_in.

wa_order_partners-partn_role = 'AG'.

wa_order_partners-partn_numb = '0000000001'.

APPEND wa_order_partners TO order_partners.

Execute Function Module BAPI_SALESORDER_SIMULATE

CALL FUNCTION 'BAPI_SALESORDER_SIMULATE'

EXPORTING

order_header_in = order_header_in

IMPORTING

return = return

TABLES

order_items_in = order_items_in

order_partners = order_partners

order_items_out = order_items_out.

The return structure gives any error messages

WRITE: return-message.

Print out the order items

LOOP AT order_items_out INTO wa_order_items_out.

WRITE: wa_order_items_out-material,

wa_order_items_out-short_text,

wa_order_items_out-subtotal_2.

ENDLOOP.

Edited by: krupa jani on Nov 24, 2008 7:00 AM

Former Member
0 Kudos
64

These are the Importing Parametres

ORDER_HEADER_IN

CONVERT_PARVW_AUART

ORDER_HEADER_IN is of structure BAPISDHEAD

CONVERT_PARVW_AUART is of type BAPIFLAG-BAPIFLAG field.

Thsi is a Single-Character Indicator.

0 Kudos
64

Hi,

Thanks for you response. But my promotion code is of 7 characters. Based on this promotion codes the discount has to be calculated and it is at the item level.

Let me know if you can guide me.

Thanks a lot for your interest shown .

Regards

Harikrishna

Former Member
0 Kudos
64

hi friend

according to my example (which i past here) u can set your own code.