2007 May 24 9:56 PM
Hi
I am using BAPI_PRICES_CONDITIONS for creating pricing conditions.
I did not understand what parameters I have to pass for updation of pricing record. i.e.
My requirement is
Step 1 - Creating Pricing record with start date as 01/01/2007 and end date as 12/31/999 using above BAPI.
In Setp 1 I could able to create Pricing condition successfully and I am getting condition number also.
Step 2 - If I want to create new pricing condition for the same condition type with start date as 02/01/2007 and end date as 12/31/9999. (Please note this date range is with in the date range what I have provided in Step 1)
Here I am expecing BAPI to update existing record with changing pricing date.. And inserting new record using new pricing condition.
Whereas the BAPI does not give the result as per the expected way.
I am using MSGFN as '009'. If I use even '005' I am not able to achieve my requirement..
Pl. let me know how to solve above problem and I gald to know the solution at the earliest.
Thanks in Advance.
Regards
Suneel.
Hi
I am using BAPI_PRICES_CONDITIONS for creating pricing conditions.
I did not understand what parameters I have to pass for updation of pricing record. i.e.
My requirement is
Step 1 - Creating Pricing record with start date as 01/01/2007 and end date as 12/31/999 using above BAPI.
In Setp 1 I could able to create Pricing condition successfully and I am getting condition number also.
Step 2 - If I want to create new pricing condition for the same condition type with start date as 02/01/2007 and end date as 12/31/9999. (Please note this date range is with in the date range what I have provided in Step 1)
Here I am expecing BAPI to update existing record with changing pricing date.. And inserting new record using new pricing condition.
Whereas the BAPI does not give the result as per the expected way.
I am using MSGFN as '009'. If I use even '005' I am not able to achieve my requirement..
Pl. let me know how to solve above problem and I gald to know the solution at the earliest.
Thanks in Advance.
Regards
Suneel.
2007 May 24 10:17 PM
See the Example one -
wtable1-table_no = '306'.
wtable1-applicatio = 'V'.
wtable1-cond_type = 'ZPR0'.
wtable1-operation = '009'.
wtable1-varkey = '13001001USD 000000000050068946'.
wtable1-valid_to = '99991231'.
wtable1-valid_from = '20051101'.
wtable1-cond_no = '$000000001'.
APPEND wtable1 TO table1.
wtable2-operation = '009'.
wtable2-cond_no = '$000000001'.
wtable2-created_by = sy-uname.
wtable2-creat_date = '20051022'.
wtable2-cond_usage = 'A'.
wtable2-table_no = '110'.
wtable2-applicatio = 'V'.
wtable2-cond_type = 'ZPR0'.
wtable2-varkey = '13001001USD 000000000050068946'.
wtable2-valid_from = '20051101'.
wtable2-valid_to = '99991231'.
APPEND wtable2 TO table2.
wtable3-operation = '009'.
wtable3-cond_no = '$000000001'.
wtable3-cond_count = '01'.
wtable3-applicatio = 'V'.
wtable3-cond_type = 'ZPR0'.
wtable3-scaletype = 'A'.
wtable3-scalebasin = 'C'.
wtable3-scale_qty = '1'.
wtable3-cond_p_unt = '1'.
wtable3-cond_unit = 'EA'.
wtable3-calctypcon = 'C'.
wtable3-cond_value = '454'.
wtable3-condcurr = 'USD'.
APPEND wtable3 TO table3.
CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
EXPORTING
PI_initialmode = 'X'
PI_BLOCKNUMBER =
TABLES
ti_bapicondct = table1
ti_bapicondhd = table2
ti_bapicondit = table3
ti_bapicondqs = table4
ti_bapicondvs = table5
to_bapiret2 = table6
to_bapiknumhs = table7
to_mem_initial = table8
EXCEPTIONS
update_error = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
loop at table6 into ret.
write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
RET-PARAMETER,RET-ROW,RET-FIELD.
endloop.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*EXPORTING
WAIT =
IMPORTING
return = ret
.
ENDIF.
Reward Points if it is helpful
Thanks
Seshu
2007 Sep 06 1:46 AM
I have same issue as Sunil. Not able to update the pricing conditions when I change the dates. It works for the amount.
Can anyone help on this????
Thanks,
Karthik