Skip to Content

New field in Travel Request

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2012 at 10:36 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2012 at 04:26 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.