cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Table Comparison Transforms in SAP BODS

former_member188628
Participant
0 Kudos

Hi All

      I tried the table comparison transform in designer.However the final output is not as expected. I have chosen the same target(output table ) as the table for comparison(CurrentTable):-

The changes of the source table are not reflected in the target tableNeeded help on this

Accepted Solutions (1)

Accepted Solutions (1)

former_member208402
Active Contributor
0 Kudos

Hi Moumita,

Remove PRODID from Generated key column in TC and also remove PRODID from compare columns lits and run the job and check.

Thanks,

Ravi kiran.

former_member188628
Participant
0 Kudos

Hi Ravi

  tried the steps as mentioned, removed the Prod Id from both the places, still there is no change in the output........!!!

Regards

former_member208402
Active Contributor
0 Kudos

Hi Moumita,

Can you please check if there are any filters in Query transform?

Thanks,

Ravi kiran.

Answers (3)

Answers (3)

former_member188628
Participant
0 Kudos

Hi All

  Thanks a lot for all your help and additional information sharing.I got the output, the thing which I did not notice initially was that my table transform was actually working. My Datasource had little incorrect data( the ProdID ) fields were repeated, due to which the existing (updated records or newly added records with duplicated ProdId were getting replaced with the existing records and were placed alphabetically ,which I did not notice before).Accordingly I made the changes in the source data and checked out the steps and information mentioned here.

Now everything is working

Thanks

Regards

Moumita

Former Member
0 Kudos

Table comparison basically flags the input data set into different opcodes-insert,update,normal and delete.In your case, the last 3 rows have to be mapped as insert which is not being done meaning comparison is not happening.

Having PRODID as primary key, make sure you don't have other records with same PRODID 1071,1081,1091 in your Current Table. If they are already present in current table, then they might have got updated.
Next remove the PRODID in the compare field and generated key column of table comparison.

former_member188628
Participant
0 Kudos

Hi Satya

        Setting the opcode,I wonder how , since i have not used any Map transforms(or I am missing something perhaps!)PRODID is unique here

Regards

0 Kudos

Hi Moumita,

You have PRODID as the Generated Key and also ProdID in the compare columns. Are they both the same ?

Can you please elaborate the issue. I understand that at source there are 24 records and at target you get only 21 records corresponding to source.

Thanks,

AJ

former_member188628
Participant
0 Kudos

Hi Anirban

        The last three columns are not getting added to the target table,The Target table is the same, no changes were updated!!!Yes both the PRODIDs are identical, i have rectified.I forgot to update that in designer.

Regards

0 Kudos

Hi Moumita,

If I have got your requirements clearly, you are going to insert a record if not present in the target and update the same in the target when an update is received at the source.

The conditions on which Insert/Update happens is the Primary Key that drives the table comparison.

As PRODID is you Generated Key Column, unless you have multiple rows wih identical primary keys and unique PRODIDs, you should not be using the PRODID as the "Input Primary Key Column".

Because this here acts as another key generated for the table at target(Surrogate Key).

Instead, you must use a primary key of the table, my best guess is the CustID as the "Input Primary Key Column".

And then pull all the other columns in the "Compare Column" fields on the basis of which comparisons will be done.

Hope this helps.

Please try out this scenario and let me know.

Thanks,

AJ