How to change header value dynamiclly in procedural alv report?

Hi experts,
I develop one report (using procedural alv ).I gave 3 input check boxes (ex : in 1st checkbox 10days in 2nd check box 20 days
in 3rd check box 30 days they entered like this in the input checkboxes in days 10,20,30.In o/p report 3 columns i maintained like this .   Column1                          column2                                                 column  3
       from 0 to 10 days          from 11 to 20 days                                    from 21 to 30 days.
I want to display alv report o/p like this in the respective columns.
For example they enter 15 25  35 (i/p)
o//p in alv report 
   Column1                          column2                                                 column  3
       from 0 to 15 days          from 16 to 25 days                                    from 26 to 35 days.
i want to change days  dynamically  in alv header  .Pls give me the code using procedural alv report.
If u want i will give u detail.pls help me in this.

I assume the main issue is chaniging ALV header dynamically, isn't it? For this you need to use field seltext_m of fieldcatalog for particular column. So you can contruct header dynamically by string concatenation like
parameters: pa_1st(2) type n,  "i.e. 15
                    pa_2nd(2) type n,  "i.e 25
                    pa_3rd(2) type n.  "i.e. 35
"first field
concatenate '0' 'to' pa_1st into it_fieldcatalog-seltext_m.
"next field
add 1 to pa_1st.
concatenate pa_1st 'to' pa_2nd into it_fieldcatalog-seltext_m.
"last field
add 1 to pa_2nd.
concatenate pa_2nd 'to' pa_3rd into it_fieldcatalog-seltext_m.
Refer [Sample ALV: Heading in ALV|http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm] for more information.
Regards
Marcin

Similar Messages

  • How to display multi line headings in procedural alv report

    Hi experts,
    How to display multi line heading in alv( procedural alv report) report.
    some columns single line and some columns multi line in the same report.
    ex: 
                  solvent consumed          solvent recovered
                   fresh |   recovery             recovery | spent                            batch no                         storage
    I am using procedural alv .pls give me idea.

    Hi Ram,
    Check the sample report [how to display multi line headings in procedural alv report|http://sample-code-abap.blogspot.com/2008/01/printing-multiple-line-header-and.html]
    Thanks,
    Duy

  • How to Change the position of Column in ALV report

    Hi Follks,
        Is is possible to change the position of column in ALV report?.If yes then how?
        Basically my requirement is, that user want afacility where , he should be able to change the position
        of column aftre he runs the report.
        Eg: After running the report , user felt that column 5 should be at position 2 , in that case he should   
               be able to drag column 5 at position 2 and vice versa.
        Please help me, how to solve this issue.
        Note : I am using NW 7.0 SP 9
        Regards
        PG
    Edited by: PG on Apr 13, 2009 11:10 AM

    HI PG,
    do below whie filling the filed catlog
    wa_fieldcat-fieldname        = 'Field1".
    wa_fieldcat-COL_POS = '1',
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname         = 'Field2".
    wa_fieldcat-COL_POS = '2',
    wa_fieldcat-fieldname         = 'Field3".
    wa_fieldcat-COL_POS = '3',
    Thanks!

  • How to show header value in each page same as Page field value.

    Hi there
    It would be very helpful if anyone could tell us how to set header value based on the page field.
    To make it more clear.. i have a field in my Rtf (which is basically a group by) so in each page it'll differ.. My Header should reflect the same as field value.
    what my understanding is header wont change for each page. but ,my requirement is something like i have to show the header which is same as one of my filed value..
    for eg:
    HEADER: ABC page-1
    Field - ABC
    HEADER:XYZ page-2
    Field - XYZ
    Regards - Vijay
    Edited by: Vijay Santhanam on 23-Oct-2008 3:51 PM

    Hi Haiye ,
    The Pointer you gave would keep Header ABC through out all the pages in report right, actually i had tried this and got same header for all pages,
    but what i need is my first page Header should be based on one of the field of Page 1, second pge Header again based on the same field, but the value may differ... (coz the page field is group by ).
    Would appreciate your help on this issue!!
    Regards - Vijay

  • How to change header and footer in login page in oracle apps r12

    Hi all,
    how to change header and footer in login page in oracle apps r12 and login button background color, please help me
    thanks
    saran

    how to change header and footer in login page in oracle apps r12 and login button background color, please help meTips For Personalizing The E-Business Suite R12 Login Page (MainLoginPG) [ID 741459.1]
    How to Personalize Login page in R12? [ID 579917.1]
    R12 Login Page: How to Personalize the Logo ? [ID 849752.1]
    Thanks,
    Hussein

  • How to change default value in a table using ALTER TABLE

    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    Any help will be needful for me
    Thanks and Regards

    user598986 wrote:
    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    ALTER TABLE  test
    MODIFY (indicator DEFAULT 'I'); 
    Incidentally, INDICATOR is a keyword in Oracle, so you may have problems using it as a column name. If so, you'll have to enclose the column name in double-quotes, and be careful to use capital letters inside the quotes.
    Edited by: Frank Kulash on Aug 26, 2009 11:42 AM

  • How to change characterics values in a ready input query ?

    How to change characterics values in a ready input query  base on a real time infocube?
    when  I use  IP to planning I want to change  characterices values that have exit in query?

    Hi,
    On the properties tab of the characteristics (within input query) you can decide what values need to be populated when the query opens.
    Is your exit written on char relationship?
    regards,
    Lokesh Nandula

  • How to change margin value in mode booklet printing Adobe Reader X ?

    How to change margin value in mode booklet printing Adobe Reader X ?

    Is this a form you created in Acrobat or is it a form that you're using with Reader? If the latter, there's nothing you can do if the field has been set up to format the field with a £ for the currency symbol.

  • How to change parameters values

    dear gurus,
    can someone guide how to change below values and apply and what steps should taken and changes do in files
    *     Shared_pool_size = 450M
    *     Db_cache_size = 750M
    *     Pga_aggregate_target = 125M
    *     Sort_area_size = 1M
    *     Open_cursors = 4000
    *     Processes = 300
    regards

    Hi If you have set SGA_TARGET and PGA_TARGET , then you dont have to wory for the individual components.Oracle internally handle it .
    You can get the information for each components using below sql
    sql> select * from V$SGA_DYNAMIC_COMPONENTS;
    If you want to find the optimize size of few of above components , take AWR report(by running script @?/rdbms/admin/awrrpt.sql). At below of report you will see SGA Memory Summary,Shared Pool Advisory,SGA Target Advisory,Java Pool Advisory,PGA Memory Advisory . So accordingly you can reset above mention parameters. This will put lower limit for these parameters
    Edited by: amitbansode on Sep 9, 2009 5:07 AM
    Edited by: amitbansode on Sep 9, 2009 5:08 AM

  • How to change variable values ?

    Dear friends,
    How to change variable values when we are broadcasting the Queires ?
    Do we need to change them everytime ?
    Thanks,
    N

    Hi,
    Please go through it.
    /people/ramkumar.ghattamaneni/blog/2008/02/25/using-variables-while-broadcasting-queries-to-the-portal-in-bi-7
    Regards,
    Ramkumar.

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi,
    I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDIT_02
    BCALV_TEST_GRID_EDIT_04_FORMS
    BCALV_TEST_GRID_EDITABLE
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_EDIT_05
    BCALV_EDIT_06
    BCALV_EDIT_07
    BCALV_EDIT_08
    BCALV_FULLSCREEN_GRID_EDIT
    But all these are using OO Concepts.
    Please help.
    Regards,
    Smruthi

    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,
      line_color(4) TYPE c,     "Used to store row color attributes
    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,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
    fieldcatalog-edit             = 'X'
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_layout-info_fieldname =      'LINE_COLOR'.
    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'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_pf_status_set = 'STATUS'
                i_callback_top_of_page   = 'TOP-OF-PAGE'
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
      LOOP AT it_ekko INTO wa_ekko.
        ld_color = ld_color + 1.
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM top-of-page                                              *
    FORM top-of-page.
      WRITE:/ 'This is First Line of the Page'.
    ENDFORM.
          FORM status                                                   *
    FORM status USING rt_extab TYPE slis_t_extab.  .
      SET PF-STATUS 'ALV'.
    ENDFORM.
          FORM USER_COMMAND                                          *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.            
      DATA ref1 TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref1.
      CALL METHOD ref1->check_changed_data.
      CASE rf_ucomm.
    when 'SAVE'.
    get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
    endcase.
    endform.
    ENDFORM.
    here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
    create a custom PF status and create push buttons and assign your ok codes in your PF status.
    if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
    Hope this will help you.
    Regards,
    phani.

  • How to place header and footer  in OO-ALV program using class

    How to place header and footer  in OO-ALV program using class tell me wat r the class we shold use and their attributes as well

    Hi Venkatesh,
    Take a look at this how to [ABAP Objects - ALV Model - Using Header and Footer|https://wiki.sdn.sap.com/wiki/x/xdw]
    it's explaining how to define the classes and use it for display an ALV with Header and Footer.
    Regards,
    Marcelo Ramos

  • How to change the folder name in the web report.

    hi experts,
    can anybody give me the solution, how to change the folder name in the web report. any help is appreciated.
    waiting for ur favourable response.
    thanks
    suri

    Hi Tony,
    Yes, the business requires, only to change in the webreport only not in bex and roles. any suggestions will be helpful to me.
    thanks
    surendra

  • How to change the standard layout sets in ALV List

    Hi Gurus,
    How to change the standard layout sets in ALV list.
    Is there any standard program ? or specific way to acheive this?
    Kindly drop some clues?Every valuable clues rewarded more points........
    Thanks in Advance,
    Dharani

    Hello Dharani
    All required function modules can be found in function group SLVC (assuming that you are using OO-based ALV or, at least, fm REUSE_ALV_GRID_DISPLAY_LVC):
    LVC_VARIANT_DEFAULT_GET (Read default display variant (description only, w/o field catalog))
    LVC_VARIANT_EXISTENCE_CHECK
    LVC_VARIANT_F4 (Display variant selection dialog box)
    LVC_VARIANT_SELECT (Read a display variant)
    For a sample report using LVC_VARIANT_DEFAULT_GET have a look at BCALV_GRID_10.
    Regards,
      Uwe

  • How many lines we can print using Non-alv report list ?

    Hi Experts,
    How many lines we can print using Non-alv report list ?
    regards
    vishnu

    Hi,
    It depends on the page size according to the page size we can set the no. of lines as follows,
    REPORT  program_name   NO STANDARD PAGE HEADING
    LINE-SIZE 290
    LINE-COUNT 65.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

Maybe you are looking for

  • Short Dump Error While Data load

    Hi Experts, Data load to an ODS in production server has been failed because of Short dump error. The error message shows " OBJECTS_OBJREF_NOT_ASSIGNED ". Request you to please help me out with a solution .. Regards, Vijay

  • Can't see my installed app but only a waiting Icon

    I tried to install Page on my iphone, but then because its size is over 20M, so my iphone paused it, then I installed Pages via Itunes, I can see boh the installed Pages icon and the waiting Pages from itunes, but on my iphone, only the waiting icon

  • Calling syntactically incorrect remote function module triggers short dump

    Hi, I have some Z Function modules in ABC system and i need to call them remotely from XYZ. There are some syntax errors in the FM's of ABC system so in the call of XYZ I am getting dump. Can I know how to capture if there is any syntax error in the

  • Need to select all equipments (PRT) for a plan (routing) operation (PLPO)

    hi, I need to select all assigned equipments (PRT) for a plan (routing) operation (PLPO). Can anybody tell me the database table relation or is there a function module or a BAPI or something like this !? Thanks Olaf Edited by: Olaf Krüger on Feb 20,

  • Duplicate files on import

    I am getting duplicates when I import from my memory card.  I have the settings in Elements 12 set to not import duplicates. They are named with a -1