Skip to Content
author's profile photo Former Member
Former Member

problem in alv fieldcat function

data: begin of it_mara occurs 100,

matnr LIKE mara-matnr,

ernam LIKE mara-ernam,

ersda LIKE mara-ersda,

mtart LIKE mara-mtart,

end of it_mara.

-


i am using the above mentioned int tab.

the following function is returning an error which states that ..

"The ABAP program lines are wider than the internal table."

-


i_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = i_repid

I_INTERNAL_TABNAME = 'IT_MARA'

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = i_repid

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

CT_FIELDCAT = int_fcat

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3

.

plz suggest how this problem can be resolved ..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 07:00 AM

    Hi,

    Try commenting I_PROGRAM_NAME = i_repid and pass your internal table to I_STRUCTURE_NAME and comment I_INCLNAME .

    Could you please provide your declaration of fieldcat.

    Thanks,

    Sriram Ponna.

    Message was edited by:

    Sriram Ponna

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:56 AM

    Hi,

    can u provide me the select staement which is filling the internal table IT_MARA.

    as wellas the Field cataolg u cretaed.

    Rvert back.

    Regards,

    naveen

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Can u just modify mara to marav, just its a suggetsion and not sure whether its really gonna work or not.

      begin of ---

      matnr LIKE marav-matnr,

      ernam LIKE marav-ernam,

      ersda LIKE marav-ersda,

      mtart LIKE marav-mtart,

      Moreover can u provide how u defined fieldcatalog.

      ex: col_pos

      field_name

      sel_text.

      Revrt back.

      Regards,

      naveen

  • Posted on Sep 20, 2007 at 06:59 AM

    There is no problem with your code provided itab definition is in the main source of the program, so how do you define int_fcat ?

    Use :

      TYPE-POOLS : slis.
      DATA int_fcat TYPE slis_t_fieldcat_alv.
    

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 07:01 AM

    Hi

    use the function module LVC_FIELDCATALOG_MERGE

    here for the exporting parameter i_structure_name , you should pass the 'MARA' and from the changing table (field catalog table) int_fcat, you should choose the required fields you want to display.

    here is the example for it :

    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

    EXPORTING

    i_structure_name = 'CNVMBTTABLES'

    CHANGING

    ct_fieldcat = p_lt_fct

    EXCEPTIONS

    inconsistent_interface = 1

    program_error = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    MESSAGE e369(cnv_mbt_46).

    ENDIF.

    LOOP AT p_lt_fct INTO ls_fct.

    CASE ls_fct-fieldname.

    WHEN 'TABNAME'.

    ls_fct-edit = 'X'.

    ls_fct-key = 'X'.

    MODIFY p_lt_fct FROM ls_fct.

    ENDCASE.

    ENDLOOP

    Hope u understood this, if u have any doubts revert back to me

    Regards,

    Prasant

    *reward if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 07:08 AM

    Hi

    see this small program so that you can understand very well

    REPORT Z_TEST_ALV_MERGE.

    Tables : Mara,makt.

    type-pools: slis.

    data: FEILDCAT type slis_t_fieldcat_alv.

    data : begin of itab occurs 0,

    MATNR like mara-matnr,

    ERSDA like mara-ersda,

    PSTAT like mara-pstat,

    MTART like mara-mtart,

    MAKTx like makt-maktx,

    end of itab.

    data: I_REPID like sy-repid.

    I_REPID = sy-repid.

    select * from mara into corresponding fields of itab.

    select * from makt into corresponding fields of itab where matnr =

    itab-matnr.

    append itab.

    endselect.

    endselect.

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = I_REPID

    I_INTERNAL_TABNAME = 'ITAB'

    I_INCLNAME = I_REPID

    CHANGING

    CT_FIELDCAT = FEILDCAT.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    IT_FIELDCAT = FEILDCAT

    TABLES

    T_OUTTAB = IT

    reward if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 07:08 AM

    Hi,

    You can check this link

    report from 4.7 to ecc 6.0

    And make sure that your program line size should be less than 72 characters.

    Thanks,

    Sriram Ponna.

    Message was edited by:

    Sriram Ponna

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 07:22 AM

    Hi Ritika,

    I also faced same problem,...what you have to do is, check coding length >72 and adjust according whole program.

    My suggestion is to aviod using FM 'REUSE_ALV_FIELDCATALOG_MERGE'.

    Let me know if your not getting

    Thanks!

    Brunda

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.