cancel
Showing results for 
Search instead for 
Did you mean: 

Work Manager 6.2 Add Time sheet

ggunturu
Participant
0 Kudos

I am trying to make the Add Time functionality work in Work Manger 6.2.

I have maintained below global parameter in agentry application

The users who will be using the application will have multiple Profiles. One user will have time profile as ABC, other will have XYZ. I don't understand why we have to add a Time Profile in the Globals. The Time Profile for our users will be maintained in User Profile Parameter CVR.

I have also done below filter in the MDO, hoping that before creating the Time sheet, the code will use the filter instead of the Global Profile variable.

I went throught /SYCLO/CL_HR_CATSTIMESHEET_DO~CREATE Method code and i did not find any code that would replace the Time Profile variable with the value in the Filter .


I want the code to use Time Profile from user profile parameter CVR instead of a hardcoded global agentry parameter.

Instead of putting a constant in the Globals parameter, can i use USER_PARAM.CVR for Globals Time Profile Variable? would that work?

Any thoughts? and Suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

Marçal_Oliveras
Active Contributor
0 Kudos

Hi Gopi,

You have to check where LaborTime.Profile global is being used and replace it for a new custom initial rule.

The initial rule has to select the USER_PARAM.CVR value from complex table ctuser.

That will work.

This is the list of transactions where I use a similar rule, probably you don't have the Crew transactions if you didn't install the component.

ggunturu
Participant
0 Kudos

I will try what you said.

Below config did not work.

I don't understand what the filter does and I hope there is a better way than modifying Agentry. If something can be done in SAP that would have been better.

Thanks Marcal.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Gopi,

This will require you to modify Agentry as the product makes an assumption that all users will be using the same profile.  The global is setup to allow you to easily change the value in one place in the application based on your configuration.  If you have a requirement for this to be dynamic then you will need to make changes to support that as Marcal indicates.

--Bill

ggunturu
Participant
0 Kudos

Another option is I could get access key for /SYCLO/CL_HR_CATSTIMESHEET_DO~CREATE  method and change the Profile in SAP.

How is this option not better than changing the agentry?

I don't know how easy or hard doing the Work Manger application upgrade is? When we do the upgrade do we have to add manually all the custom modification that were done in agentry in the new application?

If that is the case.. getting the access key to the ABAP code seems a better option.

Or would there be tool that identifies all the custom changes and it will be easier?

Both changing agentry and changing ABAP code is modifying the standard delivered code.

May be modifying the standard ABAP code is better than modifying Agentry?

Thanks,

Gopi.

Marçal_Oliveras
Active Contributor
0 Kudos

Hi Gopi,

Standard ABAP code should NEVER be modified.

Modifying the Agentry project is normal and I'm sure you will have to do it sooner or later.

But in this case though, what you can do is to create an implicit enhancement point at the beginning of the class /SYCLO/CL_HR_CATSTIMESHEET_DO, methods CREATE and EDIT (unfortunately there are not BADIS for this class as far as I know).

This way you can modify the profile in ABAP before the time record is created and only affecting calls via the Agentry Framework (none any BAPI that could be called).

Another alternative is to create a new class, inheriting from the original and redefine those methods. Do your modifications to the profile parameter and then call the "super()" method. If you do so, you will have to go to Configuration Portal and indicate that your custom Z class is being used instead of the standard for this particular MDO.

ggunturu
Participant
0 Kudos

I created a new class inheriting the original and made the changes as you suggested and it worked.

I will use that solution rather than modifying the agentry.

Also, can you give me an idea as how easy/difficult the agentry upgrade process is? Do we need to re do all the changes in the new application manually?

Thanks for you help.

Former Member
0 Kudos

Gopi,

As your new question is different then your opening question.  It would be better to open a new thread so other people reading the thread will not get confused on the question and answers.

Also, you should say, what version you are on and looking to upgrade to.  If you are looking at a platform upgrade, or an application upgrade.

Stephen

Answers (0)