10-25-2010 8:05 AM
Dear experts,
I have a requirement wherein, if an action is done on the selection screen of one report, the event should be caught in an another report which is running in another session.
Say if I click refresh button on selection screen of one report, a DB table gets updated. But on the basis of the entries in this DB tab, the parameters on the selection screen of other report should get updated.
I should not need to do any action on screen of report 2.
Is there an OOPs approach to address this?
Thanks!
Sumit.
10-25-2010 8:45 AM
Hi!
I don't think there's something useful OO approach for this between sessions.
Personally I would use a DDIC table.
Something like that: USERNAME, DATE, TIME, USER_COMMAND, CAUGHT
Make an entry in your ZTABLE, with USERNAME, DATE, TIME, USER_COMMAND.
SELECT from this table, and if found something, mark the CAUGHT field.
However I don't know how can you force the selection screen to be refreshed on the target session from the source session.
You might try out RAISE EVENTs as well, but I don't know will they work or not.
Regards
Tamá
10-25-2010 8:45 AM
Hi Sumit
You can do this using SET/GET parameter ID's.
When the table got updated , SET the value of the fiield in the 1st report and in the initialization of the
2nd report, GET the value from the memory ID.
Regards
Hareesh Menon
10-25-2010 8:49 AM
@tamas -- thanks tamas! Yes I have created a Z table. From the action in first report on sel screen I update the Z tab.
I tried with event triggering too, but then how do I catch it in report 2? May be need some kind of listener or something?
@ hareesh -- How will we know the parameter ID tab has been updated with new value?
Sumit.
10-25-2010 8:47 AM
You can use WAIT UP TO statement in 2nd report, read the concerned DB table periodically, and update whatever you want.
10-25-2010 8:53 AM
@anand -- thought of it too, but will WAIT statement and selection screen work parallely? In which event do we write WAIT statement?
Regards,
Sumit.
10-25-2010 10:18 AM
In At selection-screen output event, you can read the DB table, and you can change selection-screen contents.