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

Setting screen field attributes

Hello ,

I am working on a code where I am required to set the field attribute to

Output Only OR Input possible depending upon certain conditions.

Does anyone know how to go about to get this functionality ?

I have a vivid idea that we will have to access the attributes in the PBO module of the screen but how ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jan 10, 2013 at 01:56 PM

    Hi,

    You need to use the loop at screen command in the PBO.

    Have a look here :

    http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_SCREEN.htm

    http://help.sap.com/abapdocu_70/en/ABAPMODIFY_SCREEN.htm

    Rgds,

    Jeroen.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2013 at 01:57 PM

    (FAQ) Start with LOOP AT SCREEN and MODIFY SCREEN online help. (or press F1 on abap source)

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2013 at 02:37 PM

    Hi Shubhendu,

    We can set the field I/O dynamically. If you are working specifically with module pool programming, could you please give a brief desciption of the issue being faced.

    You can try the below code and check output for your reference

    " when you check a single check box - the other two will get disabled.

    tables screen.

    parameters: w1 as checkbox modif id 1 user-command flag,
    w2 as checkbox modif id 2 user-command flag1,
    w3 as checkbox modif id 3 user-command flag2.

    at selection-screen output.

    IF w1 = 'X' .
    loop at screen.
    if screen-group1 = '2' or screen-group1 = '3'.
    screen-input = '0'.
    endif.
    modify screen.
    endloop.



    elseif w2 = 'X'.

    loop at screen.
    if screen-group1 = '1' or screen-group1 = '3'.
    screen-input = '0'.
    endif.
    modify screen.
    endloop.


    elseif w3 = 'X'.

    loop at screen.
    if screen-group1 = '1' or screen-group1 = '2'.
    screen-input = '0'.
    endif.
    modify screen.
    endloop.

    ENDIF.

    For more information you can refer

    http://help.sap.com/saphelp_470/helpdata/en/d1/801c54454211d189710000e8322d00/content.htm

    http://help.sap.com/saphelp_470/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm

    Please let me know if this helps. Let me know in case of any issue.

    Regards

    Vivek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2013 at 02:41 PM

    Thanks Jerome , Raymond and Vivek.

    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.