cancel
Showing results for 
Search instead for 
Did you mean: 

New field in Travel Request

former_member217546
Participant
0 Kudos

Hi friends,

Happy new year to all,

Here i am working with a enhancement in create travel request,i am able to add a new field but on saving the data i should add this field value with the standard table data.If Any one added a new field in travel request , Please let me know how to save the new field data with stadard data.i have checked with on_save method in comp control still i did not get a proper idea.

Edited by: sudheer b on Jan 2, 2012 8:08 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Sudheer,

I have had an experience of working on such requirement, the SAP Standard T&E module(provided you are using the same) stores data in cluster, if you are adding an additional field to the trip by adding it in the context node then you have to make some specific changes into a number of places, the problem is compounded because you would not be able to hold the custom fields value otside the trip webdynpro component, I would not be able to preempt the specific reuquirement of yours but in a nutshell you have to perform the folloing steps:

1) capture the field value(say vendor of the expense line item) into a variable, after reading the context node, make sure that you extend all the context node and update the binding(if I remember correctly they are all interface nodes)

2) save the custom field value(vendor of the expense line item, from the step 1) in some global area, this can be done in many ways, it all depends which option you perfer.

3) Extend number of sap standard structures like for line item you have to extend PTRV_WEB_RECEIPTS_EXT, PTRV_UTIL_BELEG, PTRV_UTIL_BELEG etc...etc...also you have to do an enhancement on the function module PTRA_UTIL_RECEIPTS_GET...there are some more function module & structure which depends on your requirement.

4) extend the SAP Standard function module which saves a trip, there are many function modules which is called for the save.

There would be number of structure enhancements and they would be kind of duplicating themself....hence I would recomend if you can figure out the number of custom fields you would need and assign all of them to a structure, once that is done, you can assign this structure to all the append structure of the standard tables and structure.

I am sorry if I am replying you in a sketchy way...but to get the full picture I have to get ypur requirements first....do let me know if this doesn't help!!

Thanks & Regards

Abir Chakraborty

Former Member
0 Kudos

Hello,

You need to debug the code and have to write some enhancement in the cod depending upon the field you have added.

I have done this and saved the data properly. But I have done this long back so I cannot tel you excat places where you have to write the enhancement.

You have to enhance some standard structure and classes methods.

Thanks

Pradeep