Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering Lookup Values

Former Member
0 Kudos
173

I've been getting fantastic support here, and was able to create a pretty generic lookup values/texts mechanism which is currently being used for Trip / Travel Expanses PR05 but should be good for many other areas, as it seems.

The only think I couldn't fully figure out is how to filter the values from the different CheckTables programatically, to what you would see as a user if you logon to Net Weaver.

Is there a generic way to do that programatically?

For instance, on Trip Management there's this field MOREI, which looks suspicious to be the one to filter values based on. I read in this forum that this value is the provision variant, is that the right value?

1. If yes, then how do I get the MOREI value for a specific employee number? (programatically from a table or RFC/BAPI).

2. If that's not the right direction, then how do I get only values which are valid for the specific Trip creation?

Any help is much appreciated!

Thanks,

Itzik

2 REPLIES 2

former_member226239
Contributor
0 Kudos
128

I don't know whether it is right direction or not to get the MOREI from the employee number BUT I guess the MOREI (trip provision variant) is not directly related to the Employee number only (can get the values using Employee number and Trip number).

I guess there could be multiple MOREI values for one employee. Here is the table to get: PTRV_HEAD.

eg query: select * from ptrv_head

                             into table lt_ptrv_head

                             where pernr = lv_pernr.

                                " and reinr = lv_reinr. ( If you want only values for employee and trip number )

Check the where used list of the data elements pernr_d and morei to get all the tables where it has been used.

Thanks,
Chandra

0 Kudos
128

Chandra, thanks for your response.

We need to find a way to filter looku values, that's done as part of trip creation process and therefore, there's no Trip ID yet.

We understand that MOREI is filtering the values in the different Travel related tables such as T706S which are the values and texts for Travel Schema.

The ABAP function PA_TRV_GET_PERNR_MOREI is what we need as it should get the right value per employee ID, however, since we are using RFC this one is not applicable for us remotely.

Is there any remote enabled capability which matched PA_TRV_GET_PERNR_MOREI? if not, which tables should we query top get this info?

Any assistance will be appreciated!

Thanks,

Itzik