on 2018 Dec 17 9:01 PM
remove SystemSetupAudit;PK[unique = true] * PK to remove is from a flexibleserach query.
can anyone help on this ???
By importing the following ImpEx script, I was able to remove the product with code, 12345
:
$dburl=jdbc:mysql://localhost/hybris67
$dbusername=hybris67
$dbpassword=hybris67
$dbdriver=com.mysql.jdbc.Driver
REMOVE Product[batchmode=true];pk[unique=true];
#% impex.initDatabase("$dburl", "$dbusername","$dbpassword","$dbdriver");
"#%
impex.includeSQLData(
""SELECT PK FROM products WHERE p_code ='12345'""
);
"
Please note that I have used an SQL Query instead of an FS Query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will check that and get back to you. However, for now, you can proceed with your work with the SQL. As you already know, under the hood, the FS Query gets converted to SQL and it is the SQL which is executed by the database. Of course, FS Query abstracts the complexities of SQL and we should always strive to use FS Query instead of SQL; not just for simplicity but also for restrictions, caching etc.
Thank you so much.If we can do by FS query we can avoid the inputs like DB details .If you can share me if you are able be do with FS query. The query below query but i am getting a warke below Script: #% impex.enableCodeExecution(true); remove SystemSetupAudit[impex.legacy.scripting = false];PK[unique = true] "#%impex.exportItemsFlexibleSearch(""SELECT {pk} FROM {SystemSetupAudit} where {className}= 'class1"");" # PK
Logger (000001WY) [ImpExImportJob] Starting ImpEx cronjob "ImpEx-Import" (000001WY) [ImpExReader] line 1 at main script: skipped code line line 1 at main script:impex.enableCodeExecution(true) since bean shell is not enabled (000001WY) [ImpExReader] line 3 at main script: skipped code line line 3 at main script:impex.exportItemsFlexibleSearch("SELECT {pk} FROM {SystemSetupAudit} where {className}= 'class1'"); since bean shell is not enabled (000001WY) [Importer] Finished 1 pass in 0d 00h:00m:00s:001ms - processed: 0, no lines dumped (last pass 0)
I will try my best to find a way to execute the FS Query in it. It's just a matter of getting time as I am quite busy for a couple of days 🙂
Please remove impex.enableCodeExecution(true)
and import the ImpEx in hAC with Enable code execution checked. Let me find out if it can work without Enable code execution checked in hAC.
So far I haven't been able to find a way to import my ImpEx without Enable code execution checked. I doubt if it will work without it. While trying to find a way, I also came across https://answers.sap.com/questions/12750761/view.html where a member has mentioned the problem of enabling bean shell.
User | Count |
---|---|
12 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.