‎2007 Sep 20 7:52 AM
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 ..
‎2007 Sep 20 8: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
‎2007 Sep 20 7: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
‎2007 Sep 20 8:03 AM
hi naveen,
plz find the req. statements :
data: int_fcat type slis_t_fieldcat_alv.
select matnr ernam ersda mtart into table it_mara from marav where matnr in matnr.
-- where matnr value is coming from the selection screen.
‎2007 Sep 20 8:33 AM
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
‎2007 Sep 20 7:59 AM
‎2007 Sep 20 8: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
‎2007 Sep 20 8: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
‎2007 Sep 20 8: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
‎2007 Sep 20 8:08 AM
‎2007 Sep 20 8:28 AM
hi all,
thnx the problem is nw resloved .. i had to change the i_program_name from sy-repid to the actual program name.
‎2007 Sep 20 8: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