2011 Aug 23 11:10 AM
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.
2011 Aug 23 11:21 AM
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
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
2011 Aug 23 11:21 AM
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
2011 Aug 23 11:30 AM
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.
2011 Aug 23 11:37 AM
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
2011 Aug 23 11:43 AM
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 ?
2011 Aug 23 11:53 AM
Hi
Try to check the variant for that report
You should have the functionalities to manage the variant in the menu
Max
2011 Aug 23 12:05 PM
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.
2011 Aug 23 12:14 PM
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.
2011 Aug 23 12:24 PM
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,
2011 Aug 23 12:36 PM
It actually calls FM = 'REUSE_ALV_LIST_DISPLAY and not 'REUSE_ALV_GRID_DISPLAY.
2011 Aug 23 12:40 PM
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.
2011 Aug 23 3:07 PM
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 ?
2011 Aug 23 3:26 PM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |