Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
sid111
Explorer

If you are trying to do a E4H Conversion from SAP GTS 11.0 to SAP GTS Edition for HANA 2023 with S/4 HANA Foundation 2022 then you may come across below error.

Issue:

During the execution phase below error is reported

sid111_0-1710043896304.png

Sql command that runs 

INSERT INTO "/SAPSLL/TEDTM" ( "MANDT", "STCCS", "RTYPE", "TLC_AART" ) SELECT DISTINCT

 "/SAPSLL/LC_CUSM"."MANDT", "/SAPSLL/TLEGSU"."CTSIM" as "STCCS", "/SAPSLL/LC_CUSM"."RTYPE",

 "/SAPSLL/LC_CUSM"."TLC_AART" FROM "/SAPSLL/LC_CUSM" INNER JOIN "/SAPSLL/TLEGSU" ON

 "/SAPSLL/LC_CUSM"."MANDT" = "/SAPSLL/TLEGSU"."MANDT" AND "/SAPSLL/LC_CUSM"."LGREG" =

 "/SAPSLL/TLEGSU"."LGREG" WHERE "/SAPSLL/TLEGSU"."LGREG" = "/SAPSLL/LC_CUSM"."LGREG" AND

 "/SAPSLL/TLEGSU"."SRVLL" = 'LECCUS' AND "/SAPSLL/TLEGSU"."CTSTY" = '101' AND NOT (

 "/SAPSLL/LC_CUSM"."MANDT" = '000' )

Solution:

Old table: /SAPSLL/LC_CUSM

New table after conversion: /SAPSLL/TEDTM

The reason for the above error is that there are some duplicate entries that exists in /SAPSLL/TEDTM table so the XPRA report is not able to insert the content into the table and it throws an error.

While you can find similar kind of 301 error for different type of schema and table but there is no specific steps for this table which comes during the conversion.

Option1:

     Try to login to the clients and see if you can get help from functional consultant to identify the duplicate entries from the table and repeat the phase. (Take a backup before you do this)

Option 2: 

Accept the error at this stage and complete the conversion.

Once the conversion is done do below steps.

Check if the index exists.Most likely it will because its a ~0 index and its reserved index which means you can only see that in se14.It wnt even show in hana studio.

sid111_0-1710044962120.png

- Drop the index from below command from hana studio

ALTER TABLE "SAPABAP1"."/SAPSLL/TEDTM" DROP CONSTRAINT "/SAPSLL/TEDTM~0";

- For HANA databases, use the HANA scripts HANA_Data_DuplicateKeys_CommandGenerator_1.00.100+ and HANA_Data_DuplicateKeys_columnStore_Deletion_CommandGenerator attached in SAP Note 1969700 to remove duplicates

below the command that i used

**************************************

DELETE FROM
"SAPABAP1"."/SAPSLL/TEDTM"
WHERE
"$rowid$" IN
( SELECT
ROW_ID
FROM
( SELECT
"$rowid$" ROW_ID,
ROW_NUMBER() OVER (PARTITION BY "MANDT", "STCCS", "RTYPE") DUP_NO
FROM
"SAPABAP1"."/SAPSLL/TEDTM"
)
WHERE
DUP_NO > 1
)
WITH HINT (NO_AGGR_SIMPLIFICATION, NO_GROUPING_SIMPLIFICATION)

*******************************

@note: Please be double sure when you run this command.Have it verified with the functional consultant as its going to delete duplicate entries from the table.

- Once duplicates are removed, try to create the index again

ALTER TABLE "SAPABAP1"."/SAPSLL/TEDTM" ADD CONSTRAINT "/SAPSLL/TEDTM~0" PRIMARY KEY ( "MANDT", "STCCS", "RTYPE" )

- Run the XPRA again /SAPSLL/XPRA_V8000 (this is the same XPRA which ran during the execution phase)

and this time it should typically work without giving issues.

 

Hope this help.

Thanks

Sid

 

 

 

 

 

 

1 Comment
Labels in this area