2006 Jun 21 9:27 AM
Hi All,
Can any one please help out how to write the user exit program and which user exit in cat2 has to be used for the following scenario:
Ther requirement is that after enter into the transaction CAT2 and the data is given for the Data Entry profile and personnel number and then enter into the time sheet screen .In the time sheet screen once the time,activity types,network and activity number are entered and saved it.After that if we again enter into the time sheet screen it should not allow to change the time entered.But the standard transaction allow us to change the time.If the user makes any changes and try to save it ,it should show the error message.
2006 Jun 21 9:53 AM
Hi preethi,
1. for this purpose,
(ie. validating at the time of saving time sheet)
use the enhancement CATS0006
2. in that there is FM
EXIT_SAPLCATS_006
3. There we can issue error messages
(so that it cannot be saved)
thru the TABLES parameter of the FM
I_MESSAGES
4.
we again enter into the time sheet screen it should not allow to change the time entered
For this, u will have to FETCH THE OLD DATA
using SELECT query from DATABASE TABLE,
so that u can compare them with the
ONE ALREADY SAVED,
and the NEW ONE, which is being entered.
5. Then depending if both are different,
u can give a error message.
regards,
amit m.
2006 Jun 21 10:34 AM
Hi Amit,
I will follow the way that u had given .Thank you very much.Its really a very helpful answer.If you can give me more details kindly give me and send me if u have any documents related to user exit program.
2006 Jun 21 10:44 AM
Hi again,
1. regarding this exit,
this is the only way where u can
do validations and give error messages.
2. for documentation, u can just read the
documentation of this user exit , in SMOD.
regards,
amit m.
2006 Jun 22 8:05 AM
Hi Amit,
For the same time sheet requirement.The user has given five activity types ,for those five only it should not allow user to change the time.so they asked to create table in which i have to add the three activity types(becoz in future there might be a case to add more activity types).Can you tell me how proceed with the above scenario.And also in the previous mail u have mentioned that in the point no:4.
(we again enter into the time sheet screen it should not allow to change the time entered)
For this, u will have to FETCH THE OLD DATA
using SELECT query from DATABASE TABLE,
so that u can compare them with the
ONE ALREADY SAVED,
and the NEW ONE, which is being entered.
can you pls tell me how to write the code for comparing the fetched data and the current data i.e time changed in the time sheet.If it possible can you pls write sample code ?and send the same to me.It would be really helpful.
Regards,
Preethi.