11-06-2009 8:01 AM
Dear Gurus,
I had made a z-copy of payslip program for incorporation of Logo. Now we need to put this report in Enterprise Portal (EP). Now since we would not want any user to view any other person's payslip, I need to disable the selection field (PERNR) for user selection.
Problem is this field for user selection is coming from standard Logical Database (LDB - PNP) used in the program. So how can I make this field hardcoded as sy-uname and non-modifiable without making z-copy of LDB-PNP.
Also I wish to harcode Payroll Area writing some code (from table PA000) but again I cannot write this in std. PNP LDB and writing it in driver program will not help.
Thanks in advance.
Regards,
Amit
11-06-2009 12:37 PM
Write this coding in your program to disable PERNR...
initialization .
loop at screen.
if screen-name = 'PNPPERNR-LOW' or
screen-name = 'PNPPERNR-HIGH'.
screen-input = '0'.
endif.
modify screen.
endloop.
at selection-screen output.
loop at screen.
if screen-name = 'PNPPERNR-LOW' or
screen-name = 'PNPPERNR-HIGH'.
screen-input = '0'.
endif.
modify screen.
endloop.
similarly write code to harcode Payroll Area
11-06-2009 12:37 PM
Write this coding in your program to disable PERNR...
initialization .
loop at screen.
if screen-name = 'PNPPERNR-LOW' or
screen-name = 'PNPPERNR-HIGH'.
screen-input = '0'.
endif.
modify screen.
endloop.
at selection-screen output.
loop at screen.
if screen-name = 'PNPPERNR-LOW' or
screen-name = 'PNPPERNR-HIGH'.
screen-input = '0'.
endif.
modify screen.
endloop.
similarly write code to harcode Payroll Area
11-16-2009 10:16 AM
Dear Friends,
I need to hardcode the PNPPERNR to sy-uname in logical database PNP so that the user logging in ESS can only see report of his payslip and none other.
I know that I can choose fields to be displayed creating my own HR Report category but how shall I hardcode it to sy-uname or other fields in Selection program of PNP without creating Z-COPY of LDB PNP?
Please help.
Regards,
Amit
11-16-2009 6:08 PM
Write the highlighted coding in initialization ...
initialization .
select single pernr from pa0105
into pernr-pernr
where usrid = sy-uname.
if sy-subrc = 0.
PNPPERNR-sign = 'I'.
PNPPERNR-option = 'EQ'.
PNPPERNR-LOW = pernr-pernr.
Append PNPPERNR.
endif.
loop at screen.
if screen-name = 'PNPPERNR-LOW' or
screen-name = 'PNPPERNR-HIGH'.
screen-input = '0'.
endif.
modify screen.
endloop.
at selection-screen output.
loop at screen.
if screen-name = 'PNPPERNR-LOW' or
screen-name = 'PNPPERNR-HIGH'.
screen-input = '0'.
endif.
modify screen.
endloop.
11-17-2009 4:51 AM
Dear Srini,
Where do you suggest to write this code........in the main program calling GET PERNR; as I cannot change the LDB program PNP?
Amit
11-23-2009 6:56 PM
Write this coding in your Z program ....
report Z_test.
..
..
..
initialization.
*write the coding here ...
start-of-selection.
get pernr..
.
.
.