VishalMistry
12th September 2015, 14:21
Hi all,

I want to keep a log of changes to item group. Whenever there is any change in item description (through session tcmcs0123m000), it should be logged in a text file. I know this is possible through using DAL but don't know how.

Can anybody guide with sample code ?

Vishal

bhushanchanda
12th September 2015, 17:54
Hi,

Standard provides a way to do this through Audits. If you explain the reason to write data to file, someone can provide a better solution for what you are looking for.

VishalMistry
14th September 2015, 06:57
Hi,
I want to send notification to buyer as well as purchase requisitioner whenever a receipt line is made against a purchase order which is against created against purchase requisition. So i want to program functionality through DAL that whenever a warehouse receipt is confirmed at that time notification should go to the concerned person.

I can not program it at receipt line level as there may be more that one line in warehouse receipt.

Regards,
Vishal

vahdani
15th September 2015, 10:19
Hi Vishal,

the best way is to use a User Exit:

Step 1: Generate tcmcs023ue if it does not exit.
Step 2: Add the following to the generated code:


domain tcdsca old.dsca

function extern long ue.before.before.save.object(long mode)
{
on case mode
case DAL_NEW:
break
case DAL_UPDATE:
with.old.object.values.do(get.old.values)
if tcmcs023.dsca <> old.dsca then
|Somebody just changes the description!!
log.changes()
break
endcase

return(0)
}

function get.old.values()
{
old.dsca = tcmcs023.dsca
}

function log.changes()
{
|write new record in some log table!!
}