cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi or FM for creating travel request with TRIP Number..

Former Member
0 Kudos

Hi Experts,

How to create travel request through BAPI or FM.

I am using bapi 'BAPI_TRIP_CREATE_FROM_DATA' But it's just creating Trip number with travel details and not updated

travel request table 'FTPT_REQUEST'.

Please guide me to create travel request through bapi with help of trip no. and should update travel table 'FTPT_REQUEST' or any bapi which directly create travel request and update Travel request data.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Lukas_Weigelt
Active Contributor
0 Kudos

Hi,

as far as I know, there is no standard standalone FM/BAPI that can do both at once.

BAPI_TRIP_CREATE_FROM_DATA as you mentioned, is a good approach for backgorund data creation from custom reports or the like (be careful though using this in WDA because the BAPI uses 'CALL TRANSACTION', i.e. Dynpro logic which is incompatible with the WDA framework).

Concerning the Planning Table for requested Travel Services FTPT_REQUEST, I would go for custom logic with a daft table update. There are some function modules that also handle the planning data from the request creation, but I would not reccomend using them, since they are 1) not released for the customer and 2) intertwined in the Web-Logic and the so called "Web-Memory" (which is just a bunch of global data head flying around) which makes them nearly impossible to use out of the process they have been designed for.

Cheers, Lukas

Former Member
0 Kudos

Hi Sir,

Thanks for guiding me it's really helpful for me.

But through this FITP_CREATE_TRIP_FROM_REQUEST i am getting to create travel request and it's also updating my travel request table  'FTPT_REQUEST'.

Is this right FM or not please help me??

Travel management in SAP HR is new for me so i am getting stuck in many scenario's.

1) How to get list of all travel request of employee through BAPI/FM: PTRV_SHOW_MY_TRIPS (Not giving all travel request list)

2) How to approve travel request of employee through BAPI: BAPI_TRIP_APPROVE (Is this right)

Thanks a ton in advance.

Note: Sorry for this silly question, but please confirm me TRIP and Travel request both are different??

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Goel,

if FITP_CREATE_TRIP_FROM_REQUEST works for your requirement, then why not try using it. There really is no "right" or "wrong", if it works for you, and there are no unwanted side effects, then use it. Just be aware of the fact, that this is normally no standalone FM in the standard and it is not released for customers.

FI-TV is an about 15-20 years old module and it's in my opinion quite complicated in comparison to others so don't feel down when you get stuck from time to time .

PTRV_SHOW_MY_TRIPS also is one of those not-released FMs, but since this one only reads stuff and does nothing else, I see no harm using it whatsoever. One thing though, if you want to see ALL trips, you should also set import parameter USE_EWT_DEADLINE = X. Otherwise it will skip all posted trips.

BAPI_TRIP_APPROVE definitely is the right way for background-approval.

Concerning what you depicted as "silly question" of the terms "TRIP" and "Travel Request" I think it is not silly at all, it's a very good question. Regarding your question whether the terms "TRIP" and "Travel Request" are different things, I have to answer with 'it depends'. Let me elaborate:

(@Sally, cuff me if I'm wrong ) The terminology in FI-TV is a big mess, that's because initially, the FI-TV module only knew expense claims which were labeled "trips". Then, afterwards, the Travel Request was implemented; partially also into the already existent business logic which uses the exact same data foundation as the expense claim, (so here "trips" is used for both, expense claims and requests). Let's for example take BAPI_TRIP_CREATE_FROM_DATA, this is used both for expense claims and travel requests, there is no BAPI like BAPI_TRAVEL_REQUEST etc... So this all is very confusing.. bottom line:

When you see the term "trip" it most likely contains or depicts logic concerning the expense claim; but it can also contain logic for the travel request.

When you see the term "travel request" it contains 99% of the time only logic for the travel request.

Concerning blunt terminology, TRIP = Travel Expense Claim, Travel Request = Travel Request (but don't trust on this being seperated all correctly in the technical names of the reports, FMs, BAPIs etc. ;-/ ).

I hope this helped you understand it better rather than creating more confusion ;-/

Cheers, Lukas

Former Member
0 Kudos

Hi Lukas,

Thanks a ton to giving me TR module related explanation so deeply.

It's helped me a lot to clear my scenario.

Cheers,

Prachi

Answers (1)

Answers (1)

Former Member
0 Kudos

HI Goel,

What is your exact requirement to create travel request with BAPI or FM, Can you explain that?

Regards,

Narayana

Former Member
0 Kudos

Hi Venkat,

I need bapi name to fulfil our travel scenario's:

1) Bapi for create travel request

2) Bapi for get list of all travel request of pernr

3) Bapi for approve travel request

I got some BAPI's and FM but though which i am not getting fully details of travel request

Thanks in advance