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: 

SELECT QUERY DUMP?

Former Member
0 Kudos

Getting dump due to this query....

SELECT lifnr bukrs ebeln ernam bedat

waers zterm adrnr lands rlwrt FROM ekko

INTO CORRESPONDING FIELDS OF TABLE t_hdr

WHERE ebeln IN s_ebeln

AND lifnr IN s_lifnr

AND ekorg = 'THS1'

AND bedat IN s_date

AND frgke = '1'

AND bsart IN ('NB', 'ZNB', 'FO').

Error Analysis is:

The IN itab operator is used with internal tables which

have the following structure:

SIGN(1) OPTION(2) LOW LIKE db_field HIGH LIKE db_field

The OPTION column should contain only one of the following values:

"EQ LE GE CP BT NE LT GT NP NB"

The value " " is not allowed here.

Any suggetions...

Sachin.

1 ACCEPTED SOLUTION

former_member181995
Active Contributor
0 Kudos

what is structure of your S_* selection screen values?are you overwrite them in initialization or somewhere else.as error message clearly suggests the error check option field in all three internal tables(S_*)

13 REPLIES 13

former_member181995
Active Contributor
0 Kudos

what is structure of your S_* selection screen values?are you overwrite them in initialization or somewhere else.as error message clearly suggests the error check option field in all three internal tables(S_*)

0 Kudos

Hi Amit,

Yes, iam changing the S_DATE,if a check box on my selection screen selected..i need to display default date in S_date-low.

Thats y i have assigned a SY-DATUM to s_date-low in initialization.

If user de select it....automatically i am clearing the s_date-low value..in at selection-screen output event.

Suggest me what to do....

Sachin.

0 Kudos

Hi,

Try having the clearing of S_DATE-LOW before the select query. The value of S_DATE-OPTION is getting changed becuase of the event under which it is coded, i guess...... AT SELCTION-SCREEN OUTPUT.

Regards.

0 Kudos

HI all,

I hope getting this short dump in background because of this line..

AND bsart IN ('NB', 'ZNB', 'FO').

Is It better to store these values in RANGES table and use in where CALUSE.

Suggest me....

Sachin.

Edited by: Sachin on Dec 2, 2008 11:44 AM

0 Kudos

Hi

I hope that line is correct.

Better check once in select-option field

Regards

0 Kudos

The S_ebeln,S_lifnr and S_date are having an entry with blank option value.

The pbm is not with BSART clause. It is with the IN operator.

When u have an entry in S_ebeln field the IN operator check for option vlaue.In this case it is blank.

Thats why ur getting the dump.

Check this and let me know.

Former Member
0 Kudos

Hi

Please check the declaration part of the internal table also.

Please check the declaration sequence of fileds of internal table is same as fields in select statemnts.

if not the order should be same in declaration and inselect statement.

Former Member
0 Kudos

Hi ,

The Option field is blank ,thats why u r getting the dump message.

abdul_hakim
Active Contributor
0 Kudos

Hi

Assign a valid value for OPTION field of the select-options statement.

Would be great if you could paste your complete code here.

Cheers,

Hakim

Former Member
0 Kudos

try to this

SELECT lifnr bukrs ebeln ernam bedat

waers zterm adrnr lands rlwrt

INTO CORRESPONDING FIELDS OF TABLE t_hdr

FROM ekko

WHERE ebeln IN s_ebeln

AND lifnr IN s_lifnr

AND ekorg = 'THS1'

AND bedat IN s_date

AND frgke = '1'

AND bsart IN ('NB', 'ZNB', 'FO').

Former Member
0 Kudos

Hi , U r using IN operator and option field is blank,So make select options mandatory or pass all input values ,It will work.

Former Member
0 Kudos

Hi,

I have checked the code in my system.

There is no error for "AND bsart IN ('NB', 'ZNB', 'FO'). "

It is correct as per syntax.

Please check your internal table definition. I believe the error

is that.

Hope this helps,

Regards,

Rajat

Former Member
0 Kudos

hey sachin

I am also getting same dump..

Has your problem fixed?

Please let me know.

Regards.