Skip to Content
-1

How to create pushbutton with dynamic function?

Aug 08, 2017 at 02:32 PM

74

avatar image

Hi, all!

I am solving the following problem.

I have a one field and a few buttons (pushbuttons). I need a dynamic buttons. This means - in case I click on a button, the button copy its contents into field directly.

Thx for your help! ;-)

10 |10000 characters needed characters left characters exceeded

What is the contents of a button?

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Bertrand DELVALLEE Aug 09, 2017 at 07:39 AM
0

Hello,

You should have a look in SE80 on package SABAPDEMOS. You will find there a lot of useful samples. For example programs DEMO_DYNPRO_PUSH_BUTTON, DEMO_SEL_SCREEN_FUNCTION_KEY or DEMO_SEL_SCREEN_PUSHBUTTON.

On a selection screen you could do something like that :

PARAMETERS p_fill(10).
SELECTION-SCREEN :
BEGIN OF BLOCK b1 WITH FRAME,
   BEGIN OF LINE,
      PUSHBUTTON 2(10) butd USER-COMMAND del1,
      PUSHBUTTON 15(10) but1 USER-COMMAND p1,
      END OF LINE,
      END  OF BLOCK b1.

AT SELECTION-SCREEN.
  CASE sy-ucomm.
    WHEN 'DEL1'.
      CLEAR p_fill.
    WHEN 'P1'.
      CONCATENATE p_fill '1' INTO p_fill.
  ENDCASE.

Best regards

Bertrand

Share
10 |10000 characters needed characters left characters exceeded
Richard Harper Aug 08, 2017 at 02:39 PM
0

Report screen, Dialog or ALV ?

Are yo talking about the buttons text ?

Share
10 |10000 characters needed characters left characters exceeded
Jan Strakos Aug 09, 2017 at 07:06 AM
0

Report screen.


screen.png (5.0 kB)
Share
10 |10000 characters needed characters left characters exceeded
Jan Strakos Aug 09, 2017 at 07:55 AM
0

Problem was solved. Thx ;-)

Share
10 |10000 characters needed characters left characters exceeded