‎2008 Feb 27 7:58 AM
HI
I have created a transaction. I have also created a change document object for logging changes to the transaction. I have also made necessary calls in the transaction for logging the changes.
When i change the transaction or enter data manually , a change document is created in CDHDR . The problem is when i upload data into transaction using BDC sessions a change document is not created in CDHDR.
Is there any limition for change documents to be logged when we upload data using BDC, Pl help its urgent.
Suitable answers will be rewarded
Thanks and Regards,
Kasi S
‎2008 Feb 27 8:58 AM
Hi Kasi,
The problem is probably because processing terminates in the BDC as soon as it comes across a COMMIT WORK. SAP writes changes to CDHDR only after a COMMIT, hence you need the BDC to continue.
This is possible.
If you are using CALL TRANSACTION for the BDC then do the following:
data: w_options type CTU_PARAMS.
w_options-dismode = 'E'.
w_options-RACOMMIT = 'X'.
CALL TRANSACTION '<tcode>'
USING itab_bdc_data
OPTIONS FROM w_options.
The line
w_options-RACOMMIT = 'X'.
is very important becasue it means COMMIT WORK does not end CATT procedure.
Please try this and I believe it should work.
Cheers.
‎2008 Feb 27 8:34 AM
No limititations, i don t have your code extract, but could it be that you have a check on SY-BATCH or SY-BINPT ?
‎2008 Feb 27 8:58 AM
Hi Kasi,
The problem is probably because processing terminates in the BDC as soon as it comes across a COMMIT WORK. SAP writes changes to CDHDR only after a COMMIT, hence you need the BDC to continue.
This is possible.
If you are using CALL TRANSACTION for the BDC then do the following:
data: w_options type CTU_PARAMS.
w_options-dismode = 'E'.
w_options-RACOMMIT = 'X'.
CALL TRANSACTION '<tcode>'
USING itab_bdc_data
OPTIONS FROM w_options.
The line
w_options-RACOMMIT = 'X'.
is very important becasue it means COMMIT WORK does not end CATT procedure.
Please try this and I believe it should work.
Cheers.
‎2008 Feb 27 9:30 AM
HI Aditya,
Thanks for the response. I am not using CALL TRANSACTION method and i am using BDC session method in my BDC program. In BDC session method how to fix this issue.
The function module which is generated wehn i create the change document object is called in UPDATE TASK .
Thanks and Regards,
Kasi S
‎2008 Feb 27 9:34 AM
‎2008 Feb 27 9:41 AM
‎2008 Feb 27 9:54 AM
HI guys,
Thanks for your responses. As Aditya said chnage document are getting wrriten only after a COMMIT WORK . But BDC terminates after a COMMIT WORK. As i said before the function module genertaed by change document object for logging the changes in CDHDR is an update task function module. If i call it normally instead of update task the changes are logged even in BDC session processing.
The thing i want to know is, if i call the FM in normal method instead of Update task will the performance be affected. The upload is going to be for 60000 people
Thanks and Regards,
Kasi S
‎2008 Feb 27 10:01 AM
Hi Kasi,
If you are calling the FM in normal mode, ensure you call it only if the BDC has run without any errors. The reason for UPDATE TASK mode is to ensure no CDHDR entries get written if any error occurred. Because errors would prevent COMMIT.
As long as you are ensuring the FM is not called when not needed (as above) then there shouldnt be a performance issue.
Cheers.