Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

'Keep' button on popup

former_member591546
Participant
0 Likes
943

Hi everybody!

I need a FM or method to display a text in a popup, but that must contain the "Keep" button, such as extended search help.

Like this:

How can i do this?

Thanks on advance!

Emanuel Hernández

8 REPLIES 8
Read only

former_member591546
Participant
0 Likes
845

Nothing for this?

Thanks in advance to who can help me.

Read only

0 Likes
845

Hi

Typically every icon will have a ID assigned in ICON table... try to pass the ID from the ICON table on to the button text and see if that can be achieved.

Read only

0 Likes
845

Hi Emanuel,

create search help, play around with search help exit - standard search help exit function is well documented.

Regards,

Clemens

Read only

Former Member
0 Likes
845

And what do you want to happen when you press this "keep" button? The keep function on search helps is very specific to search helps. What would it do in a FM to display text?

Rob

Read only

0 Likes
845

Thanks guys.

Rob: i need to display some info and hold it on front, such like 'keep button' does.

I'll try their chances today.

Thanks again.

Read only

0 Likes
845

Well, I think the answer to your question is "no". You'll have to write this yourself.

Rob

Read only

0 Likes
845

Hi Emanuel,

ah, may be know I understand:

If you use a dialog box (CL_GUI_DIALOG_BOX_CONTAINER), it will stay in foreground until closed. You can place an edit control in the dialog box, but yolu will need a handler for close it, i.e. like

DATA:
  go_dialogbox  TYPE REF TO cl_gui_dialogbox_container,
  go_editor     TYPE REF TO cl_gui_textedit.

CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      close
        FOR EVENT close
        OF cl_gui_dialogbox_container.
ENDCLASS.                    "lcl_event_receiver DEFINITION

CLASS lcl_event_receiver IMPLEMENTATION.
  METHOD close.
    CALL METHOD go_editor->free.
    FREE go_editor.
    CALL METHOD go_dialogbox->free.
    FREE go_dialogbox.
* finally flush
    CALL METHOD cl_gui_cfw=>flush
      EXCEPTIONS
        OTHERS = 1.
  ENDMETHOD." close
ENDCLASS.

FORM showcontent  USING    pt_data TYPE table.
  IF go_dialogbox IS INITIAL.
    CREATE OBJECT go_dialogbox
       EXPORTING
         width                       = 800
         height                      = 300
       top                         = 50
       left                        = 100
       caption                     = 'Goil!'.
    SET HANDLER lcl_event_receiver=>close FOR go_dialogbox.
  ENDIF." go_dialogbox is initial.

  IF go_editor IS INITIAL.
    CREATE OBJECT go_editor
      EXPORTING
        parent                     = go_dialogbox
        wordwrap_mode              = cl_gui_textedit=>wordwrap_off
        wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
  ENDIF.
  CALL METHOD go_editor->set_toolbar_mode
    EXPORTING
      toolbar_mode = go_editor->true.
  CALL METHOD go_editor->set_statusbar_mode
    EXPORTING
      statusbar_mode = go_editor->true.
* Set edit mode
  CALL METHOD go_editor->set_readonly_mode.
*   send table to control
  CALL METHOD go_editor->set_font_fixed
    EXPORTING
      mode = cl_gui_textedit=>true.
  CALL METHOD go_editor->set_text_as_r3table
    EXPORTING
      table = pt_data.
* finally flush
  CALL METHOD cl_gui_cfw=>flush
    EXCEPTIONS
      OTHERS = 1.
ENDFORM.                    " showcontent

If you want any special button (like your "HOLD", place it on the toolbar -> see class cl_gui_textedit)

Regards,

Clemens

Read only

former_member591546
Participant
0 Likes
845

Thanks Clemens, I finally solved it. I use a dialog box such you said, and, with class CL_GUI_TOOLBAR, I put the button i want. But I had to write the code myself.

Thanks everybody.