Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2895

Re: Block products from specific accounts from shipping on specific hoildays

$
0
0

You'll need to store the following information somewhere: Which products will not be shipped to which customers on which days? You'll probably create a z-table and store this information in it.

 

How many customers will be restricted for this purpose? Are there a few, or are there too many that you'd better use a grouping indicator (possibly a field in customer master) to group them?

 

How many materials will be restricted for this purpose? Are there a few, or are there too many that you'd better use a grouping indicator (possibly a field in material master) to group them?

 

If you are to use a field in customer/material master, then create your table with keys Customer group / Material group / Restriction validity dates. If you are not to use a field in customer/material master, then create your table with keys Customer / Material / Restriction validity dates. Let's say you won't use fields from masters; entries in the table will look like (C=Customer, M=Material) :

 

C1     M1     20.12.2016     27.12.2016

C1     M2     20.12.2016     27.12.2016

C1     M3     20.12.2016     27.12.2016

C2     M1     20.12.2016     27.12.2016

 

So you're now restricting shipping of M1, M2 and M3 to C1, and M1 to C2 between 20.12.2016 and 27.12.2016. How will you do that? In VTLA, item category level, Conditions -> Requirements, you are probably using SAP routine 101 (program FV50B101). You'll either need to enhance this, or create a new routine in VOFM and assign this in VTLA. In the code, you'll need to read the z-table you've created, and if customer and material matches and system date lies within your validity dates in your z-table, set variable bp_subrc = 4. This way item will not be copied to delivery.

 

By the way, you can enhance the functionality of your z-table, it is by no means a complete idea. For example, if for every year December 20th to 27th will be restricted (i.e. Christmas time or any other holiday that falls to exact same time every year), then instead of entering year information to the table, you can think about entering only days and months, and ignore year part of system date in your code. Design is completely up to you.


Viewing all articles
Browse latest Browse all 2895

Trending Articles