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

BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
710

hi experts,

I want to add two condition value say 'ZFRA' for header and

'ZHTV' for for item of Sales order bapi.

but it only updating ZHTV for item .

Not for Header i.e ZFRA .. Why..?

Please check my below code.

it_order_cond-COND_TYPE = 'ZFRA'.

it_order_cond-COND_VALUE = '6.00'.

it_order_cond-CURRENCY = 'INR'.

it_order_cond-Cond_count = '01'.

it_order_cond-CONDCOINHD = '01'.

it_order_cond_inx-COND_TYPE = 'ZFRA'.

it_order_cond_inx-Cond_count = '01'.

it_order_cond_INX-updateflag = 'X'.

it_order_cond_inx-COND_VALUE = 'X'.

it_order_cond_inx-CURRENCY = 'X'.

it_order_cond-ITM_NUMBER = '000001'.

it_order_cond-COND_TYPE = 'ZHTV'.

it_order_cond-COND_VALUE = '2.00'.

it_order_cond-CURRENCY = 'INR'.

it_order_cond_inx-ITM_NUMBER = '000001'.

it_order_cond_inx-COND_TYPE = 'ZHTV'.

it_order_cond_inx-COND_VALUE = 'X'.

it_order_cond_INX-updateflag = 'I'.

it_order_cond_inx-CURRENCY = 'X'.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
669

Hi,

Change the Value from X to I in the Header updateflag.

it_order_cond_inx-COND_TYPE = 'ZFRA'.

it_order_cond_inx-Cond_count = '01'.

it_order_cond_INX-updateflag = 'I'.

it_order_cond_inx-COND_VALUE = 'X'.

it_order_cond_inx-CURRENCY = 'X'.

Hope this helps u.

Thanks,

Ruthra

5 REPLIES 5
Read only

Former Member
0 Likes
669

Hi Jim,

pass Item number for header as 0000000 and have a trail.

Read only

Former Member
0 Likes
669

Hi,

Sample code-

itab_order_conditions-itm_number = '000001'.

itab_order_conditions-cond_type = 'PR00'.

itab_order_conditions-currency = 'INR'.

itab_order_conditions-cond_value = l_basic_price.

APPEND itab_order_conditions.

CLEAR itab_order_conditions.

itab_order_conditionsx-itm_number = '000001'.

itab_order_conditionsx-cond_type = 'X'.

itab_order_conditionsx-cond_value = 'X'.

itab_order_conditionsx-currency = 'X'.

APPEND itab_order_conditionsx.

CLEAR itab_order_conditionsx.

Similary pass other condition items.

Regards,

Aparna Gaikwad

Read only

Former Member
0 Likes
670

Hi,

Change the Value from X to I in the Header updateflag.

it_order_cond_inx-COND_TYPE = 'ZFRA'.

it_order_cond_inx-Cond_count = '01'.

it_order_cond_INX-updateflag = 'I'.

it_order_cond_inx-COND_VALUE = 'X'.

it_order_cond_inx-CURRENCY = 'X'.

Hope this helps u.

Thanks,

Ruthra

Read only

Former Member
0 Likes
669

thanks to all

Read only

0 Likes
669

Hi Jim,

How you solved the issue ? Can you kindly share this ?