‎2007 Jul 24 8:05 AM
Hi all,
Please clarify this query of mine in ALV.
***Code:**
data : itab_data1 like standard table of zdetails1.
data: repid type syrepid.
data : fieldcat type slis_t_fieldcat_alv.
repid = sy-repid.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = repid
i_internal_tabname = 'itab_data1'
i_bypassing_buffer = 'X'
changing
ct_fieldcat = fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
After the execution of the Function Module the fieldcat does not contain any rows .
Kindly explain me why the fieldcat does not contain any rows.
Please reply as fast as possible.
Regards,
Vijay
‎2007 Jul 24 8:11 AM
Hi
Try like thi s
data : itab_data1 like standard table of zdetails1.
data: repid type syrepid.
data : fieldcat type slis_t_fieldcat_alv.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = sy_repid
i_internal_tabname = 'ITAB_DATA1'
i_bypassing_buffer = 'X'
changing
ct_fieldcat = fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
check this sample one
type-pools : slis.
data : begin of it_toto occurs 0 ,
matnr type matnr ,
maktx type maktx ,
end of it_toto ,
it_fieldcatalog type slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'IT_TOTO'
* I_STRUCTURE_NAME =
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
I_BYPASSING_BUFFER = 'X'
* I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = it_fieldcatalog.
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Reward all helpfull answers
Regards
Pavan
‎2007 Jul 24 8:08 AM
hi,
Change the repid type syrepid to r_repid type sy-repid
and where is u r select query..
Regards
suresh.d
null
‎2007 Jul 24 8:08 AM
Use this code instead.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
I_STRUCTURE_NAME = 'ZDETAILS1'
i_bypassing_buffer = 'X'
changing
ct_fieldcat = fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.Please mark points if the solution was useful.
Regards,
Manoj
‎2007 Jul 24 8:09 AM
Hi,
See how SAP uses:-
--- merge fieldcat from ddic structure ---
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = con_self
I_INTERNAL_TABNAME = PD_TABNAME_FIELDCAT
i_structure_name = pd_strucname_ddic
I_INCLNAME = LC_INCLUDENAME
CHANGING
ct_fieldcat = lt_fieldcat
EXCEPTIONS
OTHERS = 1.
Reward if useful!
‎2007 Jul 24 8:10 AM
Hi Balasubramanian,
In the FM you need to pass the parameter
I_STRUCTURENAME with the ZStructure that you have created in the data dictionary. Then it will work.
Reward if answer is informatory.
Best Regards,
Ram.
‎2007 Jul 24 8:15 AM
Hi Bala,
Along with the I_STRUCTURE_NAME, also pass the I_INCLNAME = SY-REPID.
Reward points for useful answers.
Best Regards,
Ram.
‎2007 Jul 24 8:11 AM
Hi
Try like thi s
data : itab_data1 like standard table of zdetails1.
data: repid type syrepid.
data : fieldcat type slis_t_fieldcat_alv.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = sy_repid
i_internal_tabname = 'ITAB_DATA1'
i_bypassing_buffer = 'X'
changing
ct_fieldcat = fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
check this sample one
type-pools : slis.
data : begin of it_toto occurs 0 ,
matnr type matnr ,
maktx type maktx ,
end of it_toto ,
it_fieldcatalog type slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'IT_TOTO'
* I_STRUCTURE_NAME =
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
I_BYPASSING_BUFFER = 'X'
* I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = it_fieldcatalog.
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Reward all helpfull answers
Regards
Pavan
‎2007 Jul 24 8:11 AM
HI,
do like this.
data : itab_data1 like standard table of zdetails1.
data: repid type syrepid.
data : fieldcat type slis_t_fieldcat_alv.
repid = sy-repid.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = repid
i_internal_tabname = <b>'ITAB_DATA1'</b>
i_bypassing_buffer = 'X'
changing
ct_fieldcat = fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
rgds,
bharat.