Skip to Content
author's profile photo
Former Member

reuse_alv_fieldcatalog_merge help required

Im passing all the necessary parameters but this function module not returning any thing, help me regarding this

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 06:18 AM

    Hi Ravi,

    Check this sample code and try to match it with your requirement.

    <b>CHECK the parameter passed to the FM with the sample code.</b>

    REPORT ztest_merge.

    TYPE-POOLS : slis.

    TABLES : qals.

    DATA : BEGIN OF t_out OCCURS 0,

    matnr LIKE qals-matnr, "MATERIAL

    werk LIKE qals-werk, "PLANT

    art like qals-art, "Inspaction Lot Type

    objnr like qals-objnr, "Object Number

    END OF t_out.

    DATA : i_fieldcat TYPE slis_t_fieldcat_alv,

    i_layout TYPE slis_layout_alv,

    gs_layout TYPE lvc_s_layo,

    g_repid TYPE sy-repid,

    ls_fieldcat TYPE slis_fieldcat_alv.

    SELECT-OPTIONS:s_prflos FOR qals-prueflos.

    INITIALIZATION.

    g_repid = sy-repid.

    i_layout-zebra = 'X'.

    i_layout-colwidth_optimize = 'X'.

    START-OF-SELECTION.

    PERFORM fetch_data.

    END-OF-SELECTION.

    PERFORM fill_fieldcat.

    PERFORM display_alv.

    &----


    *& Form FETCH_DATA

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM fetch_data .

    SELECT matnr werk art objnr

    FROM qals

    INTO TABLE t_out

    WHERE prueflos IN s_prflos.

    ENDFORM. " FETCH_DATA

    &----


    *& Form FILL_FIELDCAT

    &----


    • text

    ----


    FORM fill_fieldcat .

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    i_program_name = g_repid

    i_internal_tabname = 'T_OUT'

    i_inclname = g_repid

    CHANGING

    ct_fieldcat = i_fieldcat[]

    EXCEPTIONS

    inconsistent_interface = 1

    program_error = 2

    OTHERS = 3.

    ENDFORM. " FILL_FIELDCAT

    &----


    *& Form display_alv

    &----


    • text

    ----


    FORM display_alv .

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = g_repid

    is_layout = i_layout

    it_fieldcat = i_fieldcat[]

    TABLES

    t_outtab = t_out

    EXCEPTIONS

    program_error = 1

    OTHERS = 2.

    ENDFORM. " display_alv

    If you still face problem send reply with the error you are facing

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 28, 2007 at 06:18 AM

    Hi ravi,

    1.Refered structure is it in upper case or lower case....

    2.Refering to internal table or program structure....

    Give us more input to give some more hints....

    If the hint is useful… Say thanks by reward….

    Regards,

    Prabhu Rajesh

    Add comment
    10|10000 characters needed characters exceeded

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

    Hi Ravi ,

    Please check the below given code

    TYPE-POOLS : SLIS.
    Data : cat type SLIS_T_FIELDCAT_ALV.
    Data : rep1 type sy-repid.
    Data : begin of it_2 occurs 0 ,
              matnr type matnr ,
              werks type werks ,
           End of it_2.
    start-of-selection.
         rep1 = sy-repid.
    break-point.
         CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
          EXPORTING
            I_PROGRAM_NAME               = rep1
            I_INTERNAL_TABNAME           = 'IT_2'
            I_INCLNAME                   = rep1
           CHANGING
             ct_fieldcat                  = cat.
                  .
    break-point.

    Reagrds

    Arun

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 28, 2007 at 06:13 AM

    hi Ravi,

    the usual question: What is the error message?

    thanks

    ec

    Add comment
    10|10000 characters needed characters exceeded