cancel
Showing results for 
Search instead for 
Did you mean: 

Posting to GL Account based on Schemas

former_member221103
Participant
0 Kudos

Hi All,

Please guide how can I make it possible to assign GL Account based on Trip schema which means that the GL Account number changes based on the Trip Schema. For example - I have two trip schema i.e. Training & Business Trip. Client wants that if an employee goes on Travel for a Training purpose it should post to one GL account and if an Employee goes on Travel for Business purpose the posting should be to different GL Account.

Please advise how can I make it possible.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Andy,

BADI TRIP_POST_FI should help, especially method IF_EX_TRIP_POST_FI~EXB706K. We did it with a query on Schema within "t_head" parameter of trip and manipulated itab "users" which is used to read the G/L accounts lateron accordingly.

Cheers, Lukas

former_member221103
Participant
0 Kudos

Thanks Lukas

If you explain a little bit more that would be great help. We implemented that BADi but at which place it will make the change and can read the GL account accordingly.

Regards

Lukas_Weigelt
Active Contributor
0 Kudos

I'll try to explain more detailed, I admit it isn't 100% autodidactic

The parameters within "users" determine how the Table T706K (That's where the Pre-Accounting for G/L accounts is maintained) is read in the further progress of the program. The point is, this table has no field "schema" or the like, it is independant from the schema, it only considers the trip provision variant (MOREI). But, since you have this BADI you can read the schema in runtime from the parameter "t_head" and manipulate the parameter "users" in a way so it only will lead to selection of G/L accounts that matches your schema from runtime. So bottom line, this method allows for distinguishing the G/L selection even for parameters that do not exist in the table itself, but only in the runtime of the BADI (in your case it's the schema; the table doesn't have a field "schema" but the BADI provides it).

I hope this made it a bit better understandable. I think it would also help, if you implement the BADI and debug into the method, then it's easier to understand, IMHO.

Cheers, Lukas

former_member221103
Participant
0 Kudos

Hi Lukas,

Yes it was really helpful. Your explanation was explanatory but I am still facing problem. May be because I am not doing something correct. Actually system is taking by default two wage type MJ90, MJ95 but I have not assigned to Travel Expense type for Per Diem/Flat rate.

System is by default making the accounting entry Training Dr and

                                                                          Training Cr

instead of Training Per Diem Dr and

               Travel Advance  Cr

I am attaching the screenshot of wage type if it clears something.

Regards

Answers (0)