on 01-09-2014 7:21 AM
Hi All,
I am trying to update the price agreements of a line item based on easy condition entry in Frame agreement. I have implemented using the order save BADI. But if i save an agreement, it is updating the price agreement, If i again go to frame agreement and add another line item, it is again updating the price agreement record for already saved item giving duplicate entries.
I tried with these parameters
Can anyone suggest how to code such a way it will create a record if the line item is new and update a record if the line item is old?
Thanks in advance,
Prathyusha VJ.
Hi Devashish,
Tried it as well but could not resolve.
There are two modes available in the structure for maintaining
ow_maint_mode_on_select and db_mode with possible values A(create) and B (change).
I have passed both with different combinations but it is still creating duplicates.
Please suggest if you are aware of the exact value to be manitained for this mode.
Regards,
Prathyusha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Devashish,
i have passed ref_kind = 'B' as well but no use.
As of now, i am maintaining values based on the old and new item guid.
if the item guid is new, i am maintaining price agreements otherwise skip.
My only problem comes when user changes the conditional amount values of old item line..as without this logic, it will create duplicate entries.
If anyone had been successful with this price agreement maintenance, please share your thoughts if i am missing any other parameters. I have almost passed the few required.
Regards,
Prathyusha.
Hellp Pratyusha,
There might be a possiblity that you might need to pass the below field as well .
Please make a try with passing this field : mnt_ow_maint_mode_on_select.
wa_price_aggrements-mnt_ow_maint_mode_on_select = 'B'.
This is also present in the structure that you are passing to CRM_PRICE_AGRMNTS_MAINTAIN_OW function module.
Regards,
Devashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Janakipratyusha,
You can check if the record is new or not based on the order item guid that will be generating.
Based on this guid you can easily check if the line item is a new one or the one that needs updation.
After that, you can apply logic as :
IF Item is new :
--- loop
wa_price_agreements-db_mode = 'A'. " To create new line item
endloop.
ELSE.
--- loop
wa_price_agreements-db_mode = 'B'. " To update the line item
endloop.
Regards,
Devashish
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.