cancel
Showing results for 
Search instead for 
Did you mean: 

exportItemsFlexibleSearch error while exporting from HMC

Former Member
0 Kudos

Hi,

Im trying to export below query from System-tools-export

INSERT_UPDATE Customer;uid[unique=true,allownull=true];customerType(code) "#% impex.exportItemsFlexibleSearch( ""SELECT {C.uid}, {PCT.code} from {Customer} as C join Pangaea2CustomerType as PCT on {C.customerType} = {PCT.PK} } where {PCT.code}='Migrated'"" );"

I want to only export customer which are tagged as Migrated.Only customers which have enum values as Migrated. But this query throws error for PK.

Please need your help here.

Regards, Siddhi

Accepted Solutions (0)

Answers (2)

Answers (2)

andyfletcher
Active Contributor
0 Kudos

As on this answer https://answers.sap.com/questions/12760500/flexible-search-query-return-null-in-java-file-but.html?c...

You need to select the pk of the objects that you want exported.

More like:

 INSERT_UPDATE Customer;uid[unique=true];customerType(code)
 "#% impex.exportItemsFlexibleSearch( ""SELECT {c.pk} from {Customer as C join Pangaea2CustomerType as PCT on {C.customerType} = {PCT.PK} } where {PCT.code}='Migrated'"" );"

(Also as Raghavendra noted you had an rogue curly brace } in there)

raghavendra_desu
Contributor
0 Kudos

Hi Siddhi,

There is a issue with the above script. It contains one extra bracket after customer in customer as c.

Please try the below script, it should work.

 INSERT_UPDATE Customer;uid[unique=true,allownull=true];customerType(code) "#% impex.exportItemsFlexibleSearch( ""SELECT {C.uid}, {PCT.code} from {Customer as C join Pangaea2CustomerType as PCT on {C.customerType} = {PCT.PK} } where {PCT.code}='Migrated'"" );"

Regards,

Raghavendra.