Application Development and Automation 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: 
Read only

selection-screen and GET

Former Member
0 Likes
1,603

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,

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
1,266

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

8 REPLIES 8
Read only

suresh_datti
Active Contributor
0 Likes
1,267

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

Read only

0 Likes
1,266

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

Read only

Former Member
0 Likes
1,266

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.
Read only

0 Likes
1,266

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....

Read only

andreas_mann3
Active Contributor
0 Likes
1,266

Hi,

try fm LDB_CALL_LDB_PROCESS with ldb pnp

instead of including ldb.

Andreas

Read only

Former Member
0 Likes
1,266

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

Read only

Former Member
0 Likes
1,266

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.

Read only

0 Likes
1,266

Hi tafkap,

Did your issue GET resolved?

regards,

Suresh Datti