Width of grid disp. using CL_GUI_DOCKING_CONTAINER

Hi,
I am using CL_GUI_DOCKING_CONTAINER for grid display in the same selection screen. I am getting the output. But i am not able to reduce the width of the grid. It is taking the entire screen space below. I have tried changing ratio and extension of the object. I have also tried reducing the width using set_width and set position methods. When I use these methods, the only height of the grid is changing. Its not showing effect on the width(horizontal space occupied on screen) of the grid. The code is as below.
    create object lv_docking </b>
      exporting</b>
*        parent                      =</b>
        repid                       = sy-cprog</b>
        dynnr                       = sy-dynnr</b>
        side                        = cl_gui_docking_container=>adust_design_false</b>
"dock_at_bottom</b>
*        extension                   = 5</b>
*        style                       =</b>
*        lifetime                    = lifetime_default</b>
*        caption                     =</b>
*        metric                      = 0</b>
        ratio                       = 70</b>
*        no_autodef_progid_dynnr     =</b>
        name                        = 'DOCK_CONT'.</b>
*      EXCEPTIONS</b>
*        cntl_error                  = 1</b>
*        cntl_system_error           = 2</b>
*        create_error                = 3</b>
*        lifetime_error              = 4</b>
*        lifetime_dynpro_dynpro_link = 5</b>
*        others                      = 6</b>
    if sy-subrc <> 0.</b>
     message id sy-msgid type sy-msgty number sy-msgno</b>
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.</b>
    endif.</b>
    check lv_list is initial.</b>
    try.</b>
        lv_container ?= lv_docking.</b>
    call method cl_salv_table=>factory</b>
      exporting</b>
        list_display   = if_salv_c_bool_sap=>false</b>
        r_container    = lv_container</b>
        container_name = 'DOCK_CONT'</b>
      importing</b>
        r_salv_table   = lv_list</b>
      changing</b>
        t_table        = me->it_output.</b>
     catch cx_salv_msg .</b>
    endtry.</b>
if sy-subrc <> 0.</b>
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO</b>
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.</b>
endif.</b>
CALL METHOD lv_docking->set_position</b>
  EXPORTING</b>
    height            = 200</b>
    left              = 05</b>
    top               = 200</b>
   width             = 10000</b>
  EXCEPTIONS</b>
    cntl_error        = 1</b>
    cntl_system_error = 2</b>
    others            = 3 .</b>
So please suggest me some method to reduce the width of the container. I also need to make the ALV displayed through this as EDITABLE. pls let me know if it is possible..</b>
Thanks and Regards,</b>
Avinash Bolisetty</b>
Edited by: Avinash Bolisetty on May 11, 2010 8:01 AM

Hi ,
I am able to make it work with cl_gui_alv_grid. I can now make it editable now. Many thanks for that input.
can some one please say how to reduce to width of the grid displayed in the selection screen using 'CL_GUI_DOCKING_CONTAINER'. I have tried all the options discussed in previous posts., Only the height is changing but not the width.
Thanks and Regards,
Avinash Bolisetty

Similar Messages

  • Set cursor alv grid (not using objects)

    I got a question on ALV GRID (not using objects), please let me know if you have pointers. Thanks.
    Output has 2 screens both has different contents. The output is generated using internal table1 and 2 and using FM  'REUSE_ALV_GRID_DISPLAY_LVC'  (both screen use same FM).
    First screen has multiple pages of output (say 10 pages). User scrolled page 5 and line 10 of first screen and then double clicked it takes to screen #2. After completion of screen #2, the back arrow should get back to page 5 and line 10 of screen #1. Currently the back arrow gets to screen#1 page 1 and line 1. How to remember the cursor position in alv grid and instruct the cursor to go there?
    Appreciate the input.
    Note: I tried "set cursor line n" with "Scroll" command but no luck. http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba47e35c111d1829f0000e829fbfe/content.htm

    Thanks for the inputs.
    FYI, I got it implemented using method  CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->set_current_cell_via_id
    The method is called by 'REUSE_ALV_GRID_DISPLAY_LVC' form 'PF_STATUS_SET' when the ALV grid output is presented each time.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_bypassing_buffer       = 'X'
          i_callback_program       = gc_repid
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'
          is_layout_lvc            = lwa_layout
          it_fieldcat_lvc          = git_fc_lvc
          i_default                = ' '
        TABLES
          t_outtab                 = git_data
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      FORM alv_event_pf_status_set USING rt_extab                
                                 TYPE slis_t_extab.
      DATA lo_ref1 TYPE REF TO cl_gui_alv_grid.
    *Get the reference to class "lo_ref1" for the ALV report
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = lo_ref1.
    *set the focus of cursor in ALV
      CALL METHOD lo_ref1->set_current_cell_via_id
        EXPORTING
          is_row_no = gv_row. "row number where you want to focus the cursor
      ENDFORM.

  • Problem in displaying Alv grid output  using oops........

    hi,
    i have two problems in displaying ALV grid output Using Oops.
    1) How to modify the fieldcatalog after we getting a field catalog using general FM.
    2) initialy it is displaying 13 fields but there are 63 fields .
       eventhough we chage the layout to 63 fields it is displaying only 13 fields , these 13 fields may be different based on our selection but count  of displayed fileds are same . how can display 63 fields at a time .

    Hi,
    You can chnage using below code:
    loop at gt_fieldcat.
    if <gt_fieldcat-field_name> = 'FIELDNAME'.
    endif.
    modify gt_fieldcat.
    clear gt_fieldcat.
    endloop.
    Make sure that all the field should not have no_out = 'X' and tech = 'X'.
    Thanks,
    Sriram Ponna.

  • Installing Enterprise Manager 10g Grid Control Using an Existing Database

    I want to install Enterprise Manager 10g Grid Control 10.2.0.3 using an existing database. This database is RAC 10.2.0.2. and I use it as Infrastructure Metadata Repository.
    I is said in Oracle documentation that SYSMAN schema has to be dropped, thus Database console repository has to be dropped. As far as I understand after Grid Control installation I will not be able to use Database console for my RAC 10.2.0.2 Infrastructure Metadata Repository database. I will be able to use only Grid Control for this database.
    Am I right? Could you give me any advice about Installing Enterprise Manager 10g Grid Control Using an Existing Database?
    Thank you.

    I am trying to install the OEM rel 2.0 on AIX 5L from the downloaded software zip files which are as below,
    AIX_Grid_Control_full_10201_disk1.zip (656,766,406 bytes) (cksum - 2157028496)
    AIX_Grid_Control_full_10201_disk2.zip (655,758,726 bytes) (cksum - 2350778444)
    AIX_Grid_Control_full_10201_disk3.zip (641,760,716 bytes) (cksum - 2053607771)
    AIX_Grid_Control_full_10201_disk4.zip (606,903,411 bytes) (cksum - 4162514797)
    AIX_Grid_Control_full_10201_disk5.zip (576,555,758 bytes) (cksum - 3304661461)
    AIX_Grid_Control_full_10201_disk6.zip (459,658,650 bytes) (cksum - 3120478203)
    AIX_Grid_Control_full_10201_disk7.zip (311,903,435 bytes) (cksum - 2438252536)
    AIX_Grid_Control_full_10201_disk8.zip (224,594,251 bytes) (cksum - 2618845234)
    I am unable to locate the runInstaller in any of the disks 1- 8 ,can somebody help me on this. Thanks

  • How to make a field of ALV Grid to use a Search Help?

    Hi;
    I have a ALV grid with a field catalog. Say the field is 'USR000'.
    F4availabl = 'X' . for the field in the field catalog.
    I have prepared search help named ZEV_PROTYPE that uses tha table ZEV_PROTYPES.(two fields in the table :ProType and Text).
    Is it possible to make the field in ALV grid to use this search help if F4 is pressed on the field. ?
    Which structure of the ALV must be used for that ? Is it Field Catalog ?
    Would you please help me ?
    erk.

    Hi,
    If you have a Z data element and the search help is attached to it, you can just give the reference table and field in the field catalog for the editable ALV field, and the search help should appear.
    Regards,
    Sagar

  • Add listener to Grid Infrastructure using srvctl.

    Hi,
    We have a two node 11.2.0.3 Grid Infra cluster running on SLES11 Linux.
    Everything is ok with the SCAN and standard listeners.
    However we have a listener running on each node which is used by Oracle Gateway. These listeners were created manually using info provided by Oracle (i.e. definition copied to $ORACLE_HOME/network/admin/listener.ora and started using lsnrctl). This all works.
    These listeners are currently not managed by Grid Infra. We would like them to be.
    I thought this was easy enough using srvctl to register them with Grid Infra using...
    srvctl add listener -n mynode1 -l LISTENER_MYNODE1_GW -o $ORACLE_HOME -p 1529
    srvctl add listener -n mynode2 -l LISTENER_MYNODE2_GW -o $ORACLE_HOME -p 1529
    These commands worked but did give a warning stating that the -n flag is deprecated and will be ignored.
    This has left us with the following listener config....
    grid@MYNODE1:~> srvctl status listener -n mynode1 | grep mynode
    Listener LISTENER_MYNODE1_GW is enabled on node(s): mynode1
    Listener LISTENER_MYNODE1_GW is not running on node(s): mynode1
    Listener LISTENER_MYNODE2_GW is enabled on node(s): mynode1
    Listener LISTENER_MYNODE2_GW is not running on node(s): mynode1
    grid@MYNODE1:~> srvctl status listener -n mynode 2 | grep mynode
    Listener LISTENER_MYNODE1_GW is enabled on node(s): mynode2
    Listener LISTENER_MYNODE1_GW is not running on node(s): mynode2
    Listener LISTENER_MYNODE2_GW is enabled on node(s): mynode2
    Listener LISTENER_MYNODE2_GW is not running on node(s): mynode2
    You can see that Grid Infra knows about the listeners but they are available on both nodes. What we would like is a result like the following example....
    grid@MYNODE1:~> srvctl status listener -n mynode1 | grep mynode
    Listener LISTENER_MYNODE1_GW is enabled on node(s): mynode1
    Listener LISTENER_MYNODE1_GW is not running on node(s): mynode1
    grid@MYNODE1:~> srvctl status listener -n mynode 2 | grep mynode
    Listener LISTENER_MYNODE2_GW is enabled on node(s): mynode2
    Listener LISTENER_MYNODE2_GW is not running on node(s): mynode2
    i.e one listener registered with just the node it is running on. This used to be possible with using the -n flag but no longer works. Does anyone have any advice on how to achive this in 11gR2.
    Any input appreciated,
    Regards
    ma365

    Hi get the info of the listener and the scan -[listeners]
    Execute the statements from the GRID infrastructure.
    srvctl config listener [-l listener_name] [-a] this gives the info how the listener is register in to the OCR.
    alternative:
    Execute the steps to add a listener.
    srvctl add listener -l crmlistener -p TCP:1533 -o {CRS_HOME}
    srvctl enable listener -l crmlistener
    srvctl start listener -l crmlistener
    srvctl config listener -l crmlistener -a
    lsnrctl status crmlistener
    See what the result of this exercise is, working then convert to this method
    Cheers,
    Jos van den Oord
    Blog : [Joords Oracle DBA blog|http://joordsblog.vandenoord.eu/]
    Company : [Transfer-solutions.com|http://www.transfer-solutions.com/]

  • F4 help in ALV Grid Control (using classes)

    Hi All,
        I have created a report using ALV Grid control (using classes). I need to provide F4 help for some of the fields in the Grid control.  I couldn't understand the standard demo program BCALV_GRID_F4_HELP. So Can anyone please provide me sample code for the same.
    Regards
    Jaker.

    hi check this..programs also
    BCALV_GRID_EDIT_DELTA
    BCALV_TEST_GRID_F4_HELP
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/how%2bto%2bimplement%2bf4%2bsearch%2bhelp%2bin%2boo%2balv%2bgrid
    Struggling with f4 handling in ALV grid - Minisap 46D
    regards,
    venkat

  • Change the width of a field using XML

    Hi,
    I customize a report -set the width of a field- using XML but my
    data is truncated.
    Is it posible to set vertical elasticity for this field using
    XML?
    My XML file is:
    <?xml version="1.0"?>
    <report name="Rep" DTDVersion="1.0">
    <layout>
    <section name="main">
    <field name="F_1" source="CP_FIELD" textColor="red" width="0.5"/>
    <field name="F_2" source="CP_FIELD" width="0.5"
    alignment="center"/>
    <field name="F_3" source="CP_FIELD" width="1"/>
    </section>
    </layout>
    </report>
    I will appreciate any suggestion.
    Thank you

    You can change the size of the label, the text input box, and the field itself (border around the field in the design tab) - however there is one exception to being able to control the size of every field individually:
    Fields that have "Labels left" or "Labels right" that are also the first field in a row will all share the same label width.
    This is probably what you are encountering, this is how the fields work for now, those first in a row label left/right labels are all the same width.
    Thanks,
    Josh

  • How to retrieve Task Lists from All Subsites to the Parent Site and display in Grid view using CAML Query

    How to retrieve Task Lists from All Subsites to the Parent Site and display in  Grid view using CAML Query + object model

    do u just want task list or items under task list for all subsites
    for items use spsitedataquery ref
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.aspx use recursive to get it from alll subsite under site collection
    for tasklist only u can a simply use a for loop to find in all subsite
    Manish Sati

  • ALV Grid Report using OOPS

    Hi Friends,
    I have to develop the ALV Grid report using the Classes ie OOPS, as i am new to OOPS and know little bit of ALV,  so it will be little bit tough to develop the object so plz try to solve my query. I'm sending the Functional specs:
    The program should display the list of Purchase orders and Purchase requisitions created for specified materials. The output should be displayed in form of ALV grid. There should be separate ALV Grid for Purchase order and Purchase requisition list. The user should also have an option to save various ALV layouts and should be able to choose the ALV layout on the selection screen.The user should be able to navigate to the relevant document form the ALV grid. (Use hyperlink).
    The output must appear in the same screen.     
    Selection screen fields–
         Material Number
         Creation date (For both, PR and PO)
         Output fields –
              List one –
                  Po Number
                                        Po Item number
                                        Vendor
                                        Date
                                        Material Number
                                        Material Quantity
              List two –
                             PR Number
                                        Material Number
                                        Material Quantity
                                        Release status
                                        Date
                                        Reference
         Tables:  EKPO, EKKO, EBAN
         Transactions: ME23N
    HINT –      Use class - CL_GUI_ALV_GRID
    thnks in advance.....

    Hi,
    Check out these standard reports, they are enough to help you out .
    BCALV_GRID_01
    BCALV_GRID_02
    BCALV_GRID_03
    BCALV_GRID_04
    BCALV_GRID_05
    BCALV_GRID_06
    BCALV_GRID_07
    BCALV_GRID_08
    BCALV_GRID_09
    BCALV_GRID_10
    BCALV_GRID_11
    BCALV_GRID_AND_POPUP
    BCALV_GRID_DEMO
    Regards,
    Amit

  • Beginner ALV Grid question (using OO) "Possible Values" doesn't do anything

    Hi,
    I have a working ALV Grid report using the 'CL_CALV_TABLE' class, and FACTORY DISPLAY method.
    Standard Functions are working, got single-click events programmed to drill-down into documents, key columns, etc.
    So the report output seems fine.
    <i>However, some columns / cells have a "possible values" icon, but when selected nothing happens. And some columns have the icon, for example, Material, Co.Code, but then others don't. </i>
    I've looked at example report SALV_DEMO_TABLE_COLUMNS and SALV_TEST_FUNCTIONS, but I can't see any specific code in there that controls this.
    <u>Would appreciate it if anyone can confirm:</u>
    a) what triggers the icon to appear for some columns/cells but not others? Is it the TYPE of the table column?
    b) is any coding needed for the "Possible values" window to popup?
    TIA,
    James

    Seems like f4availabl field is enabled in field catalog.

  • Two Business Objects to fill a Data Grid/table using Anchors?

    Hi,
    I have a SAP standard tile were a table (grid) is filled by an Business Object. I want to add an additional column and retrieve the value from another Business Object.
    My questions
    1) Can I use Anchors to automatically set the relationship between two Business Objects A & B, so that I can just Drag & Drop an additional field from Business Object B to the DataGrid of Business Object A in the design screen without writing additional code?
    2) Some BO's do come with a predefined relationship to other BO's, but in the case of I have to write a supply function do I have to use a specific "Data Source Type" such as "Business Object", "BusinessQuery" or "Business CollectioN"?
    3) I already tried to write a supply function, but I realized that the system does return for some BO's or BS's a object instance, if I call "gFactory.newBusinessQuery". Is there any logic/restriction behind?
    I know I can use RowLoaded2 and a unbound column, but I want to know if this approach is also possible?
    Thank you for any help,
    Regards,
    Andreas

    Hi Andreas,
    The answer to your question is YES. You can very well do it without any changes at the code level.
    The scenerio can be implemented using a concept called JointField Mapping in MAS.
    Scenerio 1 :
    If you want to display the extra field from another BO in a list tile on the click of a search button from the search tile , then
    Please do the following :
    1. Select the Busines Query that you have associated to the search tile and go to properties from the View Designer.
    2. In the properties, Click on the Joint Field Mapping and select the BO where the extra field id present and select the primary key, Segment Field associated, (extra field)BO Property that you want to display in the list tile.
    2. Add a new control (new Field) in the List tile - ie, From the Toolbox (Tileset COntrols).
    3.Go to properties of the newly added control. Associate the anchor as the same achor as the list tile was pointing to earlier. for eg : Y_BOCAPGEN.
    4. Then Go to BCOLFieldName property and give the property name as the newly added BO property name(New field).
    After everything is modelled, You will be able to see the extra field in your application!!!!
    NOTE : Ofcourse, After the Successful generation.
    Scenerio 2 :
    If you want to display an Extra Field in a Detail tile,
    1. Go to Relationship of the BO from the Detail tile and go to properties.
    2. In the properties, You can find the Joint Field Mapping porperty.
    3. This property is again modelled as explained in scenerio 1.
    Hope, It would have definetly helped and answered your query.
    Have a good day!!
    Best Regards,
    Vignesh Ravikumar.

  • Button in alv grid cell using REUSE_ALV_GRID_DISPLAY

    Hi all,
      I want to make the contents of 2 columns of my alv grid as push button with values as text on it. I am not using classes or methods but alv grid fm. On clicking the button one dialog box has to pop up which gives edit option for the values in that coloumn, my question is how to introduce button in alv grid cell? if i can use t_fieldcatalog-icon, then please give me the complete steps for that.
    Thanks.

    this may helps u
    u need to copy stadard screen elemetn to MARATAB1(at PF -STATUS)
    You should copy the 'STANDARD' GUI status from program <b>SAPLSLVC_FULLSCREEN</b>
    type this one in SE41 program name is:<b>SAPLSLVC_FULLSCREEN</b>
    status : <b>STANDARD_FULLSCREEN</b>
    and copy it ...
             Type-pool
    type-pools slis.
             Tables
    tables: mara,sscrfields.
           Selection screen
    select-options: s_matnr for mara-matnr.
    PARAMETERS: p_email TYPE somlreci1-receiver.
    TYPES: BEGIN OF t_charmara,
      matnr(18)  TYPE c,                   " Material Number
      ernam(12)  TYPE c,                   " Person Credited
      aenam(12)  TYPE c,                   " Person Changed Object
      pstat(15)  TYPE c,                   " Maintenance Status
    END OF t_charmara.
             Data Declarations
    data: rt_extab    type slis_t_extab,   " Table of inactive function
                                           codes
          wa_charmara TYPE t_charmara,     " work area of mara Table
          fs_fieldcat type slis_t_fieldcat_alv,
                                           " Field catalog with field
                                           descriptions
          t_fieldcat  like line of fs_fieldcat,
                                           " Table of Field catalog
          r_ucomm     like sy-ucomm,       " User Command
          rs_selfield TYPE slis_selfield.  " cursor position ALV
    data: filedlayout   type slis_layout_alv,
          heading       type slis_t_listheader with header line,
          t_event       type slis_t_event.
    data: fs_event      like line of t_event.
    data: fs_sort type slis_sortinfo_alv,
           t_sort type slis_t_sortinfo_alv.
    data: w_char(200) type c,
          w_matnr     type mara-matnr.
    fs_sort-fieldname = 'MATNR'.
    fs_sort-up        = 'X'.
    fs_sort-group     = '*'.
    append fs_sort to t_sort.
    clear fS_sort.
    DATA:   t_packing_list  LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents      LIKE solisti1   OCCURS 0 WITH HEADER LINE,
            t_receivers     LIKE somlreci1  OCCURS 0 WITH HEADER LINE,
            t_attachment    LIKE solisti1   OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1   OCCURS 0 WITH HEADER LINE,
            w_cnt           TYPE i,
            w_sent_all(1)   TYPE c,
            w_doc_data      LIKE sodocchgi1,
            gd_error        TYPE sy-subrc,
            gd_reciever     TYPE sy-subrc.
             Internal Tables
    data: begin of it_mara occurs 0,
            matnr like mara-matnr,         " Material Number
            ernam like mara-ernam,         " Person Credited
            aenam like mara-aenam,         " Person Changed Object
            pstat like mara-pstat,         " Maintenance Status
          end of it_mara.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    *at selection-screen on field event
    AT SELECTION-SCREEN on s_matnr.
    PERFORM f0100_VALIDATE_MATERIAL_NUMBER.
    start-of-selection.
    retrive Data from the data base table Mara
    perform retrive_data_from_mara.
    end-of-selection.
    *Field catalog with field descriptions
    perform fieldcat.
    *perform top_of_page.
    PERFORM EVENT_LIST.
    *ALV Grid Display
    perform alv_display.
    Creating one Push button ENTER
    perform maratab1 USING    RT_EXTAB.
    *&      Form  f0100_VALIDATE_MATERIAL_NUMBER
          text
    There are no interface parameters to be passed to this subroutine
    FORM F0100_VALIDATE_MATERIAL_NUMBER .
    select matnr                          " Material Number
       from mara
      up to 1 rows
       into mara-matnr
      where matnr in s_matnr.
      endselect.
    IF sy-subrc NE 0.
          clear sscrfields-ucomm.
          MESSAGE e000 WITH 'Enter valid Material number'(003).
        ENDIF.                             " IF sy-subrc NE 0
    ENDFORM.                               " f0100_VALIDATE_MATERIAL_NUMBER
    *&      Form  retrive_data_from_mara
          text
    *There are no interface parameters to be passed to this subroutine
    FORM retrive_data_from_mara .
    select   matnr                         " Material Number
             ernam                         " Person Credited
             aenam                         " Person Changed Object
             pstat                         " Maintenance Status
        from mara
        into table It_mara
       where matnr in s_matnr.
    IF sy-subrc NE 0.
          MESSAGE i001 WITH 'Records are not found'.
          exit.
          stop.
        ENDIF.                             " IF sy-subrc NE 0
    ENDFORM.                               " retrive_data_from_mara
    *&      Form  fieldcat
          text
    *There are no interface parameters to be passed to this subroutine
    FORM fieldcat .
    *field catalog for MATNR
      t_FIELDCAT-REF_TABNAME = 'MARA'.
      t_fieldcat-fieldname   = 'MATNR'.
      t_fieldcat-col_pos     = 1.
      append t_fieldcat to fs_fieldcat.
      clear t_fieldcat.
    *field catalog for ERNAM
      t_FIELDCAT-REF_TABNAME = 'MARA'.
      t_fieldcat-fieldname   = 'ERNAM'.
      t_fieldcat-col_pos     = 2.
      append t_fieldcat to fs_fieldcat.
      clear t_fieldcat.
    *field catalog for AENAM
      t_FIELDCAT-REF_TABNAME = 'MARA'.
      t_fieldcat-fieldname   = 'AENAM'.
      t_fieldcat-col_pos     = 3.
      append t_fieldcat to fs_fieldcat.
      clear t_fieldcat.
    *field catalog for PSTAT
      t_FIELDCAT-REF_TABNAME = 'MARA'.
      t_fieldcat-fieldname   = 'PSTAT'.
      t_fieldcat-col_pos     = 4.
      append t_fieldcat to fs_fieldcat.
      clear t_fieldcat.
    ENDFORM.                               " fieldcat
    *&      Form  EVENT_LIST
          text
    *There are no interface parameters to be passed to this subroutine
    FORM EVENT_LIST .
      fs_event-name ='TOP_OF_PAGE'.
      fs_event-form = 'TOP_PAGE'.
      append fs_event TO t_EVENT.
      CLEAR FS_EVENT.
      fs_event-name ='END_OF_PAGE'.
      fs_event-form = 'END_PAGE'.
      append fs_event TO t_EVENT.
      CLEAR FS_EVENT.
      fs_event-name ='END_OF_LIST'.
      fs_event-form = 'LIST_END'.
      append fs_event TO t_EVENT.
      CLEAR FS_EVENT.
    ENDFORM.                               " EVENT_LIST
    *&      Form  alv_display
          text
    *There are no interface parameters to be passed to this subroutine
    FORM alv_display .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET       = 'MARATAB1'
       I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      =
       IT_FIELDCAT                    = FS_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
       IT_SORT                        = T_SORT
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       IT_EVENTS                      = T_EVENT
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = IT_MARA[]
    EXCEPTIONS
      PROGRAM_ERROR                  = 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.
    ENDFORM.                               " alv_display
    form TOP_PAGE.
      data:tbl_listheader type slis_t_listheader,
            wa_listheader type slis_listheader .
       wa_listheader-typ = 'S'.
       wa_listheader-info = 'Created by : Vijay Pawar'.
       append wa_listheader to tbl_listheader.
       wa_listheader-typ = 'S'.
       concatenate ' Date ' sy-datum into
                  wa_listheader-info separated by space.
        append wa_listheader to tbl_listheader.
       wa_listheader-typ = 'S'.
       concatenate ' From ' s_matnr-low '  To  ' s_matnr-high into
                           wa_listheader-info separated by space.
       append wa_listheader to tbl_listheader.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = tbl_listheader
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    endform.                               " form TOP_PAGE.
    form END_PAGE.
      STATICS W_PAGE TYPE I .
      data:tbl_listheader type slis_t_listheader,
            wa_listheader type slis_listheader .
      wa_listheader-typ   = 'S'.
      wa_listheader-info  = W_PAGE.
      append wa_listheader to tbl_listheader.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = tbl_listheader
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    add 1 to w_page.
    endform.                               " form END_PAGE.
    form list_end.
      data:tbl_listheader type slis_t_listheader,
      wa_listheader type slis_listheader .
      wa_listheader-typ = 'S'.
      wa_listheader-info = '......................................Last Page'
      append wa_listheader to tbl_listheader.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = tbl_listheader
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    endform.                               " form list_end.
    *&      Form  maratab1
          text
         -->P_RT_EXTAB  text
    FORM maratab1  USING    P_RT_EXTAB.
      SET PF-STATUS 'MARATAB1' EXCLUDING rt_extab.
    ENDFORM.                               " maratab1
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                         rs_selfield TYPE slis_selfield.
    case r_ucomm.
       when 'ENTER'.
       perform bulid_xls_data_table.
       PERFORM send_file_as_email_attachment
                                      tables it_message
                                             it_attach
                                       using p_email "'[email protected]'
                                    'Example .xls documnet attachment'
                                             'XLS'
                                             'filename'
                                    changing gd_error
                                             gd_reciever.
        perform populate_email_message_body.
        PERFORM initiate_mail_execute_program.
      endcase.                             " case r_ucomm.
    endform.                               " FORM user_command
    perform populate_email_message_body.
    PERFORM initiate_mail_execute_program.
         CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
    EXPORTING
       DATA_FILENAME             = 'MARA.XLS'
       DATA_PATH_FLAG            = 'W'
      DATA_ENVIRONMENT          =
       DATA_TABLE                = ITAB[]
      MACRO_FILENAME            =
      MACRO_PATH_FLAG           = 'E'
      MACRO_ENVIRONMENT         =
       WAIT                      = 'X'
      DELETE_FILE               = 'X'
    EXCEPTIONS
       NO_BATCH                  = 1
       EXCEL_NOT_INSTALLED       = 2
       INTERNAL_ERROR            = 3
       CANCELLED                 = 4
       DOWNLOAD_ERROR            = 5
       NO_AUTHORITY              = 6
       FILE_NOT_DELETED          = 7
       OTHERS                    = 8
       IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
       leave to list-processing.
    endcase.
    *&      Form  bulid_xls_data_table
          text
    *There are no interface parameters to be passed to this subroutine
    FORM bulid_xls_data_table .
    CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    constants:
        con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
        con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'matnr' 'ernam' 'aenam' 'pstat'
             INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      LOOP AT It_mara INTO wa_charmara.
        CONCATENATE wa_charmara-matnr wa_charmara-ernam
                    wa_charmara-aenam wa_charmara-pstat
               INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach.
      ENDLOOP.                             " LOOP AT it_mara INTO...
    ENDFORM.                               " bulid_xls_data_table
    *&      Form  send_file_as_email_attachment
       Send email
         -->P_IT_MESSAGE  text
         -->P_IT_ATTACH  text
         -->P_P_EMAIL  text
         -->P_0387   text
         -->P_0388   text
         -->P_0389   text
         -->P_0390   text
         -->P_0391   text
         -->P_0392   text
         <--P_GD_ERROR  text
         <--P_GD_RECIEVER  text
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error               TYPE sy-subrc,
            ld_reciever            TYPE sy-subrc,
            ld_mtitle              LIKE sodocchgi1-obj_descr,
            ld_email               LIKE  somlreci1-receiver,
            ld_format              TYPE  so_obj_tp ,
            ld_attdescription      TYPE  so_obj_nam ,
            ld_attfilename         TYPE  so_obj_des ,
            ld_sender_address      LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver            LIKE  sy-subrc.
      ld_email               = p_email.
      ld_mtitle              = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin  = space.
      t_packing_list-head_start  = 1.
      t_packing_list-head_num    = 0.
      t_packing_list-body_start  = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type    = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver   = ld_email.
      t_receivers-rec_type   = 'U'.
      t_receivers-com_type   = 'INT'.
      t_receivers-notif_del  = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                               " send_file_as_email_attachment
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                               " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test mara records'.
      APPEND it_message.
    endform.                               "form populate_email_message_bod
    rewards if it helps u

  • Control the page height and page width of pdf report using pasta_pdf.cfg

    Hi All,
    I've followed the note: 338990.1 (how to print publisher PDF reports via the concurrent manager) in metalink to print a PDF REPORT. Everything work fine except the page height and page width is used as default (8X11). Is there anyway that i can custom page height and page width size such as: legal (8.5X14).
    current set up in pasta_pdf.cfg
    [DEFAULT]
    %% ============== Preprocessing Command ==================== %%
    % Pasta can use a preprocessing command to invoke any executable
    % that supports an input file and an output file (a filter program).
    % You can use redirection. Pasta will invoke the filter program
    % to preprocess the Pasta output before passing it to the printing
    % command. By using the preprocess option, you can generate output
    % formats other than the formats Pasta currently supports. For
    % example, you can generate PCL output.
    % You can use {infile} and {outfile} in this option.
    % {infile} is the output file generated by Pasta. You can use
    % it as input for the preprocessing command. It is a temporary
    % file and will be deleted after being passed to the
    % preprocessing command. {outfile} is the output file generated
    % by the preprocessing command. Pasta names it temporarily and
    % it will be deleted after being passed to the printing command.
    % If you want to keep it, you can name it by using the '-o'
    % command line option. Pasta will copy {outfile} to the file you
    % specify.
    % Preprocess for PDF output
    % This is an example for PDF output to print.
    ; Xpdf
    preprocess=/usr/local/bin/pdftops {infile} {outfile}
    ; Ghost Script
    ; preprocess=pdf2ps {infile} {outfile}
    ; Acrobat
    ; preprocess=acroread -toPostScript -pairs {infile} {outfile}
    %% ============== Printing Command ========================= %%
    % You can specify the printing command and options you want
    % to use to print your report. Pasta will pass the final output
    % to this command. {printername} will be replaced by the
    % actual printer name passed through the command line option
    % (-pn), so in most cases you don't have to change these
    % options.
    % for UNIX platform
    printCommand=lp -c -d{printername}
    % for Windows platform
    ntPrintCommand=print /D:{printername}
    %% ============== Error Log File =========================== %%
    % This tells Pasta to create a log file. The default error
    % output is stderr.
    ;errorlogfile=pasta.log
    NOTE: pasta version 3.0.4
    form server 6.0.8.27.0
    third party tool is pdftops
    Thanks
    Kevin

    i think that can be down from the printing direver/styles/prt files when you added the printer at your apps system check the follwoign for more info.
    ( How to Implement Printing for Oracle Applications: Getting Started )
    Note:269129.1
    (Step By Step Guide to Set Up a Printer in Oracle Applications)
    ( Note:60936.1)
    fadi
    http://oracle-magic.blogspot.com

  • Problem sorting by Artist in grid view using Itunes 8

    I have a lot of albums that contain various artist and i set up the info in each with the correct artist name and "various artist" as the album artist. In itunes 8 when i use grid view and use show by artist it displays by album artist putting all the albums by "various artist" in one grid. It's correct in list and cover flow view. How can i set the grid view to display by the artist of the song and not the album. (ex. Soundtrack from the motion picture Tropic Thunder: Display "U Can't Touch This" under MC Hammer instead of Various Artist)

    Actually, the grid view should be using the Album Artist tag. When the Album Artist tag was added in iTunes 7.0, the intent was to allow users to properly tag songs based on the artist and any guest artists. For instance, on Luther Vandross’ album +Give Me The Reason+ Track 6, “There’s Nothing Better Than Love” is a duet. Therefore, while the Artist tag for the rest of the tracks should be ‘Luther Vandross’, the correct tag content for Track 6 is ‘Luther Vandross duet with Greory Hines’. Without having ‘Luther Vandross’ in all the Album Artist tags for all 9 album tracks, iTunes would split the album as if there are two albums of the same name by different artists.
    The other situation are producer-driven albums like Quincy Jones’ +The Dude+ or +Back On The Block+ . These are not compilations, as you described, because the songs were produced for the albums and Quincy Jones, although not a performer on any of the tracks, is the album artist. The exception is soundtracks that are compilations of songs typically produced for a given film. Like the situation you describe, each track has a different artist, so by having ‘Quincy Jones’ in the Album Artist tag for each track, iTunes maintains the integrity of the album and keeps the tracks properly grouped.
    (Now if Apple would only acknowledge and fix the persistent bug that does not carry these grouping and sorting features over to the user’s music folder when they have enabled “Keep iTunes Music folder organized” in iTunes’ preferences.)
    The situation you are specifically referencing is that of tagging compilations—albums that consist of tracks by various artists where there is no actual album artist—but you have used the Album Artist tag effectively forcing iTunes to see them as single artist albums. I also tag compilations—e.g., Various Artists (Hip Hop), Various Artists (Jazz), Various Artists (R&B), Various Artists (Soundtrack), etc.—, so I understand what you have done. Unfortunately, the fix for forcing the grid view to recognize individual artists in compilations may require you to clear out the Album Artist tag on all of your compilation album tracks forcing iTunes to revert to the Artist tag in place of the Album Artist tag.
    What I would suggest is clearing the Album Artist tag of just one compilation and seeing what happens. If the album appears under “Unknown Artist”, or some other generic listing, in the grid view then iTunes only recognizes the Album Artist tag and I am at a loss as to what you could do. If it works as you hope, then you can go ahead an clear out the Album Artist field on the rest of your compilation albums.
    The downside of clearing the Album Artist field is that iTunes will revert to its pre-version 7 habits and break up the albums; that is, a compilation with 12 tracks by 12 different artists will appear in the various views as 12 different albums albeit with the same name and cover art. To keep the tracks properly grouped in other views, you will need to mark all of the tracks from the compilation albums as “Part of a compilation” in the info dialog.

Maybe you are looking for

  • Dual Executable​s appear

    I have captured the TestStand 3.5 OI LabVIEW files in a LabVIEW 8.20 project file.  I've customized the OI a bit, and I use the Build Specifications area to build an executable.  When I run the executable, my customized OI appears, I can load sequenc

  • Blue Screen of Death on install of j2re-1_4_2_04-windows-i586-p.exe

    Immediately upon installing j2re-1_4_2_04-windows-i586-p.exe, I get the "blue screen of death" on Windows 2000, indicating memory dump. Applications do not work subsequently that use j2re. Attempts to modify in reinstallation indicate errors in Windo

  • Help with menu

    howdy everyone! i'm working on a new edge navbar for a client and i've run into some problems. see this link:  http://salesdigital.com/testmenu/  mouseover products to reveal the drop down. i've got this working pretty good exept my invisible buttons

  • How do you delete a SmartMailbox?

    How does one delete a SmartMailbox in OSX 10.6.8?  I have nothing in that mailbox, but the Delete Mailbox option is greyed out.

  • Labels on version cue folders

    There is no, what I can find, way to label folders in a Version cue Project. This would be very useful when working on many projects on the same time. Andreas TS