cancel
Showing results for 
Search instead for 
Did you mean: 

Querying tables via Ecatt

Former Member
0 Kudos

Is it possible to query - Use of select statements - tables in Ecatt. May be in the ABAP..ENDABAP block?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member585451
Active Participant
0 Kudos

Hi Bilal,

There are 2 ways of doing it..

One use a GETTAB or another use the select statement in ABAP-ENDABAP.

What is the error message you are getting from your Select statement. Check the syntax and try again..

Also, what are you trying to get from DB..

Best regards,.

Harsha

Former Member
0 Kudos

I have used the ABAP...ENDABAP block ...

but it seems that the syntax checker doesn't checks the inline ABAP.

How the inline ABAP could be checked for errors.

former_member585451
Active Participant
0 Kudos

Hi Bilal,

The General syntax checker would check for the eCATT command's syntax itself. You would need to use the Extended checker for this purpose.\

Press on the Menu Item Test Script -> Check -> Extended.

This should help you..

Best regards,

Harsha

PS: Reward points as applicable for all responding.

Message was edited by:

HarshaChaithanya Kethepalle

Former Member
0 Kudos

Coudn't find the "Extended" Option ...

we are on R/3 4.6C

with Solution Manager 3.2

is it why i can't see this Extended Option ...

former_member585451
Active Participant
0 Kudos

Hi Bilal,

Extended check is not available in 4.6C. If you have another system for release 500 or more, pl check in it.

If you could let me know what you are trying to search for, I may try to help u there..

Best regards,

Harsha

PS: Reward points as applicable for all responding

Former Member
0 Kudos

I was actually exploring e-catt. And got stuck caz of this syntax checking.

ummm ... Well u can help me out.

I want to use value from the dataset in the Query as a selection criteria.

so i have had made an import parameter.

then get this Import parameter assigned to a local variable. inside ABAP..ENDABAP block.

and then use the local variable in the WHERE clause.

but this throws up syntax error...

tell me if i'm doing somthing wrong ??

former_member585451
Active Participant
0 Kudos

Hi Bilal,

Would you give me the select statement used in your script, so that I would analyse and let you know the answer.

One thing you need to remember is, you are not supposed to use Import or Export variables with in a select statement. Also try to make sure that you are using the table field name in the where clause and not the data element of it.

Best regards,

Harsha

PS: Reward points as applicable for all responding

Former Member
0 Kudos
ABAP.
  TEMP = PERNUMBER.
SELECT SINGLE PERSK INTO EESG FROM PA0001
WHERE PERNR EQ TEMP AND ENDDA = '99991231'.
ENDABAP.

I'm Importing PERNR as PERNUMBER.

then TEMP is a local variable . i assign the import parameter to the local variable

n then the run the query using TEMP.

former_member585451
Active Participant
0 Kudos

Hey..

What is EESG here? Is that an import variable or local variable?

Also, what is the error/message you are getting after this code is executed.

Reply back..

Best regards,

Harsha

former_member585451
Active Participant
0 Kudos

HI ..

I have tried it this way and it worked..

ABAP.

SELECT SINGLE PERSK INTO V_COUNTER FROM PA0001

WHERE PERNR EQ 1 AND ENDDA = '99991231'.

ENDABAP.

LOG ( V_COUNTER ).

V_COUNTER is a local variable of type C and length 2.

Instead if the TEMP as u used it I have directly taken the Personnel number..

If it is not working from your end, pl try to use th temp assignment even before you enter into the ABAP Block.. Frankly speaking, this shouldnt make any difference.

Pl try out and let me know.

Best regards,

Harsha

PS: Reward points as applicable for all responding.