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

Hello ABAPERS

ramoruamodisha
Explorer
0 Likes
1,407

Hi All

Please could anyone of you who knows help me, below is my problem:

I am using a BAPI BAPI_MATERIAL_SAVEDATA to make changes to Material Master, now when I run a report to see what changes were made on the Material Master, SAP has stored the changes transaction in table CDHDR-TCODE as 'MM01(BAPI)' or 'MM02(BAPI)'.

I have tried to debug this BAPI to see where this changes transaction in the history table CDHDR is determined and I could not find it. Please see below:

Please anyone who has done or seen this please share, points will be awarded and your help will be highly appreciated.

Thanks

Ramo

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,274

Perform a where-used on FM MATERIAL_WRITE_DOCUMENT, then add break-point at calls found, and run your report.

Regards,

Raymond

7 REPLIES 7
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,274

Moderator Message: Please use proper subject line in future.

Read only

Former Member
0 Likes
1,274

Hi Ramo,

You need to use function modules in order to retrieve the data and CHANGEDOCUMENT_READ_HEADERS should get the data that you need.

(Other useful function modules include:

CHANGEDOCUMENT_DISPLAY

CHANGEDOCUMENT_READ

CHANGEDOCUMENT_READ_HEADERS)

I hope that helps.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,275

Perform a where-used on FM MATERIAL_WRITE_DOCUMENT, then add break-point at calls found, and run your report.

Regards,

Raymond

Read only

0 Likes
1,274

Hi Raymond

I did all you suggested but It does not seems to be on any of those MATERIAL_WRITE_DOCUMENT function calls.

Thanks though.

Any other ideas where SAP could be writing this info into the change documents tables?

Read only

0 Likes
1,274

Those documents are created (in update task !) in this FM (*), look at it once again.

What do you exactly want to know, is it Note 1050255 - Transaction code in change documents not actionable  or Note 1682898 - Change Document: Detailed T-Code for BAPI_MATERIAL_SAVEDATA ?

Regards,

Raymond

(*) Look at transaction SCDO for change objects and there position at MATERIAL and navigate to FM.

(added OSS notes links)

Read only

0 Likes
1,274

Hi Raymond

The MATERIAL_WRITE_DOCUMENT wher-used-list did the trick thanks a lot...

Much appreciated.

Read only

Former Member
0 Likes
1,274

Run the bapi with ST05 trace switched on.  You should be able to drill down from the report on the updates to CDHDR and CDPOS to find the code.