2009 Mar 27 5:27 AM
Hi All,
I have requirement where I need to call a subroutine in different events and according to the event the subroutine will behave differently. Is there a way in ABAP to capture the current event of the program?
Regards,
Prashant.
2009 Mar 27 5:40 AM
hi, the simplest thing would be,
you can set different flags in each event before calling subroutine.
write logic of subroutine based on these flags. Make sure you are clearing the flags appropraitely.
But anysways this is not a good programming style and you would need to craefully design it.
Hi All,
I have requirement where I need to call a subroutine in different events and according to the event the subroutine will behave differently. Is there a way in ABAP to capture the current event of the program?
Regards,
Prashant.
2009 Mar 27 5:39 AM
Hi Prashant,
If it is a report use the write statement and print the event name when you are processing the subroutine for that event.
IF you want to know, which event you are processing then use the FM SAPGUI_PROGRESS_INDICATOR.
The import parameters are PERCENTAGE and TEXT. pass the percentage as required between 0 to 100 and pass the event name in the TEXT. the text will be displayed in the status bar.
Hope this will solve your problem.
Regards,
Phani.
2009 Mar 27 5:40 AM
hi, the simplest thing would be,
you can set different flags in each event before calling subroutine.
write logic of subroutine based on these flags. Make sure you are clearing the flags appropraitely.
But anysways this is not a good programming style and you would need to craefully design it.
2009 Mar 27 5:42 AM
Hi:
have a look
[Event|http://help.sap.com/saphelp_nw2004s/helpdata/en/8d/25f972454311d189430000e829fbbd/content.htm]
Regards
Shashi
2009 Mar 27 5:57 AM
Hi,
I was also thinking on the same line as what Santosh has suggested, but is there a standard way of doing it.
Regards,
Prashant.
2009 Mar 31 6:21 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |