Skip to Content
0

Same column in all tables

Jun 15, 2017 at 08:50 AM

68

avatar image
Former Member

Hi Experts,

I have one column called 'deleted flag' in all tables which needs to be = 0 for the reports.

How can I implement it on IDT as I want to include above condition for only those tables which are included in select statement.

I know creating mandatory filter will be a option but I just want those which are in select statement.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mahboob Mohammed Jun 19, 2017 at 03:32 PM
0

Hi S N,

You need to create a self restricting join, I had to do this in my previous project. In the DFX, right click on that column deleted_flag -> select Insert Filter -> in the window that opens up, update the expression as <Tablename>.deleted_flag = 0 and click OK. Repeat this for all the tables.

Thanks,
Mahboob Mohammed

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Mehboob,

Thanks for your response.

That is exactly my problem I have to do it on all the table.

I want a way to do it for all the tables in one place as column name is same.

0

Yeah, I don't think there is a way around. Having same column name doesn't make the tables same, does it? Doing it for all the tables doesn't take long, 5-10 secs for one table. Within the time you posted your question on SAP Blogs, waited for response, and read this response, you'd have done it on 30-40 tables. :-)

Just right click on the deleted_flag, click insert filter, in the join windows you'll see table.deleted_flag=table.deleted_flag, the text in bold will be selected already, so you just have to click backspace button to delete it, type 0 and click OK. It's not time consuming at all.

Thanks,
Mahboob Mohammed

1

And if you want to do it even faster:

Get of list of the tables and dump them into Excel. Write a formula so that you get a result like:

table_abc.deleted_flag=0
table_def.deleted_flag=0
etc.

In IDT DFX, hit Insert -> Insert Join, and paste in the first row from Excel ("table_abc.deleted_flag=0"), and hit OK. Do this for each row.

1
Former Member
Joe Peters

Thanks Joe.

Worked and fastest approach.

0