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: 

Unable to update the header Pricing Condition of Customer Quotation

Former Member
0 Kudos
731

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

7 REPLIES 7

Former Member
0 Kudos
197

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.

Former Member
0 Kudos
197

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.

0 Kudos
197

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

former_member404244
Active Contributor
0 Kudos
197

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

0 Kudos
197

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

0 Kudos
197

Hi,

Try to change the condition type manually and see.

Regards,

Nagaraj

0 Kudos
197

Manually,from the Transaction I am able to change.

Regards,

Xavier.P