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: 

logical database

Former Member
0 Kudos

Hi

I am useing logical database pnpce & make it zpnpce1 . In the selection screen code I want to do one query and pass the data in

perner ( emp code ) of selection screen .

data : pernr_rk type PA0105-pernr .

select single pernr from pa0105 into pernr_rk where

usrid = SY-UNAME and

endda = '99991231' and

subty = '0001' .

I want to pass pernr_rk data in the selection screen code

SELECT-OPTIONS: pnppernr FOR pernr-pernr

DEFAULT pernr_rk

SY-UNAME+1(8)

NO-DISPLAY

MODIF ID sel

MATCHCODE OBJECT prem

NO INTERVALS.

How could i do .

Regards

Rakesh singh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rakesh,

I am using logical database pnpce & make it zpnpce1 . In the selection screen code I want to do one query and pass the data in

Hoping that you didnt change the selection screen code when you copied to custom LDB

select single pernr from pa0105 into pernr_rk where pnpernr = <value>

How to get it ? -- Goto SE36. Select selections and click display. then you will see the whole selection screen declaration.

you can see which is the field you are looking for based on field text.

I want to pass pernr_rk data in the selection screen code

In the initialisation event of your report, write the logic for filling the selection screen.

So when selection screen is displayed, value will be seen as filled.

INITIALIZATION.

CONCATENATE pernr_rk SY-UNAME+1(8) TO pnpernr SEPARATED BY SPACE.

Just an info.

Selection screen data declared in LDB code, will automatically be available in report.

There is no need to explicitly declare another selection screen field.

Regards,

Nisha Vengal.

3 REPLIES 3

Former Member
0 Kudos

Hi Rakesh,

I am using logical database pnpce & make it zpnpce1 . In the selection screen code I want to do one query and pass the data in

Hoping that you didnt change the selection screen code when you copied to custom LDB

select single pernr from pa0105 into pernr_rk where pnpernr = <value>

How to get it ? -- Goto SE36. Select selections and click display. then you will see the whole selection screen declaration.

you can see which is the field you are looking for based on field text.

I want to pass pernr_rk data in the selection screen code

In the initialisation event of your report, write the logic for filling the selection screen.

So when selection screen is displayed, value will be seen as filled.

INITIALIZATION.

CONCATENATE pernr_rk SY-UNAME+1(8) TO pnpernr SEPARATED BY SPACE.

Just an info.

Selection screen data declared in LDB code, will automatically be available in report.

There is no need to explicitly declare another selection screen field.

Regards,

Nisha Vengal.

0 Kudos

Thanks for your reply .

where i have to initialize in selection screen code or in driver program .

venkat_o
Active Contributor
0 Kudos

Hi Rakesh, Try this way.


REPORT ztest_notepad.
TABLES:p0105,pernr.

"AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.
  SELECT SINGLE pernr
    FROM pa0105
    INTO p0105-pernr
  WHERE usrid = sy-uname
    AND endda = '99991231'
    AND subty = '0001'.

  pnppernr-low    =  p0105-pernr.
  pnppernr-option = 'EQ'.
  pnppernr-sign   = 'I'.
  APPEND pnppernr.
  CLEAR  pnppernr.

START-OF-SELECTION.

GET pernr.
Thanks Venkat.O