cancel
Showing results for 
Search instead for 
Did you mean: 

USEREXIT_MOVE_FIELD_TO_VBAP - Change item category in VA01

schloets
Discoverer
0 Kudos

Hello!

I have implemented the following coding in MV45AFZZ (USEREXIT_MOVE_FIELD_TO_VBAP). I want to set the usage indicator (VBAP-VKAUS) depending on certain criteria.

DATA lv_vkaus TYPE zsd_vkaus-vkaus.

SELECT SINGLE vkaus
FROM zsd_vkaus
INTO lv_vkaus
WHERE auart = vbak-auart
AND prsfd = tvap-prsfd
AND mtart = maapv-mtart.

IF sy-subrc = 0.
vbap-vkaus = lv_vkaus.
ENDIF.

When I create in VA01 the position, the usage indicator will be set by the exit. Now I change the item category in VA01 and the exit is going through again and the usage indicator will the update in the debugger, but in the position data on the screen the newly determined usage indicator will not be displayed. There is shown the old value.

Have anyone an idea or can not update the data with USEREXIT_MOVE_FIELD_TO_VBAP?

Best regards

Sebastian

Accepted Solutions (0)

Answers (2)

Answers (2)

schloets
Discoverer
0 Kudos

Hi Kivanc,

thank you for your answer! It is a combination of both:

- If you have a standard sale item (like item category TAN), then the usage indicator should be set according to a customer table (no manually update in sales order)

- If you have a free of charge position (like item category TANN), then the usage indicator should be set manually in the sales order. For this is FORM USEREXIT_CHECK_VBAP no option, because the logic in this exit takes precedence over manual input.

Best regards

Sebastian

sez41
Active Contributor
0 Kudos

Hi Sebastian,

Do you want this usage indicator to be able to be updated manually, or would you like to prevent such a behaviour? If prevention is your choice, then I would recommend another user exit; FORM USEREXIT_CHECK_VBAP in program MV45AFZB.