2008 Nov 20 11:43 AM
hi folks
i want to create a report and the a requirement is:
Whenever a user changes any fields in material master (MM02), a report will display the following fields like
Material No
User Name (Who Changed the fields)
Old Value of the field
New Value of the field
Changed Date and Time.
how can i solve this?
2008 Nov 20 11:58 AM
select objectclas objectid changenr udate utime tcode username
from cdhdr
into table t_changenr
where objectclas eq 'MATERIAL'
and objectid eq s_matnr -- selection screen material
and udate in p_edate
and username in s_ernam.
if sy-subrc ne 0.
message s004(zbhi)
with 'No materials present for the input values'(034).
stop.
endif.
if not t_changenr[] is initial.
sort t_changenr by objectid changenr.
*get the item data from CDPOS
select objectclas
objectid
changenr
tabname
tabkey
chngind
fname
value_old
value_new
cuky_old
cuky_new
unit_old
unit_new
from cdpos into table t_cdpos
for all entries in t_changenr
where objectclas eq 'MATERIAL'
and changenr eq t_changenr-changenr
and objectid eq t_changenr-objectid .
Hope this helps.
cheers,
Lakshmi prasanna Gandham
hi folks
i want to create a report and the a requirement is:
Whenever a user changes any fields in material master (MM02), a report will display the following fields like
Material No
User Name (Who Changed the fields)
Old Value of the field
New Value of the field
Changed Date and Time.
how can i solve this?
2008 Nov 20 11:47 AM
2008 Nov 20 11:55 AM
Hi,
Use MM04 t.code. It displays the material changes.
Enter the material and execute, select the line which has MM02 t.code, choose details.
You will get old value and new value, field.
Regards,
Chandra
2008 Nov 20 11:58 AM
select objectclas objectid changenr udate utime tcode username
from cdhdr
into table t_changenr
where objectclas eq 'MATERIAL'
and objectid eq s_matnr -- selection screen material
and udate in p_edate
and username in s_ernam.
if sy-subrc ne 0.
message s004(zbhi)
with 'No materials present for the input values'(034).
stop.
endif.
if not t_changenr[] is initial.
sort t_changenr by objectid changenr.
*get the item data from CDPOS
select objectclas
objectid
changenr
tabname
tabkey
chngind
fname
value_old
value_new
cuky_old
cuky_new
unit_old
unit_new
from cdpos into table t_cdpos
for all entries in t_changenr
where objectclas eq 'MATERIAL'
and changenr eq t_changenr-changenr
and objectid eq t_changenr-objectid .
Hope this helps.
cheers,
Lakshmi prasanna Gandham
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |