2007 Mar 13 9:16 AM
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.
2007 Mar 13 9:20 AM
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.
2007 Mar 13 9:20 AM
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.
2007 Mar 13 9:37 AM
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.
2007 Mar 13 10:01 AM
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.
2007 Mar 13 10:06 AM
2007 Mar 13 10:22 AM
2007 Mar 13 10:36 AM
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.
2007 Mar 13 9:23 AM
Hi,
Use the command
get cursor field lv_field value lv_value.
and use the double click.
Regards,
Anji
2007 Mar 13 9:23 AM
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
2007 Mar 13 9:51 AM
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.
2007 Apr 14 6:50 PM
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