2008 Sep 07 8:09 AM
Hi experts,
please tell me about the get pernr event and from which all tables data is fetched during the event.
thanks,
ajay
Hi experts,
please tell me about the get pernr event and from which all tables data is fetched during the event.
thanks,
ajay
2008 Sep 07 8:11 AM
2008 Sep 07 8:23 AM
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.
Regards,
Harish
2008 Sep 07 8:52 AM
Hi Ajay,
GET PERNR event fetches the data from the tables which are specified using INFOTYPES statement.
Example:
INFOTYPES: 0000, 0001, 0006.
GET PERNR.
The Event fetches data from tables PA0000, PA0001 and PA0006.
Best regards,
raam