Field catalog generation using merge function

i am trying to generate the field catalog using the below finction module, but i am not able to generate one and it is showing that 'FIeld catalog not generated'
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
   EXPORTING
     I_PROGRAM_NAME               = LV_prog_name
     I_INTERNAL_TABNAME           = 'UT_FINAL'
  I_STRUCTURE_NAME            =
  I_CLIENT_NEVER_DISPLAY      = 'X'
     I_INCLNAME                   = LV_prog_name
  I_BYPASSING_BUFFER          =
  I_BUFFER_ACTIVE             =
    CHANGING
      CT_FIELDCAT                 = LT_FIELDCAT
   EXCEPTIONS
     INCONSISTENT_INTERFACE       = 1
     PROGRAM_ERROR                = 2
     OTHERS                       = 3
please help.

Hello Pramod
The following sample report show how to use definitions of internal tables for creating (SLIS) fieldcatalogs. The data include contains the data definition that is commented (below INCLUDE statement).
*& Report  ZUS_SDN_FIELDCATALOG_1
REPORT  zus_sdn_fieldcatalog_1.
TYPE-POOLS: slis.
include zus_sdn_slisfcat_Data.
*DATA: BEGIN OF ty_s_list.
*DATA:   bukrs    LIKE knb1-bukrs.
*DATA:   kunnr    LIKE knb1-kunnr.
*DATA:   vkorg    TYPE knvv-vkorg.  " type does not work !!!
*DATA: END OF ty_s_list.
DATA:
  gs_list         LIKE ty_s_list,
  gt_list         LIKE ty_s_list OCCURS 0.
DATA:
  gt_fcat         TYPE slis_t_fieldcat_alv.
START-OF-SELECTION.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name               = syst-repid
      i_internal_tabname           = 'TY_S_LIST'
*     I_STRUCTURE_NAME             =
*     I_CLIENT_NEVER_DISPLAY       = 'X'
      i_inclname                   = 'ZUS_SDN_SLISFCAT_DATA'
      I_BYPASSING_BUFFER           = 'X'
*     I_BUFFER_ACTIVE              =
    CHANGING
      ct_fieldcat                  = gt_fcat
    EXCEPTIONS
      inconsistent_interface       = 1
      program_error                = 2
      OTHERS                       = 3.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
      i_structure_name = 'LVC_S_FCAT'
    TABLES
      t_outtab         = gt_fcat
    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.
END-OF-SELECTION.
Regards
  Uwe

Similar Messages

  • ESB problem when use merge function in master/detail relationship

    I have some problem with the merge function in database adapter.
    details:
    I have 2 tables in master/detail relationship, both have GUID column as a primary key (GUID generated by ESB).
    'car_group' table
    pk : guid
    unique : group_no, datadate, datatime
    ===============================
    guid, group_no, datadate, datatime, group_detail
    ===============================
    1, 1, 01/01/2008, 09:00, groupdetail01
    2, 1, 01/01/2008, 10:00, groupdetail02
    'car_group_detail' table
    pk : guid
    fk : car_group_guid link to car_group.guid
    ==================
    guid, car_group_guid, detail
    ==================
    1, 1, detail01
    2, 1, detail02
    3, 2, detail03
    4, 2, detail04
    I used a file adapter as a input, here is an example text file
    M, 1, 01/01/2008, 09:00, groupdetail01
    D, detail01
    D, detail02
    M, 1, 01/01/2008, 10:00, groupdetail02
    D, detail03
    D, detail04
    Because I used merge function so I need to specify the columns that will be a condition for the insert/update,
    but I have generate GUID as a primary key in the tables, I can't used it, so in toplink I map my unique key as a primary key.
    The insert operation work fine but when update is required (for example, try to change 'group_detail' column of the master table in text file),
    an SQLException thrown, the log file shown the adapter try to update the GUID column of master table but the constraint not allowed.
    And yes, cause of GUID generate everytime so ESB try to update this column also, but I don't want to do like that, I need something
    like when update operation required, just ignored the GUID column.
    I try to mark read-only to the GUID column in Toplink mapping file but still have the same problem, it still generate UPDATE statement
    with the GUID column, and also I try to let the database trigger to generate GUID instead of ESB function, but it not works in master/detail
    relationship (I think the Toplink manage the relationship, is it right ?)
    Please advise, thanks for advance.

    somebody please help, thanks !!!

  • Field catalog issue using REUSE_ALV_FIELDCATALOG_MERGE

    Hello experts,
    I am using FM REUSE_ALV_FIELDCATALOG_MERGE and the field catalog is created fron the program.
    The field catalog finds the date field from the program but my internal table has been changed to make the date output YYYY/MM/DD.
    When I input the internal table in FM REUSE_ALV_GRID_DISPLAY the output displays the date as DD/MM/YYYY which is not what I want.
    How can I get FM REAUSE_ALV_GRID_DISPLAY to output the date in the format YYYY/MM/DD which is in my input table.
    I have spent a lot of time researching SDN on this but cannot find a similar solution however I did find some examples of changing the field catalogue. Can anybody suggest this is the way to go and if I would use the edit mask field in the field catalog or is there a better way.
    Thanks for any suggestions

    I think you can use a field exit for this.
    This means creating a field element and a domain in the data dictionary, the domain will need to have a conversion exit set by putting an entry in the 'Convers. Routine' field, eg MYDAT.
    You will need to create two function mdules as below:
    eg, CONVERSION_EXIT_MYDAT_OUTPUT
    and CONVERSION_EXIT_MYDAT_INPUT
    Your internal table will now need to refer to the data element you have created instead of the one you are currently using. ALV should automatically pick up the conversion exits and show the ouitput as you desire.
    FUNCTION CONVERSION_EXIT_MYDAT_OUTPUT.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(INPUT) TYPE  DATS
    *"  EXPORTING
    *"     REFERENCE(OUTPUT)
    concatenate input(4) '/' input4(2) '/' input6
    into output.
    ENDFUNCTION.
    FUNCTION CONVERSION_EXIT_MYDAT_INPUT.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(INPUT)
    *"  EXPORTING
    *"     REFERENCE(OUTPUT) TYPE  DATS
    data l_string type string.
    l_string = input.
    replace all occurrences of '/' in l_string with ' '.
    output = l_string.
    ENDFUNCTION.

  • ALV Field Catalog Generation

    Hello Experts,
    To prepare the field catalog for a ALV Grid Display, i created a DDIC structure which looks as below.
    DDIC structure from SE11.These are total 12 fields.
    DOKAR
    Types
    DOKAR
    CHAR
    3
    0
    Document Type
    DOKNR
    Types
    DOKNR
    CHAR
    25
    0
    Document number
    DOKTL
    Types
    DOKTL
    0
    0
    Documentation - text lines
    DOKVR
    Types
    DOKVR
    CHAR
    2
    0
    Document Version
    DKTXT
    Types
    DKTXT
    CHAR
    40
    0
    Document description
    DOSTX
    Types
    DOSTX
    CHAR
    16
    0
    Description of document status
    KTXT
    Types
    TDWOT_KTXT
    CHAR
    20
    0
    Object Description
    STABK
    Types
    STABK
    CHAR
    2
    0
    Status of a document (language-dependent)
    CAD_POS
    Types
    CAD_POS
    CHAR
    1
    0
    CAD: Assignment document  <-> material
    VRKSTAT
    Types
    VRKSTAT
    CHAR
    1
    0
    Link status of a document
    CVHIER
    Types
    CVHIER
    CHAR
    1
    0
    Document is in Hierarchy
    REVLV
    Types
    REVLV
    CHAR
    2
    0
    Revision Level
    When i try to run the FM:LVC_FIELDCATALOG_MERGE to generate field catalog i get 19 columns. Where as i should get only 12.
    Below are the columns,
    COL_POS     FIELDNAME
             1  DOKAR
             2  DOKNR
             3  ID
             4  OBJECT
             5  LANGU
             6  TYP
             7  DOKVERSION
             8  LINE
             9  DOKFORMAT
            10  DOKTEXT
            11  DOKVR
            12  DKTXT
            13  DOSTX
            14  KTXT
            15  STABK
            16  CAD_POS
            17  VRKSTAT
            18  CVHIER
            19  REVLV
    Can you let understand why the DDIC scan giving result like this ?
    Thanks,
    Naresh

    Hello,
    This is because the type DOKTL:

  • Automatic number generation using the function module

    Hai Everyone,
    I have the doubt in automatic number generation.
    i find the function module. the function module is
    report 123.
    *DATA: RC         LIKE INRI-RETURNCODE,
         NUMBER(10) TYPE C.
       CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING OBJECT          = 'HUGO'
                        NR_RANGE_NR     = '01'
            IMPORTING RETURNCODE      = RC
                        NUMBER          = NUMBER.
      CASE RC.
        WHEN ' '.
         everything o.k.
        WHEN '1'.
         the assigned number lies in the critical area.
        WHEN '2'.
         this was the last number, next time the first number
          will be assigned
      ENDCASE.
      write:/ number.
      in that function module what i want to give the  Exporting Object  'HOGO'. where i want to define the number range. what is meant by 'HOGO'.
    If any one faced the same problem plz help me.
    Thanks and regards,
    P.Naganjana Reddy

    Hai Chandrasekhar,
    in that what i have to give. Plz help me in this.
    Subobject data element
    To-year flag
    Number length domain
    No interval rolling
    Number range transaction
    Warning %
    Main memory buffering
    Group table
    Subobject field in group table
    Fld  NoRangeElement
    Fields int./ext. no.range no.
    Fld. NoRangeNo
    Display element text
    Thasnks and regards,
    P.Naganjana reddy

  • Field catalog issue

    Hi ppl
           I am building a field catalog for standard table 'API_VALI' , why am I not getting field catalog in xfield?
    TYPE-POOLS: slis.
    DATA: xfield      TYPE slis_t_fieldcat_alv,
    Code:
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-repid
          i_internal_tabname      = 'API_VALI'
        CHANGING
          ct_fieldcat                   = xfield
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.

    As ABAP_TECHINCAL has written, for standard tables you don't have to send the parameter i_internal_tabname . Instead you have to send the table name in the parameter i_structure_name.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = 'API_VALI'
    CHANGING
    ct_fieldcat = xfield
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    See the sample program given in the link below. It shows, how to create Field Catalog for INTERNAL TABLES
    http://www.erpgenie.com/abap/code/abap28.htm
    Also check the link
    field catalog generation using merge function

  • Doubt in using field catalog merge function

    hi all,
        When I am using the function maodule reuse_alv_fieldcatalog_merge for building the field catalog in alv list,it was giving abend message as
    'Field catalog is empty'.
         what might be the reason for such message?can some one help me out with the solution to get rid of that.
        I cant populate the catalog manually because I need to display nearly 40 fields in the output.
             Thanks in advance.

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
    Data declaration
    Data retrieval
    Build fieldcatalog
    Build layout setup
    *& Report ZDEMO_ALVGRID *
    *& Example of a simple ALV Grid Report *
    *& The basic requirement for this demo is to display a number of *
    *& fields from the EKKO table. *
    REPORT zdemo_alvgrid .
    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,
    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.
    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.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    * I.e. Field type may be required in-order for
    * the 'TOTAL' function to work.
    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-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-do_sum = 'X'. "Display column total
    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-totals_only = 'X'.
    * gd_layout-f2code = 'DISP'. "Sets fcode for when double
    * "click(press f2)
    * gd_layout-zebra = 'X'.
    * gd_layout-group_change_edit = 'X'.
    * gd_layout-header_text = 'helllllo'.
    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_top_of_page = 'TOP-OF-PAGE' "see FORM
    * 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.
    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 table it_ekko.
    endform. " DATA_RETRIEVAL

  • ALV report using the field catalog

    which is the quickest way to generate an ALV report using the field catalog merge.  without needing to build the field catalog manually .
    is it easier to create a structure and passe it in the field catalog merge .  if yes can i have an example plzzzz

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
                             Data declaration
                             Data retrieval
                             Build fieldcatalog
                             Build layout setup
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    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,
    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.
    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.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      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-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-do_sum      = 'X'.        "Display column total
      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-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    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_top_of_page   = 'TOP-OF-PAGE'  "see FORM
    *            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.
      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 table it_ekko.
    endform.                    " DATA_RETRIEVAL

  • HT1273 Can 1st generation Apple TV use AirPlay function ?

    Can 1st generation use AirPlay function ? Or need any upgrade ? Thanks

    We've posted some tips related to this matter on this link to Apple TV
    The tips are located toward the bottom of the page.
    The information likely won't help everyone but it will answer some questions.
    Per Apple policy, we want you to know we might benefit from your visit to our free information or even profit.
    We hope you find the information and video(s) useful.

  • Hierarchical alv list field catalog

    hi, i am diplaying a hierarchical list through ooalv.
    i am using the cl_salv_hierseq_table=>factory method.
    CALL METHOD cl_salv_hierseq_table=>factory
      EXPORTING
        t_binding_level1_level2 = lt_binding
      IMPORTING
        r_hierseq               = gr_table
      CHANGING
        t_table_level1          = T_HEADER
        t_table_level2          = T_ITEM.
    Could anyone please tell me how do i pass a FIELD CATALOG in the above function.
    I checked the parameters of the above function and it has only 4 parameters
    as used above.

    When you create the ALV using the SALV OM, system creates the Field Catalog and some default setting based on the table columns. So, change any of the column properties, you have to get the Column object and process the column.
    Check the program SALV_DEMO_HIERSEQ_COLUMN.
    Regards,
    Naimesh Patel

  • Modification on field catalog

    Dear friends.
    I kindly ask you to.I am using  'REUSE_ALV_FIELDCATALOG_MERGE' and 'REUSE_ALV_GRID_DISPLAY functions and in my field catalog as you can see below field catalog is used.How can I change the column names which has been in field catalog.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
            i_program_name               = sy-repid
         i_internal_tabname           = 'ITAB'
           i_structure_name             = 'ZSOMT_MALZ'
        i_client_never_display       = 'X'
            i_inclname                   = sy-repid
            i_bypassing_buffer           = 'X'
        I_BUFFER_ACTIVE              =
          CHANGING
            ct_fieldcat                  = lt_slis_fcat[]
    EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3

    Hi yusuf,
    1. just copy paste
    2. important code is marked in bold
    3.
    report abc.
    TYPE-POOLS : slis.
    <b>DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA : alvfcwa TYPE slis_fieldcat_alv.</b>
    data : begin of itab occurs 0.
            include structure usr02.
    data : end of itab.
    START-OF-SELECTION.
      select * from usr02
      into table itab.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-repid
          i_internal_tabname     = 'ITAB'
          i_inclname             = sy-repid
        CHANGING
          ct_fieldcat            = alvfc
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    IMPORTANT
      LOOP AT ALVFC INTO ALVFCWA.
        IF ALVFCWA-FIELDNAME = 'BNAME'.
          ALVFCWA-DDICTXT = 'L'.
          ALVFCWA-SELTEXT_L = 'HELLO HELLO'.
          MODIFY ALVFC FROM ALVFCWA.
        ENDIF.
      ENDLOOP.
    </b>
    Display
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          it_fieldcat   = alvfc
        TABLES
          t_outtab      = itab
        EXCEPTIONS
          program_error = 1
          OTHERS        = 2.
    regards,
    amit m.
    Message was edited by: Amit Mittal

  • How to use a function module in a subroutine

    Hi,
      I am working on a report where i have to create list boxes for 5 fields.Instead of using the function module VRM_SET_VALUES for each field can i use subroutine?
    If so, can anyone tell me the procedure for that?Its very urgent.
    Thanks and Regards,
    Hema

    Hi,
       I have written the code like this.
    FORM VALUE USING V_NAME.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING id     = v_name
                  values = v_list.
      ENDFORM.
    AT SELECTION-SCREEN OUTPUT.
      REFRESH V_LIST.
      v_name = 'P_COMMER'.
      v_value-key = 'C'.
      v_value-text = 'Commercial'.
      APPEND v_value TO v_list.
      v_value-key = 'N'.
      v_value-text = 'Non-Commercial'.
      APPEND v_value TO v_list.
      v_value-key = ' ' .
      v_value-text = 'Both'.
      APPEND v_value to v_list.
      PERFORM VALUE USING V_NAME.
      REFRESH V_LIST1.
      v_name1 = 'P_DIRECT'.
      v_value1-key = 'D'.
      v_value1-text = 'Direct'.
      APPEND v_value1 to v_list1.
      v_value1-key = 'I'.
      v_value1-text = 'Indirect'.
      APPEND v_value1 to v_list1.
      PERFORM VALUE USING V_NAME1.
      REFRESH V_LIST2.
      v_name2 = 'P_DIR'.
      v_value2-key = 'D'.
      v_value2-text = 'D'.
      APPEND v_value2 TO v_list2.
      v_value2-key = 'C'.
      v_value2-text = 'C'.
      APPEND v_value2 TO v_list2.
      v_value2-key = ' ' .
      v_value2-text = ' '.
      APPEND v_value2 to v_list2.
      PERFORM VALUE USING V_NAME2.
      REFRESH V_LIST3.
      v_name3 = 'P_LOW'.
      v_value3-key = 'Y'.
      v_value3-text = 'Yes'.
      APPEND v_value3 TO v_list3.
      v_value3-key = 'N'.
      v_value3-text = 'No'.
      APPEND v_value3 TO v_list3.
      v_value3-key = ' ' .
      v_value3-text = ''.
      APPEND v_value3 to v_list3.
      PERFORM VALUE USING V_NAME3.
      REFRESH V_LIST4.
      v_name4 = 'P_PARENT'.
      v_value4-key = 'P'.
      v_value4-text = 'Parent'.
      APPEND v_value4 TO v_list4.
      v_value4-key = 'C'.
      v_value4-text = 'Child'.
      APPEND v_value4 TO v_list4.
      v_value4-key = ' ' .
      v_value4-text = ''.
      APPEND v_value4 to v_list4.
      PERFORM VALUE USING V_NAME4.
      REFRESH V_LIST5.
      v_name5 = 'P_PREF'.
      v_value5-key = 'P'.
      v_value5-text = 'Preferred'.
      APPEND v_value5 TO v_list5.
      v_value5-key = 'N'.
      v_value5-text = 'NotPreferred'.
      APPEND v_value5 TO v_list5.
      v_value5-key = ' ' .
      v_value5-text = ''.
      APPEND v_value5 to v_list5.
      PERFORM VALUE USING V_NAME5.
    Now I am getting the same set of values in all the fields.How can I solve this?
    Thanks and Regards,
    Hema

  • Field catalog of internal tables

    Is it possible to get the field catalog of an internal table which is received as a parameter (TYPE ANY TABLE) of a function? I would like to pass the field catalog directly to the function
       "cl_alv_table_create=>create_dynamic_table"
    Pls help.

    HI
    I THINK THE FOLLOWING LINKS MAY BE HELPFUL FOR YOU ON THIS TOPIC.
    1 <a href="http://72.14.203.104/search?q=cache:pWyh46B05n0J:help.sap.com/saphelp_45b/helpdata/en/5c/c1c3de445f11d189f00000e81ddfac/content.htmfieldcatalogINABAP&hl=en&gl=in&ct=clnk&cd=1">Maintaining the Field Catalog</a>
    2 <a href="http://72.14.203.104/search?q=cache:02Sjvyc2bCMJ:help.sap.com/saphelp_erp2004/helpdata/en/52/5f060de02d11d2b47d006094192fe3/content.htmfieldcatalogINABAP&hl=en&gl=in&ct=clnk&cd=2">Generating the Field Catalog Manually</a>
    REGARDS
    ANOOP

  • When do we need field catalog merge in ALV

    Hi all,
    When do we actually need fieldcatalog merge in ALV's
    Regards
    Saroja.

    Hi
    When you want the field catalog to be populated directly from the internal table or a structure, you can use this function module. If you are populating the field catalog from an internal table in an include other than your top include, then the include name also has to be passed to the function module.
    reward if helpful
    regards,
    madhu

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

Maybe you are looking for

  • Iphone 3gs will not sync with itunes copied from external hard drive.

    We transferred itunes from an external hard drive to a new laptop pc, after copying it from our old desktop.  I connected a new iphone 3gs on the laptop (first iphone on any of our computers), and itunes does not recognize the iphone, so it does not

  • Is it possible to link an Audigy2 card with external haedphone & mic connections on my ca

    Is it possible to link an Audigy2 card with external haedphone & mic connections on my case as buying an external dri've bay is a bit expensi've, but i really want to make the most of my card. I currently use a usb headset and the sound is a bit naff

  • Attribute permissions

    Hi, based on the iPlanet knowledgebase I tried to set a user profile via the dynamic profile servlet, however this fails due to an error: com.iplanet.portalserver.profile.ProfileException: Permission denied in setting attributes or privileges This is

  • Fill in the blanks html5 stacking order issue

    I am using the fill in the blanks quiz slide but when I publish it out to html5 the dropdown boxes are stacking on top of eachother. How can this be fixed? Thanks, Oliver

  • Two exchange accounts on e71x???

    Hello, My client created an email account for me that I'd like to access from my phone. I already have my own company account set up through Mail for Exchange. I tried setting up the client account through XpressMail Professional but no luck. AT&T sa