2009 Jul 29 8:39 AM
Hello,
I am trying to get the data from table J_1IBOND in a report for which the Bond no, Bond year and Plant are the parameters and Issue date is a select-option in the selection screen. Out of the 4 selection screen elements, Plant is the only mandatory field.
When I have tried to execute the program with specifying only the plant, the select statement is unable to fetch the data and sy-surc fails. I inferred that the Bond number and Bond year are compared with the initial values '0000000000' and '0000' respectively. From the data dictionary too, if i provide the same as the fixed values, I am not able to retrieve the entries.
Please do let me know as to why the error is happening.
Thanks,
Samson
2009 Jul 29 8:43 AM
Replace the non-mandatory [PARAMETER|http://help.sap.com/abapdocu/en/ABAPPARAMETERS.htm]S with [SELECT-OPTIONS|http://help.sap.com/abapdocu/en/ABAPSELECT-OPTIONS.htm] with [NO-EXTENSION|http://help.sap.com/abapdocu/en/ABAPSELECT-OPTIONS_SCREEN.htm#!ABAP_ADDITION_4@4@] and [NO INTERVALS|http://help.sap.com/abapdocu/en/ABAPSELECT-OPTIONS_SCREEN.htm#!ABAP_ADDITION_5@5@] options, and use a [IN|http://help.sap.com/abapdocu/en/ABENWHERE_LOGEXP_SELTAB.htm] operator in the [WHERE|http://help.sap.com/abapdocu/en/ABAPWHERE.htm] clause. (You can also use [SELECT_OPTIONS_RESTRICT|https://forums.sdn.sap.com/search.jspa?objID=c42&q=SELECT_OPTIONS_RESTRICT] to insure that only EQ is used)
Regards,
Raymond
2009 Jul 29 8:41 AM
Hi,
Can you show your SELECT query or the code?
Regards,
Ankur Parab
2009 Jul 29 8:43 AM
Replace the non-mandatory [PARAMETER|http://help.sap.com/abapdocu/en/ABAPPARAMETERS.htm]S with [SELECT-OPTIONS|http://help.sap.com/abapdocu/en/ABAPSELECT-OPTIONS.htm] with [NO-EXTENSION|http://help.sap.com/abapdocu/en/ABAPSELECT-OPTIONS_SCREEN.htm#!ABAP_ADDITION_4@4@] and [NO INTERVALS|http://help.sap.com/abapdocu/en/ABAPSELECT-OPTIONS_SCREEN.htm#!ABAP_ADDITION_5@5@] options, and use a [IN|http://help.sap.com/abapdocu/en/ABENWHERE_LOGEXP_SELTAB.htm] operator in the [WHERE|http://help.sap.com/abapdocu/en/ABAPWHERE.htm] clause. (You can also use [SELECT_OPTIONS_RESTRICT|https://forums.sdn.sap.com/search.jspa?objID=c42&q=SELECT_OPTIONS_RESTRICT] to insure that only EQ is used)
Regards,
Raymond
2009 Jul 29 10:27 AM
2009 Jul 29 9:15 AM
Hi Samson,
Try to fetch the record using SE16 for same table and check the select parameters for getting records.
Same parameters you should try to pass in your SELECT query.
Regds,
Anil
2009 Jul 29 9:29 AM
Hi Samson,
whenever you are declearing parameter that means parameter value can't not be initial
in select query, because in parameter & select-options combination you are selecting value from table.
So you declear parameter as select-options with no-extension no interval and in where clause
use in instead of eq.
Regards,
Tutun