cancel
Showing results for 
Search instead for 
Did you mean: 

Defaulting Travel Schema in Expenses

Former Member
0 Kudos

Hi Travel Experts,

We have a created around 20 Trip schema's; in essence these are just policies so we could default expense types and fields based on the trip schema selected.

However we don't want the employees to select the trip schema in the FITE_VC_PRESELCTION screen ESS. We want this to be defaulted based on the employee group which is an exact match.

Also is there any trip start and end date on the FITE_VC_PRESELECTION screen so we could validate the employees EE group for those two dates??

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Ankur,

first of all: I'm a developer, not a consultant; there might be a customizing-way to achieve this aside from what I suggest in the following.

What I would do is:

  • Create an Enhancement for FITE_VC_PRESELECTION
  • Make a Post-Exit of WDDOINIT in the View
  • Get the relevant Information from the respecting Infotypes via the Pernr from the Assistance class you want to check to find out which Schema is to be selected
  • Downcast the UI-Element tree for element TRIP_SCHEMA
  • Set it Read Only with the respective WD-Class (DDByKey)
  • Set the context attribute PRESELECTION_VIEW.TRIP_SCHEMA.TRIP_SCHEMA to the distinguished value from earlier step.

Maybe this is helpful if you consider a coding-approach (maybe there is no other way ).

Cheers, Lukas

Former Member
0 Kudos

Thanks Lukas,

I was hoping that a developer would answer my query. I was thinking along the same lines. However my developer team are not keen to make changes as above because they think that enhancements cannot be deactivated in webdynpro in case they have to get SAP to look at something in future but my understanding is that one can deactivate this using SFW5?? Is this correct??

In relation to the above, one more query on the assumption that I can default the schema based on your logic above. In case the employee has changed the employee group last week and today they go onto create a expense report, the system would select the schema based on the employee group on system date. So I was thinking of having a trip start and end date in the FITE_VC_PRESELECTION screen before the trip schema so when the employee enters the trip start and end and navigate away (or we can create a button to accept the entries in date field) the trip schema is selected the based on your logic above. From your experience/knowledge do you think we can use a start and end date in the FITE_VC_Preselection screen? I know you could have a trip start and end date in that screen for travel request but not for expense report as standard.

I really appreciate your help!!

Cheers

Ankur

Lukas_Weigelt
Active Contributor
0 Kudos

my understanding is that one can deactivate this using SFW5?? Is this correct??

Basically yes, this is correct. However you need to develop some things beforehand:

  • A dedicated Package for your enhancements which you want to be able to switch on / off.
  • A Switch, which has to be connected to the package
  • A Business Function which has to be connected to the Switch (the BF  is the one you will be able to see in SFW5)

You can get a lot of detailed information about this on SCN and in SAP-help too, so I won't elaborate too much on this here now.

http://help.sap.com/saphelp_nwpi711/helpdata/en/3a/fc8441fd86030de10000000a1550b0/content.htm

There is one critical thing in this process, however, I want to emphasise because it can be quite "deadly" if used incorrectly:

In the Business Function, there is the option to have this function be reversible. If you do not set this option, and activate it in SFW5, it will stay active, permanently. The only way (as far as I know) to reverse a non-reversible Business Function in SFW5 is a complete Database-Rollback; and you don't want this. Your basis team would be ever "thankful"

So, my recommendation: Always check this option, not matter if you want it to be permanent or reversible, to be on the safe side.

Once you're done, you can Switch off/on all enhancements present in the Linked Package of the BF. In the company I work in, I have about 20 Enhancement points in WDYNs, FMs, Reports, DDIC etc. for TRV (up until now) which all depend on each other and I can simply switch it all off with just this one checkmark. Quite a nice technology in my opinion.

About your second query:

I'm not sure I understood this correctly. Do you want the Employee Group to be selected from the system date, or do you want to select the Employee Group from a dedicated point of time the Traveler has to dtermine himself by entering a date?

If you want EE_Group to be selected from a dedicated date, you can indeed make three custom UI-Elements, 2x Inputfield with DATS and one button, and onENter event of button read the custom Dates, read the EE-Group accordingly and set the Trip Schema accordingly. This won't be difficult.

Cheers, Lukas

Answers (0)