Application Development and Automation 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: 
Read only

Get PERNR

Former Member
0 Likes
1,793

Hi,

Can anyone explain in detail, on how get pernr works?

Thanks,

Sriram.

Hi,

Can anyone explain in detail, on how get pernr works?

Thanks,

Sriram.

5 REPLIES 5
Read only

Former Member
0 Likes
874

Hi Sriram,

For this you need to be familiar with the logical database concept. Just search for logical database or do F1 on GET and you will get an idea. Still you are not clear let us know, we will try to explain.

Regards,

Atish

Read only

RaymondGiuseppi
Active Contributor
0 Likes
874

<b>GET pernr.</b>

This is related to logiical database LDB, usually logical database PNP.

Look at <a href="http://help.sap.com/saphelp_46c/helpdata/en/4f/d527ba575e11d189270000e8322f96/frameset.htm">Report Structure (PA-PAD)</a>

Regards

Read only

Former Member
0 Likes
874

Hi

GET is the command used in Logical database concept for fetching the data

GET PERNR will fetch all the Pernr's one by one in a Loop like thing

and for each pernr the data records in other infotypes have been processed

and it goes on till all the pernr's are completed.

see the sample code

start-of-selection.

  • Get PERNR from LDB

get pernr.

  • Get data from Respective Infotypes

rp_provide_from_last p0001 space pnpbegda pnpendda.

if p0001-kostl in pnpkostl.

rep_tab-kostl = p0001-kostl.

rep_tab-pernr = p0001-pernr.

rep_tab-ename = p0001-ename.

  • Get the Position Text

clear t528t-plstx.

select single plstx into t528t-plstx from t528t

where plans = p0001-plans and

otype = c_type and

sprsl = sy-langu.

if sy-subrc = 0.

rep_tab-ptext = t528t-plstx.

endif.

  • Get the Cost Center Text

clear cskt-ltext.

select single ltext into cskt-ltext from cskt

where spras = sy-langu and

kokrs = c_kokrs and

kostl = p0001-kostl.

if sy-subrc = 0.

rep_tab-ctext = cskt-ltext.

endif.

append rep_tab.

clear rep_tab.

endif.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

0 Likes
874

Hi Anji

I too have a doubt pertaining to the usage of the LDB "PERNR".

I need a small clarification:

Is it that under GET PERNR Loop, we use any other Infotype (post declaring it in the report) for its value.

for Ex P0000-pqr, P0001-xyz or P0002-abc.

Kindly clear my Doubt...

Regards

Ravi