Skip to Content
author's profile photo Former Member
Former Member

Block edit field in View Maintenance

Hello all!!

I have a problem in view of maintenance I need to make a field that is not key is locked for editing if it is completed, but that when you insert a new row is possible to add data in the field. It would be the same resource that exists today for a key field, but I'll not be key in the table.

Any tips?

Thanks!!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2013 at 04:14 PM

    Hi,

    you can try to work on attribute fields on function group about your custom table.

    Is important that your function group is active only this custom table.

    Cheers

    Ivan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2013 at 04:19 PM

    Hi

    I believe you need to change the abap code generated for maintenance program: you can add a your new logic in PBO in order to manage the field characteristics.

    You can try to check the variable status-action in order to understand in which status you are (display, change, new....)

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2013 at 04:20 PM

    Hi Claudio

    Please acess the code of this maintenace and in se80 click in your screen next click in LAYOUT

    and will be appears the screen .Edit the screen and double click in your filed will show the configuration filed

    ,in first property GROUP you must type KEY and save and active.

    I think its a solution.

    Add a comment
    10|10000 characters needed characters exceeded

    • OK OK.

      I did debug my sm30 teste and i see in PBO :

      I crested a module z_test inside the table control loop.

      PROCESS BEFORE OUTPUT.

      MODULE LISTE_INITIALISIEREN.

      LOOP AT EXTRACT WITH CONTROL

      TCTRL_ZTESTE12 CURSOR NEXTLINE.

      module z_test.

      MODULE LISTE_SHOW_LISTE.

      ENDLOOP.




      In this mode when I debug i see in the TCTRL_ZTESTE12 exist the structures with field ,columns names see attach files

      In structure with my name field i change the property INPUT AND WORKED ,THE FIELD HAS NO EDITABLE.


      yOU CAN THIS BY CODE INSIDE THE LOOP YOU MUST CREATE A MODULE INSIDE A LOOP AND INSERT A CODE TO READ THE STRUCTURE AND CHANGE THE VALUE INPUT WHEN NECESSARY.



      sEE ATTACHEDS



      sm302.png (132.3 kB)
      SM301.png (93.6 kB)
  • Posted on Dec 10, 2013 at 01:27 PM

    Hi Claudio.

    I analyzed the problem again and managed to do what you want.

    On your screen SM30 locate the field you want to block and place on your group2 MOB value.

    Then create a module inside the loop of the table control in PBO and enter the code:

    LOOP AT SCREEN.

    IF screen-group2 = 'MOB'.

    screen-input = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.


    IF sy-ucomm = 'NEWL'.

    LOOP AT SCREEN.

    screen-input = 1.

    MODIFY SCREEN.

    ENDLOOP.

    ENDIF.



    Its very simple .

    Hope helped you.😉

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.