2014 Jan 03 6:52 AM
Hi all,
I want to insert different condition types in the pricing elements in va02 by FM/BAPI. This condition need to assign to one schedule line.
But there is no field relation to the schedule line(konv-j_3aetenr) in table CONDITIONS_IN of BAPI_SALESORDER_CHANGE.
How do? or is there other FM/BAPI can do it?
thanks a lot
Hi all,
I want to insert different condition types in the pricing elements in va02 by FM/BAPI. This condition need to assign to one schedule line.
But there is no field relation to the schedule line(konv-j_3aetenr) in table CONDITIONS_IN of BAPI_SALESORDER_CHANGE.
How do? or is there other FM/BAPI can do it?
thanks a lot
2014 Jan 03 7:12 AM
Hi Freddy,
What you currently passing to BAPI and from where you are getting field konv-j_3aetenr ?
As you mentioned that you want to add/insert one more condition type, You need to add that CONDITIONS_IN and also fill CONDITIONS_INX with respective records.
Thanks
Deependra
2014 Jan 03 8:19 AM
Hi Deependra,
the vlues is:
CLEAR:wa_order_header_inx.
wa_order_header_inx-updateflag = 'U'. "
CLEAR:wa_logic_switch.
wa_logic_switch-cond_handl = 'X'.
it_conditions_in-itm_number = '000010'. "
it_conditions_in-cond_st_no = '050'. "
it_conditions_in-cond_count = '00'. "
it_conditions_in-cond_type = 'ZDC3'. "
it_conditions_in-cond_value = '2.00'.
it_conditions_in-cond_updat = 'X'.
it_conditions_in-cond_p_unt = '1'.
it_conditions_in-cond_unit = 'DZ'.
it_conditions_in-currency = 'USD'.
APPEND it_conditions_in.
CLEAR it_conditions_inx.
it_conditions_inx-itm_number = '000010'.
it_conditions_inx-cond_st_no = '050'..
it_conditions_inx-cond_count = '00'.
it_conditions_inx-cond_type = 'ZDC3'.
it_conditions_inx-updateflag = 'I'. "
it_conditions_inx-cond_value = 'X'. "
it_conditions_inx-cond_p_unt = 'X'.
it_conditions_inx-cond_unit = 'X'.
it_conditions_inx-currency = 'X'.
APPEND it_conditions_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = vbeln_low
* ORDER_HEADER_IN = WA_ORDER_HEADER_IN
order_header_inx = wa_order_header_inx
* SIMULATION =
* BEHAVE_WHEN_ERROR = ' '
* INT_NUMBER_ASSIGNMENT = ' '
logic_switch = wa_logic_switch
* NO_STATUS_BUF_INIT = ' '
TABLES
return = retrun_so
* ORDER_ITEM_IN =
* ORDER_ITEM_INX =
* PARTNERS =
* PARTNERCHANGES =
* PARTNERADDRESSES =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* schedule_lines = it_schedule_lines[]
* schedule_linesx = it_schedule_linesx[]
* ORDER_TEXT =
* ORDER_KEYS =
conditions_in = it_conditions_in[]
conditions_inx = it_conditions_inx[]
* EXTENSIONIN =
.
I neet to insert price condition with schedule line.
konv-j_3aetenr = vbep-etenr.
thanks
freddy,
2014 Jan 03 9:20 AM
Freddy,
I am not able to see J_3etenr in KONV , also not in KONP .whatever you have passed to BAPI seems correct. Only one question why do you want to assign etenr while konv-kposn takes reference with vbep-posnr ?
may be i still didn't got your requirement . could you please explain actual requirement .
Thanks
Deependra
2014 Jan 09 8:31 AM
Deependra,
The field konv-j_3aetenr really exist.
in table KONV,
J_3AETENR ETENR NUMC 4 0 Delivery Schedule Line Number.
And it is actual requirement because i am working for this task.
Now i accomplish it by BDC.But i hope there is FM/BAPI working for it.
Thanks
Freddy
2014 Jan 03 10:28 AM
Hi Freddy,
whatever you do with BAPI you should try it in the respective transaction. I'm not sure you can maintain pricing conditions in the sales order. You may use FUNCTION 'BAPI_PRICES_CONDITIONS' to create the conditions that will be used by your pricing scheme.
Regards
Clemens