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

Add custom container in selection screen?

former_member194669
Active Contributor
0 Likes
3,433

Hi,

I have requirement to display a text length (50) characters in BOLD letters in the selection screen.

(I know this is not possible....)

Anybody have info how to do this.

I am thinking if i place a custom container in the selection screen, then i can display letters in BOLD?

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
1,664

You can try something like this. Here I'm attaching a docking container on the bottom of the selection screen, and using an HTML viewer inside the docking. You would need to create your own HTML document with the specific HTML tags and text that you want, and then upload to SMW0 transaction as an HTML template, then use this document id in the program.




zREPORT  rich_0001.


DATA: dockingbottom  TYPE REF TO cl_gui_docking_container,
      html_viewer     TYPE REF TO cl_gui_html_viewer,
      repid TYPE syrepid.
DATA v_url TYPE bapibds01-uri.

PARAMETERS: p_check TYPE c,
            p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
            p_rad2 RADIOBUTTON GROUP grp1,
            p_rad3 RADIOBUTTON GROUP grp1.

START-OF-SELECTION.

AT SELECTION-SCREEN OUTPUT.


  repid = sy-repid.

  CHECK dockingbottom IS INITIAL.

  CREATE OBJECT dockingbottom
    EXPORTING
      repid     = repid
      dynnr     = sy-dynnr
      side      = dockingbottom->dock_at_bottom
      extension = 300.

  CREATE OBJECT html_viewer
    EXPORTING
      parent = dockingbottom.


* This document_id is the document upload via transaction SMW0 as
* an HTML template
  html_viewer->load_html_document(
     EXPORTING  document_id  = 'HTMLCNTL_CNHTTST1_START'
     IMPORTING  assigned_url = v_url ).

  html_viewer->show_url( EXPORTING url = v_url ).

Regards,

Rich Heilman

Hi,

I have requirement to display a text length (50) characters in BOLD letters in the selection screen.

(I know this is not possible....)

Anybody have info how to do this.

I am thinking if i place a custom container in the selection screen, then i can display letters in BOLD?

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
1,665

You can try something like this. Here I'm attaching a docking container on the bottom of the selection screen, and using an HTML viewer inside the docking. You would need to create your own HTML document with the specific HTML tags and text that you want, and then upload to SMW0 transaction as an HTML template, then use this document id in the program.




zREPORT  rich_0001.


DATA: dockingbottom  TYPE REF TO cl_gui_docking_container,
      html_viewer     TYPE REF TO cl_gui_html_viewer,
      repid TYPE syrepid.
DATA v_url TYPE bapibds01-uri.

PARAMETERS: p_check TYPE c,
            p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
            p_rad2 RADIOBUTTON GROUP grp1,
            p_rad3 RADIOBUTTON GROUP grp1.

START-OF-SELECTION.

AT SELECTION-SCREEN OUTPUT.


  repid = sy-repid.

  CHECK dockingbottom IS INITIAL.

  CREATE OBJECT dockingbottom
    EXPORTING
      repid     = repid
      dynnr     = sy-dynnr
      side      = dockingbottom->dock_at_bottom
      extension = 300.

  CREATE OBJECT html_viewer
    EXPORTING
      parent = dockingbottom.


* This document_id is the document upload via transaction SMW0 as
* an HTML template
  html_viewer->load_html_document(
     EXPORTING  document_id  = 'HTMLCNTL_CNHTTST1_START'
     IMPORTING  assigned_url = v_url ).

  html_viewer->show_url( EXPORTING url = v_url ).

Regards,

Rich Heilman

Read only

0 Likes
1,664

Rich,

You saved my day. That works well.

Thanks