Field Catalog error

Hi ABAPers,
I have defined an internal table I_ACV in the following manner.
DATA: BEGIN OF i_acv_new OCCURS 0.
        INCLUDE STRUCTURE zzscmm003.
DATA:   multi(1) TYPE c,
            z_ebeln  TYPE ekko-ebeln,
            z_elikz  TYPE ekpo-elikz,
      END OF i_acv_new.
DATA: i_acv   LIKE i_acv_new OCCURS 0 WITH HEADER LINE.
now , while creating the field catalog, the function module doesnt work. The field catalog is blank.
REFRESH gt_fieldcat.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
            i_program_name         = sy-repid
            i_internal_tabname     = 'I_ACV'
            i_inclname             = sy-repid
       CHANGING
            ct_fieldcat            = gt_fieldcat
       EXCEPTIONS
            inconsistent_interface = 1
            program_error          = 2
            OTHERS                 = 3.
  IF sy-subrc <> 0.
  ENDIF.
Any way in which this can be worked around?
Help is much appreciated.
Thanks in advance.

HI,
Please concentrate on Bold part below
it eill helpful to come out from ur problem.
*& Report  ZMV_ALV_GRID
REPORT  ZMV_ALV_GRID.
TYPE-POOLS : SLIS.
TABLES : KNA1.
TYPES : BEGIN OF ty_kna1 ,
        kunnr LIKE kna1-kunnr,
        name1 LIKE kna1-name1,
        land1 LIKE kna1-land1,
        END OF ty_kna1.
DATA: it_kna1 TYPE TABLE OF ty_kna1,
      WA_KNA1 TYPE TY_KNA1.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
       wa_fieldcat TYPE slis_fieldcat_alv.
DATA : wa_layout TYPE slis_layout_alv .
DATA : it_events TYPE  slis_t_event ,
       wa_events TYPE slis_alv_event.
DATA : it_listheader TYPE slis_t_listheader,
       wa_listheader TYPE slis_listheader,
       it1_listheader TYPE slis_t_listheader,
       wa1_listheader TYPE slis_listheader.
data : num type sy-pagno.
INITIALIZATION.
  PERFORM getevents using it_events.
  PERFORM desinlayout.
START-OF-SELECTION.
  PERFORM desinfieldcat.
  PERFORM datafetching.
  PERFORM display.
*&      Form  getevents
FORM getevents  USING    P_IT_EVENTS TYPE SLIS_T_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
   I_LIST_TYPE           = 0
IMPORTING
   ET_EVENTS             = P_IT_EVENTS
EXCEPTIONS
   LIST_TYPE_WRONG       = 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.
READ TABLE p_it_events INTO wa_events WITH KEY name = 'TOP_OF_PAGE'.
  wa_events-form = 'TOP_OF_PAGE'.
  MODIFY it_events FROM wa_events TRANSPORTING form WHERE name = wa_events-name.
  READ TABLE p_it_events INTO wa_events WITH KEY name = 'END_OF_LIST'.
  IF sy-subrc = 0.
    wa_events-form = 'END_OF_LIST'.
    MODIFY it_events FROM wa_events TRANSPORTING form WHERE name = wa_events-name.
  ENDIF.
ENDFORM.                    " getevents
*&      Form  top-of-page
FORM TOP_OF_PAGE.
  wa_listheader-typ = 'H'.
  wa_listheader-info = 'Customer Details'.
  APPEND wa_listheader TO it_listheader.
  CLEAR wa_listheader.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary       = it_listheader
      i_logo                   = 'EDSLOGO'
  I_END_OF_LIST_GRID       =
  I_ALV_FORM               =
  REFRESH it_listheader.
ENDFORM.                    "top-of-page
*&      Form  end-of-page
FORM END_OF_LIST.
wa1_listheader-typ = 'H'.
wa1_listheader-info = 'Address Details'.
  append wa1_listheader to it1_listheader.
  clear wa1_listheader.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary       = it1_listheader
     i_logo                   =
  I_END_OF_LIST_GRID       =
  I_ALV_FORM               =
  REFRESH it1_listheader.
ENDFORM.                    "end-of-page
*&      Form  desinlayout
FORM desinlayout .
  wa_layout-zebra = 'X'.
  wa_layout-colwidth_optimize = 'X'.
*wa_layout-edit = 'X'.
wa_layout-edit_mode = 'X'.
ENDFORM.          " desinlayout
*&      Form  desinfieldcat
FORM desinfieldcat .
wa_fieldcat-row_pos = 1.*
  wa_fieldcat-col_pos = 1.
  wa_fieldcat-fieldname = 'KUNNR'.
  wa_fieldcat-seltext_l = 'Cust Num'.
  wa_fieldcat-datatype = 'CHAR'.
  wa_fieldcat-outputlen = 10.
  wa_fieldcat-tabname = 'IT_KNA1'.
  wa_fieldcat-key = 'X'.
wa_fieldcat-hotspot = 'X'.*
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
wa_fieldcat-row_pos = 2.*
  wa_fieldcat-col_pos = 2.
  wa_fieldcat-fieldname = 'NAME1'.
  wa_fieldcat-seltext_l = 'Name'.
  wa_fieldcat-datatype = 'CHAR'.
  wa_fieldcat-outputlen = 35.
  wa_fieldcat-tabname = 'IT_KNA1'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
wa_fieldcat-row_pos = 3.*
  wa_fieldcat-col_pos = 3.
  wa_fieldcat-fieldname = 'LAND1'.
  wa_fieldcat-seltext_l = 'Country'.
  wa_fieldcat-datatype = 'CHAR'.
  wa_fieldcat-outputlen = 10.
  wa_fieldcat-tabname = 'IT_KNA1'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
ENDFORM.                    " desinfieldcat----
*&      Form  datafetching
FORM datafetching .
  SELECT kunnr name1 land1
         FROM kna1
         INTO TABLE it_kna1
        WHERE kunnr IN s_kunnr.
         UP TO 30 ROWS.
ENDFORM.                    " datafetching
*&      Form  display
      text
FORM display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
  I_INTERFACE_CHECK                 = ' '
  I_BYPASSING_BUFFER                = ' '
  I_BUFFER_ACTIVE                   = ' '
   I_CALLBACK_PROGRAM                = SY-REPID
  I_CALLBACK_PF_STATUS_SET          = ' '
  I_CALLBACK_USER_COMMAND           = ' '
  I_CALLBACK_TOP_OF_PAGE            = ' '
  I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
  I_CALLBACK_HTML_END_OF_LIST       = ' '
  I_STRUCTURE_NAME                  =
  I_BACKGROUND_ID                   = ' '
  I_GRID_TITLE                      =
  I_GRID_SETTINGS                   =
   IS_LAYOUT                         = WA_LAYOUT
   IT_FIELDCAT                       = IT_FIELDCAT
  IT_EXCLUDING                      =
  IT_SPECIAL_GROUPS                 =
  IT_SORT                           =
  IT_FILTER                         =
  IS_SEL_HIDE                       =
  I_DEFAULT                         = 'X'
  I_SAVE                            = ' '
  IS_VARIANT                        =
   IT_EVENTS                         = IT_EVENTS
  IT_EVENT_EXIT                     =
  IS_PRINT                          =
  IS_REPREP_ID                      =
  I_SCREEN_START_COLUMN             = 0
  I_SCREEN_START_LINE               = 0
  I_SCREEN_END_COLUMN               = 0
  I_SCREEN_END_LINE                 = 0
  I_HTML_HEIGHT_TOP                 = 0
  I_HTML_HEIGHT_END                 = 0
  IT_ALV_GRAPHICS                   =
  IT_HYPERLINK                      =
  IT_ADD_FIELDCAT                   =
  IT_EXCEPT_QINFO                   =
  IR_SALV_FULLSCREEN_ADAPTER        =
IMPORTING
  E_EXIT_CAUSED_BY_CALLER           =
  ES_EXIT_CAUSED_BY_USER            =
  TABLES
    T_OUTTAB                          = IT_KNA1
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
Rewards points if helpful.

Similar Messages

  • ALV field Catalog error

    I tried to build the field catalog as below but it is erroring saying it_fieldcat allows certain data types and ls_fieldcatalog uses a different data type
    TYPE-POOLS: slis.
    data ls_fieldcatalog type SLIS_T_FIELDCAT_ALV
                  with header line.
    DATA: i_repid type sy-repid.
    i_repid = sy-repid.
    ls_fieldcatalog-fieldname = 'Co Code'.
    ls_fieldcatalog-inttype = 'C'.
    ls_fieldcatalog-col_pos = '0'.
    APPEND ls_fieldcatalog to ls_fieldcatalog.
    clear ls_fieldcatalog.
    ls_fieldcatalog-fieldname = 'Document No'.
    ls_fieldcatalog-inttype = 'N'.
    ls_fieldcatalog-col_pos = '1'.
    APPEND ls_fieldcatalog to ls_fieldcatalog.
    clear ls_fieldcatalog.
    ls_fieldcatalog-fieldname = 'GL Account'.
    ls_fieldcatalog-inttype = 'N'.
    ls_fieldcatalog-col_pos = '2'.
    APPEND ls_fieldcatalog to ls_fieldcatalog.
    clear ls_fieldcatalog.
    ls_fieldcatalog-fieldname = 'Posting Date'.
    ls_fieldcatalog-inttype = 'D'.
    ls_fieldcatalog-col_pos = '3'.
    APPEND ls_fieldcatalog to ls_fieldcatalog.
    clear ls_fieldcatalog.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM             =  i_repid
        IT_FIELDCAT                    = ls_fieldcatalog
       I_SAVE                         = 'A'
      TABLES
        t_outtab                       = it_tab
    EXCEPTIONS
       PROGRAM_ERROR                  = 1
       OTHERS                         = 2

    Please fined the below code
    data ls_fieldcatalog type SLIS_FIELDCAT_ALV
           lt_fieldcatlog type SLIS_T_FIELDCAT_ALV
    DATA: i_repid type sy-repid.
    i_repid = sy-repid.
    ls_fieldcatalog-fieldname = 'Co Code'.
    ls_fieldcatalog-inttype = 'C'.
    ls_fieldcatalog-col_pos = '0'.
    APPEND ls_fieldcatalog to lt_fieldcatalog.
    clear ls_fieldcatalog.
    ls_fieldcatalog-fieldname = 'Document No'.
    ls_fieldcatalog-inttype = 'N'.
    ls_fieldcatalog-col_pos = '1'.
    APPEND ls_fieldcatalog to lt_fieldcatalog.
    clear ls_fieldcatalog.
    ls_fieldcatalog-fieldname = 'GL Account'.
    ls_fieldcatalog-inttype = 'N'.
    ls_fieldcatalog-col_pos = '2'.
    APPEND ls_fieldcatalog to lt_fieldcatalog.
    clear ls_fieldcatalog.
    ls_fieldcatalog-fieldname = 'Posting Date'.
    ls_fieldcatalog-inttype = 'D'.
    ls_fieldcatalog-col_pos = '3'.
    APPEND ls_fieldcatalog to lt_fieldcatalog.
    clear ls_fieldcatalog.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = i_repid
    IT_FIELDCAT = lt_fieldcatalog
    I_SAVE = 'A'
    TABLES
    t_outtab = it_tab
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2

  • Error in updating ALV field catalog in selection tool for Planning Book

    Hi ,
    I am Implementing BADI  '/SAPAPO/SDP_SELECTOR' to upload Custom Fields Data in Planning Book Selection Window under APO Location Product. These Custom Fields are maintained in Custom Table.So from Table whatever Custom Fields are availabe all the fields needs to be available in for selection. Once selection is done the same data to be uploaded into Planning Book.
    This BADI is working Fine upto 4 fields but if any extra fields are added in the table 'Error in updating ALV field catalog in selection tool' error Pop Up is coming. Here i am using Folloowing Methods
    1). INIT_OBJECT_LIST
    2). F4
    3). LOC_PROD_VALUE_LIST
    Please help on the same if u have any idea or clue.
    Thanks.

    Hi Srinivas!
    Where did you get your implementation from?
    It would be nice if you could debug your code!
    For the F4 method, have you seen this note?
    Note 544904 - Sample source code f.BAdI /SAPAPO/SDP_SELECTOR ('F4'method)
    Also check this note. It contains selection modifications in the BAdI:
    Note 376902 - SDP selector: Basis corrections for BADI
    I do not know your release and support package in your SCM, but you can find a lot of notes related to this BAdI.
    Thank you!
    Will
    SCM Support Consultant

  • Error in updating ALV field catalog in selection

    Dear all,
    I'm trying to use the standard transaction /SAPAPO/TSKEYFMAIN in order to check the TS values.
    After filling the selection variant, the system shows the following error:
    'Error in updating ALV field catalog in selection'
    Could you please provide me with further details about the error? What could be the possible solution to avoid it?
    Many thanks,
    SM

    Hi Marius,
    thanks for your answer.
    I would like to use the /SAPAPO/TSKEYFMAIN transaction to check massively the values in the time series KFs and not just the consistency of them.
    So do you know any other transaction to do it or do you have an idea about the error of /SAPAPO/TSKEYFMAIN?
    Thanks for your help!
    SM

  • ALV Display - Error in field catalog

    Hi ,
    I am facing a problem in ALV... Field catalot is not getting populated... I am getting a message field catalog not found...
    Can anyone please help me....... <URGENT DOES NOT EXIST HERE>...
    I am enclosing my code also.. please go thourh it and help it....
    REPORT ZINVENTORY
          LINE-SIZE  120
           LINE-COUNT 64.
          MESSAGE-ID Z2
          NO STANDARD PAGE HEADING..
    type-pools : slis.
    Tables                                                               *
    tables: zasset,
            anla,
            itob,
            equi.
    data: v_repid LIKE sy-repid.
    Selection Screen                                                     *
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .
    SELECT-OPTIONS : S_bukrs FOR anla-bukrs OBLIGATORY ,
                     S_kostl FOR itob-kostl .
    SELECTION-SCREEN : END OF BLOCK B1 .
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
    PARAMETERS: p_screen RADIOBUTTON GROUP gr1,
                p_list RADIOBUTTON GROUP gr1 DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK b2.
    Internal Tables                                                      *
    types: BEGIN OF ty_zasset, " occurs 0,
             equnr  like zasset-equnr,
             ANLN1 LIKE zasset-ANLN1, " Asset number
             ANLN2 LIKE zasset-ANLN2, " Sub Asset number
             BUKRS LIKE zasset-BUKRS, " Company Code
             KOSTL  like zasset-kostl,
             SCANNEDBY type zasset-scannedby,
             SCANNINGDATE type zasset-SCANNINGDATE,
             SCANNINGTIME type zasset-scanningtime,
             UPDATEDATE   type zasset-updatedate,
             UPDATETIME type zasset-updatetime,
           END OF ty_zasset.
    DATA: wa_zasset   TYPE ty_zasset.
    DATA: it_zasset TYPE TABLE OF ty_zasset with header line..
    types: BEGIN OF ty_zasset1, " occurs 0,
            equnr  TYPE equi-equnr,
             ANLN1 LIKE anla-ANLN1, " Asset number
             ANLN2 LIKE anla-ANLN2, " Sub Asset number
             BUKRS LIKE anla-BUKRS, " Company Code
             ernam like anla-ernam,
             erdat like anla-erdat,
            KOSTL  like anlz-kostl,
            SCANNEDBY type zasset-scannedby,
            SCANNINGDATE type zasset-SCANNINGDATE,
            SCANNINGTIME type zasset-scanningtime,
            UPDATEDATE   type zasset-updatedate,
            UPDATETIME type zasset-updatetime,
           END OF ty_zasset1.
    DATA: wa_zasset1   TYPE ty_zasset1.
    DATA: it_zasset1 TYPE TABLE OF ty_zasset1 with header line..
    types: BEGIN OF ty_zasset2, " occurs 0,
             equnr  like itob-equnr,
             ANLNr LIKE itob-ANLNr, " Asset number
             ANLuN LIKE itob-ANLuN, " Sub Asset number
             BUKRS LIKE itob-BUKRS, " Company Code
             timbi like itob-timbi,
             kostl like itob-kostl,
            KOSTL  like anlz-kostl,
            SCANNEDBY type zasset-scannedby,
            SCANNINGDATE type zasset-SCANNINGDATE,
            SCANNINGTIME type zasset-scanningtime,
            UPDATEDATE   type zasset-updatedate,
            UPDATETIME type zasset-updatetime,
           END OF ty_zasset2.
    DATA: wa_zasset2   TYPE ty_zasset2.
    DATA: it_zasset2 TYPE TABLE OF ty_zasset2 with header line..
    types: begin of ty_final , "occurs 0,
            equnr like itob-equnr,
            anln1 like anla-anln1,
            anln2 like anla-anln2,
            bukrs like anla-bukrs,
           ernam
           erdat
            kostl like itob-kostl,
            end of ty_final.
    DATA: wa_final   TYPE ty_final.
    DATA: it_final TYPE TABLE OF ty_final with header line..
    *DATA: it_zasset TYPE TABLE OF ty_zasset.
    *data: it_zasset1 type table of ty_zasset1.
    *data:wa_zasset type ty_zasset.
    *data:wa_zasset1 type ty_zasset1.
    Flags and Variables                                                 *
    DATA : F_ERROR.                   " Flag for No Data
    *pop field cat for f7
    data: V_SYREPID LIKE SY-REPID,
          IT_FLDCAT type slis_t_fieldcat_alv , "with header line,
          wa_fldcat   type slis_fieldcat_alv.
    *DATA : IT_FLDCATS TYPE SLIS_T_FIELDCAT_ALV.
    data: itab_events type slis_t_event,
          wa_events   type slis_alv_event.
    *data: wa_layout type slis_layout_alv.
    DATA : IT_COMMENTS TYPE SLIS_T_LISTHEADER,
           WA_COMMENTS TYPE SLIS_LISTHEADER.
    DATA : IT_SORTINFO TYPE SLIS_T_SORTINFO_ALV,
           WA_SORTINFO TYPE SLIS_SORTINFO_ALV.
    Initialization                                                       *
    initialization.
      SY-REPID = V_REPID.
    At Selection Screen                                                  *
    AT SELECTION-SCREEN.
      PERFORM validation.
    Start Of Selection                                                   *
    start-of-selection.
    perform select_data.
    IF P_LIST = 'X'.
    perform get_field_catalog.
    PERFORM MODIFYFIELDCAT.
    perform get_events.
    perform write_comments.
    perform grid_display.
    *perform list_display.
    ENDIF.
    IF sy-subrc = 0.
       IF p_list = 'X'.
       loop at it_final.
       perform get_events.
       endloop.
       endif.
       endloop.
       else.
    *endif.
    End Of Selection                                                     *
    END-OF-SELECTION.
    *perform display_Recorsds.
    *loop at zasset.
    *&      Form  validation
          text
    -->  p1        text
    <--  p2        text
    FORM validation.
    *Local variables.
      DATA:
            lv_bukrs type anla-bukrs,
            lv_kostl type itob-kostl,
            lv_anln1 TYPE anla-anln1,        "MAterial Number
            lv_anln2 TYPE anla-anln2.
    *Validation for company code
      if not s_bukrs is initial.
        select single bukrs from anla
               into lv_bukrs
               where bukrs in s_bukrs.
        if sy-subrc <> 0.
    *Message used : Invalid company code.
        endif.
      endif    .
    Validation for cost center
      if not s_kostl is initial.
        select single kostl from itob
               into lv_kostl
               where kostl in s_kostl.
        if sy-subrc <> 0.
    *Message used : Invalid company code.
        endif.
      endif  .
    ENDFORM.                    " validation
    *&      Form  display
          text
    -->  p1        text
    <--  p2        text
    FORM display.
      write :/15 it_final-anln1,
      it_final-anln2,
                sy-vline.
    *-bukrs,
           it_zasset-anln1.
    ENDFORM.                    " display
    *&      Form  get_field_catalog
          text
    -->  p1        text
    <--  p2        text
    FORM get_field_catalog.
    *REFRESH IT_FLDCAT.
    *CLEAR IT_FLDCAT.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = V_REPID
       I_INTERNAL_TABNAME           = 'IT_FINAL'
       I_INCLNAME                   = V_REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = IT_FLDCAT
    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.
    ENDFORM.                    " get_field_catalog
    *&      Form  get_events
          text
    -->  p1        text
    <--  p2        text
    FORM get_events.
      WA_COMMENTS-TYP = 'H'.
      WA_COMMENTS-KEY = 'THIS IS THE HEADING.'.
      WA_COMMENTS-INFO = 'LIST OF SALES ORDERS'.
      APPEND WA_COMMENTS TO IT_COMMENTS.
    ENDFORM.                    " get_events
    *&      Form  grid_display
          text
    -->  p1        text
    <--  p2        text
    FORM grid_display.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
       I_CALLBACK_TOP_OF_PAGE            = 'FIRST PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      =  'LIST OF FLIGHT DETAILS'
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       =  it_fldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =  itab_events
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = it_final
    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.                    " grid_display
    *&      Form  write_comments
          text
    -->  p1        text
    <--  p2        text
    FORM write_comments.
      WA_COMMENTS-TYP = 'H'.
      WA_COMMENTS-KEY = 'THIS IS THE HEADING.'.
      WA_COMMENTS-INFO = 'LIST OF SALES ORDERS'.
      APPEND WA_COMMENTS TO IT_COMMENTS.
    ENDFORM.                    " write_comments
    *&      Form  select_data
          text
    -->  p1        text
    <--  p2        text
    FORM select_data.
      clear: it_zasset, it_zasset[].
      select  equnr "bukrs
              anln1
              anln2
              bukrs
              KOSTL
              SCANNEDBY
              SCANNINGDATE
              SCANNINGTIME
              UPDATEDATE
              UPDATETIME
              into table it_zasset "(g_anln1,g_anln2)
              from zasset
              where bukrs = zasset-bukrs..
          and   kostl = zasset-kostl.
      if sy-subrc = 0.
        sort it_zasset by anln1 anln2.
      endif.
    append it_zasset.
      clear it_zasset1.
      select
             equnr
              anln1
              anln2
              bukrs
              ernam
              erdat
             bukrs
             KOSTL
             SCANNEDBY
             SCANNINGDATE
             SCANNINGTIME
             UPDATEDATE
             UPDATETIME
              into table it_zasset1 "(g_anln1,g_anln2)
              from  anla
             where bukrs = it_zasset-bukrs.
      WHERE BUKRS IN S_BUKRS.
    and   kostl = anla-kostl.
      if sy-subrc = 0.
        select equnr
               anlnr
               anlun
               bukrs
               timbi
               kostl
               into table it_zasset2
               from itob
               for all entries in it_zasset1
              where bukrs = it_zasset1-bukrs
               WHERE   anlnr = it_zasset1-anln1.
      endif.
      APPEND IT_ZASSET1.
      IF SY-SUBRC = 0.
    *loop at it_zasset1 into wa_zasset1.
    loop at it_ZASSET1 into wa_zasset1.
    move wa_zasset1-bukrs to wa_final-bukrs.
        move wa_zasset1-anln1 to wa_final-anln1.
        move wa_zasset1-anln2 to wa_final-anln2.
    append wa_final to it_final.
    endloop.
    ENDIF.
    sort it_final.
    *LOOP AT IT_FINAL.
    *ENDLOOP.
    *ENDIF.
    *if sy-subrc = 0.
    *loop at it_zasset into wa_asset.
    *read table it_zasset into wa_asset with key anln2 = wa_asset-anln2
    *binary search.
    *read table it_final into wa_final with key anln2 = wa_final-anln2
    *binary search.
    *if wa_asset-anln2 = wa_final-anln2.
    *write : / 'error'.
    *endif.
    If sy-subrc <> 0.
       f_error = 'X'.
       write :  'No data Exists for the given selection in FA table'.
    else.
       loop at it_final.
         perform display.
       endloop.
    records exits in anla table also.
    endif.
    ENDFORM.                    " select_data
    *&      Form  MODIFYFIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM MODIFYFIELDCAT.
      LOOP AT IT_FLDCAT INTO WA_FLDCAT.
         CASE WA_FLDCAT-FIELDNAME.
            WHEN 'EQUNR'.
    WA_FLDCAT-COL_POS = 1.
              WA_FLDCAT-SELTEXT_L = 'aSSET'.
            WHEN 'ANLN1'.
            wa_FLDCAT-KEY = 'X'.
              WA_FLDCAT-COL_POS = 5.
              WA_FLDCAT-SELTEXT_L = 'aSSET'.
            WHEN 'ANLN2'.
              WA_FLDCAT-KEY = 'X'.
              WA_FLDCAT-COL_POS = 6.
            wa_FLDCAT-HOTSPOT = 'X'.
            WHEN 'BUKRS'.
              WA_FLDCAT-CURRENCY = 'INR'.
             WA_FLDCAT-SYMBOL = 'X'.
          ENDCASE.
        MODIFY IT_FLDCAT FROM WA_FLDCAT.
    *IT_FLDCAT-fieldname   = 'EQUNR'.
    IT_FLDCAT-seltext_m   = 'DOCUM_TYPE'.
    IT_FLDCAT-col_pos     = 1.
    IT_FLDCAT-outputlen   = 10.
    IT_FLDCAT-emphasize   = 'X'.
    IT_FLDCAT-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
    append IT_FLDCAT TO IT_FLDCAT.
    IT_FLDCAT-fieldname   = 'ANLN1'.
    IT_FLDCAT-seltext_m   = 'DOCUM_TYPE'.
    IT_FLDCAT-col_pos     = 1.
    IT_FLDCAT-outputlen   = 10.
    IT_FLDCAT-emphasize   = 'X'.
    IT_FLDCAT-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
    append IT_FLDCAT TO IT_FLDCAT.
      ENDLOOP.
    ENDFORM.                    " MODIFYFIELDCAT
    *&      Form  list_display
          text
    -->  p1        text
    <--  p2        text
    *FORM list_display.
    *CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BUFFER_ACTIVE                = ' '
      I_CALLBACK_PROGRAM             = V_SYREPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = 'FRM_USER_COMMAND'
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      = wa_layout
      IT_FIELDCAT                    = IT_FLDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = 'A'
      IS_VARIANT                     =
      IT_EVENTS                      = ITAB_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
    TABLES
       T_OUTTAB                       = IT_FINAL
    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.                    " list_display
    Edited by: Craig Cmehil on Jul 18, 2008 10:01 AM

    The problem is with this...
    types: begin of ty_final , "occurs 0,
    equnr like itob-equnr,
    anln1 like anla-anln1,
    anln2 like anla-anln2,
    bukrs like anla-bukrs,
    ernam
    erdat
    kostl like itob-kostl,
    end of ty_final.
    DATA: wa_final TYPE ty_final.
    DATA: it_final TYPE TABLE OF ty_final with header line.
    when you are using Fieldcatalog merge you have to avoid using the TYPES Declaration of the internal table.
    Instead of that you can do this
    data: begin of it_final occurs 0,
    equnr like itob-equnr,
    anln1 like anla-anln1,
    anln2 like anla-anln2,
    bukrs like anla-bukrs,
    ernam
    erdat
    kostl like itob-kostl,
            end of it_final.

  • Error ,Field catalog not found while doing billing with DP90

    Dear Guru's
    while doing billing with DP90 transaction code.i have given service order no xxxx and execute.Then i received the below error
    Field catalog not found , Message no. 0K530.Kindly help me in solving the issue.
    Thank u
    S Babu

    hi naga suribabu,
    I am also facing same issue. can you please help, where to  check the configuration for this issue

  • Error in field catalog in ALV grid display using classes at do_sum = "X'.

    Hi,
    I'm using classes in ALV Grid display.
    the code for the field catalog is going to dump because of the statement in the field catalog for field 'netwr',do_sum = 'X'.
    that do_sum = 'X' is not working and going to dump when executed.with out that do_sum it is working fine. the error in dump analysys is showing sap standard incude LSLVCF01.
        assign component
               <ls_fieldcat>-fieldname of structure rt_data to <g_field>.
        if sy-subrc ne 0.
          message x000(0k).
        endif.
    sy-subrc is 4 when the program is being executed.
    CODE:
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      ls_fcat-fieldname = 'VBELN1'.
      ls_fcat-ref_field = 'VBELN'.
      ls_fcat-ref_table = 'VBRK'.
      ls_fcat-coltext = 'Invoice No'.
      ls_fcat-seltext = 'Invoice No'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
      ls_fcat-fieldname = 'BUDAT'.
      ls_fcat-ref_table = 'BKPF'.
      ls_fcat-coltext = 'Invoice Date'.
      ls_fcat-seltext = 'Invoice Date'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
    ls_fcat-fieldname = 'NETWR'.
      ls_fcat-ref_field = 'NETWR'.
      ls_fcat-ref_table = 'VBRK'.
      ls_fcat-coltext = 'Value of Invoice'.
      ls_fcat-seltext = 'Value of Invoice'.
      ls_fcat-datatype = 'CURR'.
      ls_fcat-do_sum = 'X'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
    ENDFORM.
    can u please look in the code and rectify the error,
    would appeciate ur response.
    regards,
    veera.

    Hi,
    try this..
    ls_fcat-fieldname = 'NETWR'.
    ls_fcat-ref_field = 'NETWR'.
    ls_fcat-ref_table = 'VBRK'.
    ls_fcat-coltext = 'Value of Invoice'.
    ls_fcat-seltext = 'Value of Invoice'.
    ls_fcat-datatype = 'CURR'.
    ls_fcat-do_sum = 'X'.
    <b>ls_fcat-cfieldname = 'WAERS'.</b>
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    Regards
    vijay

  • Runtime error in Field catalog creation

    when i try to create the field catalog using the following code.
    am getting *'Field Symbol Is not assigned' Runtime error.*
    Please give me idea how to resolve this issue.
    data: wa_field type slis_fieldcat_alv,
            t_field type slis_t_fieldcat_alv.
    LOOP AT t_role INTO wa_role.
        wa_field-col_pos = count1.
        wa_field-fieldname = wa_role-agr_name.
        wa_field-datatype = 'CHAR'.
        wa_field-ref_fieldname = 'AGR_NAME'.
        wa_field-ref_tabname = 'AGR_1251'.
        APPEND wa_field TO t_field.
        count1 = count1 + 1.
      ENDLOOP.
    Suitable  Answers rewarded with maximum points....
    it's Urgent...
    Give me Quick Reply.

    Error is having following short text.
    Field symbol has not yet been assigned.
    Error analysis                                                            
        You attempted to access an unassigned field symbol                    
        (data segment 92).                                                                               
    This error may occur for any of the following reasons:                
        - You address a typed field symbol before it is set using ASSIGN      
        - You address a field symbol that points to a line in an internal table
          that has been deleted                                               
        - You address a field symbol that had previously been reset using     
          UNASSIGN, or that pointed to a local field that no longer exists    
        - You address a global function interface parameter, even             
          though the relevant function module is not active,                  
          that is it is not in the list of active calls. You can get the list 
          of active calls from the this short dump.                           
    Please tell me how to correct this error.
    It is very Urgent..

  • Error "No field catalog available"

    hi
    im using REUSE_ALV_GRID_DISPLAY wni try to excute my program
    im getting the error as
    " No field catalog available"
    can any one help me in this issue?

    hi
    below is my code
    call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
            I_CALLBACK_PROGRAM      = SY-REPID
            IS_LAYOUT               = GS_LAYOUT
            IT_FIELDCAT             = I_FCAT
            I_DEFAULT               = 'X'
            I_SAVE                  = 'A'
    *      it_sort                 = gs_sort
            IS_PRINT                = LS_PRINT
          tables
            T_OUTTAB                = IT_FINAL[]
          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.

  • Sap upgrade-Error when using DP90-OK 530-field catalog not found

    Hello,
    We are upgrading from 4.6c to mySAP ERP 2004 version. In 4.6c, we are using VA90 to create a sales order from service order to bill the customer. However in mySAP ERP 2004 version, VA90 does not exist. So we created DP profile and are  using transaction code DP90 to create billling request for the service order. However, System gives an error 'Field catalog not found'. The diagnosis says that -The field catalog cannot be determined because the output table structure name was not specified.
    Please help us how to solve the above problem.
    Thanks
    Mala

    hi mala,
    did you see SAP-message 442170?
    it is all about conversion VA90/DP90.
    hope this helps.
    br,
    matthias
    Message was edited by: Matthias Leitner

  • No field catalog found error

    in alv grid display ,cant we use REUSE_ALV_FIELDCATALOG_MERGE if the o/p internal table is formed by joining 2 or more tables.

    Hi
    U can use REUSE_ALV_FIELDCATALOG_MERGE  for any internal table.
    If u r gettin the error 'no field catalog found' try passing the program name in the exporting parameter INCLUDE_NAME.
    Refer the foll code:
    *& Report  ZALV                                                 *
    REPORT  zalv                              .
    TYPE-POOLS SLIS.
    TABLES: vbrk,
            vbrp,
            likp,
            lips,
            vbak,
            vbap.
    DATA: FIELDCAT TYPE  SLIS_T_FIELDCAT_ALV.
    DATA: BEGIN OF tbl_inv OCCURS 10,
             vbeln LIKE vbrk-vbeln,
             erdat LIKE vbrk-erdat,
             kunnr LIKE vbrk-kunrg,
             sfakn LIKE vbrk-sfakn,
             xblnr LIKE vbrk-xblnr,
             posnr LIKE vbrp-posnr,
             vgbel LIKE vbrp-vgbel,
             vgpos LIKE vbrp-vgpos,
             aubel LIKE vbrp-aubel,
             aupos LIKE vbrp-aupos,
             matnr LIKE vbrp-matnr,
             arktx LIKE vbrp-arktx,
             werks LIKE vbrp-werks,
          END OF tbl_inv,
          BEGIN OF tbl_sales OCCURS 10,
             vbeln LIKE vbak-vbeln,
             erdat LIKE vbak-erdat,
             kunnr LIKE vbak-kunnr,
             posnr LIKE vbap-posnr,
             kwmeng LIKE vbap-kwmeng,
          END OF tbl_sales,
          BEGIN OF tbl_lips OCCURS 10,
             vbeln LIKE lips-vbeln,
             posnr LIKE lips-posnr,
             lfimg LIKE lips-lfimg,
             meins LIKE lips-meins,
          END OF tbl_lips.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS   s_werks FOR vbrp-werks OBLIGATORY.
    PARAMETERS p_vkorg LIKE vbrk-vkorg OBLIGATORY.       "Sales Organisation
    SELECT-OPTIONS : s_vtweg FOR vbrk-vtweg,
    "Distribution channel
                     s_spart FOR vbrk-spart,             "Division
                     s_erdat FOR vbrk-erdat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    IF s_vtweg IS INITIAL AND s_spart IS INITIAL.
      SELECT p~vbeln
             p~erdat
             p~kunrg
             p~sfakn
             p~xblnr
             q~posnr
             q~vgbel
             q~vgpos
             q~aubel
             q~aupos
             q~matnr
             q~arktx
             q~werks
             iNTO TABLE tbl_inv
             FROM vbrk AS p
             JOIN vbrp AS q
             ON pvbeln = qvbeln
             WHERE p~erdat IN s_erdat
             AND p~vkorg   = p_vkorg.
    ELSEIF s_vtweg IS INITIAL.
      SELECT   p~vbeln
               p~erdat
               p~kunrg
               p~sfakn
               p~xblnr
               q~posnr
               q~vgbel
               q~vgpos
               q~aubel
               q~aupos
               q~matnr
               q~arktx
               q~werks
               INTO TABLE tbl_inv
               FROM vbrk AS p
               JOIN vbrp AS q
               ON pvbeln = qvbeln
               WHERE p~erdat IN s_erdat
               AND p~vkorg   = p_vkorg
               AND p~spart IN s_spart.
    ELSEIF s_spart IS INITIAL.
      SELECT   p~vbeln
               p~erdat
               p~kunrg
               p~sfakn
               p~xblnr
               q~posnr
               q~vgbel
               q~vgpos
               q~aubel
               q~aupos
               q~matnr
               q~arktx
               q~werks
               INTO TABLE tbl_inv
               FROM vbrk AS p
               JOIN vbrp AS q
               ON pvbeln = qvbeln
               WHERE p~erdat IN s_erdat
               AND p~vkorg   = p_vkorg
               AND p~vtweg IN s_vtweg.
    ELSE.
      SELECT   p~vbeln
               p~erdat
               p~kunrg
               p~sfakn
               p~xblnr
               q~posnr
               q~vgbel
               q~vgpos
               q~aubel
               q~aupos
               q~matnr
               q~arktx
               q~werks
               INTO TABLE tbl_inv
               FROM vbrk AS p
               JOIN vbrp AS q
               ON pvbeln = qvbeln
               WHERE p~erdat IN s_erdat
               AND p~vkorg   = p_vkorg
               AND p~vtweg IN s_vtweg
               AND p~spart IN s_spart.
    ENDIF.
    WRITE 'Number of entries:'.
    DESCRIBE TABLE tbl_lips LINES sy-tfill.
    WRITE sy-tfill.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
        I_PROGRAM_NAME               = 'ZALV'
        I_INTERNAL_TABNAME           = 'TBL_INV'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
        I_INCLNAME                   = 'ZALV'
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
    CHANGING
        ct_fieldcat                  = FIELDCAT
    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'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
        I_CALLBACK_PROGRAM                = 'ZALV_68416'
    TABLES
        t_outtab                          = tbl_inv
    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.
    Message was edited by:
            Vasudha L

  • Error in Building Field catalog

    HI ,
    I have my  own defined struture and passed it to the FM Reuse_alv_fieldcatalog_merge with a single quotations and also tried with capital letters .
    After executing it , it says field catalog not found.
    PLease tell me how to rectify this error.
    Thanks,
    Ahmed.

    I believe you declared the structure in DDIC i.e. it is a Global Structure in your SAP Server....if same is not the case..you would get this error.
    Follow this to use this FM:
    http://www.sap-img.com/fu015.htm

  • Error! Adding fields to the field catalog

    Dear Sap Support,
    I just added to the field catalog the field "Short Text" which stands for product description. The thing is that this field was needed in the tab "Discount" of the Marketing Planner.
    This field was then added to the table CUS_002 (usage PR), and table CUS_003 (usage FG)
    After that change, when I go to the marketing planner and try to insert a new condition, the program throws an error just right after a choose the product to be discounted. The error says: "FIELD_CHECK/DEFAULT_VALUE_SUGGESTION for BAdI /SAPCND/ROLLNAME for filter COMT_PRSHTEXTX is missing"
    Where can I find that Badi? and how does it have to be implemented?
    Best regards,
    Mariana

    Hi Mariana
    How did you slove the problem
    Thanks
    Ron

  • Field catalog run time error

    When I use Field catalog merge I get an error
    i Get a runtime error where it says the internal table passes to field catalog marge has a different fields than I_INTERNAL_TABNAME  . What could be the problem.
    Thank you

    Are you passing the internal table name and field name as the same or different and also check the data type of the fieldcatalog internal table that you are passing to this FM
    Check this code for ur reference.
    REPORT ZMK_SHIPMENT_ALV
             no standard page heading
             line-size 105
             line-count 50(5)
             message-id zz.
           TABLES                  *
    tables : vttk, "Shipment Header
             vttp, " Shipment Item
             lips. " Delivary Item
    ***TYPE-POOLS                    *
    type-pools : slis.
    *WORK AREAS                      *
    Work area for field catalog table
    data : wa_fldcat type slis_fieldcat_alv.
    Work area for Events table
    data : wa_events type slis_alv_event.
    Work area for layout.
    data : wa_layout type slis_layout_alv.
    *INTERNAL TABLES                  *
    Shimpment Details
    data : begin of itab occurs 0,
           tknum like vttk-tknum,
           shtyp like vttk-shtyp,
           tpnum like vttp-tpnum,
           vbeln like vttp-vbeln,
           end of itab.
    data : begin of itab1 occurs 0,
           vbeln like lips-vbeln,
           posnr like lips-posnr,
           matnr like lips-matnr,
           lfimg like lips-lfimg,
           meins like lips-meins,
           end of itab1.
    For field catalog table
    data : it_fldcats type slis_t_fieldcat_alv.
    For Events table
    data : it_event type slis_t_event.
    For layout.
    data : it_layout type slis_layout_alv.
    For field catalog table
    data : it_fldcats1 type slis_t_fieldcat_alv.
    For Events table
    data : it_event1 type slis_t_event.
    data : v_repid like sy-repid.
    *Data Declaration
    data: v_index type sy-index,
          v_vbeln like lips-vbeln.
    *SELECT-OPTIONS
    selection-screen begin of block b with frame title text-001.
              select-options : s_tknum for vttk-tknum .
    selection-screen end of block b.
    *INITIALIZATION
    initialization.
    v_repid = sy-repid.
    *START-OF-SELCTION
    start-of-selection.
      perform populate-data.
      sort itab by tknum.
    top-of-page.
    write : 'Shipment wise Delivary Report'.
    end-of-selection.
      perform build-fieldcatalog.
      perform modify-fieldcatalog.
      perform build-events.
      perform modify-events.
      perform set-layout.
    perform set-pfstatus.
      perform list-display.
    *&      Form  populate-data
        Retrives the Shipment data depending on the selection criteria   *
    FORM populate-data.
    select vttk~tknum
           vttk~shtyp
           vttp~tpnum
           vttp~vbeln
           into table itab
           from vttk
           join vttp
           on vttptknum = vttktknum
           where vttk~tknum  in s_tknum.
       if sy-subrc <> 0.
        message e999 with 'NO DATA FOUND'.
        exit.
      endif.
    ENDFORM.                    " populate-data
    *&      Form  build-fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build-fieldcatalog.
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
    exporting
        i_program_name               = v_repid
        i_internal_tabname           = 'ITAB'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
        i_inclname                   = v_repid
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      changing
        ct_fieldcat                  = it_fldcats
      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.
    endform.                    " BUILD-FIELDCATALOG
    *&      Form  build-events
          text
    -->  p1        text
    <--  p2        text
    FORM build-events.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = it_event
    EXCEPTIONS
       LIST_TYPE_WRONG       = 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.                    " build-events
    *&      Form  set-layout
          text
    -->  p1        text
    <--  p2        text
    FORM set-layout.
      wa_layout-zebra          = 'X'.
      wa_layout-colwidth_optimize = 'X'.
      wa_layout-no_colhead = space.
      wa_layout-no_vline = space.
    ENDFORM.                    " set-layout
    *&      Form  list-display
          text
    -->  p1        text
    <--  p2        text
    FORM list-display.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = v_repid
      I_CALLBACK_PF_STATUS_SET       = ' '
       I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
      I_STRUCTURE_NAME               =
       IS_LAYOUT                      = wa_layout
       IT_FIELDCAT                    = it_fldcats
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       IT_EVENTS                      = it_event
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = itab
    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.                    " list-display
    *&      Form  modify-fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    FORM modify-fieldcatalog.
    loop at it_fldcats into wa_fldcat.
        case wa_fldcat-fieldname.
          when 'TKNUM'.
            wa_fldcat-seltext_l = 'Ship No.'.
            wa_fldcat-col_pos = 1.
            wa_fldcat-ddictxt = 'L'.
            when 'SHTYP'.
            wa_fldcat-seltext_l = 'Ship Type'.
            wa_fldcat-col_pos = 2.
            wa_fldcat-ddictxt = 'L'.
         when 'TPNUM'.
            wa_fldcat-seltext_l = 'Item No.'.
            wa_fldcat-col_pos = 3.
            wa_fldcat-ddictxt = 'L'.
         when 'VBELN'.
            wa_fldcat-seltext_l = 'Delivary No.'.
            wa_fldcat-hotspot = 'X'.
            wa_fldcat-col_pos = 4.
            wa_fldcat-ddictxt = 'L'.
        endcase.
       modify it_fldcats from wa_fldcat.
       endloop.
    ENDFORM.                    " modify-fieldcatalog
    *&      Form  modify-events
          text
    -->  p1        text
    <--  p2        text
    form modify-events.
        read table it_event with key name =
    slis_ev_top_of_page into wa_events.
       if sy-subrc = 0.
        wa_events-form = 'HEADER-OF-REPORT'.
        modify it_event from wa_events index sy-tabix.
        clear wa_events.
       endif.
       read table it_event with key name =
    slis_ev_end_of_page into wa_events.
       if sy-subrc = 0.
        wa_events-form = 'FOOTER-OF-REPORT'.
        modify it_event from wa_events index sy-tabix.
        clear wa_events.
      endif.
    endform.                    " modify-events
    *&      Form  HEADER-OF-REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM HEADER-OF-REPORT.
    write : 'Shipment Wise Delivary Report'.
    ENDFORM.                    " HEADER-OF-REPORT
    *&      Form  FOOTER-OF-REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM FOOTER-OF-REPORT.
    write : 'End of Report'.
    ENDFORM.                    " FOOTER-OF-REPORT
    *&      Form  USER_COMMAND
          User command for Calling Transaction VT03N, Execute and Refresh
    FORM user_command USING    p_ucomm    LIKE sy-ucomm
                             p_selfield TYPE slis_selfield.
      V_INDEX = P_SELFIELD-TABINDEX.      " holds the selected table index
      CASE p_ucomm.
        WHEN '&IC1'.
         IF p_selfield-fieldname eq 'VBELN'.
          perform secondary_list.
         ENDIF.
      ENDCASE.
    ENDFORM.                    " USER_COMMAND
    *&      Form  secondary_list
          text
    -->  p1        text
    <--  p2        text
    FORM secondary_list.
    perform get_data1.
    perform build-fieldcatalog1.
      perform modify-fieldcatalog1.
      perform build-events1.
      perform modify-events1.
    perform set-layout.
    perform set-pfstatus.
      perform list-display1.
    ENDFORM.                    " secondary_list
    *&      Form  build-fieldcatalog1
          text
    -->  p1        text
    <--  p2        text
    FORM build-fieldcatalog1.
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
    exporting
        i_program_name               = v_repid
        i_internal_tabname           = 'ITAB1'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
        i_inclname                   = v_repid
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      changing
        ct_fieldcat                  = it_fldcats1
      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.
    ENDFORM.                    " build-fieldcatalog1
    *&      Form  modify-fieldcatalog1
          text
    -->  p1        text
    <--  p2        text
    FORM modify-fieldcatalog1.
    loop at it_fldcats into wa_fldcat.
        case wa_fldcat-fieldname.
          when 'VBELN'.
            wa_fldcat-seltext_l = 'Delivary No.'.
            wa_fldcat-col_pos = 1.
            wa_fldcat-ddictxt = 'L'.
            when 'POSNR'.
            wa_fldcat-seltext_l = 'Item No'.
            wa_fldcat-col_pos = 2.
            wa_fldcat-ddictxt = 'L'.
         when 'MATNR'.
            wa_fldcat-seltext_l = 'Material'.
            wa_fldcat-col_pos = 3.
            wa_fldcat-ddictxt = 'L'.
         when 'LFIMG'.
            wa_fldcat-seltext_l = 'Quantity'.
            wa_fldcat-col_pos = 4.
            wa_fldcat-ddictxt = 'L'.
         when 'MEINS'.
            wa_fldcat-seltext_l = 'Unit of Measure'.
            wa_fldcat-col_pos = 5.
            wa_fldcat-ddictxt = 'L'.
        endcase.
       modify it_fldcats from wa_fldcat.
       endloop.
    ENDFORM.                    " modify-fieldcatalog1
    *&      Form  build-events1
          text
    -->  p1        text
    <--  p2        text
    FORM build-events1.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = it_event1
    EXCEPTIONS
       LIST_TYPE_WRONG       = 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.                    " build-events1
    *&      Form  modify-events1
          text
    -->  p1        text
    <--  p2        text
    FORM modify-events1.
    read table it_event1 with key name =
    slis_ev_top_of_page into wa_events.
       if sy-subrc = 0.
        wa_events-form = 'HEADER_OF_REPORT_2'.
        modify it_event1 from wa_events index sy-tabix.
        clear wa_events.
       endif.
    ENDFORM.                    " modify-events1
    *&      Form  list-display1
          text
    -->  p1        text
    <--  p2        text
    FORM list-display1.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = v_repid
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
      I_STRUCTURE_NAME               =
       IS_LAYOUT                      = wa_layout
       IT_FIELDCAT                    = it_fldcats1
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       IT_EVENTS                      = it_event1
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = itab1
    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.                    " list-display1
    *&      Form  get_data1
          text
    -->  p1        text
    <--  p2        text
    FORM get_data1.
    READ TABLE itab INDEX V_INDEX.
    v_vbeln = itab-vbeln.
    select vbeln
            posnr
            matnr
            lfimg
            meins
            from lips
            into table itab1
            where vbeln eq v_vbeln.
    ENDFORM.                    " get_data1
    *&      Form  header_of_report_2
          text
    -->  p1        text
    <--  p2        text
    FORM header_of_report_2.
    write: 'Delivary item list'.
    ENDFORM.                    " header_of_report_2
    *-- callling a transaction code by passing the initial screen value.
    *&      Form  USER_COMMAND
    form user_command using    p_ucomm    like sy-ucomm
                             p_selfield type slis_selfield.
      data : l_index like sy-index,
             l_refbn like cooi-refbn.
      l_index = p_selfield-tabindex.       " holds the selected table index
      clear l_refbn.
      case p_ucomm.
        when '&IC1'.
          clear l_refbn.
          read table it_outtab index l_index.
          if sy-subrc eq 0.
            l_refbn = it_outtab-refbn.
            if not l_refbn is initial.
              set parameter id 'BES' field l_refbn.
              call transaction 'ME23' and skip first screen.
            endif.
          else.
            message e999 with text-014.
          endif.
      endcase.
    endif.

  • New field catalog VOLEH does not display while creating a new table

    Dear Gurus,
    I added new field as VOLEH in field catalog. However while I am creating a new table, new field (VOLEH) does not showed in field catalog...
    How can I fix this error?
    Kind Regards,

    HI
    Check once again in IMG>SD>Basic func>Pricing >Pricing control>define condition table>conditions : allowed fields> go to new entries then press F4
    check here newly created field is there or not
    (or) when creation of condition table check properly next page button in menu bar
    still if its not found
    Note 21040 - Allowed Fields not appearing for condition table
    or check this link
    http://www.sap-basis-abap.com/sd/how-to-add-new-fields-to-field-catalog.htm
    Regards,
    Krishna.

Maybe you are looking for

  • Calling javascript code from navigation bar

    hi all, I created a javascript in HTML HEADER as follows: <script language="javascript" type="text/javascript"> <!-- var win=null; function NewWindow(mypage,myname,w,h,scroll,pos){ if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random(

  • Best way to Export/Import Workspace/Applications

    Hello Gurus, I am moving servers and wanted to know the best way to Move Workspaces/applications. I am on 10G R2 and Application Express 3.0.1. I have created a database on the new server. Installed http server. Installed Application Express. I can g

  • Intercompany Billing with 3rd party

    Hi, Can anyone help me in Steps of Intercompany billing with Third Party. Regards Amit Gupta

  • RV042 password Recovery without Reset

    last year our Nework Security Supervisor submit hes resignation and unfortunately did not endorse us the admin password we already tried the password he suggested when we contacted him but nothing of them works. Is there anyway we can reset the passw

  • Rotate won't work in Bridge. How can I fix it?

    Rotate won't work in Bridge. How can I fix it?