2005 Mar 23 7:32 AM
Dear freiends,
how do i pass a structure defined in a program (not global
structure) to function LVC_FIELDCATALOG_MERGE to build field catalogue.
kind regards
kaushik
Dear freiends,
how do i pass a structure defined in a program (not global
structure) to function LVC_FIELDCATALOG_MERGE to build field catalogue.
kind regards
kaushik
2005 Mar 23 7:41 AM
You need to use the following
move: sy-repid to wf_repid ,
'INT_OUTPUT' to int_tab_name . (name of the itab)
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = wf_repid
i_internal_tabname = int_tab_name
* I_STRUCTURE_NAME =
* I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = wf_repid
i_bypassing_buffer = 'X'
* I_BUFFER_ACTIVE =
changing
ct_fieldcat = wf_fld_cat[]
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.Regards
Raja
2005 Mar 23 7:47 AM
2005 Mar 23 11:21 AM
Hi Kaushik
Try to create a DDIC structure like the one you define in your program and use it.
Other way ise to use "REUSE_FIELDCATALOG_MERGE", take its field catalog output of type "slis..." and use a transfer function. You can find it by searching. Its name should contain 'TRANSFER'. But you may need an intermediary transformation to "kkblo..." type fieldcatalog if the transfer function is not directly transforming it.
<u>i.e.</u>
slis --> lvc
OR
slis --> kkblo ( Transfer FM 1 )
kkblo --> lvc . ( Transfer FM 2 )As you see, this way is more boring. So, I recommend using a DDIC structure.
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>