Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8705

Reading infotype instead of table

$
0
0

I am currently using a number of custom fields our infosets. Some of them are used for ad-hoc queries, and some are used for other things.

 

The code of the fields generally looks like this (this field name is called ZUSRID_USERID):

 

clear zusrid_userid.

  select usrid from pa0105 into zusrid_userid

    where pernr = p0105-pernr

    and usrty = '0001'

    and endda >= pn-endps

    and begda <= pn-begps.

endselect.


With this code i am looking into the PA table corresponding to an infotype - in this case to grab the userid for the user.


While it generally works alright, it poses two problems for me.

 

The first is that a user that runs a query using this field needs to be authorized to access table PA0105.

 

The second problem is that i fear that this way of collecting data is very resource consuming. It is clear for me that when listing 10,000+ employees there is a huge difference when including and excluding these custom fields.

 

Does anyone have a suggestion on how to get the data from the infotype instead of the table?


Viewing all articles
Browse latest Browse all 8705

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>