Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

LVC_FIELDCATALOG_MERGE without DDIC-Structure

Former Member
0 Kudos

Hi, is it possible to create a field catalog in LVC_FIELDCATALOG_MERGE form an internal table without DDIC-Structure?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Yes you can pass the internal table name instead of DDIC structure.

Refer to demo program BCALV_TEST_FULLSCREEN

Edited by: Avinash Kodarapu on Jan 28, 2009 7:28 PM

7 REPLIES 7

former_member156446
Active Contributor
0 Kudos

If you have the internal table structure declared as LIKE rather than TYPE

Welcome to SDN, Next time please search before posting any question..

Former Member
0 Kudos

Hi

Yes u need to transfer the report (main program) and the include (it can be the mai program again) where the internal table is defined.

But u need to use fm REUSE_ALV_FIELDCATALOG_MERGE and then convert the data from "normal" field catalog to LVC field catalog.

Max

0 Kudos

How can I convert the data from "normal" field catalog to LVC field catalog?

Former Member
0 Kudos

Hi,

Yes you can pass the internal table name instead of DDIC structure.

Refer to demo program BCALV_TEST_FULLSCREEN

Edited by: Avinash Kodarapu on Jan 28, 2009 7:28 PM

0 Kudos

I wrote

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING

  • I_BUFFER_ACTIVE =

i_structure_name = 'GT_MITARBEITER'

  • I_CLIENT_NEVER_DISPLAY = 'X'

  • I_BYPASSING_BUFFER = 'X'

  • I_INTERNAL_TABNAME = 'GT_MITARBEITER'

CHANGING

ct_fieldcat = gt_fcat_oo[]

  • EXCEPTIONS

  • INCONSISTENT_INTERFACE = 1

  • PROGRAM_ERROR = 2

  • OTHERS = 3

It seems to work, but the gt_fcat_oo is empty.

0 Kudos

Hi

U can't do it using LVC_FIELDCATALOG_MERGE, but u can try to use REUSE_ALV_FIELDCATALOG_MERGE, and the convert the date for LVC: something like this:

TABLES: LVC_S_FCAT.

TYPE-POOLS: SLIS.

DATA: GT_FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
DATA: GT_REPID TYPE SY-REPID.

GT_REPID = SY-REPID.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
     EXPORTING
          I_PROGRAM_NAME     = GT_REPID
          I_INTERNAL_TABNAME = 'ITAB'
          I_INCLNAME         = GT_REPID
     CHANGING
          CT_FIELDCAT        = GT_FIELDCATALOG[].

DATA: GT_LVC_FIELDCATALOG TYPE LVC_T_FCAT.


LOOP AT GT_FIELDCATALOG.
  MOVE-CORRESPONDING GT_FIELDCATALOG TO LVC_S_FCAT.
  APPEND LVC_S_FCAT TO GT_LVC_FIELDCATALOG.
ENDLOOP.

Max

0 Kudos

Thank you very much, Max! It works!