Thursday, 11 May 2017 13:07

CATS: Changing Target Hours

Written by
Rate this item
(1 Vote)

In Cross-Application Timesheets, enhancement CATP0001 lets you set your own target hours for the Time Sheet. However this completely stops the default reading of target hours; if the enhancement returns even one line of target hours, none of the default reading will take place. So, how can you change the Target Hours, starting with the default hours as a base?

 

We assume you know how to create enhancement CATP0001; if not, that’s the topic of another discussion.

The code supplement for the enhancement is created in include ZXCATPU01. You could then call the target hours using the function module ‘CATS_GET_TARGET_HOURS’; however, this function module itself calls the enhancement CATP0001 – leading to recursion. It’s thus necessary to stop that recursion, to allow the function module to get the target hours without being impacted by our enhancement.

This is done by using a flag in memory. If recursion_flag is set to true, the enhancement’s logic will not be executed.You may have further conditions before triggering the enhancement’s logic; these should be done next.

Finally, we need to use CATS_GET_TARGET_HOURS to get the original target hours; but first, we set the recursion_flag to true.

Example code 2

The result of this will be that your SAP_TARGET_HOURS table will now contain the original default target hours; you can now edit these according to your own logic!

Read 3187 times Last modified on Monday, 05 June 2017 11:12

11 comments

  • Comment Link Cinthia KaperFriday, 04 August 2017 10:27 posted by Cinthia Kaper

    Türöffner in der Not Sehr guter Service. Weiter so. Hat alles so preislich gestimmt wie am Telefon abgemacht. Ein anderer warb mit 9 Euro für Türöffnung. Es war offensichtlich daß das ein Lockvogelpreis ist. Im Impressum stand auch Herford, das ist doch sehr weit. Dann stießen wir auf diesen Anbieter. Herr Klein schien uns seriös und nett also bestellten wir diesen. Wir wurden nicht enttäuscht. Eine absolute Empfhelung sind Sie.

  • Comment Link happy daysMonday, 31 July 2017 17:34 posted by happy days

    I must express my thanks to this writer just for rescuing me from this type of scenario. Because of looking out throughout the online world and seeing tips which were not productive, I was thinking my life was done. Being alive devoid of the answers to the problems you've fixed as a result of your good site is a critical case, and ones which may have in a negative way damaged my career if I had not discovered your website. Your good talents and kindness in taking care of all things was vital. I am not sure what I would have done if I had not come across such a solution like this. It's possible to at this time relish my future. Thanks very much for this expert and results-oriented help. I will not be reluctant to suggest your site to any individual who needs and wants tips on this issue.

  • Comment Link happy daysSunday, 30 July 2017 11:46 posted by happy days

    I have to express my respect for your kind-heartedness giving support to people who really need assistance with that concept. Your personal commitment to getting the message all around has been extremely beneficial and has truly enabled ladies much like me to arrive at their objectives. Your new useful publication indicates a whole lot a person like me and substantially more to my mates. Regards; from all of us.

  • Comment Link daniWednesday, 26 July 2017 08:00 posted by dani

    "I really like your writing style, good info, thanks for posting. “Let every man mind his own business.”

  • Comment Link OrvilleThursday, 06 July 2017 06:25 posted by Orville

    Hi there, I discovered your website via Google while searching for a related
    topic, your website came up, it looks good. I have bookmarked it in my
    google bookmarks.
    Hello there, just become aware of your blog through Google, and located that it is
    really informative. I am gonna watch out for brussels.
    I will be grateful if you proceed this in future. Numerous folks might be benefited from your writing.

    Cheers!

  • Comment Link MaxieWednesday, 05 July 2017 19:28 posted by Maxie

    Greate article. Keep posting such kind of info on your page.
    Im really impressed by your blog.
    Hi there, You've performed a great job. I will definitely digg it and
    in my view suggest to my friends. I'm confident they'll be benefited
    from this web site.

  • Comment Link TonyaTuesday, 04 July 2017 07:47 posted by Tonya

    Hey! Do you know if they make any plugins to protect against hackers?
    I'm kinda paranoid about losing everything I've worked hard on. Any recommendations?

  • Comment Link best online educationFriday, 19 May 2017 20:12 posted by best online education

    Heya this is somewhat of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML. I'm starting a blog soon but have no coding knowledge so I wanted to get advice from someone with experience. Any help would be greatly appreciated!

  • Comment Link college tipsThursday, 18 May 2017 11:49 posted by college tips

    This article is in fact a fastidious one it helps new internet people, who are wishing in favor of blogging.

  • Comment Link education collegeWednesday, 17 May 2017 01:27 posted by education college

    Hi there, always i used to check web site posts here early in the daylight, as i enjoy to gain knowledge of more and more.

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.