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: 

Customizing user selection fields of Logical database PNP

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

Write this coding in your Z program ....

report Z_test.

..

..

..

initialization.

*write the coding here ...

start-of-selection.

get pernr..

.

.

.