cancel
Showing results for 
Search instead for 
Did you mean: 

CS02 - trigger a mail after saving

Former Member
0 Kudos

Dear Sapians,

I come through a requirement in which , i have to trigger a mail to authorized user with detail of changes done in CS02 by unauthorized user.

I got a BADI 'BOM_UPDATE' 'CHANGE_AT_SAVE'.

And as per my understanding change detail are in table CDHDR and CDPOS.

And in above table data is loaded after CS02 is saved.

So, no detail of recent changes done is reflected in CDHDR and CDPOS .

So, I am looking for some USER-EXITS or BADI , which help me out in this scenario.

Scenario is :--

a).

When changes are done in CS02 by some UNAUTHORIZED USER, changes has to be verified by AUTHORIZED USER, so change detail has to be send to AUTHORIZED USER.

Awaiting for your reply

Thanks,

Jeet

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Just a thought, why not remove authorization for CS02 for users who should not be making changes to BOM, instead of trying to develop workflows etc to address your requirement?

Former Member
0 Kudos

Dear Vivek,

You are very correct .

Sorry for not discussing the whole scenario.

Actually , If some unauthorized user gas done some changes in CS02 than BOM Status is to be '2',

so mail is needed to ask authorized user permission to set BOM status '1'.

But in the same time , authorized wanna know what changes are done. and changes are recorded in cdhdr and cdpos tables which is updated after after bom is saved not in between.

That why mail is needed.

Former Member
0 Kudos

I would strongly suggest that you discuss your need with your workflow consultant or check in workflow forums. I faintly recollect having seen a similar need for material master changes managed via a workflow.

If you wish to map this need with a badi I think it might prove to be a little cumbersome & future enhancement to it might not be so straight forward.

Former Member
0 Kudos

Hi Vivek,

You are very true ,I also wish now to go by workflow because workflow can go with after saving cs02.

In that way I will have value from CDHDR and CDPOS, and changed value can be easily fetched.

regards.

Answers (2)

Answers (2)

Former Member
0 Kudos

done ...

0 Kudos

hi jeetendra,,,,,,i have the same requirement,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

can you please share how you fetched the Old values for BOM..................................

I am currently getting the whole BOM history from the Program RCS00100,,,,,,,,,

but i want to implement the BADI to make it less complex,,,,,,,,,,,,,,,,,

Thanks in Advance

Former Member
0 Kudos

Hi Jeet,

In BADI 'BOM_UPDATE' 'CHANGE_AT_SAVE' you can reach the change information from the import parameters; in structures DELTA* for various object types. So you do not need to query tables such as CDPOS.

The field VBKZ shows the type of the change. I, U and D, stands for insert, update and delete respectively. You can loop in the structure you desire, DELTA_STKOB for header for example, and form a proper message according to the indicator in VBKZ field.

Regards.

Former Member
0 Kudos

Hi Canan,

You are very true , I used these delta structures , but thing is they have info for value changed and no info for old value .

And requirement is, enduser want to know the old and new value both.

Thats why I was thinking to go by CDHDR and CHPOS, but this have info only once save is done , so that is of no use to be used in this badi.

If any other convenient way to do it,please let me know .

Regards.