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: 

Report

Former Member
0 Kudos

I have a situation here. I have to develop a report which will display record from a table. But each time it is executed it should display only the new records . ie the records that have been created after the last execution of this report.

Hopes I am clear about the idea.

Thanx

kelly

7 REPLIES 7

Former Member
0 Kudos

I have a situation here. I have to develop a report which will display record from a table. But each time it is executed it should display only the new records . ie the records that have been created after the last execution of this report.

Hopes I am clear about the idea. Any suggestions to how to do it?

Thanx

kelly

0 Kudos

Hi Kelly,

If it is custom table,just add one more column (field) to it (say display of char1).After displaying that record in the report ,update the database field (display = 'X') in the report itself.Next time display the record which is not having display marked as 'X'.

select * from table into internaltable where display <> 'X'.

Hope this is clear.

Rgds,

J.Jayanthi

0 Kudos

Hello Kelly,

The simplest solution I can think of is to store some details (dependent, to some extent, on what data you are displaying in the report) in a (generic) cluster table like INDX.

Let me know if you want something further on this, and also provide the details of the fields in the database table that you are fetching the records from. Is it a standard table or a custom table ?

Regards,

Anand Mandalika.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Do these records have a time stamp associated with them. Example, creation date and creation time. If so then all you need to do is stored the last time that the program has been run in a table.

In your program....

1) Get the date/time when program was last run.

2) select the data depending on the date/time that program was last run.

3) Write the report.

4) Update the table where date/time is stored.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Kelly,

You can save the keys of records read by the report in another database table and read only the records from the main table which are not in the temporary key table.

Regards,

Sükrü

Former Member
0 Kudos

Hi Kelly,

I had a requirement of the similar type for production orders. Each time the report is run it will fetch the new data from tables.

I would suggest you to create a log table for the same. Update it with the last run details like, report, plant, previous run date and time etc...

Thus when the report is executed next time check the log table for the last run details, and select the data that are created after the last run date and time.

Hope this is what you are expecting...Plz let me know if this does not help or you got a better idea..

Cheers

Kathir~

Former Member
0 Kudos

Hi ,

Thanx for the all the responses... its been a great help.

I don't have data/time fields in the table.

And there is a chance that there will be more than one record for the same keyfield.

I think, so far creating a log table is doable..

But If it is a std SAP table can't we add an additional field? Will it effect the performance anyway?

Kelly