cancel
Showing results for 
Search instead for 
Did you mean: 

Merging 2 DSO data to another DSO

former_member197527
Active Participant
0 Kudos


Have a query w.r.to merge of DSO data.

DSO 1

100    10    ABC  24.5

100    20    DEF  35.6

DSO 2

100   10  1001  56.8

100   10  1002  58.9

Now, in DSO 1, 100, 10 are header and item which are keys

In DSO 2, 1001, 1002 are document no so 3 keys. However this data might get updated later than DSO 1 as part of delta. Below is final output req

DSO 3 -  same keys as DSO 2. Planning to do delta dtp from both these dsos to DSO 3 without any ABAP.

100   10  1001  ABC  24.5  56.8

100   20     -      DEF  35.6    - 

100   10  1002  ABC  24.5  58.9

Now if there is a new record for 20 in DSO 2, will it update the 2nd record or will it create a new record as below? I think this should overwrite 2nd record in DSO 3 and not like below. Please confirm

100   10  1001  ABC  24.5  56.8

100   20     -      DEF  35.6    -  

100   10  1002  ABC  24.5  58.9

100   20  1002  DEF  35.6  65.7

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

I'm not quite sure but I think there is a mistake in your thought:

The result of the first merge in DSO 3 would be (the first 3 columns are key fields of the DSO)

100    10    -       ABC   24.5    -

100    20     -      DEF   35.6    -

100   10  1001   -          -        56.8

100   10  1002   -          -       58.9

So a new record in DSO 2 for 20 will create a new line in DSO 3. I think without reading with ABAP will not work.

Cheers

J

Answers (3)

Answers (3)

former_member197527
Active Participant
0 Kudos

Can some one please suggest

venu_gopal10
Participant
0 Kudos

Hello Sai,

We can achieve this by writing a End routine while loading data from DSO1 to DSO3 by looking into DSO2.

i.e. while we upload data from DSO1 to DSO3, write a logic in END ROUTINE to fetch the data from DSO3 based on header & item and use internal table which holds this data for populating value for Document No. This way you can have data in DSO3 as per your requirement.

Note: Here I'm not sure about the frequency of changes that happen & whether both DSO1 & DSO2 has a record when a header is changed. If you are sure that DSO1 & DSO2 has a new record for any change (like you said above) then this logic should work.

Hope this helps...

Regards,

Venu Gopal

former_member197527
Active Participant
0 Kudos

Sorry for the confusion....I got the below output in DSO3:

100    10     -       ABC   24.5      -

100    20     -       DEF   35.6      -

101    10     -       LMN   67.2      -

100   10  1001     -          -        56.8

100   10  1002     -          -        58.9

Now my requirement is to only show the header and item data that has document no. If there is no document no, then show the header and item data with blank document no.

Eg:  Output should be as below:

100   10  1001     ABC    24.5      56.8

100   10  1002     ABC    24.5      58.9

100   20      -         DEF    35.6        -

101   10      -         LMN    67.2       -

Now if there is a new document no for 3rd record above in next delta with doc no 1003, final o/p needs to be as below. The previous record need not be shown...

100   10  1001     ABC    24.5      56.8

100   10  1002     ABC    24.5      58.9

100   20  1003     DEF    35.6       88.5

101   10      -         LMN    67.2       -

This seems to be through ABAP. Can some one suggest and help?

Former Member
0 Kudos

Hi Aditya Sai,

Based on Key Field,  Data fields means keyfigures are overwrite..

in u r scenario

100   10  1001  ABC  24.5  56.8

100   20     -      DEF  35.6    -  

100   10  1002  ABC  24.5  58.9

100   20  1002 DEF  35.6  65.7

material materialnumber     Material id

100               20                         1002

material id is different so its not overwrite.