Application Development and Automation 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: 
Read only

DYNPRO_MSG_IN_HELP Error in Custom Code

Former Member
0 Likes
1,897

We are getting an error in user exit MV45AFZZ, the dump indicates that the error is after some conditions and an error message if those conditions are not met:

ENDLOOP.

*--> CS 11/12/10

IF vbak-auart = 'PEFV'.
  IF xvbkd-zterm <> 'Z003' AND xvbkd-zterm <> 'Z004'.
    MESSAGE e398(00) WITH 'Condicion de Pago no permitida en PEFV'.
  ENDIF.
ENDIF.

DATA p_zterm LIKE knvv-zterm.

SELECT SINGLE zterm FROM knvv INTO p_zterm
WHERE kunnr = vbak-kunnr.

IF vbak-auart = 'PCON'.
  IF xvbkd-zterm <> 'Z002' AND xvbkd-zterm <> 'ZG01'.
    IF NOT ( p_zterm = 'Z001' AND xvbkd-zterm = 'Z001' ).
      MESSAGE e398(00) WITH 'Condiciones de Pago no permitidas'.
    ENDIF.
  ENDIF.
ENDIF.

*--> CS 18/07/11

* HML TS - 18/05/2011
*}   INSERT

>>>>>>ENDFORM.
*eject

From what I read the error message must be wrong, but I am not sure how to fix it.

Thank you, Regards,

Carlos

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,194

IF xvbkd-zterm 'Z003' AND xvbkd-zterm 'Z004'.

. . .

IF xvbkd-zterm 'Z002' AND xvbkd-zterm 'ZG01'.

Single field cannot contain both values!....did you mean to use an OR?

But, what does your dump say is wrong?

Edited by: DaveL on Aug 2, 2011 4:43 PM

6 REPLIES 6
Read only

Former Member
0 Likes
1,195

IF xvbkd-zterm 'Z003' AND xvbkd-zterm 'Z004'.

. . .

IF xvbkd-zterm 'Z002' AND xvbkd-zterm 'ZG01'.

Single field cannot contain both values!....did you mean to use an OR?

But, what does your dump say is wrong?

Edited by: DaveL on Aug 2, 2011 4:43 PM

Read only

0 Likes
1,194

Dave,

Something happen in my copy-paste but the "not equal" signs did not paste.

My dump says the following:

The program attempted to issue a " " message during "Exit Command" processing.

This is an illegal operation.

The program was terminated.

Screen name.............. "SAPMV45A"

Screen number............ 4001

Regards,

Carlos

Read only

0 Likes
1,194

Hi Carlos,

the dump says that you tried to send a E message during exit processing.

The exit processing means that the function code that was used has an "E" type (see current GUI status assigned, using the System menu -> Status information).

Usually, an exit command means that the processing is cancelled by the user, so the values entered on the screen are ignored (the exit processing does not pass the field values back to the program).

So, you should bypass your processing in that case, by testing the function code.

For more information, see note 84510 - Rabax DYNPRO_MSG_IN_HELP: Causes, elimin.n and so on, and ABAP documentation.

BR

Sandra

Read only

0 Likes
1,194

According to the note it would get fixed if no message gets dispayed, but how do I make sure the sales order is not saved? Do I just add an EXIT command?

Regards,

Carlos

Read only

0 Likes
1,194

In which form of MV45AFZZ did you or your colleagues put this code USEREXIT_SAVE_DOCUMENT_PREPARE would be a correct form to raise an error, but not USEREXIT_SAVE_DOCUMENT. (User Exits In Sales Document Processing) You could also consider also USEREXIT_CHECK_VBAK in include MV45AFZB.

Regards,

Raymond

Read only

0 Likes
1,194

Raymond,

We did it in USERXIT_SAVE_DOCUMENT_PREPARE, I will check include MV45AFZB.

Regards,

Carlos