Application Development and Automation 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: 
Read only

SELECT QUERY DUMP?

Former Member
0 Likes
1,495

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
Read only

Former Member
0 Likes
1,433

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
Read only

Former Member
0 Likes
1,434

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_*)

Read only

0 Likes
1,433

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.

Read only

0 Likes
1,433

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.

Read only

0 Likes
1,433

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

Read only

0 Likes
1,433

Hi

I hope that line is correct.

Better check once in select-option field

Regards

Read only

0 Likes
1,433

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.

Read only

Former Member
0 Likes
1,433

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.

Read only

Former Member
0 Likes
1,433

Hi ,

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

Read only

abdul_hakim
Active Contributor
0 Likes
1,433

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

Read only

Former Member
0 Likes
1,433

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').

Read only

Former Member
0 Likes
1,433

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

Read only

Former Member
0 Likes
1,433

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

Read only

Former Member
0 Likes
1,433

hey sachin

I am also getting same dump..

Has your problem fixed?

Please let me know.

Regards.