on 06-17-2015 3:50 PM
I am trying to load data from a standard DSO (source DSO) into an another standard DSO (target DSO) while looking up data from a write optimized DSO(lookup DSO). In the source DSO I am getting one record per employee and looking up 60 records per employee and appending the result package in the end routine so that I will have 60 records in the target DSO.
The below code works fine in BI 7.0 but I am unable to use the same code to load in BI 7.4 SP4. Is there is a new setting I need to set at the DSO or DTP level so that I can load the data into the target DSO, Please advise. I have even generated a sequence per row in the end routine and tried loading it but I am getting same key issue to load the data.
Thanks
Appending part of the end routine code:
APPEND <result_fields> TO result_package_t.
ENDLOOP.
ENDIF.
ENDLOOP.
REFRESH RESULT_PACKAGE.
RESULT_PACKAGE[] = result_package_t[].
I have even tried using the appending one record at a time instead of all 60 records into the result package. But still the same key issue to load.
LOOP AT result_package_t ASSIGNING <result_fields>.
APPEND <result_fields> TO RESULT_PACKAGE.
ENDLOOP.
Error Message while executing the DTP:
Messages for 1 data records saved; request is red acc. to configuration
Message Text
Duplicate data record detected (DS SUR_O02 , data package: 000001 , data record: 1 )
Message Class
RSODSO_UPDATE
Number 19
Long Text
Diagnosis
During loading, there was a key violation. You tried to save more than one data record with the same semantic key.
The problematic (newly loaded) data record has the following properties:
o DataStore object: XXXXXX
o Request: 467358
o Data package: 000001
o Data record number: 1
Hi,
While appending new records to result Pacakge you will need to take care of record number explicitly.
at the end of code,
write a simple loop at to populate, record number for each record,
l_record = 1.
loop at result_pacakge into wa_pacakge.
wa_pacakge-record = l_record.
modify result_pacakge from wa_package.
l_record = l_record + 1.
endloop.
Should fix your problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As per error message
Message Text
Duplicate data record detected (DS XXXXX , data package: 000001 , data record: 1 )
XXXXX--> this DSO being updated with duplicate records hence throwing error, please make sure all unique records while updating XXXXX . In another hand you to maintain proper key fields in XXXXX dso to avoid duplicate records .
" During loading, there was a key violation. You tried to save more than one data record with the same semantic key."
check what are the semantic keys have"
Thank you,
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.