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: 

Get USRID from P0105 based from KNVP-PERNR...

aris_hidalgo
Contributor
0 Kudos
478

Hello Experts,

I need to get the USRID from P0105 based from the value that I got in

KNVP-PERNR(Personnel Number). Please give me an example on how to do this.

Also, is the field USRID contains the e-mail addresses of users? Thank you guys

and take care!

1 ACCEPTED SOLUTION

Former Member
0 Kudos
121

Hi

The field

USRID_LONG

in PA0105 contains the mail id of pernr.

USRID is the User name

Pass the PERNR to PA0105 and select the USRID and the mail field

USRID_LONG from it and use it.

Reward points if useful

Regards

Anji

5 REPLIES 5

Former Member
0 Kudos
122

Hi

The field

USRID_LONG

in PA0105 contains the mail id of pernr.

USRID is the User name

Pass the PERNR to PA0105 and select the USRID and the mail field

USRID_LONG from it and use it.

Reward points if useful

Regards

Anji

0 Kudos
121

Hello again Experts,

I tried using select to get data from P0105 but it says that it is not defined

as a table, etc. I am doing this inside a function module by the way.Thanks again guys!

0 Kudos
121

Hi

P0105 is a structure

use the PA0105 like a table (which is a infotype)

write a select for this

select PERNR USRID USERID_long into table ITAB from pa0105

where pernr = KNVP-pernr.

it will fetch the Mail ID

Reward points if useful

Regards

Anji

0 Kudos
121

Hi Anji,

I tried creating a test program using what you said but it still won't work. Below is the test code:


REPORT  z_aris_test_16.

TABLES: p0105.

START-OF-SELECTION.

  SELECT userid FROM p0105 INTO p0105-userid.

0 Kudos
121

As Anji said, it should be like :

REPORT z_aris_test_16.

data l_userid type pa0105-userid

data l_pernr type pa0105-pernr.

START-OF-SELECTION.

SELECT userid FROM pa0105 INTO l_userid

where pernr eq l_pernr.