OOPS ALV   size need to increase

Hi Friends -
Am using OOPS  ALV  for  report display  and the display  is devided  in two parts  
one is header info
second is  general info 
am facing a prob is   even if  four or five reords  are only there in  both the section  even then  its  coming with scroll bar  RO in a shrink  way   then  i  have to drag  and increase the size   then  only i can see other records     how  can   we resolve this issue ?
am using   structure   lvc_t_fcat  .
also can anybody pls tell me the correct  Function Module  to sent mail   using this ALV  header as subject and  ALV general part as  content of mail ..
Thanks
Smeeta

I  Really Appriciate your immd response on this   issue ,  but  even trying this also  no luck ,
see my  report is devided like this
This will create a container
  CREATE OBJECT ob_custom
    EXPORTING
      container_name = 'CONTAINER'
      style    =  cl_gui_custom_container=>ws_maximizebox.
CREATE OBJECT ob_split1
    EXPORTING
      parent      = ob_custom
      orientation = cl_gui_easy_splitter_container=>orientation_vertical.
  CREATE OBJECT ob_split3
    EXPORTING
      parent      = ob_split1->top_left_container
      orientation = cl_gui_easy_splitter_container=>orientation_vertical.
CREATE OBJECT ob_split2
    EXPORTING
      parent      = ob_split1->bottom_right_container
      orientation = cl_gui_easy_splitter_container=>orientation_vertical.
CREATE OBJECT ob_grid1
    EXPORTING
      i_parent = ob_split3->top_left_container.
      CREATE OBJECT ob_grid2
    EXPORTING
      i_parent = ob_split3->bottom_right_container.

Similar Messages

  • Editable ALV- I need to increase curr to be 12 chars from 8 chars in o/p.

    I am getting problem in Editable ALV, I wanted to increase the currency field from 8 chars to 12 chars at the output.
    But after the output i am able to enter only eight chars.
    I want '123456789012'  but i am able to put only '12345678'.
    Plz have alook.

    hi !
    check the length of field in your data declaration
    you can set the length of o/p field in alv for that just check
    intlen or outputlen in fieldcat
    but by using these you can not update these in your internal table b'coz of your type declaration for that field

  • Need to Increase the Font Size of a screen field in a Dialog Screen ?

    Hi ppl,
    I have a requirement wherein i need to increase the font size of one field on a dialog screen .
    i was going through the threads and found this which has beautiful example given by vijay
    Increase text size in Screen
    But I'm facing a problem in implementing it since the value in the field (of which the font size needs to be increased) depends on a nother field filled by user at runtime only.
    Can anyone gimme some suggestions or alternative way to solve my problem
    Thanks
    Sachin Soni

    Hi Sachin,
    There is not way to change the font style.
    But you can add ur own text through icons or graphics.
    Create your own graphics or icons and include it in ur module pool.
    Or,
    Goto the Layout Editor of your Screen.
    Double click on the text field .. Double clk the text fild, and from the Botton right u can see an arrow icon -> click on that -> will open a Popup -> in that set Area Title to TRUE.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Tree OOPS ALV - Need to display header & items of the sales order in oops

    HI,
        I need to display some of the header fields of the sales order & items in the oops alv, could you please let me know how to achieve this. I know FM - 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' but how to achieve this through oops alv.
    Thanks

    it is not possible with that function in OO .
    you can try with class cl_salv_hierseq_table
    Just check this Rich's article
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0f03986-046c-2910-a5aa-e5364e96ea2c
    if you don't want that then you may have to use ALV tree.

  • Need a sample program for hierarchial oops ALV report

    Hello experts,
                     I Need a sample program for hierarchial oops ALV report.

    Hi,
       Check the following sample code...
    T A B L E S
    tables : ekko.
      data definition
    types : begin of ty_ekko,
              ebeln type ekko-ebeln,
              lifnr type ekko-lifnr,
              bsart type ekko-bsart,
              aedat type ekko-aedat,
              ernam type ekko-ernam,
            end of ty_ekko.
    types : begin of ty_eket,
               ebeln type ekpo-ebeln,
               ebelp type ekpo-ebelp,
               werks type ekpo-werks,
               matnr type ekpo-matnr,
               menge type eket-menge,
               wamng type eket-wamng,
               netpr type ekpo-netpr,
            end of ty_eket.
    data : it_ekko type table of ty_ekko,
           it_eket type table of ty_eket.
    data: ob_hieralv type ref to cl_salv_hierseq_table.
    data: it_binding type salv_t_hierseq_binding,
          is_binding type salv_s_hierseq_binding.
    S E L C T O P T I O N S
    select-options : s_ebeln for ekko-ebeln.
    S T A R T O F S E L E C T I O N
    start-of-selection.
    select ebeln
           lifnr
           bsart
           aedat
           ernam from ekko
    into corresponding fields of table it_ekko
    where ebeln in s_ebeln.
    if sy-subrc eq 0.
    select aebeln aebelp
           awerks amatnr
           bmenge bwamng
           a~netpr from ekpo as a join eket as b
                     on  amandt = bmandt
                     and aebeln = bebeln
                     and aebelp = bebelp
                   into corresponding fields of table it_eket
                  where a~ebeln in s_ebeln.
    endif.
    is_binding-master = 'EBELN'.
    is_binding-slave = 'EBELN'.
    append is_binding to it_binding.
    *TRY.
    call method cl_salv_hierseq_table=>factory
    exporting
    t_binding_level1_level2 = it_binding
    importing
    r_hierseq = ob_hieralv
    changing
    t_table_level1 = it_ekko
    t_table_level2 = it_eket .
    *CATCH cx_salv_data_error .
    *CATCH cx_salv_not_found .
    *ENDTRY.
    call method ob_hieralv->display( ).
    Cheers,
    Ram

  • I need to increase my FMS buffer size for display video smoothly

    I need to increase my buffer size in FMS.
    Please let me know form where i would be increase my FMS buffer size.
    My video is running from RTMP and i faces the problem to load. video stalled between the running. so i need to increase buffer size for running video smoothly.
    Please reply me as soon as possible so i can resoled my problem.
    Thanks in advance.....

    Hi,
    You can increase the buffer size by using the property bufferTime of NetStream Object you are using. For eg: if ns is your NetStream Object then it can be done by ns.bufferTime=<desired value>.
    Also you can go through this
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html#bufferT ime.

  • Need to increase size of Scroll bars

    Hi.... i need to increase the size of the scrollbars (need to make them longer) in my code..... could some one please help me some tips ??
    package number2_rlc;
    import java.awt.Graphics;
    //import javax.swing.JApplet;
    import java.awt.*;
    import java.applet.Applet;
    import java.awt.event.*;
    //import javax.swing.JButton;
    //import javax.swing.JTextArea;
    //import javax.swing.JTextField;
    //import javax.swing.ComponentInputMap;
    * @author Hasula
    //public class NewAppletX extends Applet  //public class NewAppletX extends java.applet.Applet
    public class NewAppletX extends Applet implements AdjustmentListener{
              private Scrollbar slider;
              private Scrollbar slider2;
              private Scrollbar slider3;
              private Button button1 ;
              private Button button2 ;
              private TextField jtf1;
              private TextField jtf2;
              private TextField jtf3;
              private TextField jtf4;
              private TextField jtf5;
              private int sliderValue;
             public void init(){
                 slider2=new Scrollbar(Scrollbar.VERTICAL,0,0,0,100);
                 slider2=new Scrollbar(Scrollbar.VERTICAL,0,0,0,100);
               slider=new Scrollbar(Scrollbar.VERTICAL,0,1,0,100);
                 button1=new Button("Charge");
                 button2=new Button("DisCharge");
                 jtf1=new TextField();
                 //jtf.setBackground(Color.PINK );
                // jtf.setVisible(true);
                //this.setBackground(Color.BLUE);
                //repaint();
                  slider.setBounds(100, 100, 50, 50);
                      slider.setVisible(true);
                      repaint();
                 //slider.setLocation(100,100);
                 add(button1);
                 add(button2);
                 add(jtf1);
                 add(slider);
                 add(slider2);
                 slider.addAdjustmentListener(this);
             public void paint(Graphics g){
                 showStatus("Scrollbar value is"+sliderValue);
                 //g.drawRect(40, 80, 60, 100);
                // g.fillRect(40, 80, 60, sliderValue);
                 //COMMENT FROM HERE FOR ORIGINAL CODE
                  super.paint(g);
        g.drawLine(15,50, 100,50); // Upto Hope
        g.drawLine(15,50,15, 100);
        g.drawLine(10,100, 20, 100); // negative plate
        g.drawLine(5,105, 30, 105);  //possitive plate
        g.drawLine(15,105,15, 200); //after positive plate
        g.drawLine(15,200,400,200); // Bottom line
        g.drawLine(400,200,400,130); // upto Capacitor
            g.drawLine(380,130 ,420,130);//btm capactior plate
            g.drawLine(380,110,420,110);//topcapacitor plate    
        g.drawLine(400,110,400,50); // Capacitor to Top line
        g.drawLine(150,50,400,50); // Top Line   
        g.drawLine(150,200,150,100); // upto Capacitor
        g.drawLine(150,130,150,50); // *********************************** Line which should Swing
                 //END COMMENT HERE
             public void AdjustmentValueChanged(AdjustmentEvent e){
                 sliderValue=slider.getValue();
                 repaint();
        @Override
        public void adjustmentValueChanged(AdjustmentEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
    }

    Before offering the solution, a few suggestions about improving the way you post code.
    -- Don't post commented-out lines unless they are really illustrative of what you tried (and didn't work) to solve the problem
    -- Don't leave multiple blank ines. Do leave a blank line between methods.
    -- Don't post the package statement, nobody's likely to create the same package to test your code.
    -- Remove totally irrelevant stuff like the ActionListener in this case.
    Now about the actual code.
    -- You don't need to call setVisible on a component added to a container, it is visible by default.
    -- You don't need to call repaint() in init(), painting takes place when the applet is displayed.
    And the solution:
    -- Don't call setBounds (...), call setPreferredSize (...),
    Here's your code reworked.public class NewAppletX extends Applet {
       private Scrollbar slider;
       private Scrollbar slider2;
       private Scrollbar slider3;
       private Button button1 ;
       private Button button2 ;
       private TextField jtf1;
       private TextField jtf2;
       private TextField jtf3;
       private TextField jtf4;
       private TextField jtf5;
       private int sliderValue;
       public void init () {
          slider2 = new Scrollbar (Scrollbar.VERTICAL, 0, 0, 0, 100);
          slider = new Scrollbar (Scrollbar.VERTICAL, 0, 1, 0, 100);
          button1 = new Button ("Charge");
          button2 = new Button ("DisCharge");
          jtf1 = new TextField ();
          slider.setPreferredSize (new Dimension (20, 100));
          add (button1);
          add (button2);
          add (jtf1);
          add (slider);
          add (slider2);
       public void paint (Graphics g){
          super.paint (g);
          showStatus ("Scrollbar value is"+sliderValue);
          g.drawLine (15,50, 100,50); // Upto Hope
          g.drawLine (15,50,15, 100);
          g.drawLine (10,100, 20, 100); // negative plate
          g.drawLine (5,105, 30, 105);  //possitive plate
          g.drawLine (15,105,15, 200); //after positive plate
          g.drawLine (15,200,400,200); // Bottom line
          g.drawLine (400,200,400,130); // upto Capacitor
          g.drawLine (380,130 ,420,130);//btm capactior plate
          g.drawLine (380,110,420,110);//topcapacitor plate
          g.drawLine (400,110,400,50); // Capacitor to Top line
          g.drawLine (150,50,400,50); // Top Line
          g.drawLine (150,200,150,100); // upto Capacitor
          g.drawLine (150,130,150,50); // *********************************** Line which should Swing
    }I would also suggest you draw all those lines once to a BufferedImage and drawImage the BI in the paint override.
    db

  • Need to increase the font size of SAP printer

    Hi all,
    We had some new HP printers HP4015 which needs to print from SAP . we created the new device type ZHPLJCM1 after checking correct device type for it from HP printer site. For some users printouts are coming in small fonts ,they wanted it to print in big fonts .
    These are some of the  t codes  that they use KAH3 , FB03 , Y_DEV_39000067.
    we tried to change the printer fonts in SE73 of that particular device type and increased the font size , but that also ended in vain.
    Kindly suggest possible ways by which we can solve this issue.
    Please let me know if more information are needed.

    Hi,
    Is this ABAP lists, sapcript or smartforms? For sapscript or smartforms, you need to specify the font size in the paragraph/character formats for sapscript and in the smartstyle for smartforms.
    For ABAP lists, the font size is selected based on the format used. e.g. If you create a list with format X_65_255, it should print in landscape and the font size is calculated based on the size needed to fit 255 characters into a page. If the format is X_65_132, then the font size is calculated based on the size needed to fit 132 characters into a page so it is a bit larger.
    Regards,
    Aidan

  • HT1461 I created a partition and installed Windows through bootcamp. But I need to increase my partition size due to me needing more space on the windows side. Can I do this with bootcamp, and how do I do it?

    I created a partition and installed Windows through bootcamp. But I need to increase my partition size due to me needing more space on the windows side. Can I do this with bootcamp, and how do I do it?

    Welcome to Apple Communities
    You can delete the partition in Boot Camp Assistant or use Camptune to modify it

  • Reg- OOP ALV

    Hi,
      I am new to OOP ALV and I need to know when we will use split or custom or docking containers
    and whether its possible to have mean value (Average) and graphics output in normal ALV (using FM concept).
    Kindly expecting replies.
    Regards,
    Sathish

    You can use the class CL_GUI_SPLITTER_CONTAINER. Pass the docking container reference as the PARENT for the constructor method of the splitter class.
    For e.g.
    CREATE OBJECT <ref_to_splitter>
    EXPORTING
    parent = <ref_to_dock>
    rows = <r>
    columns = <c>.
    You may get any number of splitter containers based on the rows & cols specified.
    hi go thru these sites,
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5ecd2fe11d2b467006094192fe3/content.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIDOCK/BCCIDOCK.pdf
    Some of the commonly used containers are custom container,splitter container,docking container.Some of the commonly used controls are trees,ALV Grids,Text Editors,HTML Controls,Picture Control.
    CL_GUI_DIALOGBOX_CONTAINER .:This is used to display the dialog box container.It is displayed in a movable modelless dialog box which can have a title.
    Chk demo program:RSDEMO_DIALOGBOX_CONTROL
    CL_GUI_CUSTOM_CONTAINER :SAP Custom Container to build a control into an area on a screen or subscreen. You define the area occupied by the control in the Screen Painter. The default size of the control that you place in the Custom Container is the same as that of the container itself.
    Chk demo program:RSDEMO_CUSTOM_CONTROL
    CL_GUI_ALV_GRID:This is a control.The ALV grid control tool allows you to display and print non-hierarchial lists in a standardized format.The list data is displayed as a table on the screen.
    Chk demo program:BCALV*
    For ALV: http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    You will get sample programs for all the containers and the controls on this link:
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    You can use the class CL_GUI_SPLITTER_CONTAINER. Pass the docking container reference as the PARENT for the constructor method of the splitter class.
    For e.g.
    CREATE OBJECT <ref_to_splitter>
    EXPORTING
    parent = <ref_to_dock>
    rows = <r>
    columns = <c>.
    You may get any number of splitter containers based on the rows & cols specified
    hi go thru these sites,
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5ecd2fe11d2b467006094192fe3/content.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIDOCK/BCCIDOCK.pdf
    Some of the commonly used containers are custom container,splitter container,docking container.Some of the commonly used controls are trees,ALV Grids,Text Editors,HTML Controls,Picture Control.
    CL_GUI_DIALOGBOX_CONTAINER .:This is used to display the dialog box container.It is displayed in a movable modelless dialog box which can have a title.
    Chk demo program:RSDEMO_DIALOGBOX_CONTROL
    CL_GUI_CUSTOM_CONTAINER :SAP Custom Container to build a control into an area on a screen or subscreen. You define the area occupied by the control in the Screen Painter. The default size of the control that you place in the Custom Container is the same as that of the container itself.
    Chk demo program:RSDEMO_CUSTOM_CONTROL
    CL_GUI_ALV_GRID:This is a control.The ALV grid control tool allows you to display and print non-hierarchial lists in a standardized format.The list data is displayed as a table on the screen.
    Chk demo program:BCALV*
    For ALV: http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    You will get sample programs for all the containers and the controls on this link:
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    You can use the class CL_GUI_SPLITTER_CONTAINER. Pass the docking container reference as the PARENT for the constructor method of the splitter class.
    For e.g.
    CREATE OBJECT <ref_to_splitter>
    EXPORTING
    parent = <ref_to_dock>
    rows = <r>
    columns = <c>.
    You may get any number of splitter containers based on the rows & cols specified
    Re: ALV Block List - Calculate Average
    Is there any functionality for AVERAGE in ALV, like do_sum, subtot?
    ALV in graphics ?
    Re: ALV OOPS Split container
    reward points if useful,

  • OOP ALV - Setting specific records as editable

    Hello everyone,
    Is there a way for an ALV grid/OOP ALV to set certain fields as editable?
    I have tried setting specific columns as editable through field catalog setup, but I don't need all records of that column to be editable. I just need specific records to be editable. Is this possible with ALV or I have no other choice but to use Table Control?
    Please help.
    Sincerely,
    Ice

    Hi Ice,
    this code will work 4 u.
    *& Report  ZDEMO_ALVGRID_EDIT                                          *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic ALV grid, Enhanced to display specific fields as          *
    *& editable depending on field value                                   *
    REPORT  ZDEMO_ALVGRID_EDIT                 .
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      field_style  TYPE lvc_t_styl, "FOR DISABLE
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: it_fieldcat TYPE lvc_t_fcat,     "slis_t_fieldcat_alv WITH HEADER LINE,
          wa_fieldcat TYPE lvc_s_fcat,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE lvc_s_layo,     "slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM set_specific_field_attributes.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      wa_fieldcat-fieldname   = 'EBELN'.
      wa_fieldcat-scrtext_m   = 'Purchase Order'.
      wa_fieldcat-col_pos     = 0.
      wa_fieldcat-outputlen   = 10.
      wa_fieldcat-emphasize   = 'X'.
      wa_fieldcat-key         = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'EBELP'.
      wa_fieldcat-scrtext_m   = 'PO Item'.
      wa_fieldcat-col_pos     = 1.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'STATU'.
      wa_fieldcat-scrtext_m   = 'Status'.
      wa_fieldcat-col_pos     = 2.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'AEDAT'.
      wa_fieldcat-scrtext_m   = 'Item change date'.
      wa_fieldcat-col_pos     = 3.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MATNR'.
      wa_fieldcat-scrtext_m   = 'Material Number'.
      wa_fieldcat-col_pos     = 4.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MENGE'.
      wa_fieldcat-scrtext_m   = 'PO quantity'.
      wa_fieldcat-col_pos     = 5.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MEINS'.
      wa_fieldcat-scrtext_m   = 'Order Unit'.
      wa_fieldcat-col_pos     = 6.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'NETPR'.
      wa_fieldcat-scrtext_m   = 'Net Price'.
      wa_fieldcat-edit        = 'X'. "sets whole column to be editable
      wa_fieldcat-col_pos     = 7.
      wa_fieldcat-outputlen   = 15.
      wa_fieldcat-datatype     = 'CURR'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'PEINH'.
      wa_fieldcat-scrtext_m   = 'Price Unit'.
      wa_fieldcat-col_pos     = 8.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
    Set layout field for field attributes(i.e. input/output)
      gd_layout-stylefname = 'FIELD_STYLE'.
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
           EXPORTING
                i_callback_program      = gd_repid
               i_callback_user_command = 'USER_COMMAND'
                is_layout_lvc               = gd_layout
                it_fieldcat_lvc             = it_fieldcat
                i_save                  = 'X'
           TABLES
                t_outtab                = it_ekko
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO  CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  set_specific_field_attributes
          populate FIELD_STYLE table with specific field attributes
    form set_specific_field_attributes .
      DATA ls_stylerow TYPE lvc_s_styl .
      DATA lt_styletab TYPE lvc_t_styl .
    Populate style variable (FIELD_STYLE) with style properties
    The NETPR field/column has been set to editable in the fieldcatalog...
    The following code sets it to be disabled(display only) if 'NETPR'
    is gt than 10.
      LOOP AT it_ekko INTO wa_ekko.
        IF wa_ekko-netpr GT 10.
          ls_stylerow-fieldname = 'NETPR' .
          ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
                                                 "set field to disabled
          APPEND ls_stylerow  TO wa_ekko-field_style.
          MODIFY it_ekko FROM wa_ekko.
        ENDIF.
      ENDLOOP.
    endform.                    " set_specific_field_attributes
    kindly reward if found helpful.
    cheers,
    Hema.

  • Oops alv report not getting displayed

    Hi experts,
    I have  REQUIREMENT WHERE I NEED TO DISPLAY THREE REPORTS USING ALAV OOPS.
    I have maintained a FM to call alv rport.
    ,I have two validations to make at to different location in report. The report needs to be displayed only after I perform two different validations.
    Issue is
    I call this ALV reprt Fm once at  :  AT SELECTION SCREEN OUTPUT
    and second time at : START OF SELECTION...
    Now I can see the ALV report ( oops with three reports in one container) very well when i call it from :  AT SECETION SCREEN OUTPUT(  Here I perform one of teh two validations which I have mentioned above...The validation performed here is of Selction screen valiudation).
    ButNow when I perform another validation at START OF SELECTIOn...here I cannot  see the ALV report...TEH screen appearing is blank...
    I am calling teh SAME OOPS ALV Function Module from both the locations...( START of SEL and AT selc O/p)..
    I have debugged teh code and checked teh feidcatalogue genration as well s output table .and also structure
    parameteers .. all of tehm are getting populated in both the cases ,,, but dont know why thye output doesnot appear in th last call..
    please help ., I am stuck up...
    TX a ton in adv...
    Regards,
    KT

    Hi Kshitija T,
    START-OF-SELECTION is processed in PAI of selection screen - as soon as all processing is done, the program flow will return, initialize your program an all of it's objects and display the selection screen again.
    I solved this by disabling the default report status EXECUTE button and used AT-SELECTION-SCREEN events.
    Regards,
    Clemens

  • How to raise error message from PAI of oops ALV report

    Hi All,
    I have a requirement to raise error message form editable oops alv . After entering the data and then press SAVE button .
    Please help.
    Thanks in Advance

    HI SK,
    Write a Local class (Event Handeler) to handel the events. In Editable ALV once the user enter a value, CL_GUI_ALV_GRID will raise an event called DATA_CHANGED.
    1. Define and Implement a local class to handle that event.
    In the implementation of this class you need to get data from imported object to an internal table, then compare the same with the ALV output table.
    * Local Class to handler the events raised from the ALV Grid
    CLASS LCL_EVENT_HANDLER DEFINITION.
    PUBLIC SECTION.
    * Method to handel EDIT event, DATA_CHANGED of CL_GUI_ALV_GRID
      METHODS : ON_DATA_CHANGE FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
                           IMPORTING ER_DATA_CHANGED.
    ENDCLASS.
    * Event handler class Implementation
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
      METHOD ON_DATA_CHANGE.
        DATA : LT_MODIFY TYPE LVC_T_MODI,
                   LS_MODIFY TYPE LVC_S_MODI.
    * Copying changed data into intenal table from Object
        LT_MODIFY = ER_DATA_CHANGED->MT_MOD_CELLS.
    * Modifying the ouptut table with the changed values
        IF LT_MODIFY[] IS NOT INITIAL.
              *Compare the ALV Output table with LT_MODIFY
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Then raise  a message on required condition in the same method.
    Note: To trigger the above method, you need to set event handler before displaying ALV (before calling method SET_TABLE_FOR_FIRST_DISPLAY)
    * Creating object for the Local event handler class
      CREATE OBJECT GR_HANDLER.
    * Set handler (call method of Event_handler) to handler Edit event
      SET HANDLER GR_HANDLER->ON_DATA_CHANGE FOR  GR_GRID.
    Regards,
    Vijay

  • How to set a selected checkbox in output internal table of oops ALV grid

    Hi All,
    i have a checkbox as first column in my ALV grid output using oops alv, when i select some checkbox, that rows have to be selected and i need to process only selected rows in user command.
    i have given the below code also in fieldcatolg.
    f_fldcat-fieldname = 'checkbox'.
    f_fldcat-tabname ='gi_output'
    f_fldcat-checkbox = 'X'.
    f_fldcat-edit = 'X'.
    but the checkbox is not getting set in internal table when i select some checkboxes.
    can anybody explain y the checkbox in internal table not getting set?
    Thanks,
    Srilakshmi.

    Hi,
    i tried already whatever u said, but still not resolved.Pasted my code below..can u please look into it.
    MODULE pbo OUTPUT.
      PERFORM init_container.
      PERFORM prepare_field_catalog.
      PERFORM prepare_layout.
      PERFORM display_output.
    ENDMODULE.                 " PBO  OUTPUT
    *&      Module  PAI  INPUT
          text
    MODULE pai INPUT.
       DATA: lt_rows TYPE lvc_t_row.
      CASE gv_okcode.
        WHEN gc_exit OR gc_back OR gc_canc. " Finish program
          LEAVE PROGRAM.
          when 'PRINT'.
           CALL METHOD gv_grid->get_selected_rows
                     IMPORTING et_index_rows = lt_rows.
            CALL METHOD cl_gui_cfw=>flush.
      ENDCASE.
    ENDMODULE.                 " PAI  INPUT
    *&      Form  INIT_CONTAINER
          text
    FORM init_container .
      CREATE OBJECT gv_custom_container
        EXPORTING
          container_name = gc_container.
      CREATE OBJECT gv_grid
        EXPORTING
          i_parent = gv_custom_container.
      CREATE OBJECT gv_document
        EXPORTING
          style = 'ALV_GRID'.
    *&      Form  PREPARE_FIELD_CATALOG
          text
    FORM prepare_field_catalog .
      PERFORM fill_catalog USING:
    'Table Name'   'Field Name' 'NoZero'   'sel-text'
      'GI_OUTPUT'  'CHECKBOX'   ' '           text-013  'X',
      'GI_OUTPUT'  'KUNNR'      'X'           text-003  ' ',
      'GI_OUTPUT'  'NAME1'      ' '           text-004  ' ',
      'GI_OUTPUT'  'BELNR'      'X'           text-005  ' ',
      'GI_OUTPUT'  'BLART'      ' '           text-006  ' ',
      'GI_OUTPUT'  'BUDAT'      ' '           text-007  ' ',
      'GI_OUTPUT'  'BLDAT'      ' '           text-008  ' ',
      'GI_OUTPUT'  'DMBTR'      ' '           text-009  ' ',
      'GI_OUTPUT'  'WAERS'      ' '           text-010  ' '.
    ENDFORM.                    " PREPARE_FIELD_CATALOG
    *&      Form  FILL_CATALOG
          text
    FORM fill_catalog  USING    fv_tabname
                                fv_fldname
                                fv_nozero
                                fv_seltxt
                                fv_checkbox.
      DATA f_fldcat TYPE lvc_s_fcat.
      f_fldcat-fieldname     = fv_fldname.
      f_fldcat-tabname       = fv_tabname.
      f_fldcat-no_zero       = fv_nozero.
      f_fldcat-coltext       = fv_seltxt.
      f_fldcat-checkbox      = fv_checkbox.
      IF fv_checkbox = gc_x.
        f_fldcat-edit = gc_x.
      ENDIF.
      APPEND f_fldcat TO gi_fieldcat.
    ENDFORM.                    " FILL_CATALOG
    *&      Form  PREPARE_LAYOUT
          text
    FORM prepare_layout .
      gs_layout-info_fname = 'COL'.
      gs_layout-cwidth_opt = gc_x.
      gs_layout-zebra      = gc_x.
      gs_layout-no_toolbar = gc_x.
      gs_layout-no_rowmark = '1'.
      gs_layout-sel_mode = 'A'.
    ENDFORM.                    " PREPARE_LAYOUT
    *&      Form  DISPLAY_OUTPUT
          text
    FORM display_output .
      CALL METHOD gv_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_outtab       = gi_output
          it_fieldcatalog = gi_fieldcat.
      CREATE OBJECT event_receiver.
      SET HANDLER event_receiver->handle_user_command FOR gv_grid.
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = gv_grid.
    ENDFORM.                    " DISPLAY_OUTPUT

  • Runtime error while trying to execute custom F4 help in OOP ALV grid.

    Dear All,
    I am trying to add custom search help for one of my column in ALV grid. I'm using OOP ALV, when i click for search help for that column, the system shows runtime error like below.
    I am new to OOP concept and tried to follow program BCALV_EDIT_03. But not getting this error occur. Please help me.
    With regards.

    Hi,
    In order to be able to provide a search help for a field in an ALV you must do the following things.
    1) The field where F4 help need to be attached needs to be made editable.
    2) Create an event handler class to handle the ONF4 event. You can refer the following code:
        CLASS lcl_alv1_handler DEFINITION.
        PUBLIC SECTION.
           "Tohandle F4 helps
           METHODS handle_f4 FOR EVENT onf4 OF cl_gui_alv_grid
                   IMPORTING e_fieldname e_fieldvalue es_row_no er_event_data
                             et_bad_cells e_display.
        ENDCLASS.
       CLASS lcl_alv1_handler IMPLEMENTATION.
          METHOD handle_f4.
    CASE e_fieldname.
         WHEN 'LIFNR'.               "Set F4 for courier vendor
             SELECT lifnr name1 FROM lfa1 INTO TABLE lt_lifnr.
           IF lt_lifnr IS NOT INITIAL.
             CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
               EXPORTING
                 retfield           = 'LIFNR'
                 window_title   = 'Vendors'
                 value_org       = 'S'
               TABLES
                 value_tab       = lt_lifnr
                 return_tab      = lt_return
               EXCEPTIONS
                 parameter_error = 1
                 no_values_found = 2
                 OTHERS          = 3.
             IF sy-subrc = 0.
               READ TABLE gt_final INTO wa_final_t INDEX es_row_no-row_id.
               IF sy-subrc = 0.
                 READ TABLE lt_return INTO wa_return INDEX 1.
                 IF sy-subrc = 0.
                   CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                     EXPORTING
                       input  = wa_return-fieldval
                     IMPORTING
                       output = lv_lifnr.
                   wa_final_t-lifnr  = lv_lifnr.
                   MODIFY gt_final FROM wa_final_t INDEX es_row_no-row_id.
                 ENDIF.
               ENDIF.
             ENDIF.
           ENDIF.
          ENDCASE.
             CALL METHOD o_alv->refresh_table_display.
          ENDMETHOD.
       ENDCLASS.
        In the above method, GT_FINAL-LIFNR is being overwritten by the LIFNR you had selected       from F4 help. So we will call the refresh_table_display after it to see the result in the ALV.
    3) After creating the ALV object, add the fields to which the F4 has to be added. For this you
        need to declare an internal table based on  lvc_t_f4. Use the following code. Here O_ALV is    my ALV object.:
       CREATE OBJECT o_container
           EXPORTING
             container_name              = 'CUSTCON'
           EXCEPTIONS
             cntl_error                  = 1
             cntl_system_error           = 2
             create_error                = 3
             lifetime_error              = 4
             lifetime_dynpro_dynpro_link = 5
             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.
         CREATE OBJECT o_alv
           EXPORTING
             i_parent          = o_container
           EXCEPTIONS
             error_cntl_create = 1
             error_cntl_init   = 2
             error_cntl_link   = 3
             error_dp_create   = 4
             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.
       CLEAR : gt_f4, wa_f4.
       wa_f4-fieldname   = 'LIFNR'.
       wa_f4-register    = 'X'.
       wa_f4-getbefore   = space.
       wa_f4-chngeafter  = space.
       APPEND wa_f4 TO gt_f4.
       Here I am assigning F4 to LIFNR field in the final internal table that is displayed using ALV.
       After this register this field for F4.
        CALL METHOD o_alv->register_f4_for_fields
           EXPORTING
              it_f4 = gt_f4.
       CREATE OBJECT o_alv_handler.
       SET HANDLER : o_alv_handler->handle_f4 FOR o_alv1.
       The object o_alv_handler is created based on the event handler class.
    I hope that this will solve your issue. Revert if this is solved.
    Rgards,
    Abijith

Maybe you are looking for