Application Development and Automation 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: 
Read only

Problem in fieldcatlog

Former Member
0 Likes
897

Dear Friends,

i have only one fieldcatalog structure IT_FCAT.

I Developed an interactive report.

in first output screen i don't need some fields.. so i put wa_fcat-no_out = 'X'. and modified it_fcat.

this works fine.

i want all the fields in the second screen..

so i put wa_fcat-no_out = ' ' for the fields what i want in the second secondary screen.

but this is not working...?

Before posting this i serched for solution.. nothind match my query.

can anyone help me please.

1 ACCEPTED SOLUTION
Read only

former_member209920
Active Participant
0 Likes
875

Hi,

Instead of making NO_OUT = 'X' ,

why not you remove the lines altogether.

OR append extra line in field catalog only when creating second ALV.

If you are worried about 'POS',  using MACRO makes your work much easier.

Regards,

ManuB

Dear Friends,

i have only one fieldcatalog structure IT_FCAT.

I Developed an interactive report.

in first output screen i don't need some fields.. so i put wa_fcat-no_out = 'X'. and modified it_fcat.

this works fine.

i want all the fields in the second screen..

so i put wa_fcat-no_out = ' ' for the fields what i want in the second secondary screen.

but this is not working...?

Before posting this i serched for solution.. nothind match my query.

can anyone help me please.

6 REPLIES 6
Read only

Former Member
0 Likes
875

Hi,

Please attach code what you have written in second screen,,,,whether it is pop up or normal alv screen?

Thanks and regards

Read only

0 Likes
875

      LOOP AT IT_FCAT INTO WA_FCAT.
    CASE WA_FCAT-FIELDNAME.
      WHEN 'SALE_NUM'.
        WA_FCAT-NO_OUT =  SPACE.
        MODIFY IT_FCAT FROM WA_FCAT.
        CLEAR WA_FCAT.
      WHEN 'BILL_NUM'.
        WA_FCAT-NO_OUT = ' '.
        MODIFY IT_FCAT FROM WA_FCAT.
        CLEAR WA_FCAT.
      WHEN 'CHECK'.
        WA_FCAT-NO_OUT = 'X'.
        MODIFY IT_FCAT FROM WA_FCAT.
        CLEAR WA_FCAT.
      WHEN 'REG_NO'.
        WA_FCAT-NO_OUT = 'X'.
        MODIFY IT_FCAT FROM WA_FCAT.
        CLEAR WA_FCAT.
      WHEN 'UNITRATE'.
        WA_FCAT-NO_OUT = 'X'.
        MODIFY IT_FCAT FROM WA_FCAT.
        CLEAR WA_FCAT.
    ENDCASE.
  ENDLOOP.

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
           I_CALLBACK_PROGRAM       = C_PROG
*           i_callback_pf_status_set = 'PFSTATUS1'
*           i_callback_user_command  = 'USER_COMMAND1'
           I_GRID_TITLE             = 'Invoices & Sales Orders Generated List'
           IS_LAYOUT                = IS_LAYOUT
           IT_FIELDCAT              = IT_FCAT
*        it_sort                    = it_sort
           I_DEFAULT                = 'X'
           I_SAVE                   = 'A'
           IT_EVENTS                = IT_EVENTS
         TABLES
           T_OUTTAB                 = IT_MAIN1

Read only

0 Likes
875

Issue resolved...

appened those fields to it_fcat before second alv_display.

Read only

former_member209920
Active Participant
0 Likes
876

Hi,

Instead of making NO_OUT = 'X' ,

why not you remove the lines altogether.

OR append extra line in field catalog only when creating second ALV.

If you are worried about 'POS',  using MACRO makes your work much easier.

Regards,

ManuB

Read only

Former Member
0 Likes
875

If the obvious measures are already taken care, like checking field catalog before displaying the second alv, then you should check a wiki by Clemens on working with multiple alvs and their display variants.

http://wiki.sdn.sap.com/wiki/display/Snippets/Create+unique+handle+for+ALV+layout+(variant)

The ALV will not be able to distinguish which display is for which alv unless you pass a handle to the display variant. Hope this helps.

Thanks,
Shambu

Read only

0 Likes
875

I think so here there is no variant used & its only a field catalouge.

@OP - Could you please provide the details of code