on 05-18-2009 5:24 PM
Hi Gurus,
I am creating a sales order using CRMD_ORDER and trying to update the condition rate in ABAP. I need to know how exactly i can do the same.
I have identified CRM_COND_COM_BADI and CRM_PRICING_I_BADI but I don't know which parameters to alter in order to update the condition rate.
Regards.
Hi Charles,
Here is a piece of code which i used to update pricing conditions.
From here you can see what all fields are to be passed to maintain price conditions.
y_lwa_pric_cond_change-stunr = y_lwa_pric_cond-stunr.
y_lwa_pric_cond_change-zaehk = y_lwa_pric_cond-zaehk.
y_lwa_pric_cond_change-waers = y_lwa_pric_cond-waers.
y_lwa_pric_cond_change-kbetr = y_lwa_pridoc-ypriccndp.
INSERT y_lwa_pric_cond_change INTO TABLE y_li_pric_cond_change.
y_lwa_pridoc-cond_change = y_li_pric_cond_change.
INSERT y_lwa_pridoc INTO TABLE p_it_pridoc.
y_lwa_input_fields-ref_guid = y_lwa_pridoc-ref_guid.
y_lwa_input_fields-ref_kind = 'B'.
y_lwa_input_fields-objectname = 'PRIDOC_COM'.
y_lwa_field_names-fieldname = 'LIST_PRICE'.
INSERT y_lwa_field_names INTO TABLE y_li_field_names.
y_lwa_field_names-fieldname = 'DISCOUNT'.
INSERT y_lwa_field_names INTO TABLE y_li_field_names.
y_lwa_field_names-fieldname = 'NET_PRICE'.
INSERT y_lwa_field_names INTO TABLE y_li_field_names.
y_lwa_input_fields-field_names = y_li_field_names.
INSERT y_lwa_input_fields INTO TABLE y_ct_input_fields.
REFRESH y_li_field_names.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_pridoc = p_it_pridoc
CHANGING
ct_orderadm_i = p_it_orderadm_i
ct_input_fields = y_ct_input_fields.
Let me know if you need any clarrification.
Regards,
Vinay Sah
Edited by: Vinay Sah on May 26, 2009 11:17 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
CRM_ORDER_MAINTAIN is the functional module which actuallu handles the transaction CRMD_ORDER .So if you put a breakpoint in CRM_ORDER_MAINTAIN and then run the transaction CRMD_ORDER .
After doing thorough debug you will get the parameter which actually chnage the conditions .
In your ABAP code you can call the funtioan module and pass the parameter value to change the condition rate .
If it helps please provide number for the answer .
Thnaks & Regards
Debasri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear charles,
It is very difficult through abap but it is very easy through java user exit try to do with java user exit.
Thanks and Regards
shanto aloor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Charles.
Following threads might be handy. I guess the BAdi's you have is fine. Implement the merge methods of them.
Also, look at FM's with : PRC_PD* in SE37 and you will find the one you need.
Regards
Apoorva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.