HR-ABAP - By using PNPCE - LDB.
hi,
I want to add the fields values of table pa0033.
The fields are (Aus01, Aus02,Aus03----Aus20).
But these are character fields. kindly guide me.
Hello,
Copy the fields in a integer field and copy them.
You could declare an internal table with integer field names and copy them across.
Then add them and move them back to the charater field for display.
Similar Messages
-
Need example report program using PNPCE LDB in SAP HR
Need example report program using PNPCE LDB in SAP HR.
and how to create a report category in sap hr for using it as cutomised selection screen.Hi,
Go through the following links, i hope it will help you.....
/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/893908#
A sample prog with LDB PNP
*& Report ZH_REPT_PAYMENT *
report zh_rept_payment line-size 80 no standard page
heading.
tables: pernr, " Standard Selections for HR Master Data Reporting
pcl1, " HR Cluster 1
pcl2, " HR Cluster 2
pa0009,
PA9001,
PA9006,
pa0002,
pc260 , " Cluster Directory for Payroll Results
bnka .
Infotypes
infotypes: 0001. " Organizational Assignment
Declaration of Internal Tables
data : bnka1 like bnka occurs 0 with header line .
data: begin of t_int_rep occurs 100,
bankl like pc209-bankl, " Bank Number
zlsch like pc209-zlsch, " Payment method
pernr like pernr-pernr, " Employee Number
ename like pernr-ename, " Employee Name
bankn like pc209-bankn, " Bank Account Number
betrg like pc209-betrg, " Amount to be transfered
zweck like pa0009-zweck, " Purpose
end of t_int_rep.
data: begin of int_rep occurs 100,
bankl like pc209-bankl, " Bank Number
zlsch like pc209-zlsch, " Payment method
pernr like pernr-pernr, " Employee Number
ename like pernr-ename, " Employee Name
bankn like pc209-bankn, " Bank Account Number
betrg like pc209-betrg, " Amount to be transfered
zweck like pa0009-zweck, " Purpose
begda like pa0009-begda, "Begin date
end of int_rep.
Declaration of Data Variables
data: ws_betrg like pc209-betrg, " BT Amount
w_val like spell occurs 0 with header line,
int_rep1(6), " TYPE I, " Employee Number
cnt type i value 0, " Counter
calcmolga like t500l-molga value '40', " Country Grouping
v_id(15),
calc_currency like t001-waers value 'INR'. " Currency
data : ctr type i,
dt_merge like pa0009-begda.
data: ws_totemp(6) type c,
ws_totamt(20) type c,
r_mth(9) type c,
ws_fpbeg(6) type c,
ws_fpend(6) type c,
ws_mthyr(6) type c,
ws_mthyr_r(14) type c,
r_mth_t(3) type c,
ws_amt(8) type c,
ws_bankl(14) type c,
ws_date(6) type c,
amount_word(500),
total_page type i,
pages type i,
remain type i.
data begin of i_spell.
include structure spell .
data end of i_spell .
data : c_molga type t500l-molga value '40',
c_banks type bnka-banks value 'IN'.
Standard Includes
include rpc2cd09. "Cluster CD data definition
include pc2rxin0.
include rpc2rx09.
include rpppxd00. " Data Definition buffer PCL1/PCL2
include rpppxd10. " Common Part buffer PCL1/PCL2
include rpppxm00. " Buffer Handling RoutinePCL1/PCL2
include zrpc2rox2. " Data Definition POCLSTERS (not J,K,U)
Selection Screen
selection-screen begin of block b1 with frame title text-001.
parameter: pa_mth(2) type c default sy-datum+4(2) obligatory,
pa_year(4) type c default sy-datum(4) obligatory,
p_bankl like pc209-bankl, " Bank Number
p_zlsch like pc209-zlsch. " Payment method
selection-screen end of block b1.
save_calc_currency = calc_currency.
count_top = 0.
get_pernr_flag = 0.
Top-Of-Page
top-of-page.
perform convert_month using pa_mth(2) r_mth.
ws_mthyr_r = r_mth.
concatenate ws_mthyr_r pa_year into ws_mthyr_r separated by space.
SKIP 5.
skip 1.
skip 4.
if int_rep-bankl eq ' '.
if int_rep-zlsch eq 'C' or int_rep-zlsch eq 'E' or
int_rep-zlsch eq ' '.
write: /1(85) 'CHEQUE PAYMENT STATEMENT'(047) centered.
elseif int_rep-zlsch eq 'L'.
write: /1(85) 'DEMAND DRAFT STATEMENT'(047) centered.
endif.
else.
write: /1(85) 'BANK TRANSFER STATEMENT'(002) centered.
endif.
skip.
write: /34 ws_mthyr_r,
62 'Page :'(008),69(2) sy-pagno intensified off,
' Of ',78(2) pages intensified off.
clear pages.
read table bnka1 with key bankl = int_rep-bankl .
if sy-subrc = 0.
if int_rep-zlsch eq 'T'.
write:/03(10) 'Bank Name : ', bnka1-banka.
write:/03(10) 'Branch : ', bnka1-brnch.
write:/03(10) 'Address : ', bnka1-stras.
endif.
endif.
skip.
write:/1(80) sy-uline.
write: /1 sy-vline, 2(5) 'Sl.No'(002),
7 sy-vline, 8(8) 'Emp.No.'(003),
16 sy-vline,17(35) 'Employee Name'(004).
*--added for Demand Draft
if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
write : 47 sy-vline, 48(15) 'Payable at'(005).
else.
write : 47 sy-vline,48(15) 'Account No.'(005).
endif.
write: 63 sy-vline,64(16) 'Amount'(006),
80 sy-vline.
write:/1(80) sy-uline.
end-of-page.
write:/1(80) sy-uline.
write:/2 'Printed on ', sy-datum.
Start-of-selection.
start-of-selection.
*perform h_headr.
ctr = 0.
set margin 5.
call function 'RP_GET_CURRENCY'
exporting
molga = calcmolga
importing
waers = calc_currency
exceptions
others.
if sy-subrc ne 0.
calc_currency = 'DEM'.
calc_currency = save_calc_currency.
endif.
get pernr.
cd-key-pernr = pernr-pernr.
perform import_cluster.
get_pernr_flag = 1.
check : ocd-version-molga eq calcmolga.
The table 'tabpernr' is filled with the personnel numbers
and is used after selection is finished.
move-corresponding pernr to tabpernr.
append tabpernr.
The table 'tab_rgdir' is filled
loop at rgdir.
rx-key-pernr = pernr-pernr.
unpack rgdir-seqnr to rx-key-seqno.
perform int_tab. "fill tab_rgdir
perform import_bt.
perform validate.
endloop.
End of Selection
end-of-selection.
*perform h_headr.
perform convert_date_a using pa_mth r_mth_t.
sort int_rep by bankl zlsch pernr betrg descending.
delete adjacent duplicates from int_rep
comparing bankl zlsch pernr .
sort int_rep by bankl zlsch bankn . "PERNR.
loop at int_rep.
at new bankl.
select single * into bnka1 from bnka
where banks = c_banks and
bankl = int_rep-bankl .
append bnka1.
clear bnka1.
endat.
endloop.
for Demand Draft - purpose added
loop at int_rep.
concatenate pa_year(4) pa_mth(2) '01' into dt_merge.
select single * "zweck into int_rep-zweck
from pa0009 where
pernr = int_rep-pernr and
bankl = int_rep-bankl and
zlsch = int_rep-zlsch
and begda <= dt_merge and
endda >= dt_merge .
if sy-subrc = 0.
int_rep-zweck = pa0009-zweck.
modify int_rep.
endif.
endloop.
*-for DD and Chq sorted by PAyable at and EMPNO wise
if p_zlsch = 'T' .
sort int_rep by bankl zlsch bankn . "PERNR.
else. "added for "payable at" for DD/Chq
else.
sort int_rep by zweck pernr . "PERNR.
endif.
*delete adjacent duplicates from int_rep.
t_int_rep] = int_rep[.
loop at int_rep.
*-for page of page no.
total_page = 0.
loop at t_int_rep where bankl = int_rep-bankl
and zlsch = int_rep-zlsch.
total_page = total_page + 1.
endloop.
pages = total_page div 25.
remain = total_page mod 25.
comment bcoz its adding one extra page no.
done as on 29/11/2004
if remain > 0.
pages = pages + 1.
endif.
**-end
at new bankl.
ctr = 0 .
new-page.
endat.
at new zlsch.
ctr = 0 .
new-page.
endat.
clear v_id.
select single natio
into pa0002-natio
from pa0002
where pernr eq int_rep-pernr.
*-testing......for soma
if ctr > 24.
ctr = 0 .
write:/1(80) sy-uline.
new-page .
endif.
ctr = ctr + 1 .
cnt = cnt + 1.
pack int_rep-pernr to int_rep1.
write:/1 sy-vline, 2(3) cnt intensified off,
7 sy-vline, 9(6) int_rep1 intensified off,
16 sy-vline,17(35) int_rep-ename intensified off .
if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
write : 47 sy-vline,48(15) int_rep-zweck intensified off.
else.
write:
47 sy-vline,48(15) int_rep-bankn intensified off .
endif.
write: 63 sy-vline,64(16) int_rep-betrg
intensified off currency 'INR',
80 sy-vline.
ws_betrg = ws_betrg + int_rep-betrg.
*-testing......for soma
skip.
write :
/1 sy-vline, 7 sy-vline ,16 sy-vline ,47 sy-vline,63 sy-vline,80
sy-vline .
*-end testing......for soma
at end of zlsch.
if int_rep-bankl = ' '.
call function 'HR_IN_CHG_INR_WRDS'
exporting
amt_in_num = ws_betrg
importing
amt_in_words = amount_word
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2
w_val-word = amount_word.
concatenate 'INR.' w_val-word into w_val-word
separated by space.
write:/1(80) sy-uline.
write: /1 sy-vline, 7 'Total transfer:'(009),
64(16) ws_betrg intensified off currency 'INR',
80 sy-vline.
write:/1(80) sy-uline.
write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
80 sy-vline.
write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
80 sy-vline.
write:/1(80) sy-uline.
clear: ws_betrg,cnt.
skip 2.
write: /2 'Prepared by :'(010), '_______________'(013),
45 'Checked by :'(011),'_______________'(013).
skip 2.
write: /2 'Printed On ', sy-datum,
45 'Approved by :'(012),'_______________'(013).
clear sy-pagno.
endif.
endat.
at end of bankl.
if int_rep-bankl ' '.
call function 'HR_IN_CHG_INR_WRDS'
exporting
amt_in_num = ws_betrg
importing
amt_in_words = amount_word
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2
w_val-word = amount_word.
concatenate 'INR.' w_val-word into w_val-word
separated by space.
write:/1(80) sy-uline.
write: /1 sy-vline, 7 'Total transfer:'(009),
64(16) ws_betrg intensified off currency 'INR',
80 sy-vline.
write:/1(80) sy-uline.
write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
80 sy-vline.
write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
80 sy-vline.
write:/1(80) sy-uline.
clear: ws_betrg,cnt.
skip 2.
write: /2 'Prepared by :'(010), '_______________'(013),
45 'Checked by :'(011),'_______________'(013).
skip 2.
write: /2 'Printed on ', sy-datum,
45 'Approved by :'(012),'_______________'(013).
clear sy-pagno.
NEW-PAGE.
endif.
endat.
endloop.
End of Page
end-of-page.
write: /2 'Prepared by :'(010), '_______________',
45 'Checked by :'(011),'_______________'.
*& Form IMPORT_CLUSTER
Importing Data from Cluster *
form import_cluster.
sy-subrc = 0.
rp-imp-c2-cd.
if sy-subrc eq 0.
if cd-version-number ne ocd-version-number.
endif.
endif. " SY-SUBRC EQ 0
endform. " IMPORT_CLUSTER
*& Form INT_TAB
Filling internal table tab_rgdir form int_tab.
*Fill internal table tab_rgdir.
move-corresponding rgdir to tab_rgdir.
tab_rgdir-pernr = pernr-pernr.
append tab_rgdir.
endform. " INT_TAB
*& Form IMPORT_bt
Import Values from Bank Transactions Table (BT) form import_bt.
rp-init-buffer.
RP-IMP-C2-RX.
rp-imp-c2-in.
if rp-imp-in-subrc eq 0.
if in-version-number ne oin-version-number.
write: / 'Schlüssel des Clusters RX:'(015),
rx-key-pernr, rx-key-seqno.
write: / 'The imported version of the cluster'(016), 'RX',
'is not current'(017).
write: / 'Imported version :'(018),
oin-version-number.
write: / 'Current version of cluster :'(019),
in-version-number.
stop.
else.
sy-subrc = 0.
endif.
else.
sy-subrc = 8.
write: /
'Inconsistencies between cluster directory and directory for'(020).
write: /
'No payroll results found for data in cluster directory'(021).
write : /
'Please contact hotline to solve the current problem'(022).
endif.
ws_fpbeg(2) = versc-fpbeg+4(2).
ws_fpbeg+2(4) = versc-fpbeg(4).
ws_fpend(2) = versc-fpend+4(2).
ws_fpend+2(4) = versc-fpend(4).
ws_mthyr(2) = pa_mth.
ws_mthyr+2(4) = pa_year.
check ws_mthyr = ws_fpbeg.
check ws_mthyr = ws_fpend.
loop at bt. "from pc209
int_rep-pernr = pernr-pernr.
int_rep-ename = pernr-ename.
int_rep-bankl = bt-bankl.
int_rep-bankn = bt-bankn.
int_rep-betrg = bt-betrg.
int_rep-zlsch = bt-zlsch.
append int_rep.
endloop.
IF P_BANKL ' ' AND P_ZLSCH ' '.
DELETE INT_REP WHERE BANKL P_BANKL.
ELSEIF P_BANKL = ' ' AND P_ZLSCH ' '.
DELETE INT_REP WHERE ZLSCH P_ZLSCH.
ELSEIF P_BANKL ' ' AND P_ZLSCH = ' '.
DELETE INT_REP WHERE BANKL P_BANKL.
ENDIF.
endform. " IMPORT_BT
*& Form CONVERT_MONTH
Fetching Month Text form convert_month using mth t_mth.
case mth.
when '01'.
t_mth = 'January'(023).
when '02'.
t_mth = 'February'(024).
when '03'.
t_mth = 'March'(025).
when '04'.
t_mth = 'April'(026).
when '05'.
t_mth = 'May'(027).
when '06'.
t_mth = 'June'(028).
when '07'.
t_mth = 'July'(029).
when '08'.
t_mth = 'August'(030).
when '09'.
t_mth = 'September'(031).
when '10'.
t_mth = 'October'(032).
when '11'.
t_mth = 'November'(033).
when '12'.
t_mth = 'December'(034).
endcase.
endform. " CONVERT_MONTH
*& Form CONVERT_DATE_A
Fetching Month Text * form convert_date_a using mth_t t_mth_t.
case mth_t.
when '01'.
t_mth_t = 'Jan.'(035).
when '02'.
t_mth_t = 'Feb.'(036).
when '03'.
t_mth_t = 'Mar.'(037).
when '04'.
t_mth_t = 'Apr.'(038).
when '05'.
t_mth_t = 'May.'(039).
when '06'.
t_mth_t = 'Jun.'(040).
when '07'.
t_mth_t = 'Jul.'(041).
when '08'.
t_mth_t = 'Aug.'(042).
when '09'.
t_mth_t = 'Sep.'(043).
when '10'.
t_mth_t = 'Oct.'(044).
when '11'.
t_mth_t = 'Nov.'(045).
when '12'.
t_mth_t = 'Dec.'(046).
endcase.
endform. " CONVERT_DATE_A
*& Form VALIDATE
text
--> p1 text
<-- p2 text form validate .
if p_bankl <> ' ' and p_zlsch ' '.
delete int_rep where bankl p_bankl.
elseif p_bankl = ' ' and p_zlsch ' '.
delete int_rep where zlsch p_zlsch.
elseif p_bankl ' ' and p_zlsch = ' '.
delete int_rep where bankl p_bankl.
endif.
endform. " VALIDATE
check this weblog.....
/people/dj.adams/blog/2003/11/13/food-for-thought-ldbs-and-abap-objects
Also , check the following link too.
http://www.datamanagementgroup.com/Resources/Articles/Article_1005_2.asp
Regards,
Harish -
Which Syntax is best to read an infotype using PNPCE LDB ?
Hi experts,
Which syntax is best to read an infotype when we use PNPCE LDB.
Thanks.
reddyHi Iredy,
if you need to read an infotype records of the particular employee, you can use Macro RP-READ-INFOTYPE (Parameters: PERNR, INFTY, BEGDA, ENDDA)
Macro definition you can find in table TRMAC.
For RP-READ-INFOTYPE is definition as follows:
RP-READ-INFOTYPE 001 ****************************************
RP-READ-INFOTYPE 002 * RP-READ-INFOTYPE *
RP-READ-INFOTYPE 003 ****************************************
RP-READ-INFOTYPE 004 * PARAMETERS: *
RP-READ-INFOTYPE 005 * PERNR REQUESTED PERSONALNUMBER*
RP-READ-INFOTYPE 006 * INFTY REQUESTED INFOTYPNUMBER *
RP-READ-INFOTYPE 007 * INFTY-TABLE OUTPUT-TABLE LIKE PNNNN*
RP-READ-INFOTYPE 008 * BEGDA REQUESTED INTERVAL-BEGIN*
RP-READ-INFOTYPE 009 * ENDDA REQUESTED INTERVAL-END *
RP-READ-INFOTYPE 010 ****************************************
RP-READ-INFOTYPE 011 *SET DEBUGGING INTERRUPT ON *
RP-READ-INFOTYPE 012 PERFORM READ-INFOTYPE(SAPDBPNP) *
RP-READ-INFOTYPE 013 TABLES &3 *
RP-READ-INFOTYPE 014 USING &1 '&2' &4 &5
RP-READ-INFOTYPE 015 *SET DEBUGGING INTERRUPT OFF *
It means that the macro is performing read-infotype which is defined in include DBPNPF03 of the SAPDBPNP. -
Looping payroll results using pnpce ldb
hii experts,
Can anybody tell me how can v loop payroll results using pnpce ldb..plz provide me the syntax...or any reference report
program.Hi First Using Get peras event read the RGDIR results as below
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = p_pernr
IMPORTING
molga = p_molga
TABLES
in_rgdir = p_rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
Get the Cluster ID based on the molga value of the employee using T5001 table
Then Based on the RGDIR results loop retrive the payroll results below
LOOP AT gt_rgdir INTO wa_rgdir WHERE fpbeg LE wa_dates-endda AND fpend GE wa_dates-endda
AND srtza EQ c_a
AND payty EQ c_space.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = wa_t500l-relid
employeenumber = pernr-pernr
sequencenumber = wa_rgdir-seqnr
read_only_international = 'X'
CHANGING
payroll_result = gt_result
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10. -
ABAP-HR, using two LDB ie, PNP and PCH
Hi friends,
How can i use two logical database regarding to master data and organization managemnt. if i use PNP in Attributes LDB, how can i get tables regarding to organization mangent in reports, so that i can retrieve data from PNP and PCH.
Effecient answer will be rewarded points....
Thanks&Regards
Shiva PrasadHi Amit,
Thanks for yor valuable answer, i have tried it using 1st mentioned method, but i couldn't get. can u give me sample code.
i didn't try for the 2nd method.
i will try. -
Error while declaring RT_PERSON using pnpce ldb
when am declaring
data : RT_PERSON like line of PC2RT_PERSON.
am getting an error msg that
"FIELD 'PC2RT_PERSON' is unknown .it is neither in the specified tables, nor in the DATA statement".
whatz the error .what should i do.
points will be rewarded.
thanks in advance.declare as :
data : RT_PERSON like PC2RT_PERSON. -
Get data from PNPCE LDB in ABAP hr
Hi all,
I am workng on ABAP Hr.In it I am using PNPCE LDB, when I
use GET PERNR statement it don't give any syntax problem but the selection screen does not generate due to GET PERNR statement.
Is there any Other statement to find the PERNR.
Points will be sured for valuable answers.
Thanks
Sanket sethiA report that wants to use the PNPCE must enter this in its report attributes under Logical database.
In addition, the PERNR structure must be declared in the report using the 'TABLES PERNR' statement. You can only use the PERNR structure again in certain circumstances. The use of the 'GET PERNR' event is therefore forbidden. Instead, use the 'GET PERAS' event. Except for the PERNR-PERNR component, all other components of the PERNR structure are no longer filled and have initial values. This kind of programming (with the exception of PERNR-PERNR) therefore not permitted.
In addition to the 'GET PERAS' event, you can also use the GET PERSON' and 'GET GROUP' events. To be able to use these events, you must declare them using the NODES statement (NODES PERSON', 'NODES GROUP', or. NODES PERAS'.LdB's for HR are as follows:
PA----
PNP
Payroll----
PNPCE
Recruitment -
PAP
Orgmanagement -
PCH
PA report Example in attrubutes u have to add LDB is PNPCE
REPORT ZHR_TEST.
Type-Pools *
TYPE-POOLS : slis.
Nodes *
NODES: person,group,peras.
Tables *
TABLES: pernr,t512w,tfkbt,pa0022,pa0016,bkpf.
Infotypes *
INFOTYPES : 0000, "Actions
0001, "Org Details
0022, "Education Details
0041, "Date Specification
0002, "Personal Details
0016.
Internal Tables *
DATA :BEGIN OF t_output OCCURS 0,
pernr TYPE pernr_d, " Personnel No.
ename TYPE emnam, " Employee Name
btrtl TYPE btrtl, "Personnel Subarea
btext TYPE btext, "Personnel Subarea Text
persk TYPE persk, "Grade
ptext TYPE pktxt, "gradeText
END OF t_output.
DATA: t_fcat TYPE slis_t_fieldcat_alv.
ALV Variable
DATA : w_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv.
Event : GET Pernr *
GET peras.
PERFORM read_data. "Data Selection
Event : End-Of-Selection *
END-OF-SELECTION.
PERFORM f_addcat. "Field Cat
PERFORM f_display. "Display
*& Form read_data
FORM read_data.
*Organizational Assignment
rp_provide_from_last p0001 space pn-begda pn-endda.
IF pnp-sw-found EQ 1.
t_output-pernr = p0001-pernr.
t_output-ename = p0001-ename.
t_output-btrtl = p0001-btrtl.
t_output-persk = p0001-persk.
*Personal sub area text
SELECT SINGLE btext FROM t001p
INTO t_output-btext
WHERE btrtl = t_output-btrtl.
*Grade text
SELECT SINGLE ptext FROM t503t
INTO t_output-ptext
WHERE persk = t_output-persk AND
sprsl = 'EN'.
ENDIF.
APPEND t_output.
CLEAR t_output.
ENDFORM. "
*& Form f_addcat
FORM f_addcat .
*************Filling field catelog here.**************
*& Form f_display
FORM f_display.
*Local Variable
DATA : lv_repid LIKE sy-repid,
ls_layout TYPE slis_layout_alv.
lv_repid = sy-repid.
ls_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lv_repid
is_layout = ls_layout
it_fieldcat = t_fcat
i_save = 'A'
TABLES
t_outtab = t_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f_display -
Hello Frn's
I need to develop a abap Query using LDB , for this a Infoset is allready created , which uses PNPCE LDB .
Below i am Descrbing the scenerio , for which we need to develop the query ....
Dept/Div Transfer
Employees who transferred dept or division within specified date range:
EmpID
Last Name, First Name
Date of transfer
New department
New division
Current supervisor
Old department
Old division
How can i fitler out the data of our requirment ... because i want to use same infoset in diffrent query .
Please provide some solution
Thanks and Regards..
Priyank DixitHi Priyank,
First you need to check whether all the required fields are available there in the LDB PNPCE(I guess you are using the same).
I think old department, old division must not be available there. Then you need to add it in your Infoset and write custom code for these fields. Once you are done with custom coding, you can use this infoset for creating queries.
Use trnx SQ02 to create queries, either SAP or Infoset.
Hope it helps. Let me know if you need some more help.
Raveesh -
HR ABAP - (PNPCE - LDB)
hi,
I am using PNPCE-LDB, I want the selection screen o/p as like PNP(selection screen). guide me on this.Hi rajesh,
1. If u want your own screen,
then just don't define
TABLES : PERNR.
(no default screen of the ldb will come)
2.
report abc.
parameters : a type c.
regards,
amit m. -
Hi all,
I am workng on ABAP Hr.In it I am using PNPCE LDB, when I
use GET PERNR statement it don't give any syntax problem but the selection screen does not generate due to GET PERNR statement.
Is there any Other statement to find the PERNR.
Points will be sured for valuable answers.
Thanks
Sanket sethiIn addition, the PERNR structure must be declared in the report using the 'TABLES PERNR' statement. You can only use the PERNR structure again in certain circumstances. The use of the 'GET PERNR' event is therefore forbidden. Instead, use the 'GET PERAS' event. Except for the PERNR-PERNR component, all other components of the PERNR structure are no longer filled and have initial values.
In addition to the 'GET PERAS' event, you can also use the 'GET PERSON' and 'GET GROUP' events. To be able to use these events, you must declare them using the NODES statement ('NODES PERSON', 'NODES GROUP', or 'NODES PERAS'). -
BI: PNPCE LDB extractor - cant specify begda & endda
Hi,
I tried to create extractor using PNPCE LDB to retrieve wages, but the problem is that I cant change decision date for LDB.
It is always set up for sy-datum and I cant change it to another interval.
Can you tell me where is the problem?
thanx
Juraj -
Hi,
I am using PNPCE LDB for one Report.
I am giving PERSONID(central personnumber) in selection screen then i am getting correct output.
When i dont give input in selection screen then need to select total data means total PERSONID's .
But i am not getting that.
Is there any problem behind that?
Can you please provide some inputs on this
Thanks in Advance
Regards
SandeepWe are using HR-Report category PNPCEALL which includes all selection criteria. We had a varient for which reporting period is all and employee status is active. When we r giving direct single Personid we r getting otput which is included in this varient. But when we r not giving any personid i.e it should work for all pernrs. But its not happening.
-
How to retrieve time data from infotypes 2001 and 2002 when we use PNPCE
Hello Everyone,
I am new in using PNPCE ldb.In the requirement i have to retrieve time data from infotypes 2001 and 2002 between the begda and endda.I tried using the macro RP-READ-ALL-TIME-ITY to retrieve data.But its not supporting.Can some body help me in doing this.
THanks in Advance..
Regards,
Chinni.Hi
Try the following code:
REPORT ZHRTM41.
nodes peras.
Tables: PERNR.
Infotypes: 2001.
start-of-selection.
get peras.
rp_read_all_time_ity pn-begda pn-endda.
end-of-selection.
loop at p2001.
write:/ p2001-abwtg,p2001-stdaz.
endloop.
It worked for me when using PNPCE. let me know if you have any problem
Thanks,
V.Nagaraju -
Want to have own selection screen in HR-ABAP report using LDB
Hi experts,
I am working on HR-ABAP report using LDB pnp and infotypes..But, here we get the built in selection criterion..but I want my own selection screen to be displayed..whats the solution for this??? Is it possible to create my own selection screen instead of default one..and how???
Please help me..its very urgent..Hi,
chk this out:
Create Report Categories
In this step, you define the report categories and determine the layout
of the standard selection screen for these report categories. You can
create report categories for programs or queries that are based on the
PNP or PNPCE logical databases.
The definition of report categories is divided into two sections:
o In the Change Report Category view, you define general attributes
such as sort order, input fields for date, and so on.
o In the Change Selection Criteria view, you define which selection
fields of the logical database should be avaliable on the selection
screen.
Example
You want to set up your system so that your employees can only start
evaluation reports for Payroll if they use a payroll area. Within a
payroll area, you should be able to select according to personnel
number. Additional selection criteria should not be possible and you
should not be allowed to enter a sort sequence.
Standard settings
The standard system already contains report categories. You can find the
attributes of the report categories in the table.
Note the following five report categories in particular:
o Report category ' ' is the SAP default report category for
programs that are based on the PNP logical database.
o Report category PNPCE is the SAP default category for programs that
are based on the PNPCE logical database.
o Report category '00000000' is the customer-specific default category
for programs that are based on the PNP logical database.
o Report category '0PNPCE' is the customer-specific default category
for programs that are based on the PNPCE logical database.
o Report category __X2001 is the default category for Queries that
are based on an InfoSet of the PNP LDB.
o Report category QUEPNPCE is the default category for queries that
are based on an InfoSet of the PNPCE LDB.
The default report categories are used when a report is called if
the report has not been assigned a report category.
Parameters and Options for Report Categories of the LDB PNP and PNPCE
Parameters and Options in Screen Area General Data
If you activate this parameter, you can only enter data on the data
selection period if you use reports that have been assigned. The
same date entries are then used for the person selection as for the
date selection.
o Matchcode allowed
If you activate this parameter, you have use of a Matchcode
pushbutton (search help) if you use reports that have been assigned.
This pushbutton enables you to perform the person selection.
o Sort allowed
If you activate this parameter, you have use of a Sort pushbutton if
you use report that have been assigned. This pushbutton enables you
to define a sort order before you execute the report.
o Organizational structure allowed
If you activate this parameter, you have use of an Org.Structure
pushbutton if you use reports that have been assigned. This
pushbutton enables you to perform the person selection.
Note:
For more information about these options, see the online
documentation under this path:
SAP Library -> Human Resources -> Reporting in Human Resources
Management -> Standard HR Reports -> Report Selection Screen in
Human Resources Management.
Parameters and Options in Screen Areas Data Selection Period/Person
Selection Period/Payroll Area/Period/Year
o Options for data selection period and person selection period (key
date and so on)
Here you define which options for date and person selection are
available for reports that have been assigned.
o Options for payroll area/period/year
Here you define which options for selection using payroll
area/period/year are available for reports that have been assigned.
Parameters and Options in Screen Area Selection View
o Type/Name
This parameter enables you to use selection views to define report
categories. You use the selection view selected here to determine
which fields are available in the Dynamic Selectionsy.
Note:
You create selection views for the PNP and PNPCE logical databases
in the Object Navigator (SE80):
1. Start the Object Navigator (SE80)
2. Choose Workbench -> Edit Object.
3. Choose the More... tab page and the Selection view on this tab
page.
4. Choose Create.
5. In the Create Selection View dialog box, choose the For any
tables option.
6. In the Name of view field, enter a name for your selection view.
7. In the Tables dialog box, enter the name of the table from which
you want to use fields.
Note:
When you enter the table name, observe the naming convention in
Personnel Administration:
Infotype number: nnnn -> table name: PAnnnn
8. Choose Continue.
9. In the Functional groups area, define functional groups by
assigning a name and a number.
10. Assign fields from the selected tables to the functional groups
by entering the number of the desired functional group in front of
each field.
11. Save your entries.
For more information about adjusting the dynamic selections using
your own selection views, see the online documentation under the
following menu path:
SAP Library -> Human Resources -> Reporting in Human Resources
Management -> HR Standard Reports -> Report Selection Screen in
Human Resources Management -> Enhancing the Selection Screen -
Dynamic Selections.
If you do not want to offer dynamic selections, make the following
settings:
- LDB PNP: In the Selection view field, enter PNP_NO_FREE_SEL.
- LDB PNPCE: Leave the Selection view field empty.
Parameters and Options in Screen Area Data Selection Period/Person
Selection Period/Payroll Area/Period/Year
o Available input parameters, date or period entry (today, key date,
all, and so on), and standard value.
Using the Standard value option, you define which of the selected
options is shown.
Parameters and Options in Screen Area CE Selection Fields
o CE selection fields (external person ID, grouping reason, grouping
value)
Using the options in this area, you define whether the external
person Id, grouping reason, or grouping value are available on the
selection screen.
Note:
These parameters are only relevant for you if you implement
Concurrent Employment (see also note 517071).
Parameters and Options in Screen Area Selection view
o Dynamic selections as dialog box
If this switch is set, you can call the dynamic selections as a
dialog box.
o Dynamic selections active
If this switch is set, the dynamic selections of the logical
database are active at the start of the report.
Note that the following combinations are possible for the last two
options mentioned:
Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/inactive
Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/active
Dyn.Sel. as dialog box/Dyn.Sel. active: active/inactive
Activities
1. Choose Edit -> New entries.
2. Enter an abbreviation and a long text for the report category.
The customer name range for report categories is 0-9.
3. Select the For the PNPCE logical database checkbox, if you want to
create a report category for a program or for queries of the PNPCE
logical database.
4. In the General Data screen area, choose the desired options.
If you want to use selection IDs, you must have first created and
grouped selection Ids. The IMG path to do this is given in the
parameter description section.
5. In the Data selection period/person selection period or Selection
period screen area, choose the desired options.
6. In the Selection view screen area, choose the desired options.
7. In the CE selection fields screen area, choose the desired (only
possible for report categories of the LDB PNPCE).
8. Save your entries.
9. Choose the subactivity Permitted selection criteria.
10. Choose Edit -> New entries.
11. In the Select option field, use the input help to select each field
that should be available on the selection screen.
12. Select the checkbox in the 1.page column, if you want this selection
field to be available directly when you call the selection screen.
Further notes
13. If you want to copy entries, you still have to enter the selection
parameters again in the subsequent screen.
o If you create the report category '000000000', a selection screen is
generated according to report category '00000000'for all reports for
which a report category has not explicitly been assigned.
Assign Report Categories
In this step, you assign a report category to your reports.
Example
You have created your own report, for example ZPCTEST1, and would like
it to have the selection screen that corresponds to that of the
evaluation report for Payroll, which is assigned to report category
'__M00001'.
Assign report category '__M00001' to the report.
Requirements
You must have defined the Report Categories.
Standard settings
SAP Standard Reports:
In the standard system, reports are assigned a report category. If you
want to override these assignments, perform the activities described
here. If you want to assign report categories to standard reports using
SE38, this represents a modification.
Customer-Specific Reports:
For reports you have developed yourself, you can either assign report
categories by performing the activities described here or directly in SE38.
Recommendation
Only assign a report category if you have created your own reports or if
the selection screens in the standard system do not meet your
requirements.
Activities
1. Choose Edit -> New entries.
2. Perform the required assignment using the Program name and Report
category fields.
3. Save your entries.
reward if helpful
regards,
madhumitha -
If I use a LDB in the Attributes of the Program what happens?
Hi friends,
I have to modify a standard program RFRECPSFA410. which i need to add some more fields in the output layout. It is a standard program. In the attributes of the program he used the LDB name RECN. And while debugging i found that the program is calling logical database. How it is calling I could not understand. And I need to add the fields in the Output Lay out. How can I add?Hi
LDB - Logical Database are special ABAP programs that retrieve data and make it available to application programs. The most common use of logical databases is still to read data from database tables by linking them to executable ABAP programs. They provide selction-screen, authority-check etc.
For detailed information see the following links:
Overview:
http://help.sap.com/saphelp_nw04/helpdata/en/60/183d78163011d2953c0000e8353423/frameset.htm
Using Logical Databases:
http://help.sap.com/saphelp_nw04/helpdata/en/60/183d78163011d2953c0000e8353423/frameset.htm
Regards
Surya.
Maybe you are looking for
-
HT201269 How do I get my iPhone contacts synced to my new iPad?
I just got a new iPad. I have an iPhone with tons of phone numbers and contact information on it. How do I get those on my new iPad without having to type them all in?
-
Hi, I have a requirement to move file (unread) from remote server to local and capture the file size for logging purpose. I have modified my jca file to use FTPIoInteractionSpec and FTP working fine. To get the file size, I tried using jca.ftp.size p
-
Hello, I had store the chinese character using nvarchar2 in Oracle9i using UTF-16 encoding (NLS_NCHAR_CHARACTERSET = AL16UTF16 ) The problem is how i can i read the chinese character using SQLPlus or iSQLPlus ? When i select the field, it display "??
-
Hi, I have been using Captivate for a while now, and am slowly starting to get the hang of it! I am currently working on a project which includes static instructional material that is broken up by interactive software demos, all deployed through a LM
-
JTEAM please help:how to show flexible date in a time component
According to Steven Muench about How to handle Flexible Date Format on Feb 28,2001. I create the FlexiDate Domain and create a FlexiDate.class in the howto.common package. Then in Employees entity on the Attribute Setting page I select Hiredate attri