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

Hiding of input field in subscreen

Hi Expertise,

I have to hide some input fields of sub screen after clicking on push button.

related content should display.

IN PBO of subscreen, i have written code which is working for hiding.

other code i have written In PAI of subscreen to display all text field

and input field. which is not working ..

Pbo.

LOOP AT SCREEN.
IF SCREEN-group1 = 'GRP'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.

PAI.

IF SY-UCOMM = 'GO'.
LOOP AT SCREEN .

IF SCREEN-NAME = 'STUD_ID'.
SCREEN-OUTPUT = 1.
SCREEN-ACTIVE = 1.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.

IF SCREEN-NAME = 'ZSTUD_ADD-STUD_ID'.
SCREEN-OUTPUT = '1'.
SCREEN-ACTIVE = '1'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.

IF SCREEN-NAME = 'ZSTUD_ADD-STUD_ADD'.
SCREEN-OUTPUT = 1.
SCREEN-ACTIVE = 1.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.

MODIFY SCREEN .

ENDLOOP.
ENDIF.



Please help me out .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jul 28, 2014 at 09:47 AM

    Hi Priyaranan,

    Please do the change in INVISIBLE attribute as shown below.

    LOOP AT SCREEN .

    IF SCREEN-NAME = 'STUD_ID'.

    SCREEN-OUTPUT = 1.

    SCREEN-ACTIVE = 1.

    * SCREEN-INVISIBLE = 1.

    SCREEN-INVISIBLE = 0.

    MODIFY SCREEN.

    ENDIF.

    IF SCREEN-NAME = 'ZSTUD_ADD-STUD_ID'.

    SCREEN-OUTPUT = '1'.

    SCREEN-ACTIVE = '1'.

    * SCREEN-INVISIBLE = '1'.

    SCREEN-INVISIBLE = 0.

    MODIFY SCREEN.

    ENDIF.

    IF SCREEN-NAME = 'ZSTUD_ADD-STUD_ADD'.

    SCREEN-OUTPUT = 1.

    SCREEN-ACTIVE = 1.

    * SCREEN-INVISIBLE = 1.

    SCREEN-INVISIBLE = 0.

    MODIFY SCREEN.

    ENDIF.

    MODIFY SCREEN .

    Regards

    Rajkumar Narasimman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 28, 2014 at 10:00 AM

    Hi Priyaranjan,

    any screen modification can only be done on the PBO.

    you need to move the PAI codes to PBO.

    Thanks,

    Jyoti

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2014 at 10:00 AM

    Hello PRIYARANJAN,

    Try this.

    Global variable.

    data gv_hide.

    In PAI

    if sy-ucomm = 'GO'.

    gv_hide = 'X'.

    endif.

    In PBO

    IF gv_hide = 'X'

    LOOP AT SCREEN.
    IF SCREEN-group1 = 'GRP'.
    SCREEN-INPUT = '0'.
    SCREEN-INVISIBLE = '1'.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.

    ENDIF


    I hope you help.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2014 at 10:03 AM

    Hi priya


    PROCESS BEFORE OUTPUT

    module change_screen.




    ______________________________________________


    module change_screen output.


    if sy-ucom = <button_name>

    loop at screen.

    if screen-name = <field_name>.

    screen-active = 0.

    screen-invisible = 1.

    modify screen.

    endif.

    endloop.

    endif.

    endmodule.



    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.