‎2005 Dec 21 11:04 PM
Hi all,
in my program i use PNP logical database, so system create automatically selection screen. Nice.
When user fill selection screen event start-of-selection is launched and i do GET PERNR for read data from PNP.
But my customer want to add field in selection screen. Ok, i did that. Well, now he want that when a user fills new fields the PNP is not read i.e GET PERNR shouldn't be launched, so i my program i write this :
if myfield is initial.
GET PERNR.
else.
PERFORM get_data.
endif.
But when i compile program i can't do that and i don't know how to make this and if it's possible.
Regards,
‎2005 Dec 21 11:14 PM
Hi,
It looks like a rather unique requirement.. once a report is tied to PNP, you cannot bypass the GET PERNR.. what you can do is as follows..
GET PERNR.
check myfield is initial.
end-of-selection.
PERFORM get_data.
Regards,
Suresh Datti
‎2005 Dec 21 11:14 PM
Hi,
It looks like a rather unique requirement.. once a report is tied to PNP, you cannot bypass the GET PERNR.. what you can do is as follows..
GET PERNR.
check myfield is initial.
end-of-selection.
PERFORM get_data.
Regards,
Suresh Datti
‎2005 Dec 21 11:19 PM
You can't use that GET statement like that. You may be able to do something like this. It works for me.
report zrich_0003.
nodes: pernr.
parameters: p_check type c.
start-of-selection.
if not p_check is initial.
write:/ 'PERNR is not being used here'.
exit.
endif.
get pernr.
write:/ pernr.
REgards,
Rich Heilman
‎2005 Dec 21 11:42 PM
START-OF-SELECTION.
GET PERNR.
IF myfield IS NOT INITIAL.
PERFORM get_data.
//USE THE DATA YOU RETRIEVE
ELSE.
RP-PROVIDE-FROM-LAST <infotype> <subtype> pn-begda pn-endda.
//USE DATA RETRIEVED FROM MACRO...OR SOMETHING LIKE THIS.
ENDIF.
‎2005 Dec 22 7:04 AM
I agree with you but if user don't fill employee number in field standard selection-screen, program read all database and performance are low....
‎2005 Dec 22 7:23 AM
Hi,
try fm LDB_CALL_LDB_PROCESS with ldb pnp
instead of including ldb.
Andreas
‎2005 Dec 22 8:05 AM
Hi tafkap,
I can think of one option. By making the LDB PNP to read with employee number eq space (then the GET will not fetch any records) you can skip GET and use your selections.
Some thing like the following.
START-OF-SELECTION.
IF NOT myfield IS INITIAL.
pnppernr-sign = 'I'.
pnppernr-option = 'EQ'.
pnppernr-low = '00000000'.
APPEND pnppernr.
PERFORM get_data.
ENDIF.
GET PERNR.
.....
.....
Hope this helps..
Sri
‎2005 Dec 22 8:19 AM
Hi tafkap,
1. u have created a z report and
u are using PNP logical database.
2. u say,
, now he want that when a user fills new fields the PNP is not read i.e GET PERNR shouldn't be launched
suppose this is achieved, then how
are u going to fetch the data
and show the report ?
3. If u already have the logic for
getting information from database and showing
to the user,
then do not use GET event.
(It is not compulsory in a ldb)
4. Instead use START-OF-SELECTION
event
and do the normal programming.
5. In such case,
the selection screen (and ur extra field(s))
will be displayed as usual
and your own code will get triggered
at start-of-selection.
I hope it helps.
regards,
amit m.
‎2005 Dec 22 10:44 AM