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

How to disable push button in module pool

i have a screen having a push button having two lables.

That is first time when i enter the bill no. & press enter , then PRINT button appear.

when the same bill no i enter again, it shows REPRINT on the same push button.

I have to disable the REPRINT button.

Means it won't allow to reprint the same bill no.

How can i do this.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2012 at 06:19 AM

    Hello Ritesh,

    You have to put validation on screen. When you enter bill number at very first time and press enter means its going into screen's PAI event and then again going back to PBO event and then display's the screen with push button.

    So you have to add validation code in PBO event if that bill is already printed or not.

    in PBO.

    module validation output.

    if set_flag = 'X'.

    loop at screen.

    if screen-name = 'Pushbuton'.

    screen-disable = 'X'.

    modify screen.

    endif.

    endloop.

    endif.

    endmodule.

    In PAI.

    module set_flag.

    set_flag = 'X'.

    endmodule.

    Thanks,

    Nilima

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Ritesh,

      you have to add flag in PAI, set_flag = 'X'. This flag is to print billing document only once. So its need's to set in PAI. After that write condition in PBO as

      module validation output.

      if set_flag = 'X'.

      loop at screen.

      if screen-name = 'Pushbuton'. " your pushbutton name on screen

      screen-active = 0.

      modify screen.

      endif.

      endloop.

      clear set_flag .

      endif.

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.