‎2010 Jun 17 12:13 PM
Hi,
I have created another thread in ABAP OOPs forum as I thought this Forum might be widely checked by SDNers (I shall mark ANSWERED once I get a response)
my requirement is that I am using std FM CATSXT_TEXT_EDITOR, I need to have a check on this FM execution.
On execution of this FM, you get a text where you can enter and once you say OK, it saves that text in a variable.
My requirement is that I need to do a validation to this FM, if the user doesnt enter any text, it shouldnt allow the user to get out of that Editor, unless he enters something.
Is it possible?
I found that I can use Implicit Enhancement, but dont know how to alert the user of entering something and keep the screen till he enters something.
Aditya
‎2010 Jun 17 12:30 PM
Hi
I think you mentioned wrong FM, its CATSXT_SIMPLE_TEXT_EDITOR. As you said if you go for an enhancement spot to raise an error message to the user you cannot call the same editor again or you can call the same FM in the enhancement.
Instead what I suppose the below solution.
WHILE text IS INITIAL.
CALL FUNCTION 'CATSXT_SIMPLE_TEXT_EDITOR'
EXPORTING
im_title = 'SOME TITLE'
im_display_mode = ' '
im_start_column = 10
im_start_row = 10
CHANGING
ch_text = text.
IF text[] IS INITIAL.
MESSAGE 'Can not exit without entering text.' TYPE 'S'.
ENDIF.
ENDWHILE.
Venkat
‎2010 Jun 17 12:30 PM
Hi
I think you mentioned wrong FM, its CATSXT_SIMPLE_TEXT_EDITOR. As you said if you go for an enhancement spot to raise an error message to the user you cannot call the same editor again or you can call the same FM in the enhancement.
Instead what I suppose the below solution.
WHILE text IS INITIAL.
CALL FUNCTION 'CATSXT_SIMPLE_TEXT_EDITOR'
EXPORTING
im_title = 'SOME TITLE'
im_display_mode = ' '
im_start_column = 10
im_start_row = 10
CHANGING
ch_text = text.
IF text[] IS INITIAL.
MESSAGE 'Can not exit without entering text.' TYPE 'S'.
ENDIF.
ENDWHILE.
Venkat
‎2010 Jun 17 1:36 PM