cancel
Showing results for 
Search instead for 
Did you mean: 

user exit on MV45AFZZ

Former Member
0 Kudos

Condition: A warning message u201CQuantity entered is greater than 100, do you want to proceed?u201D will display each time the value of parts order exceeded to 100 order quantities. An abap code or user-exit change needed to meet this requirement.

sample: I create or I add item with order quantity greaterthan 100 a warning message will pop-up after I input the value for Order quantity.

i try to use, USEREXIT_SAVE_DOCUMENT_PREPARE it is working after i click the button save.

what they want is after i input the quantity it will be check after i can add another item.

thanks for the help SAP Guru's.

Accepted Solutions (1)

Accepted Solutions (1)

Shiva_Ram
Active Contributor
0 Kudos

In the same include, check with user exit USEREXIT_READ_DOCUMENT can help with your scenario.

p.s: apologize, I meant different exit and not the one mentioned by you, but by mistake I retyped what you have mentioned.

Regards

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks to everyone...

Former Member
0 Kudos

Hi guys,

i found your answers right they are all working, i already have the logic

LOOP AT xvbap WHERE kwmeng GT 100.000.

CALL FUNCTION 'POPUP_TO_CONFIRM'

ENDLOOP.

i loop xvbap to get only those who have the value of 100 then i use an FM 'POPUP_TO_CONFIRM' for the warning message with condition if you push the button YES it will proceed to next item and if it is NO i call the screen 4001 to go back to its initial screen so u could change your input.

but my client want is after he input or edit something on the quantity it be check at if it satisfy the condition the popup message will be triggered.

sample:

Material order quantity

1108179 1

1108179 10

sample i would like to change the quantity of my first item from 1 i will make it 101 after i change this the popup must be triggered and i must choose if i will proceed or not before i could change another item.

Former Member
0 Kudos

Hi,

logic can be included in the user exit 'userexit_save_document'. Then pop up will display when you try to save the document. It is required to save document for creation as well for change.

Gali

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

So you can use in the exit the function module POPUP_TO_CONFIRM_STEP (search in ABAP forums).

Regards,

Eduardo

Former Member
0 Kudos

HI E_Hinojosa,

Thanks for your help i used your recent reply using user exit on MV45AFZB thanks alot..

to all of you guys thanks i really appreciate your help

God bless to everyone..

and have a nice day.

hope someday i can worked with you guys...

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

In report MV45AFZB, subroutine USEREXIT_CHECK_VBAP, write this code:


IF xvbap-kwmeng > 100.
  MESSAGE i398(00) WITH 'Quantity entered is greater than 100' '' '' ''.
ENDIF.

If you write for XVBAP, it will work only for modifications or new data.

I hope this helps you.

Regards,

Eduardo

Former Member
0 Kudos

hi,

this is to inform you that,

the user-exits will fired only when we save the document.

please find enhancement spot/BADI for your requirement.

that will be help ful.

regards,

balajia

Former Member
0 Kudos

try putting the code in FORM USEREXIT_FIELD_MODIFICATION

or

try the forms in MV45AFZA or MV45AFZB.

More info.