Skip to Content
0

Regarding Addition of custom field in Travel expense report FPM application

Dec 28, 2016 at 11:06 AM

136

avatar image

customization-in-travel-expense-report.pngHello Team

As a part of requirement we need to add custom field in travel expense report. based on this field expense type drop down should be changed. we have custom logic for the same.can we change expense type standard drop down? currently we have added one field on Receipt view on frond end screen.. but unable to change expense type drop down based on this field values as it has standard search help and also we haven't enhanced any structure

we added that field at node level, unable to save as well. could you please let us know is there any configuration for adding custom field in travel expense report or any technical structure need to enhanced and how to achieve this dependent search help functionality .

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Lukas Weigelt Jan 06, 2017 at 12:45 PM
0

Hi,

from my experience with this particular application I can tell you it's a very bad idea trying to enhance the business logic of the receipt structure, i.e. trying to add fields here, because:

  1. the WDYN receipt context is not built based on a DDIC structure
  2. the business logic uses about 5 different structures in between communicating with the corresponding database logic which would all have to be enhanced
  3. even if you enhance them all, not all value passing is done via move-corresponding, which results in the need of manual value passing, which would involve multiple modifications in the deeper layers of the business logic
  4. ultimately you'd also have to enhance the cluster (PCL1-TE BELEG) which can cause irrepairable damage to existing data if you do anything wrong


Despite all that it is possible to manipulate the selected key of the value help with simple means of dynamic programming, however I warn you not to manipulate the value help (e.g. delete entries from it) itself because it is not only used for user input of the webdynpro but also as a means of check basis (sorry, I'm not sure how to express this in English any better) for any business logic within the webdynpro. This is in itself a very bad design from SAP but it's a fact nontheless.

Putting all these technical problems aside, what exactly are your functional requirements which you try to achieve? Can you try to explain it in detail? Maybe there's another way to approach it.

Cheers, Lukas

Share
10 |10000 characters needed characters left characters exceeded
Nishita Sdn Jan 09, 2017 at 08:38 AM
0

Hello Lukas

thanks for sharing your view.. would like to provide more brief on the requirement. we need to validate expense type based on one of the custom fields. for that we have added custom field in two different way and in post exit of action of expense type we have written custom validation logic. attaching screenshots and some bullet points for reference. please help us to know whether this requirement is feasible and its impact analysis. let us know if any further information is required.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

fig02.png

Travel Category field 1

We have added one node in Receipt view .this field is only at screen level this not added in at structure level. We could see this field in editable format with OVS Search help but for multiple record its taking fig03.png

First value which is selected. If for second row if we change the value then value of first row also getting changed.We have added this field to validate expense type. On post exit on action of expense type custom logic for validation is written its working fine for single record for multiple record travel category fig04.pngfig05.png

Is taking same value.

Receipt View Context ZTravel is diff node

Refer : figure 1

OVS search help is added for Travel category

Refer : figure 2

For multiple records its taking same value. Clear is the value affects first entry

Refer : figure 3

Travel Category field 2

Here in the receipt view we have enhanced structure PTRV_WEB_RECEIPTS_INT_2

And added this field but this field is not editable or also not taking any value from backend

Field is available in receipt in display format

Refer : figure 4

It field is present in context of receipt , now this field is as part of internal table of receipt but unable to take any values.

Refer : figure 5

fig02.png (26.2 kB)
fig01.png (24.4 kB)
fig03.png (13.4 kB)
fig04.png (19.3 kB)
fig05.png (68.3 kB)
0