Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Change Document - CDHDR

Former Member
0 Likes
1,305

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
972

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.

7 REPLIES 7
Read only

Former Member
0 Likes
972

No limititations, i don t have your code extract, but could it be that you have a check on SY-BATCH or SY-BINPT ?

Read only

Former Member
0 Likes
973

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.

Read only

0 Likes
972

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

Read only

0 Likes
972

Do you see any error message in SM13 ?

Read only

0 Likes
972

No Kris, No error is found in SM13

Thanks and Regards,

Kasi S

Read only

0 Likes
972

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

Read only

0 Likes
972

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.