2007 Nov 23 9:32 AM
Hi all,
I have programmed the user exit EXIT_SAPLCATS_002 in CAT2 to automatically fill in hours and time to and time from, when certain values are entered in those fields.
However in order to enter the correct data I need to know what was entered (time from and to) in other Absence type codes for that current day.
How can I get that information? Is there an internal table where this data is stored?
I tried accessing DB table CATSDB to find other time entries for the current date, but the time entries there are only added once user presses save in CAT2.
All suggestions are welcome!
Thank you all in advance!
BR,
Armin
2007 Nov 23 10:37 AM
Ok, so I have double clicked on LXCATTOP in the include, then once again double clicked on LXCATTOP in the include.
Now I write:
INCLUDE ZECDC .
When I double click on that include it does not ask me if I want the include to be global or local.
I have tryed creating an internal table:
DATA: old_rec_t TYPE TABLE OF CATSDB .
but I can not access that table when I'm an exit.
Think I missed something in creating either the table or the include to be global.
What have I missed?
Thanks again for the quick respons Raymond!
2007 Nov 23 9:49 AM
You could try to memorize all records of current processing
In include in include ZXCATTOP (user include in TOP include of exit main program) create an internal table which will keep a trace of all records currently processed
-> Fill this table every time you get the hand in a customer-exit which receive a CAT record in parameter :
EXIT_SAPLCATS_002 of CATS0002
EXIT_SAPLCATS_003 of CATS0003
EXIT_SAPLCATS_005,
EXIT_SAPLCATS_008 of CATS0005
EXIT_SAPLCATS_009 of CATS0009
Then in include EXIT_SAPLCATS_002 you could try to find the "previous" record in this internal table.
Regards
2007 Nov 23 10:05 AM
Hi Raymond,
Looks like you the man when it comes to CAT2!!
Ok, good idea. How do I enter data in ZXCATTOP? is it a part of some user exit or?
Thanks for the quick reply!
/Armin
2007 Nov 23 10:12 AM
The Customer exit of CATS are in the same function group XCAT, so accessible from any customer exit function module, some ways to access the include
1 - go to main program (SAPLXCAT) and double click LXCATTOP, then ZXCATTOP
2 - use an undefined field in any include, save, double-click on field and when prompted to create it, select in global data
Each and every customer exit of the CATS area has access to these data, so fell free to use it for parameter transmission, ot even optimization, keeping result of individual SELECT into internal table defined in top, so you can use results of an exit in another exit.
Activate a lot of exit to insure all records are processed and at the begining of each include search your internal table for the record(s) received and insert/modify the internal table. (Beware that in EXIT_SAPLCATS_003 you have to ignore "old" records and use only new records, cf. OSS note 641940)
Regards
2007 Nov 23 10:37 AM
Ok, so I have double clicked on LXCATTOP in the include, then once again double clicked on LXCATTOP in the include.
Now I write:
INCLUDE ZECDC .
When I double click on that include it does not ask me if I want the include to be global or local.
I have tryed creating an internal table:
DATA: old_rec_t TYPE TABLE OF CATSDB .
but I can not access that table when I'm an exit.
Think I missed something in creating either the table or the include to be global.
What have I missed?
Thanks again for the quick respons Raymond!
2007 Nov 23 10:44 AM
I was telling you about include of a customer exit (not any include
As these customer exit exists in the same program (function group XCAT) they share the same TOP area, this area is SAP property, so they gently inserted a Z-include in the TOP to let us, poor developer, insert out fields and structures.
Don't create another include, put your table definition in ZXCATTOP. (You can access it via any exit, BEFORE going to include ZXCATxx, go to menu/goto/global data) Activate the include.
When you edit exit, go through CMOD to insure the Exit Function Module is opened in editor before the include, else the editor wont know that you are working in a function group and wont propose creation of the NEW FIELD in the TOP include of the function group.
Regards
2007 Dec 24 2:28 PM
hi, were you able to solve this requirement?
if yes, please let me know.