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: 

eCATT - Displaying database records in Log

Former Member
0 Kudos
194

Hi All,

I am working in eCATT.

I would like to display all the records in the Log.

I am using the following code but with this code i am able to display only the first record.

Can any one please help me how to display multiple records in the log.

Thanks in advance.

ABAP.

Data : wa type mara.

select * from mara into wa.

loop at wa.

write: / wa-matnr,

10 wa-mandt.

v_mandt = wa-mandt.

v_matnr = wa-matnr.

*EndSelect.

ENDABAP.

log (V_MANDT).

log (V_MATnR).

9 REPLIES 9

Former Member
0 Kudos
83

Hello mahendra.

You have to define your variable in the ecatt section, not in the abap so you can "log it".

For example:

you define WA with type mara[] as a variable in the parameter interface.

Then


ABAP.
 select * from mara into table wa.

ENDABAP.

LOG( WA ).

Reward points if useful 😃

Walter

Former Member
0 Kudos
83

Hi

check these link,

eCATT- An Introduction

/people/sumeet.kaul/blog/2005/07/26/ecatt-an-introduction

Creating Test Scripts

/people/sumeet.kaul/blog/2005/08/10/ecatt-creating-test-scripts

eCATT Logs

/people/sapna.modi/blog/2006/04/18/ecatt-logs-part-vi

eCATT Scripts Creation – TCD Mode

/people/sapna.modi/blog/2006/04/10/ecatt-scripts-creation-150-tcd-mode-part-ii

Creation of Test Data Container

/people/sumeet.kaul/blog/2005/08/24/ecatt-creation-of-test-data-container

eCATT Scripts Creation - SAPGUI Mode

/people/sapna.modi/blog/2006/04/10/ecatt-scripts-creation--sapgui-mode-part-iii

Integrating ECATT & MERCURY QTP Part -1

/people/community.user/blog/2007/01/02/integrating-ecatt-mercury-qtp-part-1

Using eCatt to Test Web Dynpro ABAP

/people/thomas.jung/blog/2006/03/21/using-ecatt-to-test-web-dynpro-abap

and

-command reference

http://help.sap.com/saphelp_nw04/helpdata/en/c6/3c333b40389c46e10000000a114084/content.htm

/people/sapna.modi/blog/2006/04/10/ecatt--an-introduction-part-i

http://prasadbabu.blogspot.com

https://www.sdn.sap.com/sdn/developerareas/was.sdn?page=test_tool_integration_for_sap_e-catt.htm

http://help.sap.com/saphelp_nw04/helpdata/en/1b/e81c3b84e65e7be10000000a11402f/frameset.htm

http://www.erpgenie.com/ecatt/index.htm

hope this helps.

Reward points for useful Answers

Regards

Anji

Former Member
0 Kudos
83

Hi Walter,

I haven't understand your answer.

I declared two variables v_mandt and v_mantr in eCATT section.

In ABAP secation , i am assinging workarea(wa) values to the variables which i have declared in eCATT section.

In log i am trying to display those two values.

Here i am getting values of first record.

I would like to display all records values.

Is there any way to declare array variables and how to assign to those variables.

Can you please explain clearly.

0 Kudos
83

Hello,

You have to define a table (WA) in ecatt where you will store all the data:

You do it by entering, if your structure is mara for example,

 wa type mara[] 

.

Then you can work with it directly in the ABAP section

 select * from mara into table wa.

.

And finally you can log it directly in the ecatt section LOG( WA ).

Former Member
0 Kudos
83

Hi ,

How to define a table in ECATT.

is it same way as defining the variable.

0 Kudos
83

Yes it is, you just have to add [] after the type name.

Former Member
0 Kudos
83

but is saying error as "invalid parameter name" mandt[] may only contain letters, digits,or '_'.

0 Kudos
83

hello,

you have to put the [] not in the parameter name but in the parameter type.

uwe_schieferstein
Active Contributor
0 Kudos
83

Hello Mahendra

Define the following parameters:

parameter=LD_IDX visibility=V ABAP type= I (integer)

parameter=LD_COUNT visibility=V ABAP type= I (integer)

parameter=LS_MARA visibility=V parameter type=MARA

parameter=LT_MARA visibility=V parameter type=MARA[]

ABAP.
  SELECT * FROM mara INTO TABLE lt_mara UP TO 100 ROWS.

  DESCRIBE TABLE lt_mara.
  ld_count = syst-tfill.
ENDABAP.


ld_idx = 0.
DO ( LD_COUNT ).
  ABAP.
    ADD 1 TO ld_idx.

    READ TABLE lt_mara INTO ls_mara INDEX ld_idx.
  ENDABAP.

  LOG( ls_mara ).
ENDDO.

However, there is an even simpler way of logging all selected material data:

ABAP.
  SELECT * FROM mara INTO TABLE lt_mara UP TO 100 ROWS.
ENDABAP.

  LOG( lt_mara ).

Regards

Uwe