cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict Expense Types

Former Member
0 Kudos

Dear All,

Can anyone help me how to restrict expense types based on trip types (Domestic / International).

Regards,

Anl.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

We have done the same by using customized search help exit for the field PTK03-SPKZL.

Standard search help exit is:PTRV_F4_EXP_TYPE_SH_EXIT, copy this as a Z function module and modify according to your requirement.

Procedure:

Open data element:SPKZL from SE11.

Check the search help name:SH_EXPENSE_TYPES.

Double click on the search help SH_EXPENSE_TYPES.

You can find the search help exit name:PTRV_F4_EXP_TYPE_SH_EXIT

Copy that PTRV_F4_EXP_TYPE_SH_EXIT into a 'Z' function module.

Filter the expense type, in the loop,

loop at spkzls where spkzl in t_spkzl_selopt and sptxt in t_sptxt_selopt.
  ****write ur logic here to filter the expense types based on the activity
 append spkzls to spkzls_help. 
 endloop.

After activating the above z function module, replace the standard function module with 'z' function module in search help exit filed.

Hope It will be helpful to you.

Thanks and Regards

Former Member
0 Kudos

Hi,

I have did the same as you said and it works fine in PR05 transaction.

Where as when i went to EP (Enterprise portal - ESS - Travel Expenses), it still shows all the types. Anything need to be done specifically for EP?

Regards,

Ani

Former Member
0 Kudos

Hi,

You can do one thing, you need to replace the standard search help service with customized webdynpro service. Use the same z function module for customized webdynpro service.

Before deploying the above zfunctionmodule in webdynpro make sure that is Remote enabled.

Thanks and regards

Former Member
0 Kudos

Hi,

where to go and change to customized webdynpro service. Already through SE11 -> Datatype, i have changed the search help to Z Function module.

And also based on your reply, i try to change the function module to remote enable, then it shows error "Type SHLP_DESCR_T is unknown", which is in the Changing Parameter declaration.

Regards,

Ani

Former Member
0 Kudos

Hi,

I have solved this issue by using the TRIP_WEB_CHECK Badi.

Thanks for all.

Former Member
0 Kudos

Hi Ani,

Can you please tell me how did you solve this. even i have same requirement.

Thanks and Regards,

Shilpa

Former Member
0 Kudos

Hi,

Sorry the BADI name is TRIP_WEB_CUSTOMIZING.

Go to SE18, enter the BADI name TRIP_WEB_CUSTOMIZING. and display.

Go to Menu "Implementation" -> Create and enter the Implementation name as Z_*. And enter the Short text and save and activate.

In the Interface Tab of the implementation screen, double click the method USER_EXIT_CUSTOMIZING.

If you don't find the method USER_EXIT_CUSTOMIZING first time, then double click the interface name "IF_EX_TRIP_WEB_CUSTOMIZING".

And it will go to the method IF_EX_TRIP_WEB_CUSTOMIZING~USER_EXIT_CUSTOMIZING. screen, where we can do the codings.

The codings are as follows:

data: wa_schema type PTRV_WEB_T706S.

data: wa_exptype type PTRV_WEB_T706B1

loop at trip_schemas into wa_schema.

if wa_schema-T_SCHEMA = '01'.

loop at EXPENSE_TYPES into wa_exptype.

if wa_exptype-EXP_TYPE+0(1) ne '1'.

delete expense_types.

endif.

endloop.

endif.

endloop.

It depends on your requirement, our requirement was based on schema 01, it has to show those expense type starting with '1'.

Hope the above is clear.

Former Member
0 Kudos

Hi Ani,

Thanks a lot for your detailed reply.It is really helpfull. I am not able to award points since the question was not posted by me.

Thanks and Regards,

Shilpashree

Former Member
0 Kudos

Hi Ani,

I need to prevent employee/manager from DELETE ing attachement (travel expense) once it is posted to FI ie if its in status 'posted to FI'. An error message needs to be generated in this case, to prevent.

the component used is FITV_VC_TRIP_DOCUMENTS.

What needs to be done for this ?

Answers (1)

Answers (1)

Former Member
0 Kudos

Thi swill help you