Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

USEREXIT_FILL_VBAP_FROM_HVBAP

Former Member
0 Kudos

Dear all,

I am using the USEREXIT_FILL_VBAP_FROM_HVBAP in the include MV45AFZB.

My aim was to fill all the sub-item in the field mvgr1-5 with the input of the hvbap.

the code is the following:

VBAP-mvgr1 = HVBAP-mvgr1.

VBAP-mvgr2 = HVBAP-mvgr2.

VBAP-mvgr3 = HVBAP-mvgr3.

  • u03A0u039Fu03A1u03A4u0391 LAMINATE

if HVBAP-MATKL = '10'

AND VBAP-MATKL = '11'.

VBAP-MVGR4 = HVBAP-MVGR4 - 0027.

VBAP-MVGR5 = HVBAP-MVGR5 - 0050.

elseif HVBAP-MATKL = '10'

AND VBAP-MATKL = '20'.

VBAP-MVGR4 = HVBAP-MVGR4.

VBAP-MVGR5 = HVBAP-MVGR5 - 0006.

while the mvgr1-3 are working fine ( when the user inputs in the HVBAP-MVGR1 something and presses ENTER, the system fills the vbap-mvgr1 with this input. Moreover when it is changed (the HVBAP-MVGR1) it changes accordingly.

The problem is that the MVGR4 & MVGR5 which are used to make some simple calculations it is not working.

The user fills the HVBAP-MVGR4 with an input (Height of the product) it must copy this input to the sub-item and if some certain requirements are met to make this simple calculations.

Though, when the user fills in the MVGR4 and presses ENTER there is no response. The only way to have a response to this field is the change one the MVGR1-3.

Can you please help me to solve the problem?

1 ACCEPTED SOLUTION

LucianoBentiveg
Active Contributor
0 Kudos

I thik that your conditions:


if HVBAP-MATKL = '10' AND VBAP-MATKL = '11'.


elseif HVBAP-MATKL = '10' AND VBAP-MATKL = '20'.

are not applying. Try something like this, to see if values are populating:


VBAP-mvgr1 = HVBAP-mvgr1.
VBAP-mvgr2 = HVBAP-mvgr2.
VBAP-mvgr3 = HVBAP-mvgr3.
VBAP-MVGR4 = HVBAP-MVGR4 - 0027.
VBAP-MVGR5 = HVBAP-MVGR5 - 0050

If that work, so your IF conditions are not apliying.

Try it.

Regards.

1 REPLY 1

LucianoBentiveg
Active Contributor
0 Kudos

I thik that your conditions:


if HVBAP-MATKL = '10' AND VBAP-MATKL = '11'.


elseif HVBAP-MATKL = '10' AND VBAP-MATKL = '20'.

are not applying. Try something like this, to see if values are populating:


VBAP-mvgr1 = HVBAP-mvgr1.
VBAP-mvgr2 = HVBAP-mvgr2.
VBAP-mvgr3 = HVBAP-mvgr3.
VBAP-MVGR4 = HVBAP-MVGR4 - 0027.
VBAP-MVGR5 = HVBAP-MVGR5 - 0050

If that work, so your IF conditions are not apliying.

Try it.

Regards.