04-29-2009 6:10 AM
Dear All,
I have ABAP report list.
I have the following code:
SELECT-OPTIONS: s_date FOR oijne-astdtt.
PARAMETERS : p_time LIKE sy-uzeit DEFAULT sy-uzeit.
SELECT-OPTIONS : s_soldto FOR oijnomi-soldto.
in my program i have INCLUDE ZER0100F. as incude for subroutine form.
If i put the subroutine in the include and in side this subroutine i am using the s_date or s_soldto.
It gives me error.
The field "S_DATE" is unknown
04-29-2009 6:17 AM
Hi,
The scope of s_date is restricted to the ABAP List report it is declared in. You can write your subroutine in this report itself to use the same select option in it.
Regards,
Himanshu
04-29-2009 6:20 AM
HI Himanshu Kanekar
Is the there any way to access it from the include rether than from main progra?
BR,
Ali
04-29-2009 6:23 AM
In ur FORM .... ENDFORM use using or changing parameters for s_date in ur include and similarly in PERFORM also use using or changing according to ur FORM ...ENDFORM.
04-29-2009 6:38 AM
My Code as mentioned.
SELECT-OPTIONS: s_date FOR oijne-astdtt.
PARAMETERS : p_time LIKE sy-uzeit DEFAULT sy-uzeit.
SELECT-OPTIONS : s_soldto FOR oijnomi-soldto.
How i can use the S_Date in the paramters of the Form?
As u know S_DATE is and internal table.!!
BR,
Ali
04-29-2009 6:40 AM
04-29-2009 6:42 AM
what is the type i should use here for the selection option parameters.
04-29-2009 6:43 AM
use so_date in tables parameters of form ... endform.
Edited by: vijetasap on Apr 29, 2009 7:45 AM
04-29-2009 6:49 AM
better if u try the option of include that i have suggested earlier ..
i dnt think TABLES , USING etc will work....because ur subroutine will be in include.....
so even if u use parameters in FORM ...ENDFORM it still wont work....i guess
error is because ur include does not find the Select-option field....
so u have to declare it before the ur subroutine include.....
04-29-2009 6:59 AM
Hi,
There is no need to use Using or tables since the select option is global and will be accessible in your routine.
E.g:
TABLES kna1.
SELECT-OPTIONS: s_date FOR sy-datum.
PARAMETERS : p_time LIKE sy-uzeit DEFAULT sy-uzeit.
SELECT-OPTIONS : s_soldto FOR kna1-kunnr.
START-OF-SELECTION.
PERFORM f_routine.
FORM f_routine.
WRITE : 'low :' , s_soldto-low.
ENDFORM. "f_routine
Regards.
Edited by: Dev Parbutteea on Apr 29, 2009 8:05 AM
04-29-2009 7:34 AM
Hi,
Do the coding in this way :
tables but000.
SELECT-OPTIONS: s_date FOR sy-datum.
PARAMETERS : p_time LIKE sy-uzeit DEFAULT sy-uzeit.
SELECT-OPTIONS : s_soldto FOR but000-partner.
perform test.
include zero.
The subroutine is present in the include zero.
It would work fine.
regds,
deepika
04-29-2009 6:35 AM
Hi,
this error is because u have written include statement before the selection-screen block...
if u write include after the selection screen it will solve ur problem...
or u cna do one more thing....
create another include for selection-screen and put that include before ur subroutine include...
thnx
Rohit
04-29-2009 7:09 AM
Hello,
whenever you are using subroutine and the variable used in the subrutine is not defined locally (within the subroutine) it will give you an error saying its not defined though you must have done it before calling the subrutine but if they are not defined globally they become the local varaible and for the subroutine to access them you have to pass them to the subroutine.
Thanks,
Gunjan
04-29-2009 7:10 AM
hi
the select-option is global to ur report
so any subroutine , whether it is in same report or in any include program , will have access to it
so you dont need to use any using or changing.
if the problem still exist then try to declear data first and then subroutine.
like:
INCLUDE Z_DATA.
INCLUDE Z_FORMS.
hope this help
04-29-2009 7:54 AM
You have to declare the Include program after the selection-screen (select-options).
Regards,
Joan
Edited by: Joan Jesudasan on Apr 29, 2009 8:55 AM
04-29-2009 8:11 AM
06-08-2016 12:46 PM
Hi Ali ,
Include the select options in top include.
SELECT-OPTIONS: s_date FOR oijne-astdtt.
PARAMETERS : p_time LIKE sy-uzeit DEFAULT sy-uzeit.
SELECT-OPTIONS : s_soldto FOR oijnomi-soldto.
With Regards,
Sudhir S