2006 May 12 9:55 AM
Hi All,
I have a report which can output two different ALV grid depending upon the option selected on selection screen.
For example say I have selection screen with option button for Vendor report and Customer report. When user select Vendor report option button then content of KNA1 is displayed in ALV grid, similarly when user select Vendor report option button then content of LFA1 is displayed.
Now when I save a layout on Vendor report, that layout is also visible on Customer report and vice versa. Both of these report share same set of layouts.
Is there any method so that both of these report have there own set of layouts?
The problem which I am facing is I have save a layout on Vendor report to display column LFA1-LIFNR only and this layout is DEFAULT layout. Now when I run report for Customer report (customer option button selected) it shows me only on column KNA1-LIFNR. Actually it select the layout which is saved with Vendor report.
Is there any solution? Thanks in advance...
Vendor
Ceus
2006 May 12 10:12 AM
Pawan,
In this case if you want to create two different layouts what you need to pass the values in the parameter I_VARIANT where in you specify the user name, rpeort name and HANDLE.
Now, this handle will have to be unique for customer and vendor, you probably can hard code it as CUST for customer and VEND for vendor. You will have to pass this to the function.
Then the layouts pertaining to the specific report will be displayed.
Regards,
Ravi
Note : Please mark the helpful answers
Hi All,
I have a report which can output two different ALV grid depending upon the option selected on selection screen.
For example say I have selection screen with option button for Vendor report and Customer report. When user select Vendor report option button then content of KNA1 is displayed in ALV grid, similarly when user select Vendor report option button then content of LFA1 is displayed.
Now when I save a layout on Vendor report, that layout is also visible on Customer report and vice versa. Both of these report share same set of layouts.
Is there any method so that both of these report have there own set of layouts?
The problem which I am facing is I have save a layout on Vendor report to display column LFA1-LIFNR only and this layout is DEFAULT layout. Now when I run report for Customer report (customer option button selected) it shows me only on column KNA1-LIFNR. Actually it select the layout which is saved with Vendor report.
Is there any solution? Thanks in advance...
Vendor
Ceus
2006 May 12 9:58 AM
Hi pawan,
You can give a parameter on selection screen for choosing the layout then it will show only the selected layout
Regards
Sumit Bhutani
2006 May 12 10:01 AM
hii
check this out
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
PARAMETERS: P_VBTYP LIKE VBAK-VBTYP DEFAULT 'C'.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
PARAMETERS: LIST RADIOBUTTON GROUP G1,
GRID RADIOBUTTON GROUP G1.
SELECTION-SCREEN END OF BLOCK B2.
FORM CHECK_OPTION.
WA_EVENTS-NAME = 'TOP_OF_PAGE'.
WA_EVENTS-FORM = 'TOP'.
APPEND WA_EVENTS TO IT_EVENTS.
CLEAR WA_EVENTS.
WA_EVENTS-NAME = 'END_OF_LIST'.
WA_EVENTS-FORM = 'END_LIST'.
APPEND WA_EVENTS TO IT_EVENTS.
CLEAR WA_EVENTS.
IF LIST = 'X'.
PERFORM LIST_DISP.
ENDIF.
IF GRID = 'X'.
PERFORM GRID_DISP.
ENDIF.
ENDFORM.
FORM CHECK_OPTION.
WA_EVENTS-NAME = 'TOP_OF_PAGE'.
WA_EVENTS-FORM = 'TOP'.
APPEND WA_EVENTS TO IT_EVENTS.
CLEAR WA_EVENTS.
WA_EVENTS-NAME = 'END_OF_LIST'.
WA_EVENTS-FORM = 'END_LIST'.
APPEND WA_EVENTS TO IT_EVENTS.
CLEAR WA_EVENTS.
IF LIST = 'X'.
PERFORM LIST_DISP.
ENDIF.
IF GRID = 'X'.
PERFORM GRID_DISP.
ENDIF.
ENDFORM.
hope this helps
Thanks&Regards
Naresh
2006 May 12 10:07 AM
Hi pawan,
1. It cannot be done.
2. Bcos
3. ALV layouts which are stored by users,
are PROGRAM SPECIFIC.
4. So even if we try to
show more than two different kind of alv,
for the system, its only one program,
and hence, it will save all layouts,
under that ONE PROGRAM only.
5. U will have two have two different programs
for different layouts.
regards,
amit m.
2006 May 12 10:12 AM
Pawan,
In this case if you want to create two different layouts what you need to pass the values in the parameter I_VARIANT where in you specify the user name, rpeort name and HANDLE.
Now, this handle will have to be unique for customer and vendor, you probably can hard code it as CUST for customer and VEND for vendor. You will have to pass this to the function.
Then the layouts pertaining to the specific report will be displayed.
Regards,
Ravi
Note : Please mark the helpful answers
2006 May 12 10:13 AM
2006 May 12 10:14 AM
Hi,
u give a name for your variant.
u can see that in table TCVIEW.
u can also use the FM GET_USER_STANDARD, this will getback the user settings before ALV display.
If found useful, award points pls.
Thanks,
Bharadwaja R
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |