‎2006 Apr 13 3:30 AM
I need help on this one..I have to do some validations just before saving data, i found this exit that is trigerring just before saving data but when i give some error message it just comes out of the transaction. I want an exit which can popup an error message and then stays in the transaction and allows user to correct data..Is there any other way to do it like any OSS notes or something else can be applied here..The Exit is for transaction FB60 and function module is EXIT_SAPLF048_001..Any help would be greatly appreciated.
Thanks,
Mohsin
‎2006 Apr 13 3:38 AM
Hi,
Can you post the code where you are throwing the error?
Regards,
Ravi
‎2006 Apr 13 3:55 AM
Hello Ravi,
I was just testing the enhancement by giving the following code in the enhancement F180A001 but its coming out of the transaction.
if sy-uname eq 'MF8562'.
break-point.
Message e000(zmsg_1).
Please tell me the correct way to proceed on this.
Thanks,
Mohsin
‎2006 Apr 13 4:31 AM
Hi,
Try this
if sy-uname eq 'MF8562'.
break-point.
Message e000(zmsg_1).
<b>LEAVE TO SCREEN SY-DYNNR.</b>
Hope it helps.
Regards,
Shashank
‎2006 Apr 13 4:45 AM
Hi Moshin,
You can code something like this.
IF SY-UNAME EQ 'MF8562'.
BREAK-POINT.
MESSAGE E000(ZMSG_1).
<b>SET SCREEN <current screen>.
LEAVE SCREEN.</b>
ENDIF.
These statements <b>do not</b> end the screen sequence. The screen sequence only ends when you leave to next screen 0.
Hope this will help.
Regards,
Ferry Lianto
‎2006 Apr 13 5:07 AM
I think you try these two things:
1. Use leave program.
2. give Warning message
‎2006 Apr 13 4:06 PM
Hello Ferry,
I tried the following code u sent but when i give the screen number it does go back to the screen but then when i close the error message it goes back to debugging mode. I want it back to the transaction so that user can correct the errors. Any other way to do this plzzzz..
IF SY-UNAME EQ 'MF8562'.
BREAK-POINT.
MESSAGE E000(ZMSG_1).
SET SCREEN <current screen>.
LEAVE SCREEN.
ENDIF.
That is the code i used.
Thanks,
Mohsin
‎2006 Apr 13 4:22 PM
Hi,
Don't give error message , try to Give ABEND message.
IF SY-UNAME EQ 'MF8562'.
BREAK-POINT.
MESSAGE <b>A000</b>(ZMSG_1).
ENDIF.
what exactly you want ? you want to check it is working or not.
or do you want to really give error message.
try giving ABEND message.
Regards
vijay
‎2006 Apr 13 4:15 PM
Hi Moshin,
Please delete <b>BREAK-POINT</b> statement and try to change to message from error to system/warning.
IF SY-UNAME EQ 'MF8562'.
MESSAGE S000(ZMSG_1).
SET SCREEN SY-DYNNR.
LEAVE SCREEN.
ENDIF.Hope this will help.
Regards,
Ferry Lianto
‎2006 Apr 13 4:27 PM
Hello Ferry,
If i remove break-point it still comes out of the transaction when i close the error message. Is there any other way to do it.Please let me know as i am really not able to proceed on this one..
Thanks,
Mohsin
‎2006 Apr 13 4:29 PM
Hi Mohsin,
Try to Give Info or Warning messages instead of Error, error will take you out of Transaction.
don't issue error messages.
Regards
vijay
‎2006 Apr 13 4:34 PM
Hello Vijay,
The requirement is to give an error message if the user enters wrong data just before saving it. I found the exit for it but when i give error message it just comes out of the transaction. I want it to go back to the screen so that the user can correct the errors and resubmit the document.Do you know how i should proceed on this one..
Thanks,
Mohsin
‎2006 Apr 13 4:40 PM
Hi,
try to identify the screen where he enters wrong data , and you need to validate the data and set the screen to the screen where the data is entered wrongly. and say leave screen and now issue error message.
try this..
i have a doubt, are they custom screen fields , if so why can't you handle them there it self.
Regards
vijay
Message was edited by: Vijay Babu Dudla
‎2006 Apr 13 5:15 PM
Hi Moshin,
Please try this ...
DATA: WA_ANSWER(1) TYPE C.
IF SY-UNAME EQ 'MF8562'.
CLEAR WA_ANSWER.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TEXT_QUESTION = 'Error Notification'
TEXT_BUTTON_1 = 'Fixed Error'
TEXT_BUTTON_2 = 'No'
IMPORTING
ANSWER = WA_ANSWER.
CASE WA_ANSWER.
WHEN '1'
SET SCREEN SY-DYNNR.
WHEN '2'.
...
WHEN 'A' *Cancel
...
ENDCASE
ENDIF.Hope this will help.
Regards,
Ferry Lianto