This blog is about automating a utility in ECC which you can use to set up close-by store/plants. This utility can be accessed via txn wsd_cbp. One of the places this “Closeness” is used is in a FIORI app called “Product lookup”. For details on Product look up app, click here.

Setting up “Close by plants” is a very manual process and even if you have set it up once, there is a always a constant need to change it, especially if you are in a Retail environment with store opening and closing all the times.

There are two ways to automate this process.

  1. First, have a Google API so that you can do close by association based on Plant/store’s address (coordinates)
  2. Second, write an ABAP program to use one or more attributes from the plant/store master to create these associations.

Unfortunately first option requires extra investment, which was not approved in our implementation, so we ended up going the cheaper way of writing an ABAP program. Broadly, the logic we used was to look at stores/plant in a sales organization and then organize them based on a sales district.

Detailed Logic

  1. Create a table (copy of WSD_cbp) of all stores with same value of T001K-VKORG
  2. Delete stores where closed date is less then today’s
  3. For same value of T001K-VKORG populate PLANT = WR02D-LOCNR and Close_by = All the plants with same T001K-VKORG
  4. For same value of T001K-VKORG and T001W-BZIRK (district), set PRIORITY=001
  5. Repeat for all VKORG and BZIRK combinations
  6. Copy entries to WSD_CBP

ABAP code

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply