How to make a field editable again after displaying error msg (validation)

Dear All,
In dialog programming, I have written a validation on a text field that it should not be left blank by the user, but after displaying the message the field becomes gray (non-editable). How can I make it editable once again after displaying the error message.
My code is as following:
***INCLUDE MZFBPS1_SAVE_DATAF01 .
*&      Form  save_data
      text
-->  p1        text
<--  p2        text
FORM save_data .
****************Check For Empty Fields Start
if ZFBPS_GATE_IN-truck_code is INITIAL
or ZFBPS_GATE_IN-truck_no is INITIAL
or ZFBPS_GATE_IN-transporter_code is INITIAL.
MESSAGE e020(zmatlist).
endif.
****************Check For Empty Fields Start
Regards,
Alok.

hi,
u can do it in chanin end chain.
For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to give some error message. You can declare that fields in the chain enchain so that only those fields will be input enabled and all other fields will disabled.
CHAIN.
FIELD chk_connobj.
FIELD chk_inst.
FIELD chk_devloc.
FIELD ehaud-haus.
FIELD eanl-anlage.
MODULE modify_screenfields.
ENDCHAIN.
*& Module modify_screenfields INPUT
* text
MODULE modify_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.
IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND
chk_devloc EQ c_x.      -----------> ur condition
IF ehaud-haus IS INITIAL.
SET CURSOR FIELD 'EHAUD-HAUS'.
MESSAGE e000(zo_spa) WITH text-017. " message obj
ELSE
loop at screen.
if screen-name = 'FIELD_NAME'.
field-name-input = 1. -----------> chnges to non-edit mod
modify screen.
endloop.
ENDIF.
ENDIF.
ENDMODULE.
Rgds
Anver
if hlped pls mark points

Similar Messages

  • How to make a field editable, this field is dependent on a checkbox.

    Hi Frens,
    On the selection-screen of a report, i have a field and a checkbox in one block only.I want to make this field non-editable if the checbox is unchecked and if the checkbox is checked than, the field shouls be editable.
    Currently, it is happening but when i press enter after checking or unchecking the checkbox.
    How can we do it without pressing enter.
    Thanks and regards.

    Hi Anshul
    first describe your parameter like :
    PARAMETERS p_chkb AS CHECKBOX USER-COMMAND chkb.
    when user clicks on this checkbox
    the event  AT SELECTION-SCREEN OUTPUT. will be triggered without touching enter button.
    Than write a code like this to make P_OTHER parameter editable or non-editable :
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name EQ 'P_OTHER'.
          IF p_chkb EQ 'X'.
            screen-input = '1''.
          ELSE.
            screen-input = '0''.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Hope it helps,
    Bulent
    Edited by: Bulent Balci on Jul 6, 2010 5:23 PM

  • How to make screen fields editable

    Hi all,
    iam writing a validation for FD32 transaction in exit, if the validation fails showing error message.
    Porblem is when ever error message comes and after that if i press enter fields are going to mode of non editable ( Display mode), how to make them editable which were already editable ( before error message comes).
    Iam not using module pool program for this, iam writing code in include exit and throwing the message.
    Thanks,

    Hi,
    You can use pop up window to display error message as below:
    -Quote-
    AT SELECTION-SCREEN ON ABCD.
      IF <condition fails>.
        CALL FUNCTION 'FC_POPUP_ERR_WARN_MESSAGE'
          EXPORTING
            popup_title        = 'Error'
          IS_ERROR           = 'X'
            message_text       = 'Error message description'
            start_column       = 25
            start_row          = 6
        STOP.
      ENDIF.
    -Unquote-
    You may also use:
    -Quote-
      IF <condition fails>.
        MESSAGE 'abcd' TYPE 'E'.
      ENDIF.
    -Unquote-
    Kindly let me know whether this is of any help or not.
    Regards,
    Shayeree.

  • How to make Date fields Editable or Non-Editable based on Call Staus

    Hi,
    We are using CRM2007 Web GUI for Service call creation. We are using date profile to populate the dates. Here my requirement is if call status is 'Call created' then some set of date fields to be appeared in display mode(Non Editable) and some set of date fields to be appeared in change mode(Editable). How to achieve this. Kindly suggest me.
    Regards,
    Steve

    Hello,
    Kindly check the following thread which is giving many solutions for your requirement:
    Re: how to make field non-editable (display mode)
    Kind regards,
    Nicolas Busson.

  • How to activate screen fields of VA01 after an error displayed

    Hi
    I have an issue working with USEREXIT_CHECK_VBAK, which affects transactions VA01, VA02 and VA03.
    I have written the logic to validate the combination of Sold-To and Ship-To, against the Partner Table KNVP, under USEREXIT_CHECK_VBAK. And, if a user enters wrong combination of Sold-To and Ship-To, say in transaction VA01, USEREXIT_CHECK_VBAK will be triggered and the validation error message will be displayed. So, once the error is displayed, all the fields available on the screen are getting inactive. The requirement I have is that, after the error message is displayed, both the Sold-To and Ship-To fields should be ready for input again by the user, and the error should be displayed each time user enters wrong combination, but the fields should always be ready for input.
    I have tried working with USEREXIT_FIELD_MODIFICATION, to no avail.
    Could anyone help on this, or give me an idea on how this requirement could be achieved.
    It's urgent.

    You can try it with warning message instead of error message.
    Or else have a lok at below link which gives the details of VA01 exits so that u can find out the corresponding exit where you can make the changes.
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • How to Make standard fields editable

    Hi,
    We have are requirement to make the standard fields (cost center, GL, expense type, amount) to be editable for Approver user role. Currently only Auditor role can edit some of the fields.
    Is this something doable using SDK?
    Thanks,
    Webster

    Hi,
         You can change them statically(they will always be "ready for input" in screen painter, just double-click the field, in the dialog that appears, check the box for "Input Field".
    If you want to do this a run-time, then you will need to modify the fields in the PBO, using the LOOP AT SCREEN.
    LOOP AT SCREEN.
    IF screen-name = 'Your_field_name'.
    screen-input = '1'.
    modify screen.
    endif.
    EndLoop.
    Regards

  • Make "Company" Field editable

    Hello Experts,
    We are using E-Sourcing 5.1 with most of the out-of-the-box functionality. When creating an Auction, header section contains field "Company". This field appears as read only, and populates automatically based on the company defined in the user profile.
    I tried making this field editable by means of page customizing (UI ID: doc.auction.multi.universal.auctionevent.ui.buyside.default), but even when I declare field COMPANY as Editable = YES, the change is not reflected in the UI.
    Any ideas on how to make this field editable so end-users can select another company code besides the one specified in their profile? Your help is appreciated. Thanks!

    Hi Gilberto
    Unfortunately it is not possible to make the company field editable. Workaround could be to hide the standard COMPANY field in page customization and create a new extension definition lets say "Company" with data type: Object Refrence and choose 'Company' as the object reference type.
    Hope this would meet your requirement.
    Regards
    Mudit Saini

  • Table Control: make a field editable or not based on another field value

    HI All,
    How to make a column field input enabled or disabled based on another field value in a Table Control.
    Here's the scenario:
    I have a table control with two columns, KTOKK and LIFNR. Now for certain KTOKK, the LIFNR field should be editable and for certain KTOKK it should not be editable.
    Eg.,  KTOKK = 0001 =>  LIFNR field is not editable.
            KTOKK = ZKTO => LIFNR field is editable.
    But these fields are in a table control.
    Please advice.
    Thanks in advance,
    RK.

    Hi RK,
    Go through the below link..
    how to make special field editable or diseditable in table control?
    the code mentioned in the link.. just add ur conditions in the module....
    Best Regards,
    Brijesh

  • After Showing ERROR message make the field editable in subscreen.

    Hello Experts,
    I have a requirment where i have added a subscreen to the standard screen of ME31K for creating the contract. In my Subcreen i have my custom screen fields that i'm updating in EKKO table through include structure.
    Now if user forget to fill the details in my custom fields in the subscreen then i'm giving the error message prompting the user to fill the value in fields.
    But the problem is the screen is locked there itself i want to make the field editable so that user can enter some value in the fields. I can not use the stuatus or information message here because doing this i will get the item overview screen which should not come as i want to restrict the user to header details only and fill all the custom fields.
    Please provide me with your helpful responses.
    Thnaks,
    Naveen

    Hi Naveen,
    Sorry for the delay.
    The code which I gave for popup, i hope its being shown in an IF . . . ENDIF.
    So in that condition u can add the following :
    IF < ur condition >
       < Call message FMs >
        SET SCREEN SY-DYNNR.   "this would set screen to current screen which is 0201
        EXIT.
    ENDIF.
    Other than this if you like you can set some parameters in the PAI of this screen which redirect to current screen based on some conditions.
    So u can manually set OK-CODE and CALFCODE as SPACE, but i dont know how much this can impact the process.
    So please follow the above code.
    This is available in
    Main Program     SAPMM06E
    Source code of   MM06EF0F_FCODE_CALL
    IF OK-CODE EQ SPACE AND
       CALFCODE EQ SPACE.
      SET SCREEN SY-DYNNR.
      EXIT.
    ENDIF.
    Hope this helps.
    Regards,
    Ateet

  • How to make a field un editable in one screen

    Dear Experts,
    I want to know how to make one field as un editable in one screen.I will explain in detail. I want to make "Reconciliation account" field as un editable in XD02 t-code.
    Regards,
    Surendra babu.

    Hi Surendra,
    Use this path in spro:
    Financial Accounting-> A/P&A/R-> CustomerAccounts->MasterData->Preparatons for CreatingCustomerMasterData
    use the transactions & u can update for creation of customer master or hange of customer master.
    Hope this helps you
    Award points if helpful
    chaitanya

  • How to make some fields in ALV tree editable

    Hello All,
    Can any one tell me how to make some fields in ALV tree editable.
    If possible please post some code.
    Regards,
    Lisa.

    Hi Lisa,
    I want to make 3 fields in the ALV tree editable and update the saved values in ztable.
    I tried making the wa_fieldcat-edit = 'X' But in vain.
    Also i made the layout fields  wa_layout-edit = 'X'  and wa_layout-edit_mode = 'X'.
    But still the alv tree field appears as display.
    As you have mentioned in the post as answered, So please guide me to make the field editable.
    I am using oops method.
    Please provide me code if any.
    Thanks & Regards,
    Mozila

  • How to make a field in adobe form noneditable

    how to make a field in adobe form noneditable. like info keys..
    when this form is sent through worflow the receiver shudnt be able make changes to the field value...(I have a form, which has fields prefilled(like pernr employee name) but these fields are in editable able..(i want only some fields to be uneditable not all)
    Edited by: kumar gaurav on Apr 11, 2008 8:04 AM

    Hi,
    You can make fields non-editable at runtime using this code:
    field.access = "readOnly"
    Hope this helps.
    Amit

  • How to make a field Mandatory in a Table view?

    How to make a field Mandatory in a Table view?
    The requirement is, the user should not be able to append a new Row, unless and untill he enteres the data in the column SOLD-TO. Now how do i acheive making this field madatory. Normally in Edit form view, we can go in customizing and flag Mandatory, for table view we don't have this option.
    Please can anyone of you guide me in this approach?
    Jagadish.G

    Hi Jagadish,
    have a look in this thread, part of the code you can use in eh_insert method or logic to write enable/disable insert button.
    Re: Assignment Block Mandatory
    regards
    Ismail
    Edited by: Ismail Shaik on Oct 21, 2009 11:36 AM

  • How to make a pdf editable and save for print

    Hi,
    I just joined Adobe Cloud and it's been a while since I have used acrobat. I have made a brochure that I need a couple of things to be editable on. See below. I need the two areas highlighted in red to be editable for different locales/people. My questions are:
    A) I assume Acrobat is the way to do this. I also have FormsCentral if that works better. Can someone tell me how to make these two fields editable?
    B) What program do they edit with?  Acrobat Reader?
    C) How do they save and output it for print?
    Thank you,
    John

    This is not about what Acrobat can or can't do - and you just said they won't have it anyway. It's about the limitations of PDF. A proper solution is to develop (at some expense) a server side PDF generator that takes the user's input and makes them a custom PDF. I don't know if you can just subscribe to a service to do this. If you aren't going to have them use Acrobat, form fields are your only option. Be sure they (and you) understand the limitations and that they must use Reader (not one of the many other PDF viewers). Be sure you understand about reader enabling: many versions of Reader CANNOT SAVE filled in files unless they are specially prepared.
    So back to your original question: how do you make the fields editable: with the Forms function in Acrobat. You may have better luck in the Acrobat Forms forum.

  • How to make table as "editable false"

    Dear Forum,
    i am user of jDeveloper jClient/Swing .jpr.
    cutomer table having following attributes-
    1.cust_id (primary key)
    2.cust_name
    3.cust_add
    Suppose customerview bind with jTable1.
    Using ViewObjectEditor, i set "updateable never" for all fields.
    This show error, when data insert into table " cust_id as
    read only".
    Help me, Using jClient Binding how to make Table as "editable false".

    Overriding method prepareEditor() for new table:
    private JTable tableList = new JTable(){
    public Component prepareEditor(TableCellEditor editor, int row, int column) {
    // 1 and 2 column is not editable
    if(column == 0 || column == 1){ return null; }
    return super.prepareEditor(editor, row, column);

Maybe you are looking for