Skip to Content
avatar image
Former Member

Report Problem

Hi,

I have a Z report which is giving the error Incorrect value in the dynamic table..in ECC 6.0..

How can I solve this problem..

Thanks..

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 18, 2008 at 06:04 AM

    Problem Not Solved till now....

    Plz help..

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Please find the simple code below, it may help your cause.

      type-pools: slis.

      field-symbols: <dyn_table> type standard table,

      <dyn_wa>.

      data: alv_fldcat type slis_t_fieldcat_alv,

      it_fldcat type lvc_t_fcat.

      selection-screen begin of block b1 with frame title text-001.

      parameters: p_flds(5) type c.

      selection-screen end of block b1.

      start-of-selection.

      *build the dynamic internal table

      perform build_dyn_itab.

      *write 5 records to the alv grid

      do 5 times.

      perform build_report.

      enddo.

      *call the alv grid.

      perform call_alv.

      ************************************************************************

      *Build_dyn_itab

      ************************************************************************

      form build_dyn_itab.

      data: new_table type ref to data,

      new_line type ref to data,

      wa_it_fldcat type lvc_s_fcat.

      *Create fields .

      clear wa_it_fldcat.

      wa_it_fldcat-fieldname = 'name1'.

      wa_it_fldcat-datatype = 'mara-matnr'.

      wa_it_fldcat-intlen = 5.

      append wa_it_fldcat to it_fldcat .

      *

      *clear wa_it_fldcat.

      wa_it_fldcat-fieldname = sy-index.

      wa_it_fldcat-datatype = 'CHAR'.

      wa_it_fldcat-intlen = 5.

      append wa_it_fldcat to it_fldcat .

      *

      do p_flds times.

      clear wa_it_fldcat.

      wa_it_fldcat-fieldname = sy-index.

      wa_it_fldcat-datatype = 'CHAR'.

      wa_it_fldcat-intlen = 6.

      append wa_it_fldcat to it_fldcat .

      enddo.

      *Create dynamic internal table and assign to FS

      call method cl_alv_table_create=>create_dynamic_table

      exporting

      it_fieldcatalog = it_fldcat

      importing

      ep_table = new_table.

      assign new_table->* to <dyn_table>.

      *Create dynamic work area and assign to FS

      create data new_line like line of <dyn_table>.

      assign new_line->* to <dyn_wa>.

      endform.

      *********************************************************************

      *Form build_report

      *********************************************************************

      form build_report.

      data: fieldname(20) type c.

      data: fieldvalue(5) type c.

      data: index(3) type c.

      field-symbols: <fs1>.

      do p_flds times.

      index = sy-index.

      *Set up fieldvalue

      concatenate 'FLD' index into

      fieldvalue.

      condense fieldvalue no-gaps.

      assign component index of structure <dyn_wa> to <fs1>.

      <fs1> = fieldvalue.

      enddo.

      *Append to the dynamic internal table

      append <dyn_wa> to <dyn_table>.

      endform.

      ************************************************************************

      *CALL_ALV

      ************************************************************************

      form call_alv.

      data: wa_cat like line of alv_fldcat.

      do p_flds times.

      clear wa_cat.

      wa_cat-fieldname = sy-index.

      wa_cat-seltext_s = sy-index.

      wa_cat-outputlen = '6'.

      append wa_cat to alv_fldcat.

      enddo.

      *Call ABAP List Viewer (ALV)

      call function 'REUSE_ALV_GRID_DISPLAY'

      exporting

      it_fieldcat = alv_fldcat

      tables

      t_outtab = <dyn_table>.

      endform.

      With best wishes,

      Murthy.

  • avatar image
    Former Member
    Sep 17, 2008 at 11:05 AM

    By Entering Correct Value in the Dynamic Internal Table.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 18, 2008 at 06:29 AM

    Hi Prince Kumar,

    Paste your code first...

    Without seeing your code i don't think so u will get the solution..

    Give the full information on SDN to get the accurate and Timely result...

    Thanks & Regards

    ilesh 24x7

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Plz check this code:..

      **********************************************

      type-pools: slis.

      data: linecolor type slis_specialcol_alv occurs 0 with header line.

      data: alv_layout type slis_layout_alv.

      data: fieldcat type slis_t_fieldcat_alv,

      fieldcat_ln like line of fieldcat,

      sortcat type slis_t_sortinfo_alv,

      sortcat_ln like line of sortcat,

      eventcat type slis_t_event,

      eventcat_ln like line of eventcat,

      alv_print type slis_print_alv.

      data: col_pos type i,

      row_pos type i,

      n type i,

      list_price like konp-kbetr.

      data g_status type slis_formname value 'STANDARD_02'.

      data g_user_command type slis_formname value 'USER_COMMAND'.

      data: begin of itab occurs 0,

      vbeln like vbap-vbeln,

      posnr like vbap-posnr,

      erdat like vbak-erdat,

      kunnr like vbak-kunnr,

      name1 like kna1-name1,

      vkbur like vbak-vkbur,

      matnr like vbap-matnr,

      arktx like vbap-arktx,

      kwmeng like vbap-kwmeng,

      list_price type i,

      invnbr like vbrk-vbeln,

      invpos like vbrp-posnr,

      rfmng like vbap-kwmeng,

      balqty like vbap-kwmeng,

      prodh like vbap-prodh,

      color type slis_t_specialcol_alv.

      data end of itab.

      data: begin of itab1 occurs 100.

      include structure itab.

      data end of itab1.

      **************************************************************

      Thanks..

  • avatar image
    Former Member
    Sep 18, 2008 at 06:30 AM

    The information you have provided to me is not sufficient, paste the part of the code how you have declared the dynamic internal table for your report.

    Please find the link below, which I hope will help you.

    interanl-table-output-problem

    Regards,

    Murthy.

    Add comment
    10|10000 characters needed characters exceeded