05-15-2008 8:07 PM
Hi all
I need to clear a field after validation in a field exit .
My code like this:
if lc_field is not initial.
clear output.
message e398(00) with 'this number already is registeres...'
endif.
endif.
My output field isn't empty after execution. I can´t use message type i or type w because a dump is thrown.
What can I do to clear this field using my field exit?
Thanks
05-15-2008 9:44 PM
Hi..
I am not sure if this is possible in field exit, but i know it workd in ABAP report.
Instead of displaying error in type E, display it as shown below:
if lc_field is not initial.
clear output.
message text-001 type 'S' display like 'E' .
LEAVE LIST-PROCESSING.
endif.
Leave list processing or any such command which will take you back on screen should be used here..
text-001 = this number already is registeres...
Hope this helps!
Ags.
05-15-2008 8:30 PM
Hi Natali,
I think you can't access the values in a field exit because this is processed in screen processing between PBO and PAI. We solved an issue like this by dynamically assigning the calling programs variable
FUNCTION FIELD_EXIT_ZLSPR.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT)
*" EXPORTING
*" VALUE(OUTPUT)
*"----------------------------------------------------------------------
*-----------------------------------------------------------------------
* 17.02.2000 CLi Field-Exit for payment lock on invoice acreen
* Transaction F-43
*-----------------------------------------------------------------------
CONSTANTS: BSL(20) VALUE '(SAPMF05A)BSEG-BSCHL'.
FIELD-SYMBOLS: <BSL>.
ASSIGN (BSL) TO <BSL>.
IF SY-SUBRC = 0.
IF INPUT = ' ' AND
* <BSL> <> '37' AND
<BSL> <> '27'.
OUTPUT = 'A'.
MESSAGE S002(ZF) WITH 'Payment lock "A" was set'.
ELSE.
OUTPUT = INPUT.
ENDIF.
ELSE.
OUTPUT = INPUT.
ENDIF.
ENDFUNCTION.
As you see, we could issue a success message.
I don't know if this helps you - it is 8 years ago and field-exits like this may not be supported any longer. Anyway: Try to find out what the calling programs field name is, do a dynamic assign as seen in the code and change the value as required.
Regards,
Clemens
05-15-2008 9:44 PM
Hi..
I am not sure if this is possible in field exit, but i know it workd in ABAP report.
Instead of displaying error in type E, display it as shown below:
if lc_field is not initial.
clear output.
message text-001 type 'S' display like 'E' .
LEAVE LIST-PROCESSING.
endif.
Leave list processing or any such command which will take you back on screen should be used here..
text-001 = this number already is registeres...
Hope this helps!
Ags.
05-17-2008 10:50 PM