cancel
Showing results for 
Search instead for 
Did you mean: 

Travel addition of Advance and Expense

Former Member
0 Kudos

Hi All,

We have a requirement where in , traveler is paid an advance of 100$ prior to trip. On his return, he claims 20$, but this is deducting from the advance. Is there a way to pay the full 20$ to him? That is he is entitled to full 100$ as well as the 20$.

I tried creating an expense as paid by company but is of no help. Please assist.

Regards,

Avi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lukas,

On researching further, we have decided to go ahead and create an expense type which the employee needs to add in defaulting the amount = to the advance amount.

However, we tried using the BADI TRIP_WEB_CHECK to insert a receipt  but somehow this BADI works only works for update.

Is there any way to insert a receipt om clicking ENter Receipt in the Create expense report?

Regards,

Avi

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Avi,

I would have assumed that IF_EX_TRIP_WEB_CHECK~USER_CHECK_RECEIPTS and IF_EX_TRIP_WEB_CHECK~USER_CHECK_LINE_OF_RECEIPTS would be feasible, but if you say they are not.... I'm not using the BADI myself because we had tons of requirements that were not possible to achieve using the BADI, thus I created explicit enhancements for the WD-Components.

There are several ways to "smuggle" in your dummy-receipt. If I was in your shoes I'd probably go for the SMOD-Enhancement FITR0003 using the EXIT-FM EXIT_SAPMP56T_002, that's an old but powerful customer include where all the data from the trip (except planning tables) is piped through before the trip is saved to the database. Here's what the interface looks like:

So, you could poll table VSCH and manipulate BELEG, EXBEL, BELER or whatever else you need to achieve your requirement.

Using this approach would reflect on the WDAs as well as on most of the backend transactions (check the FM-Documentation for more details) and the whole process would happen "behind the scenes" so the end user is not confronted with it in the WDAs.

Cheers, Lukas

Former Member
0 Kudos

Splendid!

Will give it a shot and get back to you

Former Member
0 Kudos

Hi Lukas,

We put in debugging points on the code for the user exit mentioned but the exit doesnot get called when you hit Enter Receipts.

😐

Regds,

Avi

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Avi,

there's a misunderstanding. The SMOD-Enhancement is called slightly before the trip is saved to the database, i.e. before the entire process is completed. It can be used for subsequent manipulations after you have triggered the saving of the trip. It's not triggering in between navigations of the Floorplan Manager.

If you want the end user to actually see there's a receipt created automatically, i.e. you need the receipt within FITE_VC_RECEIPTS upon navigation, then you have to enhance FITE_VC_RECEIPTS and code it manually.

Depends on what you want to do.

Cheers, Lukas

Former Member
0 Kudos

Hi Lukas,

We managed to finally deal with this issue.

We enhanced

IF_EX_AFTER_TRIP_SETTLEMENT~CHANGE_TRV_OBJECTS

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Avi,

thanks for the feedback! So my initial recommendation did work out after all. Do you know what went wrong originally when you tried it at first and had some spooky advances that you couldn't get rid of?

Cheers, Lukas

Former Member
0 Kudos

We tried a lot of combinations and somehow with our current logic it worked..

Can you help me with my below post:

Answers (2)

Answers (2)

Former Member
0 Kudos

oops sorry...the BADI name was deceiving

And yes, the advance function only used for this In-Advance-Perdiem-Workaround

As you can see above, we are selecting the dates,country and accommodation. The default value shows up based on the amounts maintained in the back end table.

The Advances need to add up to the expense claimed.

There will be no "real" advances  that are supposed to invoke a deduction from the reimbursement

Lukas_Weigelt
Active Contributor
0 Kudos

Mhh...OK so if I understood right, you'll just have to eliminate the Advance before the settlement so the system doesn't deduct the advance from the reimbursement. The BADI still seems the best approach to me at the moment, i.e. you'd have to make an implementation and CLEAR the changing parameter IT_VSCH in Method IF_EX_AFTER_TRIP_SETTLEMENT~CHANGE_TRV_OBJECTS.

I can't promise you this will work the way you want it, though, you'll have to experiment a bit.

Cheers, Lukas

Former Member
0 Kudos

will check and revert.

Former Member
0 Kudos

hi Lukas,

tried your method.Seems to work when i generate the form.

However, when i run the PRFI transaction and check the posting document the advance is still there!!

I am not sure if it is being caused due to ROT.

Former Member
0 Kudos

Checked ROT as well. Cant seem to figure out where it just appears out of nowhere.

Lukas_Weigelt
Active Contributor
0 Kudos

If it's not in ROT, the only other option I can think of at the moment is RUW. Can you check?

Former Member
0 Kudos

Hi Luke,

RUW also does not contain it.

So the code provided as stated works fine on the PDF form.

But this is the output i get on running posting.

I created a trip with an advance perdiem of 4000SGD and posted as expected.

On his return, he claims reimbursements of 300 SGD and the posting is not as expected.

It should actually credit 300 to vendor.

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Avi,

then you'll have to debug and see where the data is polled from. Alternatively, you could check BADI TRIP_POST_FI.

Cheers, Lukas

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Avi,

you could try the "Badi of last resort" AFTER_TRIP_SETTLEMNT.

Aside from that, may I ask what is the background of your requirement? I don't remotely understand it from a functional point of view.

Cheers, Lukas

Former Member
0 Kudos

Hi Luke,

Where can i find this BADI?

As i mentioned in one of my previous posts, we are treating the advance field as PER DIEMs to be paid before an employee goes on leave and based on fixed values provided to us by the client.

Hence, the per diem is completely entitled to the employee. However, when the employee enters his claims he should get the full reimbursed amount not a deduction from the advance.

Hope it is clear.

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Avi,

Is the advance function only used for this In-Advance-Perdiem-Workaround or can there be "real" advances as well that are supposed to invoke a deduction from the reimbursement?

What do you mean with "where can I find the BADI"? You mean in IMG? Financials --> Travel Management --> Business Addins --> Settlement --> Manipulation of Objects after settlement of TRIP (loosely translated from German, might not be verdatim).

Cheers, Lukas