cancel
Showing results for 
Search instead for 
Did you mean: 

BW admp transformation issue: certain record sequence are disordered

0 Kudos

Dear BW experts:

I faced an issue in one amdp transformation. When executing delta loading, some record sequence are disordered.

The involved amdp tr has an end routine, which is quite simple, inner joins two tables

to be specific, the delta data in source ADSO changelog table are below:

as it shows, the latest correct status is 04,

however, when executing delta loading with amdp TR, some record sequence is disordered, like below data framed by red, the 01 state goes to the last record, which leads to an error status after activating data

it's quite odd that only certain records have this issue, not all the records. I tried to change the package size and set the dtp extraction group, but neither of them works.

Any ideas on how to avoid this issue?

Thanks in advance

Abhishek_Hazra
Active Contributor
0 Kudos

Have you tried activating the request? From your screenshot the delta after image is correctly seen to be set with the row having Z_BBSTAT = '04'. You should be able to get this one as final record.

0 Kudos

hello Abhishek, I updated the screenshot after activation, it shows the error state 01

Jörg_Brandeis
Contributor
0 Kudos

Hi Hailong,

are there any AMDP Routines involved?

Regards,
Jörg

0 Kudos

Hello Jörg,

Yes, the tr has end routine, quite simple, inner join two tables. the screenshot has been updated.

Accepted Solutions (1)

Accepted Solutions (1)

Jörg_Brandeis
Contributor

Hi Hailong,

the reason for the issue can be found in the code. The original value of the field RECORD should be kept unchanged from the INTAB and put to the OUTTAB, because the data is sorted by this field before inserting it in the inbound table of the target. Then the original order will be kept.

When it is not possible to keep the original value, e.g. in the case of new records, you can generate your own RECORD value with the ROW_NUMBER window function with a given ORDER BY clause. But be aware that the field is a character field and will be sorted as text. So leading 0 were required in this case. The code could then look like this:

outtab = SELECT <other fields>        
                LPAD( ROW_NUMBER() OVER  (ORDER BY <your sorting>), 56, '0') AS "RECORD",
                SQL__PROCEDURE__SOURCE__RECORD
       FROM :intab ;

With best regards,
Jörg

0 Kudos

Hello Jörg,

Thank you for your input, it works. 🙂

Best regards,

Hailong

Answers (0)