Skip to Content
avatar image
Former Member

ALV Problem

Hi,

I am creating a report using ALV and i have to display seletion parameters as the header of ALV. so i'm using split control and ALV Grid control. In top window i'm displaying header info based on selection screen. Now my question is I have 11 selection paramters, and if I display all 11 in new lines then half of the screen will be captured by this header which is not recommonded bcoz only half of the screen will be left for ALV. so what i'm doing is in one row i'm displaying 2 selection paramters e.g company code and posting date. I m using add_gap method of class 'cl_dd_document'. But add gap method is used for putting from last input. But what if user has not put any value in company code, then all my alignment is disturbed. It comes to left. So is there any other method which i can use on split control in this situation in which alighnment will not be disturbed....

Thanks,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 24, 2007 at 04:10 PM

    Hi,

    Displaying all selection criteria at one go should not be a problem. And even if it occupies half screen, user can use the scroll bar and adjust the width of top of page, so he can view details of output data.

    If you are printing this, then to avoid printing selection screen at each page, you can put condition IF SY-PAGNO = 1, then only it should print.

    Hope this helps.

    ashish

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 24, 2007 at 04:12 PM

    Hi,

    Check this

      data: text type sdydo_text_element.
      if v_plgrp ne c_gl.
        text = text-273.
      else.
        text = text-274.
      endif.
    
      call method document->add_text
        exporting
          text         = text
          sap_style    = space
          sap_color    = space
          sap_fontsize = cl_dd_document=>medium
          sap_emphasis = cl_dd_document=>strong
          style_class  = space.
      call method document->new_line.
      call method document->add_gap
        exporting
          width = 3.
    
      if v_plgrp ne c_gl.
        text = text-275.
      else.
        text = text-276.
      endif.
    
      call method document->add_text
        exporting
          text         = text
          sap_style    = space
          sap_color    = space
          sap_fontsize = cl_dd_document=>medium
          sap_emphasis = cl_dd_document=>strong
          style_class  = space.
      call method document->add_gap
        exporting
          width = 1.
      text = v_plgrp.
      call method document->add_text
        exporting
          text = text.
      call method document->add_gap
        exporting
          width = 1.
      select single grpdes into text from yattgrpt
             where spras eq sy-langu
               and plgrp eq v_plgrp.
      concatenate '-' text into text separated by space.
    
      call method document->add_text
        exporting
          text         = text
          sap_style    = space
          sap_color    = space
          sap_fontsize = cl_dd_document=>medium
          sap_emphasis = space
          style_class  = space.
    
    

    Add comment
    10|10000 characters needed characters exceeded