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

Prerequisites for using ALV reports

Former Member
0 Likes
2,557

Hi,

We have some of our standard transaction for instance LT23, which seems to have been programmed to be used and viewed with ALV layout. However, this is not the case, it just print using the old list layout.

Are the prerequisites for running ALV report; if so I would like to know them. SAP GUI is 7.20 and the theme is SAP Signature.

Any input is appreciated.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,291

Hi

I don't know if I've really understood what you mean, but the only prerequisite is the program is developed in order to use the ALV

Max

Hi,

We have some of our standard transaction for instance LT23, which seems to have been programmed to be used and viewed with ALV layout. However, this is not the case, it just print using the old list layout.

Are the prerequisites for running ALV report; if so I would like to know them. SAP GUI is 7.20 and the theme is SAP Signature.

Any input is appreciated.

Thanks.

12 REPLIES 12
Read only

Former Member
0 Likes
2,292

Hi

I don't know if I've really understood what you mean, but the only prerequisite is the program is developed in order to use the ALV

Max

Read only

0 Likes
2,291

Hi,

Sorry, here is an example:

The program behind TK=LT23 contain a call function = L_TO_LIST_DISPLAY.

If I look in this FM, it contains a perform CALL_ALV.

The form is a call to the FM = REUSE_ALV_LIST_DISPLAY.

Should this not be enough to view the standard report in ALV ?

As it is, ti does not show it in ALV, but only as standard listing.

Read only

0 Likes
2,291

Hi

Yes it's enough, ALV is just an ABAP LIST

I don't think you see a "normal" list, probably it can have a particular variant of layout

Max

Read only

0 Likes
2,291

Hi,

Thanks. I might call it a "semi ALV". The data is shown as we saw it before ALV came, but I also have the buttons for sorting, Word, Local File etc.

Are we mising some layout defs. here ?

How to get rid of the old layout for viewing data ?

Read only

0 Likes
2,291

Hi

Try to check the variant for that report

You should have the functionalities to manage the variant in the menu

Max

Read only

0 Likes
2,291

I think LT23 shows the report only in ALV List display and not ALV GRID.I don't see any options available for GRID display.

Thanks,

K.Kiran.

Read only

0 Likes
2,291

I have a copy of the program behind LT23.

I call a FM = REUSE_ALV_VARIANT_F4'.

It has a parameter named I_DISPLAY_VIA_GRID and I have tried to fill it with 'X'. This however, does not seem to change anything.

Read only

0 Likes
2,291

REUSE_ALV_VARIANT_F4 only displays the Varaints available for that program.If you want the report output to be in GRID display then check if the program is using the FMs REUSE_ALV_GRID_DISPLAY or the equivalent of it in OOPS.

Thanks,

K./Kiran,

Read only

0 Likes
2,291

It actually calls FM = 'REUSE_ALV_LIST_DISPLAY and not 'REUSE_ALV_GRID_DISPLAY.

Read only

0 Likes
2,291

Then the program needs to be changed so that it can display the report output ALV GRID,as anyway you have Z version of the program..

K.Kiran.

Read only

0 Likes
2,291

Yes, my first thought was to copy the FM = L_TO_LIST_DISPLAY and modify the CALL ALV Form to be using FM = REUSE_ALV_GRID_DISPLAY.

Good idea ?

Read only

0 Likes
2,291

Hi

If you want to use the GRID instead of LIST, yes I don't know if it's a good idea but you can do only that

That means you need to change the function module L_TO_LIST_DISPLAY, but the ALV is called in form CALL_ALV, so you can create an enhancement in order to call the GRID instead of LIST.

The call should be the same, because the 2 functions (GRID and LIST) have the same interface, so instead of

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
     EXPORTING
          I_CALLBACK_PROGRAM       = SAV_SY_REPID
          I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
*         I_CALLBACK_USER_COMMAND  = ' '
*         I_STRUCTURE_NAME         =
          IS_LAYOUT                = LAYOUT
          IT_FIELDCAT              = XFIELD
*         IT_EXCLUDING             =
          IT_SPECIAL_GROUPS        = XSP_GROUP[]
*         IT_SORT                  =
*         IT_FILTER                =
*         IS_SEL_HIDE              =
          I_DEFAULT                = 'X'
          I_SAVE                   = 'A'
          IS_VARIANT               = VARIANT
          IT_EVENTS                = XEVENT
* >>>>>>>>>> begin of insertion HP_318150 >>>>>>>>>>
          i_buffer_active          = 'X'
* <<<<<<<<<< end   of insertion HP_318150 <<<<<<<<<<
*         IT_EVENT_EXIT            =
*         IS_PRINT                 =
          I_SCREEN_START_COLUMN    = I_SCREEN_START_COLUMN
          I_SCREEN_START_LINE      = I_SCREEN_START_LINE
          I_SCREEN_END_COLUMN      = I_SCREEN_END_COLUMN
          I_SCREEN_END_LINE        = I_SCREEN_END_LINE
*    IMPORTING
*         E_EXIT_CAUSED_BY_CALLER  =
       TABLES
            T_OUTTAB                 = T_TO_LIST_PLUS
       EXCEPTIONS
            PROGRAM_ERROR            = 1
            OTHERS                   = 2.

  IF SY-SUBRC NE 0.
    MESSAGE E706(L1) WITH 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'.
*   Interner Fehler ist aufgetreten (FB &)
  ENDIF. 

....you can insert:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
          I_CALLBACK_PROGRAM       = SAV_SY_REPID
          I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
*         I_CALLBACK_USER_COMMAND  = ' '
*         I_STRUCTURE_NAME         =
          IS_LAYOUT                = LAYOUT
          IT_FIELDCAT              = XFIELD
*         IT_EXCLUDING             =
          IT_SPECIAL_GROUPS        = XSP_GROUP[]
*         IT_SORT                  =
*         IT_FILTER                =
*         IS_SEL_HIDE              =
          I_DEFAULT                = 'X'
          I_SAVE                   = 'A'
          IS_VARIANT               = VARIANT
          IT_EVENTS                = XEVENT
* >>>>>>>>>> begin of insertion HP_318150 >>>>>>>>>>
          i_buffer_active          = 'X'
* <<<<<<<<<< end   of insertion HP_318150 <<<<<<<<<<
*         IT_EVENT_EXIT            =
*         IS_PRINT                 =
          I_SCREEN_START_COLUMN    = I_SCREEN_START_COLUMN
          I_SCREEN_START_LINE      = I_SCREEN_START_LINE
          I_SCREEN_END_COLUMN      = I_SCREEN_END_COLUMN
          I_SCREEN_END_LINE        = I_SCREEN_END_LINE
*    IMPORTING
*         E_EXIT_CAUSED_BY_CALLER  =
       TABLES
            T_OUTTAB                 = T_TO_LIST_PLUS
       EXCEPTIONS
            PROGRAM_ERROR            = 1
            OTHERS                   = 2.

  IF SY-SUBRC NE 0.
    MESSAGE E706(L1) WITH 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'.
*   Interner Fehler ist aufgetreten (FB &)
  ENDIF. 

Max