Skip to Content
0

VA01 change schedule line delivery block

Nov 02, 2017 at 01:10 PM

64

avatar image
Former Member

Hi Guys,

I have an requirement to create the schedule line item with delivery block and Item category based on item price and quantity availability.

I was using USEREXIT_SAVE_DOCUMENT_PREPARE.

but system is not accepting the change.

code snippet below.

in t-code VA01.

LOOP AT xvbep ASSIGNING <fs_vbep1> WHERE vbeln = xvbap-vbeln and posnr = xvbap-posnr.

<fs_vbep1>-ettyp = l_1ettyp.
<fs_vbep1>-lifsp = l_1lifsp.
<fs_vbep1>-updkz = 'I' OR 'U'.

ENDLOOP.

i tried with U and I it not working please help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Veselina Peykova
Nov 03, 2017 at 06:52 AM
1

I am not sure that setting a delivery block at schedule line level will result in the document disappearing completely from MD04 (if this is what the business expects as outcome from this development).

According to the IMG help:

If a transaction is blocked for delivery, the required stock will be blocked so it cannot be used elsewhere. To prevent this, you can block the transfer of requirements for a delivery block in this step.
In this case, the ordered quantity will still be transferred to MRP as a requirement but the quantity will not be reserved. This is apparent in the document when no confirmed quantities are available after saving (see schedule line screen).

What is more - using NETWR as criterion to set delivery blocks is probably not a good approach. If certain pricing condition needs to be applied for specific scenarios and processes, this is best solved with pricing routines and pricing incompletion, not with such hard-coded check in the exit. Imagine you have a free of charge item in the order (TANN), which is with 100% discount. In this case NETWR is zero even though the base price is determined correctly from some condition. With the approach suggested by the functional consultant this item will end up with delivery block, which is may not be a desired outcome, especially if the item is determined via free goods functionality and you are supposed to deliver it together with the main TAN item.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 03, 2017 at 05:59 AM
0

Hi Jelena,

thanks for the reply.

I agree with you there is business logic which needs to be executed to accept the change , So only I am facing the problem .

My requirement is.

1. If vbap-netwr is zero ( drives from pricing tab ZPR0 condition type) not maintained then I should change the

schedule line delivery block and schedule line item category.

in MVAF45ZZ USEREXIT_MOVE_FIELD_TO_VBEP , During sales order when program strikes this exit the pricing tab is empty XKOMV

so I wont be able to place my custom logic here .

2. when doing the change in USEREXIT_SAVE_DOCUMENT_PREPARE. it accepts the change but sales order is appearing in MD04 which should not happen .

I searched in google but not finding any good example relevant to my requirement.

please help.

regards,

Guru.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Please use "comment on this answer" to reply to the existing answers. Otherwise the other person is not notified of your reply. This is how SCN works these days, unfortunately - only the author is notified when an answer is posted.

Either way, I see Veselina already provided an answer and I agree. NETWR is just not the right criteria for delivery block.

0
Jelena Perfiljeva
Nov 02, 2017 at 08:52 PM
0

This is not a suitable user exit. Schedule line block needs to be modified way before saving because there is business logic that has to be executed after such change.

Use a different user exit. This definitely has been answered on SCN before, make sure to search in Google.

Share
10 |10000 characters needed characters left characters exceeded