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 problem

Former Member
0 Likes
697

I am not able to write a select query (as a macro) in SM30 TRMAC table, please let me know whether it's possible or not?.

regards

Sudhir

5 REPLIES 5
Read only

Former Member
0 Likes
638

Hi sudhir,

1. Its absolutely possible.

(i just tried it)

2. the program is

report abc.

parameters: a type c.

data : itab like table of t001 with header line.

zmac.

break-point.

3. The MACRO is ZMAC

and the macro code is

select * from t001 into table itab.

4. it works fantastic.

(make sure the ITAB,variables are already declared

in the program)

regards,

amit m.

Read only

Former Member
0 Likes
638

Hi Amit,

Single line queries work fine,writing a query with a where condition or by passing a work-area or a variable to the macro results in syntax errors. Please check.

Regards

Sudhir.

Read only

0 Likes
638

Hi again,

1. *

2. We have to give *

as the last character of that line in TRMAC

3. <b>select * from t001 into table itab *</b>

where bukrs = itab-bukrs.

regards,

amit m.

Read only

Former Member
0 Likes
638

Hi Amit,

The following statement is just not working

SM30-----

select single * from mara into wa_mara * -line1

where matnr eq l_matnr. -line2

SE38----- both wa_mara & l_matnr are defined in the program as work area-type mara & variable -type mara-matnr before calling the macro.

It's unable to interpret '*' & where condition! is it some version related problem?.

Regards

Sudhir.

Read only

Former Member
0 Likes
638

Hello Sudhir,

Did u chekc the table TMRAC as it has got an entry for select with where clause. check macro RP-APP-SET-CLERK.