‎2005 Nov 07 12:59 PM
Hi,
I have been asked to add condition record based on Sales Org / Material and would like to know if there is a function module available for this instead of coding BDC for the transaction VK11.
Thanks in advance for your help.
Regards
Bala
‎2005 Nov 07 1:08 PM
‎2005 Nov 07 1:08 PM
‎2005 Nov 08 6:09 AM
Hi Vinod,
Thanks for your help.
can u tell me in which version BAPI_PRICES_CONDITIONS will work?
because here i am using 4.7 version, in this i am unable to find the FM.
points will be rewarded soon.
once again thanks in advance.
regards
KBS REDDY
‎2005 Nov 08 7:08 AM
Yes. It is in 4.7 as well as 5.0
Please check it again in SE37
‎2005 Nov 11 9:10 AM
‎2005 Nov 22 11:55 AM
Hi Vinod,
Thanks for your info. now it is working fine.
i am giving full points to you.
here i am sending the code which i used to update.
i hope it will be useful for future for all.
wtable1-cond_usage = 'A'.
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.
‎2005 Dec 14 2:31 PM
Hi there,
Can this be used to effectively delete the conditions record?
Lucy
‎2005 Dec 14 2:35 PM
‎2005 Dec 14 5:05 PM
You only included 3 of the tables used. Do you have a record of the others?
I noticed the condition number with $. This is a temporary number which causes the system to go into create mode ( I think ). Perhaps the way forward is to change the validity date.
Lucy
‎2006 Aug 03 2:03 PM
Where did you find this bapi? I also have v4.7, but I can't find this Fm using SE37. Do you know what module this BAPI belongs to?
‎2006 Aug 03 2:26 PM
Hi Levin,
even i have faced same problem. in my place i have 2 servers one is my company and another one is client. in client m/c i found that. but in my company server i didn't find it. both are 4.7 only. for this my manager told might be some patches are not added in our server. so, if you have any other server you can find it in v4.7
regards,
balu