‎2009 Nov 17 4:18 AM
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
‎2009 Nov 17 5:14 AM
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.
‎2009 Nov 17 5:14 AM
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.
‎2009 Nov 17 5:20 AM
Thanks for your reply .
where i have to initialize in selection screen code or in driver program .
‎2009 Nov 17 6:48 AM
Hi Rakesh,
Try this way.
Thanks
Venkat.O
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.