Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dump in select statement ?

Hi All,

i have coded a small report which generates the report in ALV mode i am getting dump near the select statement not able to solve where is the mistake.

below is the code :

----


  • Includes *

----


*-----Standard header and footer routines

INCLUDE zsrepthd.

*--- ALV Routines

INCLUDE zvsdi_alv_routines_ver3.

*--- Authorization Check

INCLUDE z_selection_auth_check.

----


  • Types Declarations *

----


tables : ZVSDTOLLPEG.

----


  • Types Declarations *

----


  • Table ZVSDTOLLPEG

TYPES: BEGIN OF ty_ZVSDTOLLPEG,

MATNR(18) TYPE C,

WERKS(11) TYPE C,

ZWER1(11) TYPE C,

ZWER2(11) TYPE C,

ZMRO1(10) TYPE C,

ZEBEL(8) TYPE C,

ZMENG(13) TYPE C,

ZMEI3(9) TYPE C,

LFDAT(13) TYPE C,

ZLFDA(13) TYPE C,

ZMEN1(13) TYPE C,

ZMEI4(13) TYPE C,

ZZPO1(10) TYPE C,

ZVEBL(9) TYPE C,

ZMEN2(13) TYPE C,

ZMEI5(13) TYPE C,

ZLFD2(12) TYPE C,

ZSLAC(14) TYPE C,

ZSTAT(6) TYPE C,

ZDELE(16) TYPE C,

VFDAT(18) TYPE C,

MNG01(13) TYPE C,

MNG02(13) TYPE C,

MNG03(13) TYPE C,

MNG04(13) TYPE C,

ZDOH1(13) TYPE C,

ZMIRW1(30) TYPE C,

ZMARW2(30) TYPE C,

TGBED(13) TYPE C,

ZDEL2(11) TYPE C,

ZUREC(18) TYPE C,

ZLEVE(15) TYPE C,

END OF ty_ZVSDTOLLPEG.

*-Output table

TYPES: BEGIN OF ty_output,

MATNR(18) TYPE C,

WERKS(11) TYPE C,

ZWER1(11) TYPE C,

ZWER2(11) TYPE C,

ZMRO1(10) TYPE C,

ZEBEL(8) TYPE C,

ZMENG(13) TYPE C,

ZMEI3(9) TYPE C,

LFDAT(13) TYPE C,

ZLFDA(13) TYPE C,

ZMEN1(13) TYPE C,

ZMEI4(13) TYPE C,

ZZPO1(10) TYPE C,

ZVEBL(9) TYPE C,

ZMEN2(13) TYPE C,

ZMEI5(13) TYPE C,

ZLFD2(12) TYPE C,

ZSLAC(14) TYPE C,

ZSTAT(6) TYPE C,

ZDELE(16) TYPE C,

VFDAT(18) TYPE C,

MNG01(13) TYPE C,

MNG02(13) TYPE C,

MNG03(13) TYPE C,

MNG04(13) TYPE C,

ZDOH1(13) TYPE C,

ZMIRW1(30) TYPE C,

ZMARW2(30) TYPE C,

TGBED(13) TYPE C,

ZDEL2(11) TYPE C,

ZUREC(18) TYPE C,

ZLEVE(15) TYPE C,

END OF ty_output.

*-Output field name

TYPES: BEGIN OF ty_fields,

fname(60) TYPE c,

END OF ty_fields.

----


  • Internal Table Declarations *

----


DATA:it_ZVSDTOLLPEG TYPE STANDARD TABLE OF ty_ZVSDTOLLPEG,

*--- Alv parameters

it_out_alvp TYPE typ_alv_form_params, "for alv parameters

*-Field catalog for ALV display

it_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,

*-Field names for Excel column headings

it_ZVSDTOLLPEG_fields TYPE STANDARD TABLE OF ty_fields WITH HEADER LINE.

**--To store output for Principial Pegging data

DATA: BEGIN OF it_output occurs 0,

MATNR(18) TYPE C,

WERKS(11) TYPE C,

ZWER1(11) TYPE C,

ZWER2(11) TYPE C,

ZMRO1(10) TYPE C,

ZEBEL(8) TYPE C,

ZMENG(13) TYPE C,

ZMEI3(9) TYPE C,

LFDAT(13) TYPE C,

ZLFDA(13) TYPE C,

ZMEN1(13) TYPE C,

ZMEI4(13) TYPE C,

ZZPO1(10) TYPE C,

ZVEBL(9) TYPE C,

ZMEN2(13) TYPE C,

ZMEI5(13) TYPE C,

ZLFD2(12) TYPE C,

ZSLAC(14) TYPE C,

ZSTAT(6) TYPE C,

ZDELE(16) TYPE C,

VFDAT(18) TYPE C,

MNG01(13) TYPE C,

MNG02(13) TYPE C,

MNG03(13) TYPE C,

MNG04(13) TYPE C,

ZDOH1(13) TYPE C,

ZMIRW1(30) TYPE C,

ZMARW2(30) TYPE C,

TGBED(13) TYPE C,

ZDEL2(11) TYPE C,

ZUREC(18) TYPE C,

ZLEVE(15) TYPE C,

END OF it_output.

----


  • Data Declarations *

----


data: v_werks TYPE ZVSDTOLLPEG-werks,

v_zwer1 TYPE ZVSDTOLLPEG-zwer1,

v_zwer2 TYPE ZVSDTOLLPEG-zwer2,

v_matnr TYPE ZVSDTOLLPEG-matnr,

v_zmro1 TYPE ZVSDTOLLPEG-zmro1,

v_zzpo1 TYPE ZVSDTOLLPEG-zzpo1,

v_zslac TYPE ZVSDTOLLPEG-zslac,

v_zstat TYPE ZVSDTOLLPEG-zstat,

v_zdel2 TYPE ZVSDTOLLPEG-zdel2,

v_zdele TYPE ZVSDTOLLPEG-zdele.

----


  • Work Area Declarations *

----


DATA: x_output_zvsdtollpeg type ty_output,

x_zvsdtollpeg type ty_zvsdtollpeg.

----


  • Constants Declarations *

----


CONSTANTS:c_0 TYPE i VALUE 0,

c_x TYPE char1 VALUE 'X'.

----


  • Selection Screen *

----


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-f01.

SELECT-OPTIONS:

s_werks FOR v_werks OBLIGATORY,

s_zwer1 FOR v_zwer1,

s_zwer2 FOR v_zwer2,

s_matnr FOR v_matnr,

s_zmro1 FOR v_zmro1,

s_zzpo1 FOR v_zzpo1,

s_zslac FOR v_zslac,

s_zstat FOR v_zstat,

s_zdel2 FOR v_zdel2,

s_zdele FOR v_zdele.

SELECTION-SCREEN END OF BLOCK b1.

----


  • At Selection Screen *

----


AT SELECTION-SCREEN.

----


  • Start-of-Selection *

----


START-OF-SELECTION.

*--- Check Authorizations for Selection-screen

PERFORM z_selection_auth_check.

*--- Fetch Principial Pegging data

PERFORM fetch_status_pp.

----


  • End-of-Selection *

----


END-OF-SELECTION.

**-- Download data to final internal table.

PERFORM data_output.

IF NOT it_output[] IS INITIAL.

*--- Fill the structure for calling the ALV form

PERFORM initialize_alv_params.

**-- Display ALV Report

PERFORM setup_and_display_alv_ver2

USING

it_out_alvp "Parameter structure

it_output[] "Internal Data table(header table)

it_output[]. "Dummy table for Hierarchical ALV!!(item table)

ENDIF.

IF it_output[] IS INITIAL.

MESSAGE i999(zi) WITH 'No data found for selection'(i02).

ENDIF.

&----


*& Form FETCH_STATUS_PP

&----


  • Get the Principial Pegging data from ZVSDTOLLPEG table

----


FORM FETCH_STATUS_PP .

*-Fetch PP Data from ZVSDTOLLPEG table

REFRESH it_zvsdtollpeg.

SELECT MATNR

WERKS

ZWER1

ZWER2

ZMRO1

ZEBEL

ZMENG

ZMEI3

LFDAT

ZLFDA

ZMEN1

ZMEI4

ZZPO1

ZVEBL

ZMEN2

ZMEI5

ZLFD2

ZSLAC

ZSTAT

ZDELE

VFDAT

MNG01

MNG02

MNG03

MNG04

ZDOH1

ZMIRW1

ZMARW2

TGBED

ZDEL2

ZUREC

ZLEVE

FROM ZVSDTOLLPEG

INTO TABLE it_ZVSDTOLLPEG

WHERE matnr IN s_matnr

AND werks IN s_werks.

IF sy-subrc = c_0.

SORT it_ZVSDTOLLPEG BY matnr werks.

ENDIF.

ENDFORM. " FETCH_STATUS_PP

&----


*& Form f_top_of_page

&----


*This is to write the top of page

----


FORM top_of_page.

DATA: lt_list TYPE slis_t_listheader,

lx_list TYPE slis_listheader.

*--- Title name

CLEAR lx_list.

lx_list-typ = 'S'.

lx_list-key = 'Title name'(t13).

lx_list-info = sy-title.

APPEND lx_list TO lt_list.

IF NOT lt_list IS INITIAL.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = lt_list.

ENDIF.

ENDFORM. "top_of_page

&----


*& Form init_page_head

&----


  • Description : This subroutine initializes the fields in table BHDGD *

  • for printing the report heading. *

----


FORM init_page_head.

bhdgd-line1 = 'SLA Status Report'(h04).

bhdgd-line2 = sy-title.

bhdgd-lines = sy-linsz.

bhdgd-fcpyrt = sy-uline.

bhdgd-inifl = '0'.

ENDFORM. "init_page_head

----


  • FORM it_out_init_events *

----


  • -->this is form is to modify the events

----


FORM it_out_init_events

CHANGING

alevnts TYPE slis_t_event.

FIELD-SYMBOLS <alevnt> TYPE slis_alv_event.

LOOP AT alevnts ASSIGNING <alevnt>.

CASE <alevnt>-name.

WHEN slis_ev_top_of_page.

MOVE 'TOP_OF_PAGE' TO <alevnt>-form.

ENDCASE.

ENDLOOP.

ENDFORM. "it_out_init_events

&----


*& Form initialize_alv_params

&----


  • Description : Form to initialize ALV Params

----


FORM initialize_alv_params.

CONSTANTS: lc_alv_grid TYPE char1 VALUE 'G', "Grid

lc_u TYPE char1 VALUE 'U'.

MOVE 'IT_OUTPUT' TO it_out_alvp-tablname. "final table

MOVE sy-repid TO it_out_alvp-repid.

MOVE lc_alv_grid TO it_out_alvp-alvtype.

MOVE c_x TO it_out_alvp-bringdefaultvar.

MOVE lc_u TO it_out_alvp-variantsavetype.

ENDFORM. " initialize_alv_params

&----


*& Form DATA_OUTPUT

&----


  • Download data to final internal table

----


FORM DATA_OUTPUT .

loop at it_zvsdtollpeg into x_zvsdtollpeg.

x_output_zvsdtollpeg-matnr = x_zvsdtollpeg-matnr.

x_output_zvsdtollpeg-werks = x_zvsdtollpeg-werks.

x_output_zvsdtollpeg-zwer1 = x_zvsdtollpeg-zwer1.

x_output_zvsdtollpeg-zwer2 = x_zvsdtollpeg-zwer2.

x_output_zvsdtollpeg-ZMRO1 = x_zvsdtollpeg-ZMRO1.

x_output_zvsdtollpeg-ZEBEL = x_zvsdtollpeg-ZEBEL.

x_output_zvsdtollpeg-ZMENG = x_zvsdtollpeg-ZMENG.

x_output_zvsdtollpeg-ZMEI3 = x_zvsdtollpeg-ZMEI3.

x_output_zvsdtollpeg-LFDAT = x_zvsdtollpeg-LFDAT.

x_output_zvsdtollpeg-ZLFDA = x_zvsdtollpeg-ZLFDA.

x_output_zvsdtollpeg-ZMEN1 = x_zvsdtollpeg-ZMEN1.

x_output_zvsdtollpeg-ZMEI4 = x_zvsdtollpeg-ZMEI4.

x_output_zvsdtollpeg-ZZPO1 = x_zvsdtollpeg-ZZPO1.

x_output_zvsdtollpeg-ZVEBL = x_zvsdtollpeg-ZVEBL.

x_output_zvsdtollpeg-ZMEN2 = x_zvsdtollpeg-ZMEN2.

x_output_zvsdtollpeg-ZMEI5 = x_zvsdtollpeg-ZMEI5.

x_output_zvsdtollpeg-ZLFD2 = x_zvsdtollpeg-ZLFD2.

x_output_zvsdtollpeg-ZSLAC = x_zvsdtollpeg-ZSLAC.

x_output_zvsdtollpeg-ZSTAT = x_zvsdtollpeg-ZSTAT.

x_output_zvsdtollpeg-ZDELE = x_zvsdtollpeg-ZDELE.

x_output_zvsdtollpeg-VFDAT = x_zvsdtollpeg-VFDAT.

x_output_zvsdtollpeg-MNG01 = x_zvsdtollpeg-MNG01.

x_output_zvsdtollpeg-MNG02 = x_zvsdtollpeg-MNG02.

x_output_zvsdtollpeg-MNG03 = x_zvsdtollpeg-MNG03.

x_output_zvsdtollpeg-MNG04 = x_zvsdtollpeg-MNG04.

x_output_zvsdtollpeg-ZDOH1 = x_zvsdtollpeg-ZDOH1.

x_output_zvsdtollpeg-ZMIRW1 = x_zvsdtollpeg-ZMIRW1.

x_output_zvsdtollpeg-ZMARW2 = x_zvsdtollpeg-ZMARW2.

x_output_zvsdtollpeg-TGBED = x_zvsdtollpeg-TGBED.

x_output_zvsdtollpeg-ZDEL2 = x_zvsdtollpeg-ZDEL2.

x_output_zvsdtollpeg-ZUREC = x_zvsdtollpeg-ZUREC.

x_output_zvsdtollpeg-ZLEVE = x_zvsdtollpeg-ZLEVE.

append x_output_zvsdtollpeg to it_output.

endloop.

ENDFORM. " DATA_OUTPUT

----


  • FORM it_out_alv_fieldcat_before *

----


  • --> PT_FCAT *

  • --> ALVP *

----


FORM it_out_alv_fieldcat_before CHANGING

pt_fcat TYPE slis_t_fieldcat_alv

alvp TYPE typ_alv_form_params.

DATA: lx_fcat TYPE slis_fieldcat_alv.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'MATNR'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Material'(010).

lx_fcat-seltext_m = 'Material'(010).

lx_fcat-seltext_s = 'Material'(010).

lx_fcat-reptext_ddic = 'Material'(010).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'WERKS'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Supply plant'(013).

lx_fcat-seltext_m = 'Supply plant'(013).

lx_fcat-seltext_s = 'Supply plant'(013).

lx_fcat-reptext_ddic = 'Supply plant'(013).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZWER1'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Principal Plant'(015).

lx_fcat-seltext_m = 'Principal Plant'(015).

lx_fcat-seltext_s = 'Principal Plant'(015).

lx_fcat-reptext_ddic = 'Principal Plant'(015).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZWER2'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Market Plant'(013).

lx_fcat-seltext_m = 'Market Plant'(013).

lx_fcat-seltext_s = 'Market Plant'(013).

lx_fcat-reptext_ddic = 'Market Plant'(013).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMRO1'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'MRO'(003).

lx_fcat-seltext_m = 'MRO'(003).

lx_fcat-seltext_s = 'MRO'(003).

lx_fcat-reptext_ddic = 'MRO'(003).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZEBEL'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'MRO item number'(015).

lx_fcat-seltext_m = 'MRO item number'(015).

lx_fcat-seltext_s = 'MRO item number'(015).

lx_fcat-reptext_ddic = 'MRO item number'(015).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMENG'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Quantity'(008).

lx_fcat-seltext_m = 'Quantity'(008).

lx_fcat-seltext_s = 'Quantity'(008).

lx_fcat-reptext_ddic = 'Quantity'(008).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMEI3'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Unit of Measurement'(020).

lx_fcat-seltext_m = 'Unit of Measurement'(020).

lx_fcat-seltext_s = 'Unit of Measurement'(020).

lx_fcat-reptext_ddic = 'Unit of Measurement'(020).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'LFDAT'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Receipt date'(012).

lx_fcat-seltext_m = 'Receipt date'(012).

lx_fcat-seltext_s = 'Receipt date'(012).

lx_fcat-reptext_ddic = 'Receipt date'(012).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZLFDA'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Revised Date'(012).

lx_fcat-seltext_m = 'Revised Date'(012).

lx_fcat-seltext_s = 'Revised Date'(012).

lx_fcat-reptext_ddic = 'Revised Date'(012).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMEN1'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Adjusted Quantity'(017).

lx_fcat-seltext_m = 'Adjusted Quantity'(017).

lx_fcat-seltext_s = 'Adjusted Quantity'(017).

lx_fcat-reptext_ddic = 'Adjusted Quantity'(017).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMEI4'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Unit of measurement'(020).

lx_fcat-seltext_m = 'Unit of measurement'(020).

lx_fcat-seltext_s = 'Unit of measurement'(020).

lx_fcat-reptext_ddic = 'Unit of measurement'(020).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZZPO1'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'PO'(002).

lx_fcat-seltext_m = 'PO'(002).

lx_fcat-seltext_s = 'PO'(002).

lx_fcat-reptext_ddic = 'PO'(002).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZVEBL'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'PO item number'(014).

lx_fcat-seltext_m = 'PO item number'(014).

lx_fcat-seltext_s = 'PO item number'(014).

lx_fcat-reptext_ddic = 'PO item number'(014).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMEN2'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Quantity'(008).

lx_fcat-seltext_m = 'Quantity'(008).

lx_fcat-seltext_s = 'Quantity'(008).

lx_fcat-reptext_ddic = 'Quantity'(008).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMEI5'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Unit of Measurement'(020).

lx_fcat-seltext_m = 'Unit of Measurement'(020).

lx_fcat-seltext_s = 'Unit of Measurement'(020).

lx_fcat-reptext_ddic = 'Unit of Measurement'(020).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZLFD2'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Receipt date'(012).

lx_fcat-seltext_m = 'Receipt date'(012).

lx_fcat-seltext_s = 'Receipt date'(012).

lx_fcat-reptext_ddic = 'Receipt date'(012).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZSLAC'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'SLA compliance'(014).

lx_fcat-seltext_m = 'SLA compliance'(014).

lx_fcat-seltext_s = 'SLA compliance'(014).

lx_fcat-reptext_ddic = 'SLA compliance'(014).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZSTAT'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Status'(006).

lx_fcat-seltext_m = 'Status'(006).

lx_fcat-seltext_s = 'Status'(006).

lx_fcat-reptext_ddic = 'Status'(006).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZDELE'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Delete indicator'(017).

lx_fcat-seltext_m = 'Delete indicator'(017).

lx_fcat-seltext_s = 'Delete indicator'(017).

lx_fcat-reptext_ddic = 'Delete indicator'(017).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'VFDAT'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Verification date'(017).

lx_fcat-seltext_m = 'Verification date'(017).

lx_fcat-seltext_s = 'Verification date'(017).

lx_fcat-reptext_ddic = 'Verification date'(017).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'MNG01'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Stock at verification date'(030).

lx_fcat-seltext_m = 'Stock at verification date'(030).

lx_fcat-seltext_s = 'Stock at verification date'(030).

lx_fcat-reptext_ddic = 'Stock at verification date'(030).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'MNG02'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Requirements'(012).

lx_fcat-seltext_m = 'Requirements'(012).

lx_fcat-seltext_s = 'Requirements'(012).

lx_fcat-reptext_ddic = 'Requirements'(012).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'MNG03'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Receipts'(008).

lx_fcat-seltext_m = 'Receipts'(008).

lx_fcat-seltext_s = 'Receipts'(008).

lx_fcat-reptext_ddic = 'Receipts'(008).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'MNG04'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Projected stock'(015).

lx_fcat-seltext_m = 'Projected stock'(015).

lx_fcat-seltext_s = 'Projected stock'(015).

lx_fcat-reptext_ddic = 'Projected stock'(015).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZDOH1'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Days on Hand'(012).

lx_fcat-seltext_m = 'Days on Hand'(012).

lx_fcat-seltext_s = 'Days on Hand'(012).

lx_fcat-reptext_ddic = 'Days on Hand'(012).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMIRW1'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Minimum DOH'(011).

lx_fcat-seltext_m = 'Minimum DOH'(011).

lx_fcat-seltext_s = 'Minimum DOH'(011).

lx_fcat-reptext_ddic = 'Minimum DOH'(011).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZMARW2'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Maximum DOH'(011).

lx_fcat-seltext_m = 'Maximum DOH'(011).

lx_fcat-seltext_s = 'Maximum DOH'(011).

lx_fcat-reptext_ddic = 'Maximum DOH'(011).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'TGBED'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Daily Average Requirements'(026).

lx_fcat-seltext_m = 'Daily Average Requirements'(026).

lx_fcat-seltext_s = 'Daily Average Requirements'(026).

lx_fcat-reptext_ddic = 'Daily Average Requirements'(026).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZDEL2'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Delete MRO and PO'(017).

lx_fcat-seltext_m = 'Delete MRO and PO'(017).

lx_fcat-seltext_s = 'Delete MRO and PO'(017).

lx_fcat-reptext_ddic = 'Delete MRO and PO'(017).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZUREC'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'Upper Level Record Number'(025).

lx_fcat-seltext_m = 'Upper Level Record Number'(025).

lx_fcat-seltext_s = 'Upper Level Record Number'(025).

lx_fcat-reptext_ddic = 'Upper Level Record Number'(025).

APPEND lx_fcat TO pt_fcat.

CLEAR lx_fcat.

lx_fcat-tabname = 'IT_OUTPUT'.

lx_fcat-fieldname = 'ZLEVE'.

lx_fcat-col_pos = '1'.

lx_fcat-ddictxt = 'M'.

lx_fcat-seltext_l = 'PO Level Number'(015).

lx_fcat-seltext_m = 'PO Level Number'(015).

lx_fcat-seltext_s = 'PO Level Number'(015).

lx_fcat-reptext_ddic = 'PO Level Number'(015).

APPEND lx_fcat TO pt_fcat.

ENDFORM. " it_out_alv_fieldcat_before.

I am getting the dump as :

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught

in

procedure "FETCH_STATUS_PP" "(FORM)", nor was it propagated by a RAISING

clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

In a SELECT access, the read file could not be placed in the target

field provided.

Either the conversion is not supported for the type of the target field,

the target field is too small to include the value, or the data does not

have the format required for the target field.

Regards,

Shalini

Edited by: shalini reddy on Oct 6, 2008 3:48 PM

Tags:
Former Member
Former Member replied

The order of the fields seem ok.

It's probably the way the table is declared.

If you declare each component like

type table-component

it should work.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question