Application Development 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: 

enbale screen input after error message

Former Member
0 Kudos

hi all,

i have created an enhancement for FK02 transaction, save button is clicked ,it executes and it checks certain conditions based on the data input and throws an error message. But the screen freezes after the error message, I want to re-enable screen entry for FK02 after the error message ,also the data should not be saved. How is it possible. Please help.

15 REPLIES 15

Former Member
0 Kudos

Hi Abin,

You need to find the screen exits for that and make the changes . Or you should have to find SAP Notes . Only in these two ways you can do that .

alejandro_mejias
Active Participant
0 Kudos

are you using exit ZXF05U01? If you raise an error message from this exit, when the user press enter user input is available.

i.e.

  IF i_lfa1-stceg IS INITIAL.
    MESSAGE e010(ad) WITH text-005.
  ENDIF.

arindam_m
Active Contributor
0 Kudos

Hi,

May be MESSAGE i010(ad) WITH text-005 DISPLAY LIKE 'E' would help.

Cheers,

Arindam

Former Member
0 Kudos

Hi,

Use the fuction module which is given in the link.

http://scn.sap.com/community/abap/blog/2013/07/31/handy-sap-function-module-to-automate-pai-events

Regards,

Alenlee mj

Former Member

Hi,

     IF  Condition .

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

        LEAVE TO SCREEN sy-dynnr.

      ENDIF.

Regard's

Smruti

sivaganesh_krishnan
Contributor
0 Kudos

HI abin,

Write your message statement as Message  text-000 type 'S' display like 'E'.

this will help you.

Regards,

Sivaganesh.

Former Member
0 Kudos

Hii Abin,

Display ur message like below if u r checking certain field input contents while saving,

IF field_name <> ' VALUE' .

     SET CURSOR FIELD 'field_name'.

     MESSAGE I022 WITH field_name DISPLAY LIKE 'E'.

ENDIF.

The set cursor will put the cusor to the field_name field and will be editable.

regards

Syed

Former Member
0 Kudos

Hi Abin

Using information message or other message and displaying them like error or so wont serve the purpose as the type of message decides it's behavior that whether it will continue processing after message or not etc.. So, no point in doing that.

I have come across certain situation numerous times (have developed many 'z' modules as well) when we don't want to take proceedings further yet give a dialog box message to user for his clear understanding of what has happened.

In such case, it's always advisable to use information type message & set a flag for error and have a check on that flag as mandatory to take proceeding further.

For example,

DATA: flag.

CLEAR: flag.

IF <conditon/input> TRUE.                                                    (For message)

  MESSAGE I<nnn>(<msgclass>) DISPLAY LIKE 'E'.

  flag EQ 'X'.

ELSE.

  CLEAR: flag.

ENDIF.

CHECK flag IS INITIAL.

<proceedings>.

former_member184569
Active Contributor
0 Kudos

Where have you created your enhancement? And in which screen in FK02 do you want this validation?

Former Member
0 Kudos

Hi Abin,

  You just try writing Leave list Processing after the error message or else you can use FCODE = 'ENT1'.

Just try it..

Former Member
0 Kudos

Hi Abin,

I believe the error message is being triggered from your enhancement. (If the error is triggered from some standard code, pls ignore).

If so the following blog may help you.

The blog explains automating the event of user pressing the ENTER key after an error message for enabling the screen to correct the wrong values. Hope it will solve your problem.

http://scn.sap.com/community/abap/blog/2013/07/31/handy-sap-function-module-to-automate-pai-events

Use the following piece of code.

*Begin-Auto triggers ENTER command

     CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'

       EXPORTING

            functioncode           = 'ENTER'

       EXCEPTIONS

            function_not_supported = 1

            OTHERS                    = 2.

*End-Auto triggers ENTER command

Hope it will solve your problem.

Regards,

Narayana Reddy A V L.

Former Member
0 Kudos

Hi Abin,

Can you please paste your code so that we can help with your code to enable the screen.

This usually happens because of using MEssage Type E [error]. It will display the screen and will not give an option to the user to give correct values on the screen .

You can try with the Below two options :

IF < ur condition >

  Messsage TYPE E 'XYZ message'.

    EXIT.

ENDIF.

OR

IF < ur condition >

  Messsage TYPE E 'XYZ message'.

STOP.

ENDIF.

Hope this will help!

Provide your code so that we can assist with accurately.

Best Regards,

KC

Piyushmatrixs
Participant
0 Kudos

Hello Rojer,

    You can solve  your problem something like below:

    IF (condition to display error msg and enable re-entry is true ).

             MESSAGE I000(ZASIA_IN) WITH 'Record not found. Please try again.' DISPLAY LIKE 'E'.

     ELSE.

           (PLACE CODE HERE TO SAVE DATA).

    ENDIF.

I am sure that it will definitely help you to solve your problem.

Thanks

0 Kudos

Hi Rojer,

After receiving an error message when F8 is pressed, the screen is available for input.

It worked for me in scheduling agreement creation .

Regards,

Ramiz

Khan
Participant
0 Kudos

Simple and effective solution. It worked for me. Thanks