Posts

Showing posts from December, 2020

Exporting Data from SAP Commerce by ImpEx

 From time to time I need to export data from SAP Commerce Cloud system. For me the best approach is to have them in Excel where I can filter them out nicely. I usually use for that ImpEx Export with flexibleSearch query. Here is an example of that kind of script: in export line there is FlexibleSearch query with WHERE clause which I use to filter out data for my needs. Usually I run ImpEx Export from hac cockpit, where I have zip file listed right away after execution. Package contains CSV file, which I open in Excel/Calc/Numbers and do the filtering. Recently I had to remove large volume of business processes after load tests. For that I have created similar impex, but with more user-friendly method for querying data to be filtered. Here I have used exportItemsFlexibleSearch method. impex.exportItemsFlexibleSearch(""/* flexible search query */""); Here as you can see, there is only query used, with no additional parameters required. Generated zip f...

Eclipse File URL encoding is broken

I have been struggling with one issue raised to SAP Commerce eclipse plugin for a while and could not create test scenario to reproduce the bug  #48 Fortunately one of users came up to situation that if file path to eclipse contains whitespace then it is not possible to convert Eclipse URL to File URL, then to URI to finally get a File instance pointing to local file.  Long story short, whitespace should be encoded to format %20 to be compatible with standard. Currently (2020/2021 A.D.) it is not. I it is left as " " Bit long, but unfortunately that scenario is quite often seen in plugin development. I was able to find on Eclipse Bugzilla  #145096  and there was a struggle what to do with that... Until script has closed that bug. Bummer. Last reply was: Wrong. Non-encoded URLs are lossy. See explanations in bug 3109 comment 28 . The only right solution is to stop using non-encoded URLs, even if that breaks buggy API clients that tried to "encode" wrong URLs (that ...