How to make fields editable in an custom enhancement

Hi Experts,
My requirement is to perform some custom validations against a field FKONT(BSEG) at the line item level of FB60 and display appropriate message and make the incorrect field editable.
I have implemented an implicit enhancement point in include MF05AFGENJ.
The error messages are coming but I am unable to make the GL account, cost center and profit center fields editable.
Please let me know how to make the above fields editable after displaying the error message.
For reference, I have done the coding like this:
IF sy-tcode = 'FB60' .
CHECK GL_ITEMS IS NOT INITIAL.
DATA: L_COUNT TYPE I,
      L_STRING TYPE STRING,
      L_FKONT TYPE FIPLS,
      L_TABIX TYPE SY-TABIX,
      G_FLAG TYPE C.
DATA: WA_ZZFSTP LIKE ZZFSTP.          "Work area for ZZFSTP table
CONSTANTS:C_MK TYPE TXJCD VALUE 'MK0000000'.
*-- Validating the Financial budget item field
IF GL_ITEMS-FKONT IS NOT INITIAL.
SELECT SINGLE FKONT
                    INTO L_FKONT
                    FROM ZFSTP
                    WHERE FKONT = GL_ITEMS-FKONT.  "cost center
IF SY-SUBRC NE 0.
   CLEAR: G_FLAG.
   G_FLAG = 'X'.
   MESSAGE W003(ZZFI) WITH 'Please enter 'Financial' 'Budget Item Field' DISPLAY LIKE 'E'.
   EXIT.
ENDIF.
*-- Copying the first line item financial budget item field to all the line items in the internal table
DESCRIBE TABLE GL_ITEMS LINES L_COUNT.
IF L_COUNT > 1.
  READ TABLE GL_ITEMS INDEX 1.
  IF SY-SUBRC = 0.
        CLEAR: L_FKONT.
        L_FKONT = GL_ITEMS-FKONT.
*-- Assign the tax jurisdiction codes in all the line items
         LOOP AT GL_ITEMS.
           CLEAR: L_TABIX.
           L_TABIX = SY-TABIX.
           GL_ITEMS-FKONT = L_FKONT.
           GL_ITEMS-TXJCD = C_MK.
*-- Copy the first financial budget item number and tax jurisdiction code MK0000000 in all line items
           MODIFY GL_ITEMS INDEX L_TABIX TRANSPORTING FKONT TXJCD.
*-- Populate tax jurisdiction and FKONT financial budget item number in XBSEG table
           L_TABIX = L_TABIX + 1.  "top record in XBSEG is for header
           READ TABLE XBSEG INDEX L_TABIX.
           IF SY-SUBRC = 0.
             XBSEG-FKONT = L_FKONT.
             XBSEG-TXJCD = C_MK.
             MODIFY XBSEG INDEX L_TABIX.
           ENDIF.
         ENDLOOP.
  ENDIF.
ENDIF. "describe statement
CLEAR: WA_ZZSTP.
*-- Validate the amount and GL account against the FKONT(financial budget item) number
SELECT SINGLE FKONT
              ZZWRBTR
              ZZHKONT
              ZZKOSTL
              ZZPRCTR
       INTO CORRESPONDING FIELDS OF WA_ZZFSTP
       FROM ZFSTP
       WHERE FKONT EQ GL_ITEMS-FKONT.
IF sy-subrc EQ 0.
IF BSEG-WRBTR > WA_ZZFSTP-ZWRBTR.
       CLEAR: G_FLAG.
       G_FLAG = 'X'.
       MESSAGE W003(ZZFI) WITH 'Amount entered' 'cannot be' 'greater than ' WA_ZFSTP-ZZWRBTR DISPLAY LIKE 'E'.
       EXIT.
ELSE.
         CLEAR: G_FLAG.
        G_FLAG = 'X'.
        SET CURSOR FIELD 'GL_ITEMS-HKONT'.
        MESSAGE W003(ZZFI) WITH 'Incorrect GL account' 'number entered for' 'given financial' 'budget item number'.
        EXIT.
       ELSE.
*-- Check for cost center and profit center at line item level
         LOOP AT GL_ITEMS.
*-- Both cost center and profit center is initial.
            IF GL_ITEMS-KOSTL IS INITIAL AND GL_ITEMS-PRCTR IS INITIAL.
                CLEAR: G_FLAG.
                G_FLAG = 'X'.
                SET CURSOR FIELD 'GL_ITEMS-PRCTR' LINE SY-STEPL.
                SET CURSOR FIELD 'GL_ITEMS-KOSTL' LINE SY-STEPL.
                MESSAGE W003(ZZFI) WITH 'Please enter' 'cost center' 'or' 'profit center'.
                EXIT.
*-- Either cost center or profit center is initial
            ELSEIF GL_ITEMS-KOSTL IS INITIAL AND GL_ITEMS-PRCTR IS NOT INITIAL.
                CHECK GL_ITEMS-PRCTR NE WA_ZZFSTP-ZPRCTR.
                  CLEAR: G_FLAG.
                  G_FLAG = 'X'.
                  SET CURSOR FIELD 'GL_ITEMS-PRCTR' LINE SY-STEPL.
                  MESSAGE W003(ZZFI) WITH 'Incorrect profit' 'center entered' 'for given' 'financial budget item' DISPLAY LIKE 'E'.
                  EXIT.
            ELSEIF GL_ITEMS-KOSTL IS NOT INITIAL AND GL_ITEMS-PRCTR IS INITIAL.
               CHECK GL_ITEMS-KOSTL NE WA_ZFSTP-ZKOSTL.
                  CLEAR: G_FLAG.
                  G_FLAG = 'X'.
                  SET CURSOR FIELD 'GL_ITEMS-KOSTL' LINE SY-STEPL.
                  MESSAGE W003(ZZFI) WITH 'Incorrect cost' 'center entered' 'for given' 'financial budget item' DISPLAY LIKE 'E'.
                  EXIT.
            ENDIF.
         ENDLOOP.
       ENDIF. "GL Account
ENDIF. "Amount check
ENDIF. "SY-SUBRC check
ENDIF.
EXPORT G_FLAG FROM G_FLAG TO MEMORY ID 'ZER'.
Please let me know how to make GLaccount,cost center and profit center fields editable.
Regards,
Sangeeta.

Hi.. chaek the below links. may be useful to u.
Making Table control records Editable / Non-editable
Table control with both Editable and non Editable fields
Regards,
KP.

Similar Messages

  • How to make field editable in Tcode WPED

    Hi,
    Its about upgrade of IS Retail from ECC5.0 to ECC6.0.
    For Inbound IDOCS coming from POS to SAP System, IDOCs which are in unprocessed category in WPER Tcode.
    Now problem is in Tcode WPED there is a transaction date field which is now non editable in ECC6.0
    I want to make it modifiable.
    Earlier in ECC5.0 It was editable.
    So how to make that field modifiable.
    Regards,
    Divya

    Thanks Chenna
    But that field is sometimes coming editable and sometimes not.....may be it depends on some condition.....but I want to make it editable always whenever an Inbound IDOC is in "To be processed" status in WPER tcode.
    Iam going in that screen where field is coming uneditable is:
    Tcode WPER -
    > Inbound IDOC processing---> to be processed idocs---> double clicking on Idoc Number (comes on WPED screen with non-editable fields in overview table).
    If I'm double clicking on that transaction date field it goes to the screen whcih shows Sales Audit Editor: Item list of aggregate sales.
    Suggest me how to make it editable.
    bye
    Divya

  • How to make fields editable in an alv tree

    hi
    there is an alv grid for which tree view shud also be made. The cells that are editable in the grid should also be editable in the tree.
    please let me know how to make the specific cells of the tree editable

    after setting the edit field in the field catalogue its bot working.
    i am posting the code snippet.
    please let me know what else should be done and how to add  INPUT field to the fieldcat.
      field-symbols: <fs_fieldcat> type lvc_s_fcat.
      data: l_tabix type sy-tabix.
      data: g_fieldcatalog type lvc_t_fcat,
            wa_fcat like line of g_fieldcatalog.
      data : hide type c value 'X'.
      call function 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'RSTHIE_M'
          i_client_never_display = 'X'
          i_bypassing_buffer     = 'X'
        CHANGING
          ct_fieldcat            = g_fieldcatalog.
    ***-set table header on middle width
      LOOP AT g_fieldcatalog ASSIGNING <fs_fieldcat>.
        <fs_fieldcat>-FIX_COLUMN = 'X'.
        <fs_fieldcat>-edit = 'X'.
      ENDLOOP.

  • How to make field editable in ALV tree in OOPs?

    Hi Gems,
    Again I need help from you all.
    I am writing a program using OOPs and the uotput will be in ALV tree. I need to make a field editable in a perticular row.
    I am doing it using layout but the program is giving error during
    CALL METHOD CL_GUI_CFW=>FLUSH
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2.
    This method is returning sy-subrc = 2 and I am unable to get the output.
    I am using below code to make the field editable:
    DATA: LT_LAYOUT_ITEM TYPE LVC_T_LAYI,
                LS_LAYOUT_ITEM TYPE LVC_S_LAYI.
      LS_LAYOUT_ITEM-FIELDNAME = 'ACPCKTWRT'.     "ACPCKTWRT is the field name in the Internal table
      LS_LAYOUT_ITEM-EDITABLE = 'X'.
      APPEND LS_LAYOUT_ITEM TO LT_LAYOUT_ITEM.
    CALL METHOD G_ALV_TREE->ADD_NODE
        EXPORTING
          I_RELAT_NODE_KEY     = FP_RELAT_KEY
          I_RELATIONSHIP       = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          IS_OUTTAB_LINE       = LS_TMP_FINFCNO                                                "structure of the internal table
         IS_NODE_LAYOUT       =
          IT_ITEM_LAYOUT       = LT_LAYOUT_ITEM                                                "Added layout to make the field editable
          I_NODE_TEXT          = LV_NODE_TEXT                                                      "Node text
        IMPORTING
          E_NEW_NODE_KEY       = FP_NODE_KEY
        EXCEPTIONS
          RELAT_NODE_NOT_FOUND = 1
          NODE_NOT_FOUND       = 2
          OTHERS               = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Please help me and let me know how to get the solution.

    Hello
    The ALV tree control is not intended for making values editable (e.g. see
    [How to make ALV tree columns editable|http://sap.ittoolbox.com/groups/technical-functional/sap-abap/how-to-make-alv-tree-columns-editable-2052414])
    However, if you need an editable tree control then you have to use a different class (e.g. CL_ITEM_TREE_MODEL or CL_COLUMN_TREE_MODEL) but you will not have the ALV functionality of the ALV tree control.
    Regards
      Uwe

  • How to make fields editable in Personal Profile Application(WDA)

    Hi Experts,
    I am not able to make the  passport field field editable in Personal Profile Application.
    The passport field is uneditable. How do we make it editable so that user can enter Identity No.
    Please help.
    Regards,
    Priti

    Hi Priti,
    Do not maintain use case B* - This is not editable.
    Maintain Use case A* - This is editable.
    Did you maintain entries in this below table.
    In this table - V_T7XSSPERSUBTY
    Regards
    Somu

  • How to make field is editable in ALV  CL_SALV_TABLE only)

    Hi,
    How to make field is editable in ALV  CL_SALV_TABLE only)
    Any one has tried to make field si editable by using CL_SALV_TABLE class.
    *I know how to do it in REUSEALV function module and CL_GUI_ALV class.*_
    Please reply only if you riedin CL_SALV_TABLE class method.
    Regards
    Rajesh V
    Moderator message: not supported, please read class documentation and search for previous discussions.
    Edited by: Thomas Zloch on Mar 17, 2011 2:07 PM

    Hi Chad,
    Please refer the link,
    Edit field in alv
    Regards,
    Hema.
    Reward points if it is useful.

  • How to make field ( F110V-LIST1 ) mandatatory in free selection tab of F110

    hi
    How to make field ( F110V-LIST1 ) mandatatory in free selection tab of F110
    regards,
    Billa

    Hi,
    Standard transaction variant is not possible ,i dont want to use as zf110.
    Regards,
    Billa
    Edited by: Billa Mahe on Sep 3, 2010 3:14 PM

  • How to make subforms editable in ADOBE forms

    Hello All,
       The 'Pagination' for few of the subforms are editable, and for few of the subforms are not editable.
    Actaully i have to set the 'overflow' for one subform, but the whole pagination is dispaly mode.
    (i can edit pagination for other subforms).
    can someone help how to make it editable.
    Thanks in advance
    Best Regards,
    Amarender Reddy B

    Hello Amar,
    Can please explain the problem you are facing with more clearer words. I am unable to make out any thing from this post.
    You might have some problem with Pages. We have two type of pages body and master. If a perticular subform is there in master page you can not edit it on the body page.
    Regards,
    Vikash

  • How to make cell editable alv in WebDynpro for ABAP?

    I make Column editable ALV.(See under source code)
    But I can't make Cell editable ALV.
    How to make Cell editable ALV in WebDynpro for ABAP?
    and..how to get changed data?
    DATA: l_value TYPE REF TO cl_salv_wd_config_table.
      l_value = l_ref_interfacecontroller->get_model( ).
    * { EDITABLE
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_input_field     TYPE REF TO cl_salv_wd_uie_input_field,
            lr_column          TYPE REF TO cl_salv_wd_column.
      lr_column_settings ?= l_value.
      lr_column = lr_column_settings->get_column( 'TOTAL_COUNT' ).
      CREATE OBJECT lr_input_field
        EXPORTING
          value_fieldname = 'TOTAL_COUNT'.
      lr_column->set_cell_editor( lr_input_field ).
      DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
      lr_table_settings ?= l_value.
      lr_table_settings->set_read_only( abap_false ).

    the code seems to be correct....but where are you writing it?
    put the code in the wddoinit method and it should work.
    have a look at this article..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1

  • How to make separately editable blocks in one widget?

    How to make separately editable blocks (Width, Height, BGColor,...) in one widget?

    There's an example widget for a 5x5 table which allows you set the color of different areas differently.
    Download the sample files at the bottom of the MUCOW documentation page:
    MuCow Documentation
    The sample named 'Table5x5.mucow' sets different parts of the widgets to different colors.

  • How to make fields required in an updateble multi line form?

    How to make fields required in an updateble multi line form?

    You need to create a validation item that is triggered when the user clicks the submit button.
    Set the validation type to "Function Returning Error Text".
    Then add your validation into the "Validation Expression 1" field. Something like:
    BEGIN
    FOR I IN 1.. HTMLDB_APPLICATION.G_F02.COUNT LOOP
    IF HTMLDB_APPLICATION.G_F02(I) IS NULL THEN
    RETURN 'Please enter in a value for xxxxx on line ' || TO_CHAR(I,'0');
    END IF;
    END LOOP;
    RETURN NULL;
    END;
    As long as the function returns a string, an error is generated - as there is no single field where this error can be displayed, it will need to be displayed "On Error Page".
    If the return value is NULL, then the fields are valid and the submit process can continue.
    Andy

  • How to make lookup editable

    Hi All,
    In my instance MTL_RELATIONSHIP_TYPES lookup is disabled for editing , how to make it editable?
    Any profile options?
    Please help
    Thanks,

    Verify you are not in read only responsiblity.

  • How to make fields mandatory in cost center

    Hi Sap Experts,
    How to make fields mandatory in cost center.
    Please give me advise.
    Regards,
    Raj

    If you want to make "Profit Center" field as mandatory, then OBA5 transaction code
    Application Area - KS
    Number 096
    make this as error for online and batch input. Then profit center will become mandatory.

  • How to make fields Non Editable in Web ADI

    Hi All,
    Can you please let me know how we can make fields Non Editable in Web ADI?
    Thanks,
    Anil

    Hi,
    Are you trying to make required parameters readonly and does this variable have different values for each row. If not then I would suggest you use a wrapper for the API and get only parameters that you need from the excel sheet and the use the wrapper to send the other read only values.
    Thanks

  • How to make non editable field after requestor created the shoping cart

    Hi,
    i need to make non editable field (Price field) after requester created the shooping cart.The field should be  non editable only for requster .
    this i need to make when workflow triggers when the buyer sends  back the shopping cart to requester.
    one solution which i found:depend on the status of the shoping cart
    but i dont know whether it is correct way.
    if not please suggest me the solution.

    Hi,
    You can implement the BADI" BBP_UI_CONTROL_BADI".
    You can check for the role of the user who has logged in(e.g. for user REQUESTER,there will be a distinct role to idnetify that the user is a requester) and then acc set the display properties for the field PRICE.
    For sample code pls refer the foll links:
    Sample code for BBP_UI_CONTROL_BADI
    Re: Hiding Shopping Cart Fields in SRM 3.0
    Re: How to Hide the attributes from template BBPSC01?
    Re: How to validating total value in shopping cart
    Re: Price filed in Shopping cart should be in display mode
    BR,
    Disha.

Maybe you are looking for

  • Mac mini 2010 start up stuck at greay screen

    Just purchased a brand new Mac mini this past weekend. 2.4 GHz, 320 hard drive. Updated to 10.6.6, migrated files from an eMac. Everything was working fantastic. Then played a Star Trek game (Elite Force II) and the disc froze. Had to shut down. Coul

  • Oracle Patch for 10.2

    Hi, We were installed Oracle 10.2 on windows OS with  X64 processor. To apply the patches we have downloaded : 5103679_4: ORACLE RDBMS Patch 10.2.0.4 Windows Server on x64 64bit which is around 9 KB in size. But when we unzipped the same, there is no

  • Applescript: file size not recognized as changed in script

    This is difficult for me to explain. I'm trying to delay the start of a Folder Action because it's starting before the file has time to finish writing.  So I've written a script to try and sample the file size, wait a few seconds then sample the file

  • I am using a windows 7 home premium desktop 64 bit

    At present I am using a HP pavilion Elite desktop PC, windows 7 64 bit, I am not sure if I should upgrade this or just buy a new windows 8, I purchased a windows 8 Notebook for my spouse but found it lacking in that it does not come with media center

  • Adobe CS3Clean Script for Windows

    I have downloaded and unzipped the file located at: http://www.adobe.com/support/contact/cs3clean.html English/Japanese Download the Adobe CS3Clean Script for Windows (ZIP, 978 KB) Each time I extract the files, the AdobeCS3CleanReadMe.pdf will not o