on 11-21-2007 4:20 PM
Hi there....
I have an in/outbound interface with an external system, interfacing with CRM thru XI via a PROXY. Im able to retrieve data using 'CRM_ORDER_READ' and i can retrieve stuff from the buffer as well using CRM_ORDERADM_H_GET_MULTI_OB, and this works perfectly as I'm able to send info to XI.
However, I have a futher requirement,XI brings back a reference number which I must save to table CRMD_ACTIVITY_H field EXTERN_ACT_ID(its called Ext,No on the screen). Please advise as how to achieve this in the ORDER_SAVE badi,cos it looks like i may need to update the buffer,ive also tried all the
"CRM_ACTIVITY_H_* " FM's but to no success.
Thanks
Zola.
Hi Zola,
This is a two step process, 1- update 2- save.
To post changes to 1Order you need to call the API function <b>CRM_ORDER_MAINTAIN</b>, this API will trigger all the corresponding checks and will update the internal buffer. You will find a lot of importing parameters, this is because 1Order is a framework used by several CRM not only Activity.
To change the attribute EXTERN_ACT_ID you will need to maintain the importing attribute <b>IT_ACTIVITY_H-EXTERN_ACT_ID</b>, CT_INPUT_FIELDS in which you indicate with exact filed has changed and CT_ORDERADM_H or CT_ORDERADM_I depending if you update a header of item.
Finally you need to save these changes using function <b>CRM_ORDER_SAVE</b> and passing in <b>IT_OBJECTS_TO_SAVE</b> the list of object you want change.
Another alternative will be to call directly <b>CRM_ACTIVITY_H_UPDATE_DU</b> and passing in the value to be changed. Note that by using directly this function module without passing by 1Order APIs (maintain + save) you by passed the check logic from in the 1Order framework and potentially lost the validity feedback about the consistency of the data you request to changed. If you use this function module you must be 100% sure about consistency of the data you are about to post.
Hopping this answer your question.
Sincerely,
Alain Gauthier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Alain ,
as i said when i replied you on the email, i havent found a way around this.I need to do this on CREATE of on order.At the point where my BADI kicks in,the database has not commited and thus the values in still in the buffer.Maybe another way of phrasing this would be, how do i change values in the BUFFER?.. if possible.
Thanks
Zola
Alain
I did try CRM_ORDER_MAINTAIN,, but when i use it with CRM_ORDER_SAVE, it gets into an endless loop, and when i cancell it, its shortdumps with
" The ABAP/4 Open SQL array insert results in duplicate database records." on the activity table..
When i leave out CRM_ORDER_SAVE, it runs till it finishes but does not change the field i specify.
please advise
Thanks
Zola
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.