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 stat.

Former Member
0 Likes
801

Hi and good morning,

I've problem in getting the data..... I guess the problem is in my select statement.....please help?

a b c d

w1 h01 h12 12/04/06

w2 wc1 hr8 01/08/04

where a,b and c are of char type and d is of date type... my select statement is

select a b c d from mara into corresponding

fields of table it_tab2 where a = pa_a and c in

s_c and b in s_b.

it is not working please suggest.....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
752

Hi,

Check the following.

1) Make sure you have the records in the table MARA for the corresponding combination give in the selection screen...

2) Also make sure the parameter pa_a is entered in the selection-screen..

Since in the where clause..You are using EQ operator..Which means if the value is not give in the selection screen..It will look for blank value..

Make the parameter as mandatory OR if it is optional parameter..Use SELECT-OPTIONS NO INTERVALS NO-EXTENSION addition..And use IN in your select statement..

Example

-


SELECT-OPTIONS SO_A FOR MARA-A.

select a b c d from mara into corresponding

fields of table it_tab2 where <b>A IN SO_A</b> and c in

s_c and b in s_b.

Thanks,

Naren

7 REPLIES 7
Read only

Former Member
0 Likes
752

can u post exact select statement along with description of internal table.

regds,

kiran

Read only

Former Member
0 Likes
752

Hi Shaheen,

Just check how the DATE is stored in database.

Usually its as per User setting or YYYYMMDD format.

So you need to change your Select-option Date format in to User setting or YYYYDDMM format and then select.

Reward points if this Helps.

Manish

Read only

Former Member
0 Likes
752

HI,

The date is stored as YYYYMMDD internally in the Database.

Use some date conversion FM or some other technique to change date fromYYYYMMDD to DD/MM/YY format and then display it on the screen.

Hope this info helps you.

Regards

Subramanian

Read only

Former Member
0 Likes
752

sorry guys I forgot to add this ..... that my problem is in the char fields b & c..... the rows underneth these to colums I'm getting it as blank no data is dispalyed .... thanks in advance.

Read only

0 Likes
752

Hi,

Are u using the selct query in a loop? In dat case u need to use appending in ur query.

Read only

Former Member
0 Likes
753

Hi,

Check the following.

1) Make sure you have the records in the table MARA for the corresponding combination give in the selection screen...

2) Also make sure the parameter pa_a is entered in the selection-screen..

Since in the where clause..You are using EQ operator..Which means if the value is not give in the selection screen..It will look for blank value..

Make the parameter as mandatory OR if it is optional parameter..Use SELECT-OPTIONS NO INTERVALS NO-EXTENSION addition..And use IN in your select statement..

Example

-


SELECT-OPTIONS SO_A FOR MARA-A.

select a b c d from mara into corresponding

fields of table it_tab2 where <b>A IN SO_A</b> and c in

s_c and b in s_b.

Thanks,

Naren

Read only

Former Member
0 Likes
752

thanks all for your participation