Application Development 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: 

Material Master- Display changes thr' Z-program

Former Member
0 Kudos

Hi,

I have created two custom fields in MM01, which appear as DISPLAY

only fields.

The value in these fields is populated depending on some another

Z-field. This value is populated in database table thr' one Z-program.

But reqmt is like, whenever the value is changed thr' Z-program,

material master - Environment Menu>Display changes, should display the

change history for that material.

Can we use some 'CHANGEDOC*' function modules in Z-program so that it

will record the user name , tcode, time and date in CDHDR table?

If yes, what are those FM's and what should be the sequence for using

those function modules?

Thanks in advance,

Prasad

3 REPLIES 3

Former Member
0 Kudos

Hello,

First you will have to go to the domain level and click a flag for change documents in attributes. Once you have done that you need to put those fields in the object for mara. For that you need to go to transaction SCDO. Find the the material object and add your fields there. Do not forget to regnerate teh program. Now once you have done that try to see if you are getting the change pointers if not then you will have to code to create the same using these

<b>

SCD0 Change document creation

CHANGEDOCUMENT_CLOSE Change document: Close change document creation

CHANGEDOCUMENT_INSERT_NUMBER

CHANGEDOCUMENT_IS_GENERATED

CHANGEDOCUMENT_MULTIPLE_CASE Change document: Create change document items (multiple case)

CHANGEDOCUMENT_OPEN Change document: Open change document creation

CHANGEDOCUMENT_PREPARE_TABLES Change document: Edit tables for change document

CHANGEDOCUMENT_SINGLE_CASE Change document: Create change document items (single case)

CHANGEDOCUMENT_TEXT_CASE Change document: Create change document items (text case)

</b>

Former Member
0 Kudos

Hello Prasad,

I have the same problem as you do. Some field value that is set to DISPLAY only should now be changed through a Z-program. The changes should be documented as change documents.

Did you manage to get this report working with all these 'CHANGEDOC*' function modules? Which ones did you use? Maybe you could post some example coding?

Thanks in advance,

Roland

Former Member
0 Kudos

Hi prasad,

1. There are a couple of things important.

2. a) That particular fiellds, in the table,

(ie, the data element of those fields)

should have the CHECK BOX

'CHANGE DOCUMENT' ticked.

Only then, can sap, record the changes,

other wise not.

b) Environment Menu>Display changes, should display the

change history for that material

For that, using the tcode SCDO

, u will have to change

the CHANGE DOCUMENT parameters

of 'MATERIAL'

3. Then everything will become automatic !!!

regards,

amit m.