<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: alv run time error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680411#M886325</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try...&lt;/P&gt;&lt;P&gt;IT_FIELDCAT = it_fcat []&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Apr 2008 10:17:25 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2008-04-14T10:17:25Z</dc:date>
    <item>
      <title>alv run time error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680404#M886318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is program im getting a runtime in alv grid display function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz help me out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZHR_MAH32_PAYROLL
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  ZHR_MAH32_PAYROLL no standard page heading.

tables: pernr.

type-pools: slis.

infotypes:0000,"actions
          0001,"org assignment
          0002,"personal data
          0170."flexi plans

types: begin of ty_final,
          massn type massn,"actions
          massg type massg,"action type
          stat1 type stat1,"employment
          bukrs type bukrs,"company code
          werks type werks,"plant
          kostl type kostl,"stell
          sacha type sacha,"payroll adminstrator
          nachn type nachn,"last name
          vorna type vorna,"first name
          barea type ben_area,"benifit area
          pltyp type ben_type,"benifit plan type
          bplan type ben_plan,"benifit plan
          bnktr type char15,
      end of ty_final.

data: it_final type standard table of ty_final,
      wa_final like line of it_final.

data: w_pernr type pc200-pernr,
        w_molga type molga,
        w_seqnr type pc261-seqnr,
        w_relid type pcl2-relid.

data: it_rgdir type standard table of pc261,
      IT_RESULT TYPE  PAY99_RESULT,
      WA_BT TYPE PC209.

data: it_fcat type table of slis_fieldcat_alv ,
      wa_fcat type slis_fieldcat_Alv.

data: it_events type SLIS_T_EVENT,
      wa_event like line of it_events.

START-OF-SELECTION.

get pernr.

*subroutine to get the employee last record

 perform f_get_emp_data.

*step1

*subroutine for reading payroll resullts from rgdir

  perform f_get_payroll.

*step5 to process the records of the table cluster and internal tables using loop or read statements

  perform f_process_record.


*defining a macro

define: add_fcat.

clear wa_fcat.


wa_fcat-col_pos = &amp;amp;1.

wa_fcat-fieldname = &amp;amp;2.

wa_fcat-tabname  = &amp;amp;3.

wa_fcat-seltext_m = &amp;amp;4.

wa_fcat-outputlen = &amp;amp;5.

append wa_fcat to it_fcat.

end-of-definition.

end-of-selection.
*
*perform f_built_fcat.


perform f_display_report.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_get_emp_data
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_get_emp_data .

  rp_provide_from_last p0000 space pn-begda pn-endda.

  if pnp-sw-found eq 1.

    move: p0000-massn to wa_final-massn,
          p0000-massg to wa_final-massg,
          p0000-stat1 to wa_final-stat1.

  endif.

  rp_provide_from_last p0001 space pn-begda pn-endda.

  if pnp-sw-found eq 1.

    move:   p0001-bukrs to  wa_final-bukrs,
            p0001-werks to  wa_final-werks,
            p0001-kostl to  wa_final-kostl,
            p0001-sacha to  wa_final-sacha.

  endif.

  rp_provide_from_last p0002 space pn-begda pn-endda.

  if pnp-sw-found eq 1.

    move: p0002-nachn to wa_final-nachn,
          p0002-vorna to wa_final-vorna.

  endif.

  rp_provide_from_last p0170 space pn-begda pn-endda.

  if pnp-sw-found eq 1.

    move: p0170-barea to wa_final-barea,
          p0170-pltyp to wa_final-pltyp,
          p0170-bplan to wa_final-bplan.

  else.

    message i011(zhnc).

  endif.

ENDFORM.                    " f_get_emp_data
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_get_payroll
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_get_payroll .

*SUBROUTINE TO FETCH EMPLOYEE PAYROLL RUNS

  PERFORM F_GET_PAYROLL_RUNS.

  IF SY-SUBRC eq 0.

*step2

*subroutine for getting sequence number
    PERFORM F_GET_SEQNR.

    IF SY-SUBRC eq  0.

*SUBROUTINE FOR GETTING CLUSTER TABLE NAME or  CLUSTER ID OR RELID

      PERFORM F_GET_RELID.

      IF SY-DBCNT NE 0.

*EXTRACT PAYROLL DATA RESULTS BY PASSING EMPLOYEE NO, SEQ NO , CLUSTER TABLE NAME

        PERFORM F_GET_RESULT.

        IF SY-SUBRC EQ 0.

*perform F_PROCESS_REC.


        ENDIF.

      ENDIF.

    ENDIF.

  ENDIF.

ENDFORM.                    " f_get_payroll
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_GET_SEQNR
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_GET_SEQNR .

  CALL FUNCTION 'CD_READ_LAST'
    EXPORTING
      BEGIN_DATE      = pn-begda
      END_DATE        = pn-endda
    IMPORTING
      OUT_SEQNR       = w_seqnr
    TABLES
      RGDIR           = it_rgdir
    EXCEPTIONS
      NO_RECORD_FOUND = 1
      OTHERS          = 2.

ENDFORM.                    " F_GET_SEQNR
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_GET_RELID
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_GET_RELID .

  select single relid into w_relid from t500l where molga eq w_molga.

ENDFORM.                    " F_GET_RELID
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_GET_RESULT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_GET_RESULT .

  CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
    EXPORTING
      CLUSTERID                    = W_RELID
      EMPLOYEENUMBER               = pernr-pernr
      SEQUENCENUMBER               = W_SEQNR
      READ_ONLY_INTERNATIONAL      = 'X '
    CHANGING
      PAYROLL_RESULT               = IT_RESULT
    EXCEPTIONS
      ILLEGAL_ISOCODE_OR_CLUSTERID = 1
      ERROR_GENERATING_IMPORT      = 2
      IMPORT_MISMATCH_ERROR        = 3
      SUBPOOL_DIR_FULL             = 4
      NO_READ_AUTHORITY            = 5
      NO_RECORD_FOUND              = 6
      VERSIONS_DO_NOT_MATCH        = 7
      ERROR_READING_ARCHIVE        = 8
      ERROR_READING_RELID          = 9
      OTHERS                       = 10.


ENDFORM.                    " F_GET_RESULT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_GET_PAYROLL_RUNS
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_GET_PAYROLL_RUNS .

  CALL FUNCTION 'CU_READ_RGDIR'
    EXPORTING
      PERSNR          = pernr-pernr
    IMPORTING
      MOLGA           = w_molga
    TABLES
      IN_RGDIR        = it_rgdir
    EXCEPTIONS
      NO_RECORD_FOUND = 1
      OTHERS          = 2.

ENDFORM.                    " F_GET_PAYROLL_RUNS
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_process_record
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_process_record .

loop at it_result-inter-BT into wa_BT.

if wa_bt-lgart eq '/559'.

MOVE: wa_bt-betrg TO wa_final-bnktr.

APPEND WA_FINAL TO IT_FINAL.

CLEAR WA_FINAL.

ENDIF.

ENDLOOP.


ENDFORM.                    " f_process_record
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_display_report
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_display_report .

perform f_get_cat.

data:g_repid type sy-repid.

g_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   I_CALLBACK_PROGRAM                = g_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                         =
   IT_FIELDCAT                       = it_fcat
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS                 =
*   IT_SORT                           =
*   IT_FILTER                         =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
*   I_SAVE                            = ' '
*   IS_VARIANT                        =
*   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_final
 EXCEPTIONS
   PROGRAM_ERROR                     = 1
   OTHERS                            = 2
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

ENDFORM.                    " f_display_report
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_get_cat
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_get_cat .

add_fcat :

'1' 'massn' 'pa0000' 'actions'     '10',

'2' 'massg' 'pa0000' 'action type' '10',

'3' 'stat1' 'pa0000' 'employment'  '10',

'4' 'bukrs' 'pa0001' 'company code' '4',

'5' 'werks' 'pa0001' 'plant'        '4',

'6' 'kostl' 'pa0001' 'work center' '8',

'7' 'sacha' 'pa0001' 'payroll adminstrator' '10',

'8' 'nachn' 'pa0002' 'last name' '40',

'9' 'vorna' 'pa0002' 'first name' '40',

'10' 'barea' 'pa0170' 'benifit area'         '10',

'11' 'pltyp' 'pa0170' 'benefit paln type'    '10',

'12' 'bplan' 'pa0170' 'benefit paln'         '10'.

'13'  '' ''     'bank transfer amount'   '10'.

ENDFORM.                    " f_get_cat
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZHR_MAH32_PAYROLL
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  ZHR_MAH32_PAYROLL no standard page heading.

tables: pernr.

type-pools: slis.

infotypes:0000,"actions
          0001,"org assignment
          0002,"personal data
          0170."flexi plans

types: begin of ty_final,
          massn type massn,"actions
          massg type massg,"action type
          stat1 type stat1,"employment
          bukrs type bukrs,"company code
          werks type werks,"plant
          kostl type kostl,"stell
          sacha type sacha,"payroll adminstrator
          nachn type nachn,"last name
          vorna type vorna,"first name
          barea type ben_area,"benifit area
          pltyp type ben_type,"benifit plan type
          bplan type ben_plan,"benifit plan
          bnktr type char15,
      end of ty_final.

data: it_final type standard table of ty_final,
      wa_final like line of it_final.

data: w_pernr type pc200-pernr,
        w_molga type molga,
        w_seqnr type pc261-seqnr,
        w_relid type pcl2-relid.

data: it_rgdir type standard table of pc261,
      IT_RESULT TYPE  PAY99_RESULT,
      WA_BT TYPE PC209.

data: it_fcat type table of slis_fieldcat_alv ,
      wa_fcat type slis_fieldcat_Alv.

data: it_events type SLIS_T_EVENT,
      wa_event like line of it_events.

START-OF-SELECTION.

get pernr.

*subroutine to get the employee last record

 perform f_get_emp_data.

*step1

*subroutine for reading payroll resullts from rgdir

  perform f_get_payroll.

*step5 to process the records of the table cluster and internal tables using loop or read statements

  perform f_process_record.


*defining a macro

define: add_fcat.

clear wa_fcat.


wa_fcat-col_pos = &amp;amp;1.

wa_fcat-fieldname = &amp;amp;2.

wa_fcat-tabname  = &amp;amp;3.

wa_fcat-seltext_m = &amp;amp;4.

wa_fcat-outputlen = &amp;amp;5.

append wa_fcat to it_fcat.

end-of-definition.

end-of-selection.
*
*perform f_built_fcat.


perform f_display_report.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_get_emp_data
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_get_emp_data .

  rp_provide_from_last p0000 space pn-begda pn-endda.

  if pnp-sw-found eq 1.

    move: p0000-massn to wa_final-massn,
          p0000-massg to wa_final-massg,
          p0000-stat1 to wa_final-stat1.


  endif.

  rp_provide_from_last p0001 space pn-begda pn-endda.

  if pnp-sw-found eq 1.

    move:   p0001-bukrs to  wa_final-bukrs,
            p0001-werks to  wa_final-werks,
            p0001-kostl to  wa_final-kostl,
            p0001-sacha to  wa_final-sacha.


  endif.

  rp_provide_from_last p0002 space pn-begda pn-endda.

  if pnp-sw-found eq 1.

    move: p0002-nachn to wa_final-nachn,
          p0002-vorna to wa_final-vorna.


  endif.

  rp_provide_from_last p0170 space pn-begda pn-endda.

  if pnp-sw-found eq 1.

    move: p0170-barea to wa_final-barea,
          p0170-pltyp to wa_final-pltyp,
          p0170-bplan to wa_final-bplan.

  else.

    message i011(zhnc).

  endif.

ENDFORM.                    " f_get_emp_data
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_get_payroll
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_get_payroll .

*SUBROUTINE TO FETCH EMPLOYEE PAYROLL RUNS

  PERFORM F_GET_PAYROLL_RUNS.

  IF SY-SUBRC eq 0.

*step2

*subroutine for getting sequence number
    PERFORM F_GET_SEQNR.

    IF SY-SUBRC eq  0.

*SUBROUTINE FOR GETTING CLUSTER TABLE NAME or  CLUSTER ID OR RELID

      PERFORM F_GET_RELID.

      IF SY-DBCNT NE 0.

*EXTRACT PAYROLL DATA RESULTS BY PASSING EMPLOYEE NO, SEQ NO , CLUSTER TABLE NAME

        PERFORM F_GET_RESULT.

        IF SY-SUBRC EQ 0.

*perform F_PROCESS_REC.


        ENDIF.

      ENDIF.

    ENDIF.

  ENDIF.

ENDFORM.                    " f_get_payroll
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_GET_SEQNR
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_GET_SEQNR .

  CALL FUNCTION 'CD_READ_LAST'
    EXPORTING
      BEGIN_DATE      = pn-begda
      END_DATE        = pn-endda
    IMPORTING
      OUT_SEQNR       = w_seqnr
    TABLES
      RGDIR           = it_rgdir
    EXCEPTIONS
      NO_RECORD_FOUND = 1
      OTHERS          = 2.

ENDFORM.                    " F_GET_SEQNR
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_GET_RELID
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_GET_RELID .

  select single relid into w_relid from t500l where molga eq w_molga.

ENDFORM.                    " F_GET_RELID
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_GET_RESULT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_GET_RESULT .

  CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
    EXPORTING
      CLUSTERID                    = W_RELID
      EMPLOYEENUMBER               = pernr-pernr
      SEQUENCENUMBER               = W_SEQNR
      READ_ONLY_INTERNATIONAL      = 'X '
    CHANGING
      PAYROLL_RESULT               = IT_RESULT
    EXCEPTIONS
      ILLEGAL_ISOCODE_OR_CLUSTERID = 1
      ERROR_GENERATING_IMPORT      = 2
      IMPORT_MISMATCH_ERROR        = 3
      SUBPOOL_DIR_FULL             = 4
      NO_READ_AUTHORITY            = 5
      NO_RECORD_FOUND              = 6
      VERSIONS_DO_NOT_MATCH        = 7
      ERROR_READING_ARCHIVE        = 8
      ERROR_READING_RELID          = 9
      OTHERS                       = 10.


ENDFORM.                    " F_GET_RESULT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_GET_PAYROLL_RUNS
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_GET_PAYROLL_RUNS .

  CALL FUNCTION 'CU_READ_RGDIR'
    EXPORTING
      PERSNR          = pernr-pernr
    IMPORTING
      MOLGA           = w_molga
    TABLES
      IN_RGDIR        = it_rgdir
    EXCEPTIONS
      NO_RECORD_FOUND = 1
      OTHERS          = 2.

ENDFORM.                    " F_GET_PAYROLL_RUNS
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_process_record
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_process_record .

loop at it_result-inter-BT into wa_BT.

if wa_bt-lgart eq '/559'.

MOVE: wa_bt-betrg TO wa_final-bnktr.

APPEND WA_FINAL TO IT_FINAL.

CLEAR WA_FINAL.

ENDIF.

ENDLOOP.


ENDFORM.                    " f_process_record
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_display_report
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_display_report .

perform f_get_cat.

data:g_repid type sy-repid.

g_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   I_CALLBACK_PROGRAM                = g_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                         =
   IT_FIELDCAT                       = it_fcat
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS                 =
*   IT_SORT                           =
*   IT_FILTER                         =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
*   I_SAVE                            = ' '
*   IS_VARIANT                        =
*   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_final
 EXCEPTIONS
   PROGRAM_ERROR                     = 1
   OTHERS                            = 2
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

ENDFORM.                    " f_display_report
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  f_get_cat
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM f_get_cat .

add_fcat :

'1' 'massn' 'pa0000' 'actions'     '10',

'2' 'massg' 'pa0000' 'action type' '10',

'3' 'stat1' 'pa0000' 'employment'  '10',

'4' 'bukrs' 'pa0001' 'company code' '4',

'5' 'werks' 'pa0001' 'plant'        '4',

'6' 'kostl' 'pa0001' 'work center' '8',

'7' 'sacha' 'pa0001' 'payroll adminstrator' '10',

'8' 'nachn' 'pa0002' 'last name' '40',

'9' 'vorna' 'pa0002' 'first name' '40',

'10' 'barea' 'pa0170' 'benifit area'         '10',

'11' 'pltyp' 'pa0170' 'benefit paln type'    '10',

'12' 'bplan' 'pa0170' 'benefit paln'         '10'.

'13'  '' ''     'bank transfer amount'   '10'.

ENDFORM.                    " f_get_cat
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Apr 14, 2008 4:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 09:27:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680404#M886318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T09:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: alv run time error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680405#M886319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Mozam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you give me the error that you are getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 09:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680405#M886319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T09:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: alv run time error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680406#M886320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GET_WA_ASSIGNED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field symbol has not yet been assigned&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 09:47:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680406#M886320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: alv run time error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680407#M886321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;error is in this form..&lt;/P&gt;&lt;P&gt;give the names in CAPs.&lt;/P&gt;&lt;P&gt;instead of bukrs give BUKRS , and instead of pa0000 use PA0000 in quotes . for all fieldnames and table names use CAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_get_cat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add_fcat :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'1' 'MASSNR' 'PA0000' 'actions' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'2' 'MASSG' 'PA0000' 'action type' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'3' 'STAT1' 'AA0000' 'employment' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'4' 'BUKRS' 'pa0001' 'company code' '4',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'5' 'WERKS' 'pa0001' 'plant' '4',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'6' 'KOSTL' 'pa0001' 'work center' '8',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'7' 'sacha' 'pa0001' 'payroll adminstrator' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'8' 'nachn' 'pa0002' 'last name' '40',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'9' 'vorna' 'pa0002' 'first name' '40',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'10' 'barea' 'pa0170' 'benifit area' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'11' 'pltyp' 'pa0170' 'benefit paln type' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'12' 'bplan' 'pa0170' 'benefit paln' '10'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'13' '' '' 'bank transfer amount' '10'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " f_get_cat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 09:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680407#M886321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T09:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: alv run time error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680408#M886322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Moazam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem seems to be with following piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_get_cat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add_fcat :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'1' &lt;STRONG&gt;'massn' 'pa0000'&lt;/STRONG&gt; 'actions' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'2' 'massg' 'pa0000' 'action type' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'3' 'stat1' 'pa0000' 'employment' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'4' 'bukrs' 'pa0001' 'company code' '4',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'5' 'werks' 'pa0001' 'plant' '4',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'6' 'kostl' 'pa0001' 'work center' '8',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'7' 'sacha' 'pa0001' 'payroll adminstrator' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'8' 'nachn' 'pa0002' 'last name' '40',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'9' 'vorna' 'pa0002' 'first name' '40',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'10' 'barea' 'pa0170' 'benifit area' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'11' 'pltyp' 'pa0170' 'benefit paln type' '10',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'12' 'bplan' 'pa0170' 'benefit paln' '10'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'13' '' '' 'bank transfer amount' '10'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " f_get_cat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give table name and field name in capital letters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Talwinder&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 14, 2008 4:43 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 09:57:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680408#M886322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T09:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: alv run time error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680409#M886323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As YASH suggested provide the field details in CAPS.&lt;/P&gt;&lt;P&gt;One more thing I want to add is check whether you have provided the exact field name as the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 09:58:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680409#M886323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T09:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: alv run time error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680410#M886324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS ALL OF U &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT GOT SOLVED AFTER GIVING IN  CAPITAL LETTERS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 10:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680410#M886324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T10:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: alv run time error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680411#M886325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try...&lt;/P&gt;&lt;P&gt;IT_FIELDCAT = it_fcat []&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 10:17:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-run-time-error/m-p/3680411#M886325</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2008-04-14T10:17:25Z</dc:date>
    </item>
  </channel>
</rss>

