on 08-04-2018 10:02 AM
HI There,
How to find product categories for which there has no products assigned?
Thanks, Vishal Kambare
Hi Vishal,
Interesting question, and I must admit I couldn't think of an elegant solution, but here are a couple of attempts.
Would you consider an excel-based solution (if this is not meant to be a frequent activity)? If yes, then just get all the following rows from repository explorer and get the delta in excel:
1. BO Material-->empty query to select all-->select all rows-->navigate to CrossProcessCategory-->select all and copy to excel
2. BO ProdutCategoryHierarchy-->empty query to select all-->select all rows-->navigate to ProductCategory-->select all and copy to excel
Compare both results and extract the delta of columns "ProductCategoryIDKey/ProductCategoryInternalID" from result set 1 and "InternalID" from result set 2.
Note: this will only work for <200 records in both Material and ProductCategoryHierarchy, because the query in repository explorer only gets a max of 200 records.
If you have more than 200 records, but still don't mind using Excel, you can try building OData services to read all the corresponding BO data into excel ("Power Query" is a free excel plugin that will help with this. Check this blog: https://blogs.sap.com/2015/10/07/using-sap-bydesign-odata-in-microsoft-power-query/ ).
If you want to have a ByD application based solution, then this could be achieved in two ways:
I) creating a joined data source of two custom data sources "Material Master Data" and "Product Category Master Data". An inner join between these two will give you the delta of unused product categories.
II) creating a custom BO that first reads all instances of ProductCategoryHierarchy-->ProductCategory and compares with all instances of Material-->CrossProcessCategory within a loop.
Regards,
Rohan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.