on 01-20-2011 9:18 PM
Hi,
We have a custom DSO with 4 key characteristics. It is initially populated by a custom datasource correctly.
We now need to update some of the data fields using a standard datasource, but it only has two of the key fields available.
In the transformation from the datasource to this DSO, I have generated an internal table in the start routine to collect the additional two key fileds from the DSO table.
I was wondering if there is a way to loop through when loading to update all the rows for the other two keys?
e.g.
DSO - load from custom datasource:
K1 K2 K3 K4 D1 D2
a b c d 1 2
a b e f 3 4
standard datasource
K1 K2 D2
a b 8
We would like to use the data from the standard datasource to update both rows in the DSO to populate data column D2 with the value 8.
Thanks!
Darryl
Hi Darryl,
The way you planned would not work. You could do what Raj suggested. Create a new DSO2 with keys K1 and K2 and load the std datasource into it.
Now create a self loop on DSO1 as explained by Raj and in the routines look-up DSO2 and fill D2 where DSO1-K1 = DSO2-K1 and DSO1-K2 = DSO2-K2.
I guess you want to update 8 for D2 for both records.........
a b c d 1 2 8
a b e f 3 4 8
Regards,
Murali.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Darryl,
In case you dont want to create a new DSO, you can try this option.
Add the infosource between the standrad data source and DSO and this infosource should have the structure same
as the DSO.
The transfermations between DS and Infosource should be 1 to 1, But in the start routine of the transfermations between infosource and DSO , write the following logic.
- Declare an 2 internal tables same as the source_package.
- Read the DSO active table with key1 and key2 from source_package into the internal table1 declared above.
- Copy source_package contents to internal table2.
- delete the contents of source package.
- Loop at internal table 1 and populate key3 and key4 by reading internal table2.
- Modify source_package from internal table1.
Thanks,
Ravi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try creating a self loop on the DSO (Transformation from and to the same DSO) and write your code there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.