Set Titlebar

I have created a program for a normal interactive list.
Initially I have set the title of the program through program attributes.
The title is being displayed in the selection screen and also the basic list.
Now when I go to a secondary list i want to change the title.
For this I have used 'SET TITLEBAR title.' in the AT USER-COMMAND event.
where title is a string variable containing the title. 
When i check the syntax, it doesnt give any error, but when i activate and execute the program and switch to the secondary list the title bar for basic list in being displayed (set in prog attributes) in the secondary list also.
Can anybody help in this regard.....

Hi,
As it is normal intercative list I would like to suggest you to use Event---
TOP-OF-PAGE DURING LINE-SELECTION. for Displaying Secondary list tilte.
And for Basic list you can Use TOP-OF-PAGE event.
For Details-Check this sample code-
http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=436
You also check this link-
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba2eb35c111d1829f0000e829fbfe/content.htm

Similar Messages

  • Regarding SET TITLEBAR in normal ABAP report

    Hi All,
        I  wnat to know the  use of SET TITLEBAR command in ABAP report . i have searched the forum but i am not find any sutable answers.
    for what purpose we  use the SET TITLEBAR in normal ABAP report.
    Regards
    CB

    SET TITLEBAR - Liste
    Syntax
    SET TITLEBAR title [OF PROGRAM prog]
                       [WITH text1 ... text9].
    Extras:
    1. ... OF PROGRAM prog
    2. ... WITH text1 ... text9
    Effect
    During list processing, this statement sets the GUI title, specified in title, for the display window of the current list level and all following list levels up to the next statement SET TITLEBAR. The statement has - for the most part - the same syntax and semantics as for screens.
    In contrast to the screens of dynpros, each list level automatically remains linked to the title set for it. When you return from the display of a higher list level to the display of a lower list level, the latter is displayed with the title that was set for it.
    Check the HELP file of SAP before posting your queries.

  • Setting TitleBar color

    hai
    i am devoloping a chat application
    for this i need to change the color of titlebar to notify the arrival of a message.
    how can i change the color of the TitleBar
    hoping an early reply
    bye

    Hi
    In post 1.4 JDKs Look and Feels let the user choose between a native decoration or a look and feel provided decoration. The method is "setDefaultLookAndFeelDecorated" defined in JFrame.
    If your LnF supports this feature, you may be able to change the color of the title by tweaking the code.
    For an LnF that supports Look and Feel decorations, have a look at: www.incors.com "Alloy LnF"
    Good Luck,
    Behrang S.

  • To set HOTSPOT for a field in ALV-oops and when clecked should call transac

    Hi,
    I need to set HOTSPOT for a field in O/P list using ALV-oops and when clecked should take me to Transaction VA01. Please help....
    Thanks,
    Prabhu

    Hi,
         Please go through this code it may help u.
    REPORT zcls_alv_oops MESSAGE-ID z1.
    TABLES : mara.
    Types Declaration..\
    TYPES :
    BEGIN OF t_mara,
    matnr TYPE matnr,
    mtart TYPE mtart,
    maktx TYPE maktx,
    END OF t_mara,
    BEGIN OF t_marc,
    matnr TYPE matnr,
    werks TYPE werks_d,
    mtart TYPE mtart,
    maktx TYPE maktx,
    END OF t_marc.
    Internal Tables Declaration..\
    DATA :
    i_mara TYPE TABLE OF t_mara,
    i_marc TYPE TABLE OF t_marc,
    i_fcat1 TYPE lvc_t_fcat,
    i_fcat2 TYPE lvc_t_fcat.
    Constants Declaration..\
    CONSTANTS :
    c_cont1 TYPE scrfname VALUE 'CONT1',
    c_cont2 TYPE scrfname VALUE 'CONT2'.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    SELECT-OPTIONS:
    s_matnr FOR mara-matnr NO INTERVALS.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS :
    p_hotspt RADIOBUTTON GROUP r1 DEFAULT 'X',
    p_bttn RADIOBUTTON GROUP r1.
    SELECTION-SCREEN END OF BLOCK b1.
    \* Class forward referncing.
    CLASS lcl_rcvr_class DEFINITION DEFERRED.
    \* Pointers Declaration..
    DATA :
    lp_rcvr TYPE REF TO lcl_rcvr_class,
    lp_cont1 TYPE REF TO cl_gui_custom_container,
    lp_cont2 TYPE REF TO cl_gui_custom_container,
    lp_grid1 TYPE REF TO cl_gui_alv_grid,
    lp_grid2 TYPE REF TO cl_gui_alv_grid.
    \* Local Class Definiton.
    CLASS lcl_rcvr_class DEFINITION.
    PUBLIC SECTION.
    METHODS :
    hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
    IMPORTING e_row_id e_column_id es_row_no,
    handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
    IMPORTING e_row e_column.
    ENDCLASS.
    \* Local Class Implementation.
    CLASS lcl_rcvr_class IMPLEMENTATION.
    METHOD hotspot_click.
    DATA :
    wa_mara TYPE t_mara,
    wa_marc TYPE t_marc.
    DATA :
    l_index TYPE sy-tabix.
    READ TABLE i_mara INTO wa_mara INDEX e_row_id-index.
    IF sy-subrc EQ 0.
    REFRESH i_marc.
    SELECT matnr
    werks
    INTO TABLE i_marc
    FROM marc
    WHERE matnr EQ wa_mara-matnr.
    IF sy-subrc EQ 0.
    LOOP AT i_marc INTO wa_marc.
    l_index = sy-tabix.
    wa_marc-mtart = wa_mara-mtart.
    wa_marc-maktx = wa_mara-maktx.
    MODIFY i_marc FROM wa_marc INDEX l_index
    TRANSPORTING mtart maktx.
    ENDLOOP.
    CALL SCREEN 200.
    ELSE.
    MESSAGE e121 WITH text-005 wa_mara-matnr.
    ENDIF.
    ENDIF.
    ENDMETHOD.
    METHOD handle_double_click.
    DATA :
    wa_mara TYPE t_mara,
    wa_marc TYPE t_marc.
    DATA :
    l_index TYPE sy-tabix.
    READ TABLE i_mara INTO wa_mara INDEX e_row-index.
    IF sy-subrc EQ 0.
    REFRESH i_marc.
    SELECT matnr
    werks
    INTO TABLE i_marc
    FROM marc
    WHERE matnr EQ wa_mara-matnr.
    IF sy-subrc EQ 0.
    LOOP AT i_marc INTO wa_marc.
    l_index = sy-tabix.
    wa_marc-mtart = wa_mara-mtart.
    wa_marc-maktx = wa_mara-maktx.
    MODIFY i_marc FROM wa_marc INDEX l_index
    TRANSPORTING mtart maktx.
    ENDLOOP.
    CALL SCREEN 200.
    ELSE.
    MESSAGE e121 WITH text-005 wa_mara-matnr.
    ENDIF.
    ENDIF.
    ENDMETHOD.
    ENDCLASS.
    \* Start of Selection
    START-OF-SELECTION.
    \* Extract the Material Master data for the Input Material.
    SELECT a~matnr
    a~mtart
    b~maktx
    INTO TABLE i_mara
    FROM mara AS a
    INNER JOIN makt AS b
    ON a~matnr EQ b~matnr
    WHERE a~matnr IN s_matnr
    AND b~spras EQ sy-langu.
    END-OF-SELECTION.
    IF NOT i_mara\[\] IS INITIAL.
    \* Call Screen to display the Material Master data.
    CALL SCREEN 100.
    ELSE.
    MESSAGE s121 WITH text-006.
    ENDIF.
    \*& Module DISP_GRID OUTPUT
    \* text
    MODULE disp_grid OUTPUT.
    \* Build the Field catelog for Material Master data.
    PERFORM build_fcat.
    \* Display the Material Master data using ALV.
    PERFORM disp_alv.
    ENDMODULE. " DISP_GRID OUTPUT
    \*& Module USER_COMMAND_0100 INPUT
    \* text
    MODULE user_command_0100 INPUT.
    \*when exit or cancel is clicked program has to come out
    CASE sy-ucomm.
    WHEN 'EXIT' OR 'CANC'.
    LEAVE PROGRAM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    \*& Form build_fcat
    \* text
    \* \--> p1 text
    \* <-\- p2 text
    FORM build_fcat.
    DATA : ws_fcat TYPE lvc_s_fcat.
    ws_fcat-fieldname = 'MATNR'.
    ws_fcat-scrtext_m = text-001.
    ws_fcat-tabname = 'I_MARA'.
    IF p_hotspt EQ 'X'.
    ws_fcat-hotspot = 'X'.
    ENDIF.
    APPEND ws_fcat TO i_fcat1.
    CLEAR ws_fcat.
    ws_fcat-fieldname = 'MTART'.
    ws_fcat-scrtext_m = text-002.
    ws_fcat-tabname = 'I_MARA'.
    APPEND ws_fcat TO i_fcat1.
    CLEAR ws_fcat.
    ws_fcat-fieldname = 'MAKTX'.
    ws_fcat-scrtext_m = text-003.
    ws_fcat-tabname = 'I_MARA'.
    APPEND ws_fcat TO i_fcat1.
    CLEAR ws_fcat.
    ENDFORM. " build_fcat
    \*& Form disp_alv
    \* text
    \* \--> p1 text
    \* <-\- p2 text
    FORM disp_alv.
    IF lp_cont1 IS INITIAL.
    \* Create the Container Object of Material Master.
    CREATE OBJECT lp_cont1
    EXPORTING
    container_name = c_cont1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    others = 6 .
    IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    \* Create the Object for Grid of Material Master.
    CREATE OBJECT lp_grid1
    EXPORTING
    i_parent = lp_cont1
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    others = 5.
    IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    \* Dipslay Material Master data by calling method.
    CALL METHOD lp_grid1->set_table_for_first_display
    CHANGING
    it_outtab = i_mara
    it_fieldcatalog = i_fcat1
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4.
    IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    \* Set Handler for the Hot Spot Event.
    CREATE OBJECT lp_rcvr.
    IF p_hotspt EQ 'X'.
    SET HANDLER lp_rcvr->hotspot_click FOR lp_grid1.
    ELSE.
    SET HANDLER lp_rcvr->handle_double_click FOR lp_grid1.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDFORM. " disp_alv
    \*& Module STATUS_0100 OUTPUT
    \* text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'MAIN_STAT'.
    SET TITLEBAR 'T_100'.
    ENDMODULE. " STATUS_0100 OUTPUT
    \*& Module STATUS_0200 OUTPUT
    \* text
    MODULE status_0200 OUTPUT.
    SET PF-STATUS 'PLANT_STAT'.
    SET TITLEBAR 'T_200'.
    ENDMODULE. " STATUS_0200 OUTPUT
    \*& Module DISP_GRID_plant OUTPUT
    \* text
    MODULE disp_grid_plant OUTPUT.
    \* Build the Field catelog for Material Plant data.
    PERFORM build_fcat_plant.
    \* Display the Material Master Plant data using ALV.
    PERFORM disp_alv_plant.
    ENDMODULE. " DISP_GRID_plant OUTPUT
    \*& Module USER_COMMAND_0200 INPUT
    \* text
    MODULE user_command_0200 INPUT.
    \*when exit or cancel is clicked program has to come out
    CASE sy-ucomm.
    WHEN 'EXIT' OR 'CANC'.
    LEAVE PROGRAM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0200 INPUT
    \*& Form build_fcat_plant
    \* text
    \* \--> p1 text
    \* <-\- p2 text
    FORM build_fcat_plant.
    DATA : ws_fcat TYPE lvc_s_fcat.
    ws_fcat-fieldname = 'MATNR'.
    ws_fcat-scrtext_m = text-001.
    ws_fcat-tabname = 'I_MARC'.
    APPEND ws_fcat TO i_fcat2.
    CLEAR ws_fcat.
    ws_fcat-fieldname = 'WERKS'.
    ws_fcat-scrtext_m = text-004.
    ws_fcat-tabname = 'I_MARC'.
    APPEND ws_fcat TO i_fcat2.
    CLEAR ws_fcat.
    ws_fcat-fieldname = 'MTART'.
    ws_fcat-scrtext_m = text-002.
    ws_fcat-tabname = 'I_MARC'.
    APPEND ws_fcat TO i_fcat2.
    CLEAR ws_fcat.
    ws_fcat-fieldname = 'MAKTX'.
    ws_fcat-scrtext_m = text-003.
    ws_fcat-tabname = 'I_MARC'.
    APPEND ws_fcat TO i_fcat2.
    CLEAR ws_fcat.
    ENDFORM. " build_fcat_plant
    \*& Form disp_alv_plant
    \* text
    \* \--> p1 text
    \* <-\- p2 text
    FORM disp_alv_plant.
    IF lp_cont2 IS INITIAL.
    \* Create the Container Object of Material Plant data.
    CREATE OBJECT lp_cont2
    EXPORTING
    container_name = c_cont2
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    others = 6.
    IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    \* Create the Object for Grid of Material Plant data.
    CREATE OBJECT lp_grid2
    EXPORTING
    i_parent = lp_cont2
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    others = 5.
    IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    \* Dipslay Material Plant data by calling method.
    CALL METHOD lp_grid2->set_table_for_first_display
    CHANGING
    it_outtab = i_marc
    it_fieldcatalog = i_fcat2
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4.
    IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDIF.
    ENDIF.
    ELSE.
    \* Call method 'REFRESH_TABLE_DISPLAY' to refresh the grid data.
    CALL METHOD lp_grid2->refresh_table_display.
    ENDIF.
    ENDFORM. " disp_alv_plant

  • Set PF status in popup screen

    Hi ,
    I m creating a ALV report ,in that using set PF status i created push button , in alv output list if i click the push button pop up screen will come in that popup screen it displays the previous PF status, how to add my own PF status in that popup screen
    thanks

    Hi,
    You must have created other screen for the pop up say suppose 9002.
    then we need to write the code in 9002 PBO.
    *&      Module  STATUS_9002  OUTPUT
    *       text
    MODULE status_9002 OUTPUT.
      SET PF-STATUS 'ZNOT3'.
      SET TITLEBAR 'ZTNOT3'.
    ENDMODULE.                 " STATUS_9002  OUTPUT
    Here 'ZNOT3' is is the PF STATUS that ius made according to our need.
    It is recommend that you copy standard status'STANDARD' from function group SALV and modify it accordingly. ALV standard function codes always start with '&'.
    Hope this will help you.
    Thanks,
    Dhanashri.

  • Setting default values for field on screen.

    Hello,
    I am trying to set default value for one of the fields I have on screen when I execute the custom transaction.
    I am doing that in PBO as follows. But the default value is not set for Date field.
    PROCESS BEFORE OUTPUT.
    MODULE PBO_OUT.
    MODULE STATUS_5000.
    *&      Module  STATUS_5000  OUTPUT
          text
    MODULE STATUS_5000 OUTPUT.
      SET PF-STATUS 'NON_SAP_DOCUMENT'.
      SET TITLEBAR '001'.
    ENDMODULE.                 " STATUS_5000  OUTPUT
    *&      Module  PBO_OUT  OUTPUT
          text
    MODULE PBO_OUT OUTPUT.
      ERDAT = SY-DATUM.
    ENDMODULE.                 " PBO_OUT  OUTPUT
    Please help.
    Thanks.
    Regards,
    Rajesh.

    Works Now...

  • How to show a variable at titlebar of alv screen

    Hi,
    I want to say that :
    Data: number type i.
    Number  = 100.
    Set TITLEBAR 'ABC' .
    'I want to say'  100 'of'  500 'records have been selected'.
    How can I do that?
    Thanks.

    Declare your TITLEBAR like this way
    and while calling your title bar
    Data: number type i.
    Number = 100.
    data : v_text(2) type c value 'of'.
    data : v_stext(50) type c.
    v_stext = 'records have been selected'.
    set titlebar 'ABC' with number v_text '500' v_stext .

  • Change the parameter in the titlebar

    Hi Everyone,
    I have pop up screen, where in it changes the titlebar accordingly on which grid it is. Now is it possible to pass a variable in the titlebar which keeps changing accordingly based on the columns of the grid.
    Any help will be of great use to me.
    Thanks,
    Prabs.

    Hi
    Insert & in your titlebar, and then when you set it:
    SET TITLEBAR 'XXX' WITH TITLE.
    The system'll replace & with the value in TITLE.
    So:
    If .......
      TITLE = ....
    else.
      TITLE = ....
    endif.
    SET TITLEBAR 'XXX' WITH TITLE.
    If you want to manage more variable part, you can insert &1 &2 ... &5 in titlebar (I believe 5 is max, but i don't remember), and so:
    SET TITLEBAR 'XXX' WITH TITLE1 TITLE2.....
    Max

  • How to set column width in alvgrid

    hi
    how to set column width in alvgrid.
    thanks.

    Hi,
    Check this,
    REPORT  ztest.
    DATA: BEGIN OF i_scarr_tab OCCURS 0.
            INCLUDE STRUCTURE  scarr.
    DATA: END OF i_scarr_tab.
    DATA: i_scarr LIKE TABLE OF i_scarr_tab WITH HEADER LINE,
          w_scarr LIKE LINE OF i_scarr_tab.
    DATA: o_grid      TYPE REF TO cl_gui_alv_grid,
          o_container TYPE REF TO cl_gui_custom_container.
    DATA: lt_fcat     TYPE lvc_t_fcat,
          ls_layo     TYPE lvc_s_layo,
          ls_sort     TYPE lvc_s_sort,
          lt_sort     TYPE lvc_t_sort,
          ls_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    START-OF-SELECTION.
      CALL SCREEN 9000.
    *&      Module  status_9000  OUTPUT
          text
    MODULE status_9000 OUTPUT.
      SET PF-STATUS '9000'.
      SET TITLEBAR '9000'.
    ENDMODULE.                 " status_9000  OUTPUT
    *&      Module  user_command_9000  INPUT
          text
    MODULE user_command_9000 INPUT.
      CASE sy-ucomm .
        WHEN 'BACK' OR 'EXIT'.
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.
    ENDMODULE.                 " user_command_9000  INPUT
    *&      Module  init_9000  OUTPUT
          text
    MODULE init_9000 OUTPUT.
      IF o_container IS INITIAL.
        SELECT * FROM scarr INTO CORRESPONDING FIELDS OF TABLE
           i_scarr UP TO 100 ROWS.
        IF cl_gui_alv_grid=>offline( ) IS INITIAL.
    Create a custom container control for ALV Control
          CREATE OBJECT o_container
              EXPORTING
                  container_name = 'CONTROL'.
    Create a ALV Control
          CREATE OBJECT o_grid
              EXPORTING i_parent = o_container.
          PERFORM build_field_catalgue.
          ls_layo-sel_mode = 'A'.
          CALL METHOD o_grid->set_table_for_first_display
            EXPORTING
              i_save          = 'A'
              i_default       = 'X'
              is_layout       = ls_layo
            CHANGING
              it_outtab       = i_scarr[]
              it_fieldcatalog = lt_fcat
              it_sort         = lt_sort[].
        ENDIF.
      ENDIF.
    ENDMODULE.                 " init_9000  OUTPUT
    *&      Form  build_field_catalgue
          text
    -->  p1        text
    <--  p2        text
    FORM build_field_catalgue .
      DATA: ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-cprog
          i_internal_tabname     = 'I_SCARR_TAB'
          i_structure_name       = 'SCARR'
         i_client_never_display = 'X'
        CHANGING
          ct_fieldcat            = ls_fieldcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
        MESSAGE 'FCAT Error' TYPE 'I'.
        EXIT.
      ENDIF.
      LOOP AT  ls_fieldcat.
        CLEAR ls_fcat.
        ls_fcat-fieldname = ls_fieldcat-fieldname.     "Fieldname
        ls_fcat-ref_table = ls_fieldcat-tabname.       "DDIC ref struct
        ls_fcat-inttype   = ls_fieldcat-inttype.       "Data type
        ls_fcat-outputlen = ls_fieldcat-outputlen.     "Column width
        ls_fcat-coltext   = ls_fieldcat-seltext_m.     "Column Header
        ls_fcat-seltext   = ls_fieldcat-seltext_m.     "Column Desc
        ls_fcat-ref_field = ls_fieldcat-ref_fieldname. "Reference field
        ls_fcat-ref_table = ls_fieldcat-ref_tabname.   "Reference table
        CASE  ls_fieldcat-fieldname.
          WHEN 'LUGGWEIGHT' OR 'FORCURAM'.
            ls_fcat-edit      = 'X'.
            ls_fcat-do_sum    = 'X'.
          WHEN 'URL'.
            ls_fcat-no_out = 'X'.
          WHEN OTHERS.
            ls_fcat-edit      = ' '.
            ls_fcat-do_sum    = ' '.
        ENDCASE.
        APPEND ls_fcat TO lt_fcat.
      ENDLOOP.
    ENDFORM.                    " build_field_catalgue
    check the programs bcalv_grid*.
    check this link for more detailed example.
    http://www.supinfo-projects.com/fr/2005/alv_display_fr/2/
    Regards
    Sruthi

  • SET TITLE IN MPP

    Hi experts,
    i am working in module pool programing.
    by default screen title is displaying as SAP.
    i want to display my own title using set title .
    can any body tell me how to do this.
    thaks in advance,
    tharangini

    Hi,
    in the PBO event, you type in the instruction
    SET TITLEBAR 'MYTITLE'.
    save your program and make double click on 'MYTITLE'. You get a popup message indicating that the object does not exist. Press yes.
    In the next screen that shows up, you enter the title you want. Save and activate.

  • In interactive how to use AT LINE-SELECTION WITH SET PF-STATUS

    Hi all,
             I am developing an interactive report in which i am using gui status (pf-status ) for AT USER-COMMAND and AT LINE-SELECTION  event .But when i used at line-selection event is  not working with pf-status even though i use PICK function code .
    plz help me to work with both the event i.e.
    AT USER-COMMAND.
    AT LINE-SELECTION.
    Thanks a lot in Advance .
    Regards,
    Tarak

    hi,
      In PBO of Module Pool, Please Write in this way
    MODULE status_9001 OUTPUT.
    Set the PF-STATUS
      SET PF-STATUS '9001'.
    To Set the Title of Screen
      SET TITLEBAR 'TITLE'.
    ENDMODULE
    Setting PF status to the (SAP) system default
    set pf-status 'BASIC'.
    How to check for pf-status
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'ART'.
    PERFORM STYR_ARTSKONTI.
    WHEN 'PST'.
    PERFORM STYR_POSTER.
    WHEN 'BIL'.
    PERFORM VIS_BILAG.
    ENDCASE..

  • Unable to set status for subscreen

    Dear Experts,
    In my subscreen, I want to set the fct code for enter.
    I am not able to set the status so that i can provide the fct code under the standard function keys.
    In my subscreen I have a list of input screen fields, when i enter the first input field and press enter i want to move to the next field.
    Please provide me an alternative so that i can set the status and write the relavant code using set/get cursors.
    Thanks and Regards,
    Kawish.

    hi Kawish
    You only need set a status for main screen at the output event. In this status, you need assign a function code to 'Function Keys'-> this first function button, it`s 'Enter'. you can debug to see it.
    the PAI event of subscreen also will response this function code, then you can control your cursor in PBO, blow code is module of subscreen:
       module status_0101 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
       set cursor field 'LGORT'.
       if lv_flag eq 'X'.
       set cursor field 'WERKS'.
       endif.
    endmodule.                 " STATUS_0101  OUTPUT
    *&      Module  USER_COMMAND_0101  INPUT
    *       text
    module user_command_0101 input.
       case sy-ucomm.
         when '&ENTER'.
           lv_flag = 'X'.
       endcase.
    endmodule.                 " USER_COMMAND_0101  INPUT
    hope can help you.
    regards,
    Archer

  • SET TITLE BAR

    Hello Experts.
    i m facing probel in simple report to set a title bar
    i have 2 t-codes for a report(<b>zinv01</b> and <b>zinv02</b>)
    if user go by zinv01
    report title should be <b>'abc ltd'</b>
    and if user go by zinv02
    report title should be <b>'xyz ltd'</b>
    pls help me on this
    i hv tried in initialization ,at selection screen putput, start-of-selection.
    thanks in advance ...
    points will be rewarded..
    Regards
    Rajan Mehta

    THNKS MAN
    but still i m not getting the title
    following is the test prog i hv created....
    pls see to it .
    report ZVBN1_BDC.
    INITIALIZATION.
    *TXT_001 =
    *set TITLEBAR  'TITLE1' OF PROGRAM SY-REPID WITH 'TEST TITLEBAR'.
    TABLES : mara.
    SELECT-OPTIONS: s_mtart for mara-mtart.
    *IF s_mtart IS   NOT INITIAL.
    *SET PF-STATUS 'STATUS'.
    AT SELECTION-SCREEN .
    *set TITLEBAR  'TITLE1' OF PROGRAM SY-REPID WITH 'TEST TITLEBAR'.
      SET TITLEBAR 'TIT1' OF PROGRAM SY-CPROG.
    ENDIF.
    *if syst-tcode = 'ZTST'.
    set TITLEBAR  'TITLE' ."OF PROGRAM 'Z_TEST'.
    CALL TRANSACTION 'ZTST'.
    ELSEIF syst-tcode = 'ZTST19'.
    **set TITLEBAR  'AAAAAAAAAAAAAA' ."OF PROGRAM 'Z_TEST'.
    SET TITLEBAR 'TITLE'.
    *ENDIF.
    START-OF-SELECTION.
    WRITE / 'rajan'.

  • Translate text in titlebar

    I want to translate text in tiltebar,
    in t-code se41,select title list,but in the screen,the 'translate" is inactive,
    then how to translate text in titlebar?

    Hi
      In SE51 - PBO, You can see the title bar.
    module STATUS_9000 output.
    *  SET PF-STATUS 'xxxxxxxx'.
       SET TITLEBAR 'ABCD'.
       " Other code
    endmodule.                 " STATUS_9000  OUTPUT
      There double click on ABCD, You will get a pop-up and lick ALL TITLES.
      There in the menu path GOTO->TRANSLATION, you can do the translation.
      Finally activate it.

  • Remove / set focus on ALV using objects

    I have a screen with 6 subscreen and 6 customercontainers with each 1 ALV, I have 6 ALV's on the same screen, some of the ALV's are only display, and some are for input, my problem is that each alv have fokus on the first cell I want to remove the fokus in all display alv's, I am using the method "set_current_cell_via_id" to place the fokus in edit cell for the alv's with editable cell's, but how to remove fokus in alv, where only display ?
    Best regards Jørgen Jensen INIT A/S

    Hello Jørgen
    This is one of the rare occasion where I believe that something is NOT possible with SAP.
    You may have a look at my sample report
    ZUS_SDN_SPLITTER_CONTAINER and play around with various methods yet I doubt you will be successful. 
    *& Report  ZUS_SDN_SPLITTER_CONTAINER
    REPORT  zus_sdn_splitter_container.
    **type-pools:  abap.
    TYPES: ty_t_knb1    TYPE STANDARD TABLE OF knb1
                        WITH DEFAULT KEY.
    TYPES: BEGIN OF ty_s_control.
    TYPES: cell    TYPE REF TO cl_gui_container.
    TYPES: grid    TYPE REF TO cl_gui_alv_grid.
    TYPES: data    TYPE ty_t_knb1.
    TYPES: row     TYPE lvc_s_row.
    TYPES: layout  TYPE lvc_s_layo.
    TYPES: variant TYPE disvariant.
    TYPES: END OF ty_s_control.
    TYPES: ty_t_control  TYPE STANDARD TABLE OF ty_s_control
                         WITH DEFAULT KEY.
    DATA:
      gs_control       TYPE ty_s_control,
      gt_controls      TYPE ty_t_control.
    DATA:
      gd_repid         TYPE syst-repid,
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
    **  go_cell          TYPE REF TO cl_gui_container,
    **  go_grid          TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gd_msg           TYPE bapi_msg,
      gd_perc          TYPE i,
      gd_lines         TYPE i,
      gd_idx           TYPE i,
      gd_cnt           TYPE i,
      gt_knb1          TYPE STANDARD TABLE OF knb1.
    PARAMETERS:
      p_row    TYPE i  DEFAULT '3',
      p_col    TYPE i  DEFAULT '3'.
    START-OF-SELECTION.
      PERFORM init_controls.
      DESCRIBE TABLE gt_controls.
      gd_lines = syst-tfill.
      SELECT * FROM knb1 INTO TABLE gt_knb1 UP TO 100 ROWS
        WHERE bukrs = '1000'.
      LOOP AT gt_controls INTO gs_control.
        gd_idx = syst-tabix.
        gd_cnt = syst-tabix * 5.
        gd_perc = ( syst-tabix * 100 ) / gd_lines.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            percentage       = gd_perc
    *       TEXT             = ' '
        gs_control-data = gt_knb1.
        DELETE gt_knb1 INDEX 1.
        "   Set individual layout and variant
        gs_control-layout-cwidth_opt = abap_true.
        gs_control-layout-zebra      = abap_true.
        gs_control-layout-no_toolbar = abap_true.
        gs_control-layout-smalltitle = abap_true.
        gs_control-row-index = gd_idx.
        WRITE gd_idx TO gs_control-layout-grid_title NO-ZERO.
        CONDENSE gs_control-layout-grid_title NO-GAPS.
        CONCATENATE gs_control-layout-grid_title
                    '. Customer'
          INTO gs_control-layout-grid_title.
        CALL METHOD gs_control-grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'KNB1'
            is_layout        = gs_control-layout
            i_save           = 'A'
            is_variant       = gs_control-variant
          CHANGING
            it_outtab        = gs_control-data
          EXCEPTIONS
            OTHERS           = 4.
        IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF ( gd_idx > 1 ).
          CALL METHOD gs_control-grid->set_current_cell_via_id
            EXPORTING
              is_row_id = gs_control-row.
          CALL METHOD gs_control-grid->refresh_table_display
    *        EXPORTING
    *          IS_STABLE      =
    *          I_SOFT_REFRESH =
    *        EXCEPTIONS
    *          FINISHED       = 1
    *          others         = 2
          IF sy-subrc <> 0.
    *       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ENDIF.
        MODIFY gt_controls FROM gs_control INDEX gd_idx.
      ENDLOOP.
      gd_msg = gd_lines.
      CONDENSE gd_msg NO-GAPS.
      CONCATENATE gd_msg 'grids displayed on single screen.'
        INTO gd_msg
        SEPARATED BY space.
      MESSAGE gd_msg  TYPE 'S'.
    * Link the docking container to the target dynpro
      gd_repid = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  INIT_CONTROLS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM init_controls .
    * define local data
      DATA:
        ld_column  TYPE i,
        ls_control TYPE ty_s_control.
      REFRESH: gt_controls.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL METHOD go_docking->set_extension( 99999 ).
    * Create splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = p_row
          columns           = p_col
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DO p_col TIMES.
        ld_column = syst-index.
        DO p_row TIMES.
    * Get cell container
          CLEAR: ls_control.
          CALL METHOD go_splitter->get_container
            EXPORTING
              row       = syst-index
              column    = ld_column
            RECEIVING
              container = ls_control-cell.
    *   Create ALV grid
          CREATE OBJECT ls_control-grid
            EXPORTING
              i_parent          = ls_control-cell
            EXCEPTIONS
              OTHERS            = 5.
          IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          APPEND ls_control TO gt_controls.
        ENDDO.  " rows
      ENDDO.  " columns
    ENDFORM.                    " INIT_CONTROLS
    Regards
      Uwe

Maybe you are looking for