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

Enabling Screen after Error Message

Former Member
0 Likes
8,803

Hi All,

i have done validation for Posting date in MIGO using MB_MIGO_BADI. That is if Posting Date in MIGO is less than the PO Created Date, then an Error Message will be appeared.now its working fine but after the error message MIGO screen is not allowing to enter the Posting date.Can anybody help to over come this problem.I have tried with all the methods present in this BADI.Thanks in advance.

13 REPLIES 13
Read only

Former Member
0 Likes
3,653

Hello,

Have tried putting the Screen fields which you want to be editable in PAI CHAIN ---ENDCHAIN.

E.g

PAI

.

.

.

CHAIN.

FIELD POSTING_DATE.

MODULE CHECK_POSTINGDATE.

ENDCHAIN.

Read only

Former Member
3,653

Hi Mallikarjun,

Use below Message Type in your Code .

  IF  "YOUR Condition ".

MESSAGE 'Your Message ' TYPE 'W' DISPLAY LIKE 'E'.

LEAVE TO SCREEN sy-dynnr.

ENDIF.

Regard's

Smruti

Read only

Former Member
0 Likes
3,653

Hello Mallikarjun,

What you have to do is based on your condition,

             

        MESSAGE text-007 TYPE 'I' DISPLAY LIKE 'E'.

        CALL SELECTION-SCREEN scr_no.

        LEAVE PROGRAM.

text-007 : your message

It will help you.

Thanks

Katrice

Read only

Former Member
0 Likes
3,653

Hi Mallik,

use EXIT command after message or leave the program and try.

Message 'XXX' type'E'.

EXIT.

-Srini

Read only

Former Member
0 Likes
3,653

HI Mallik,

try this one...

If <condition>

MESSAGE <text-> type "S" DISPLAY LIKE "E".

SET SCREEN dynnr

LEAVE SCREEN.

ENDIF.

With this it will go to the desired screen and there only it will show the error message, which after Pressig "ENTER" would allow you to fill the posting date again.

Regards,

Sumit

Read only

Former Member
0 Likes
3,653

HI Mallik,

try this one...

If <condition>

MESSAGE <text-> type "S" DISPLAY LIKE "E".

SET SCREEN dynnr

LEAVE SCREEN.

ENDIF.

With this it will go to the desired screen and there only it will show the error message, which after Pressig "ENTER" would allow you to fill the posting date again.

Regards,

Sumit

Read only

Former Member
0 Likes
3,653

Hi, you have to change the message type. If message type is 'E' it will not allow to go further.

Read only

Former Member
0 Likes
3,653

Hi,

First change the message type as error behave like Warning.

Then also try to put in chain and end chain itself.

Why because if you write call screen or leave to screen and all it will clear the data that you have entered so don't try that and mainly focus to  accommodate  in PAI chain and  end chain  block.

Thanks,

Dinesh.

Read only

Former Member
0 Likes
3,653

Hi,

Validate that field inside CHAIN-ENDCHAIN.

Regards,

Farid.

Read only

Former Member
0 Likes
3,653

Hi,

There are two methods to overcome your problem.

   1. Validate the required fields using CHAIN-ENDCHAIN.

   2. Validate the field using FIELD <field_name> MODULE <module_name>.

For further details, refer to the following link.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm

Regards,

Riju Thomas.

Read only

Former Member
0 Likes
3,653

You mentioned you have tried all methods of BADI MB_MIGO_BADI.So I assume method "CHECK_ITEM" did not work for you.

There is one more BADI MB_CHECK_LINE_BADI to check line items in MIGO. Check if its useful for you.

Read only

anubhab
Active Participant
0 Likes
3,653

Hi Mallikarjun,

If you are using message type as 'E', it wont allow user to input data after an error occurs. If you want to re-enable the field after an error occurs, you should use:

FIELD <FIELD NAME> MODULE <MODULE NAME>.

And if want this for multiple fields, then you should use:

CHAIN.

FIELD <FIELD NAME>.

MODULE <MODULE NAME>.

ENDCHAIN.

If you want to play with the message type, you can try:

MESSAGE <message text> TYPE 'S' DISPLAY LIKE 'E'.

Regards,

Anubhab

Read only

Former Member
0 Likes
3,653

Hi Mallikarjun,

Message 'Error_Message' Type 'S' Display Like 'E'.

Will solve the problem.

When it is

Message 'Error_Message' Type 'E'.

Then the program stops executing after the error has occured.

But when it is Display Like 'E', this makes the process to still run after the message is displayed.You can still play with screen i.e it is still active.

This is the basic concept. Hope it helps clearing why this coding is required.

With Regards.

D Amarnath Madhaba