2011 Sep 07 9:58 AM
Hi Friends,
I am trying to change the Customer Quotaion using the 'BAPI_CUSTOMERQUOTATION_CHANGE'.
I am able to update the Header details and item details,but When it comes to pricing Conditions the Following errors I am getting
000000: Operations with Conditions of type F not allowed(ZZHD).
as it is a Header pricing Condition, I am passing Item number as 000000,even I tried to Comment and see,but the same issue.
Following is are the pricing Condition details that I am passing to BAPI.
CLEAR: wa_quote_condition_in,
wa_quote_condition_inx.
wa_quote_condition_in-itm_number = '000000'.
wa_quote_condition_inx-itm_number = '000000'.
wa_quote_condition_in-COND_COUNT = '01'.
wa_quote_condition_inx-COND_COUNT = '01'.
wa_quote_condition_in-cond_type = 'ZZHD'.
wa_quote_condition_inx-cond_type = 'ZZHD'.
wa_quote_condition_inx-updateflag = 'U'.
lv_zzhd = ( ls_nd_payment-transport_charg / 10 ).
wa_quote_condition_in-cond_value = lv_zzhd.
wa_quote_condition_inx-cond_value = 'X'.
APPEND: wa_quote_condition_in TO it_quote_condition_in,
wa_quote_condition_inx TO it_quote_condition_inx.
CLEAR: wa_quote_condition_in,
wa_quote_condition_inx.
Please help in tracing the above issue.
Regards,
Xavier.P
Edited by: Xavier on Sep 7, 2011 10:59 AM
Edited by: Xavier on Sep 7, 2011 11:00 AM
2011 Sep 07 10:09 AM
hi,
maybe the pricing condition are linked to itmes and not to header, so you need at least one item to modify it.
Try it with a document having at least one item..
hope ti helps.
2011 Sep 07 10:12 AM
Hi,
I did not find parameter cond_type in BAPI BAPI_CUSTOMERQUOTATION_CHANGE. if you send me your actual code, I will help. In mean while, Please check respective parameters in BAPI BAPI_CUSTOMERQUOTATION_CHANGE.
Ram.
2011 Sep 07 10:22 AM
Hi prasad,
Please find the you will find 'condition type paramter in the structers bapicond, bapicondx.
data :it_quote_condition_in TYPE TABLE OF bapicond,
wa_quote_condition_in TYPE bapicond,
it_quote_condition_inx TYPE TABLE OF bapicondx,
wa_quote_condition_inx TYPE bapicondx.
CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
EXPORTING
salesdocument = ls_nd_payment-vbeln
quotation_header_in = wa_header
quotation_header_inx = wa_header_inx
simulation = 'X'
BEHAVE_WHEN_ERROR =
INT_NUMBER_ASSIGNMENT =
logic_switch = wa_logic_switch
NO_STATUS_BUF_INIT = ' '
TABLES
return = it_bapiret2
quotation_item_in = it_order_items
quotation_item_inx = it_order_items_inx
partners = it_partners
PARTNERCHANGES =
PARTNERADDRESSES =
conditions_in = it_quote_condition_in
conditions_inx = it_quote_condition_inx
QUOTATION_CFGS_REF =
QUOTATION_CFGS_INST =
QUOTATION_CFGS_PART_OF =
QUOTATION_CFGS_VALUE =
QUOTATION_CFGS_BLOB =
QUOTATION_CFGS_VK =
QUOTATION_CFGS_REFINST =
schedule_lines = it_order_schedule
schedule_linesx = it_order_schedule_inx
quotation_text = it_texts
QUOTATION_KEYS =
EXTENSIONIN =
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Regards,
Xavier.P
2011 Sep 07 10:49 AM
Hi,
I don't see any problem with the code. wa_quote_condition-COND_UPDAT = 'X' add this.
Also try to change other condition type and see if it is working
Regards,
Nagaraj
2011 Sep 07 11:01 AM
Hi Nagaraj ,
I was go through going another Function Module /SAPHT/SALES_ORDER_READ which also reads all the pricing Conditions.
I am able to Update all the Pricing conditions( Including Header Condiotns and item Conditions),but I am not able to update only two pricing Conditions whose Condition category(KNTYP) = 'F'.
Where as all the other Pricing conditions have KNTYP = space.
BAPI,'BAPI_CUSTOMERQUOTATION_CHANGE' does not allow me change whose KNTYP = 'F'.
Regards,
Xavier.P
Edited by: Xavier on Sep 7, 2011 12:02 PM
2011 Sep 07 11:19 AM
Hi,
Try to change the condition type manually and see.
Regards,
Nagaraj
2011 Sep 07 11:22 AM
Manually,from the Transaction I am able to change.
Regards,
Xavier.P