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: 

Interactive hr report

Former Member
0 Kudos
118

Hi all,

I created an interactive HR report using PNP LDB ... but I have a problem .... it is taking me to the next screen wherever i click ...... and I want to restricted to personnel no..... so that whenever i click on personnel no. it should take me to the next screen ...... any suggestions please.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
90

Hi,

Usin HIDE statement after the WRITE of the PERNR field, wherever you click you get the output.

To avoid this use GET CURSOR FIELD <f> VALUE <v> and in thje AT LINE-SELECTION event check for field variable <v> to be ITAB-PERNR and only then process the list.

10 REPLIES 10

Former Member
0 Kudos
91

Hi,

Usin HIDE statement after the WRITE of the PERNR field, wherever you click you get the output.

To avoid this use GET CURSOR FIELD <f> VALUE <v> and in thje AT LINE-SELECTION event check for field variable <v> to be ITAB-PERNR and only then process the list.

0 Kudos
90

This is what I'm doing and it is not working as required can you check it please.

if p0000-pernr ne wa_employee-pernr.

message i001(00) with error'.

else.

GET CURSOR FIELD get_pernr value p0000-pernr.

SET PARAMETER ID 'PER' FIELD p0000-pernr.

call transaction 'PA20'.

endif.

0 Kudos
90

Hi

Can u tell me in which event u have written this code.If u have written in GET PERNR, then fine. Outside GET PERNR, the internal table p0000 will have the contents of the last looped PERNR. So the following condition

<b>if p0000-pernr ne wa_employee-pernr.</b> is somewhat misleading.

0 Kudos
90

I used it in end-of-selection event.

0 Kudos
90

any suggestions please.

0 Kudos
90

Can u tell me how is data coming into p0000-pernr before the if condition

<b>if p0000-pernr ne wa_employee-pernr</b>

Also paste the whole code so as to understand the exact flow.

Former Member
0 Kudos
90

Hi,

Use the command

get cursor field lv_field value lv_value.

and use the double click.

Regards,

Anji

ashok_kumar24
Contributor
0 Kudos
90

Hi,

Check the following code.

START-OF-SELECTION.

  • Read data for REPORT1 into itab1

END-OF-SELECTION.

PERFORM write_report1.

TOP-OF-PAGE.

  • Write list header for REPORT1

AT USER-COMMAND.

  • Respond when the user presses a function key

CASE sy-ucomm.

WHEN 'REPORT2'.

PERFORM write_reprt2.

WHEN 'REPORT3'.

PERFORM write_reprt3.

ENDCASE.

AT LINE-SELECTION.

  • Istead of pressing a button can perform the same actions

  • as i AT USER-COMMAND, by double clicking a line

  • sy-lsind contains the list level.

  • Each time an interactive list event occurs, sy-lsind is

  • automatically increased by 1.

  • At REPORT1 sy-lsin = 0

CASE sy-lsind.

WHEN 1.

PERFORM write_reprt2.

WHEN 2.

PERFORM write_reprt3.

ENDCASE.

TOP-OF-PAGE.

  • Write report header for report1 ( sy-lsind = 0 )

TOP-OF-PAGE DURING LINE-SELECTION.

  • Write report header for sub reports

CASE sy-lsind.

WHEN 1.

  • Write report header for REPORT2.

WHEN 2.

  • Write report header for REPORT3.

ENDCASE.

FORM WRITE_REPORT1.

LOOP at itab1.

  • write report1.......

  • Hide keyfields used for the select statement of

  • report2

HIDE: itab1_year, itab1_month.

ENDLOOP.

ENDFORM.

FORM WRITE_REPORT2.

SELECT * FROM databasetable2 into itab2

WHERE year = itab1_year AND

month = itab1_month.

LOOP at itab2.

  • write report2 .......

  • Hide keyfields used for the select statement of

  • report3

HIDE: itab2_carrid.

ENDLOOP.

ENDFORM.

FORM WRITE_REPORT3.

SELECT * FROM databasetable3 into itab3

WHERE carrid = itab2_carrid.

LOOP at itab3.

  • write report3 .......

  • No need to hide keyfields, as further drill down is not

  • possible

ENDLOOP.

ENDFORM.

Good Luck and reward points for the same

Thanks and Regards

AK

Former Member
0 Kudos
90

Use this:

AT LINE-SELECTION.

GET CURSOR FIELD get_pernr value p0000-pernr.

SET PARAMETER ID 'PER' FIELD p0000-pernr.

call transaction 'PA20' and skip first screen.

Former Member
0 Kudos
90

hiiiiii 2 all.

This is Ron

guyz if suppose my 1st screen contain of name n address

and when i clk name it shld display age, d.o.b

and when i clk address it shld display me add info

wht shld i rite in case

when 1

___________________________________

_______________________________

thank u