‎2013 Aug 07 2:26 PM
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.
‎2013 Aug 08 10:25 AM
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.
‎2013 Aug 08 10:39 AM
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
‎2013 Aug 08 11:39 AM
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
‎2013 Aug 08 11:46 AM
Hi Mallik,
use EXIT command after message or leave the program and try.
Message 'XXX' type'E'.
EXIT.
-Srini
‎2013 Aug 08 11:52 AM
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
‎2013 Aug 08 11:52 AM
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
‎2013 Aug 08 11:58 AM
Hi, you have to change the message type. If message type is 'E' it will not allow to go further.
‎2013 Aug 08 12:27 PM
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.
‎2013 Aug 22 7:02 AM
‎2013 Aug 23 7:37 AM
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.
‎2013 Aug 23 8:51 AM
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.
‎2013 Aug 23 9:18 AM
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
‎2013 Aug 23 10:27 AM
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