Question:
Hi Fans,
I created a display variant for VA05, but for business reasons I would like to display results directly into an Excel sheet format instead of a grid. I know that I can define it using the view tab when I create a display variant but unfortunately, I have no idea on how to proceed.
I've heard that it is possible to upload a template via BDS (using OAER transaction code)...but it this case, what is the procedure to list the template and to attach it to my display variant (I'm not able to select a template because not found in BDS)
Thanks in advance for your help!
Best Regards
Answer:
Dear As per my understanding
first format your report as you required go to change layout choose
view tab and press save button on the bottom of the screen.
it will ask for the varient name and if you want to make it default than
make it defult when you again come into this transaction than
this report will display in excel with ur define format.
Thanks
Regards
Answer:
I don't see this as being a BASIS question...
_________________
SapFans Moderator
NetWeaver ‘04–SAP Web AS for ORACLE certified
Search: /forums/search.php
SAP Notes: http://service.sap.com/notes
SAP Help: http://help.sap.com
Basic Rules: /forums/viewtopic.php?t=222759
Answer:
If I understand you correctly then you need to copy some excel inplace templates from client 000. This is acheived by running the report mentioned below or by implementing note 803067.
You need to run a report BCALV_BDS_IMPORT_SAP_TEMPLATE.
Check the following OSS notes carefully and understand them before you proceed:
316728
803067
548409
If those notes don't help then I guess you need to explain your problem more clearly.
regards,
MB
_________________
We were somewhere around Barstow on the edge of the desert....
Answer:
SAP Note No. 548409 01.02.2006 Page 1
________________________________________________________________________
Number 548409
Version 10 from 18.03.2005
Status Released for Customer
Set on 18.03.2005
Language EN
Master language DE
Short text ALV view: Consulting note about Excel
Inplace/Templates
Responsible SAP AG
Component BC-SRV-ALV
SAP List Viewer
________________________________________________________________________
Long text
Symptom
Frequently-asked questions for creating templates in the ALV environment
1. How can I import the SAP standard templates SAP_OM.XLS or SAP_MM.XLS
from client 000?
The BCALV_BDS_IMPORT_SAP_TEMPLATE report copies the two templates
SAP_OM.XLS and SAP_MM.XLS from client 000 into the current clients.
There is no check to determine whether the templates already exist.
After you call a transaction or report with an ALV display, the
templates for all transactions/reports are available in the client
after you select the "Change layout" dialog boxes and the "View" tab
and you then switch to Excel and copy.
The BCALV_BDS_IMPORT_SAP_TEMPLATE is available in Release SAPKB46C
as of Support Package 06, in Release 46D as of Support Package 02
(see also note 316728) and in Release 610 and 620.
o As of the following Support Packages or after you implement note
803067, the SAP standard templates are loaded automatically from
the 000 client if they are missing in the current client:
SAP_BASIS Release Support Package
4.6C 50
4.6D 40
610 43
620 49
640 11
2. How can I change the standard SAP templates SAP_OM.XLS or
SAP_MM.XLS?
You should not change these templates because they will be
overwritten during an update. A better option would be to create a
standard customer template.
3. How do I create a standard customer template (CUS_*)?
Call transaction OAOR (Business Document Navigator).
Enter the following values in the selection screen:
Class name: ALVLAYOUTTEMPLATES
Class type: OT
Object key: SAP_STANDARD_TEMPLATE
Select the SAP_OM.XLS or SAP_MM.XLS files in the navigation tree and
select the "Export document" function in the menu of the right mouse
Page 2
button. Specify a target directory and save the template.
Layout changes should be made and saved in the local Excel file.
Standard customer templates should begin with the prefix Cus_* in
accordance with the naming convention. .
The changed template is imported into the system with the
'BCALV_BDS_MAINTENANCE' report. For this select "Import templates"
on the selection screen. If a transport request is to be created,
you must select the "Set to transport request" check box in the
selection screen.
For importing changed templates, press the arrow next to the "Upload
templates" button in the function menu bar and select the standard
customer templates. After you enter the corresponding directory on
the local PC and the name of the template, the changed template is
copied to the system.
4. How can I change the description of a customer standard template?
Start transaction OAOR
Enter the following values in the selection screen:
Class name: ALVLAYOUTTEMPLATES
Class type: OT
Object key: CUS_STANDARD_TEMPLATE
Select the corresponding template in the navigation tree and select
"Change attributes" in the function bar or through the menu of the
right mouse button. You can enter the descriptions there.
5. How can I refresh a standard customer template (CUS_*)?
Call transaction OAOR
Enter the following values in the selection screen:
Class name: ALVLAYOUTTEMPLATES
Class type: OT
Object key: CUS_STANDARD_TEMPLATE
Select the corresponding template in the navigation tree and select
the "Export document" function in the menu of the right mouse
button. Specify a target directory on your local PC.
Layout changes should be made and saved in the local Excel file. The
CUS_* file prefix must be maintained.
The changed template is imported into the system with the
'BCALV_BDS_MAINTENANCE' report. For this select "Import templates"
on the selection screen. If a transport request is to be created,
you must select the "Set to transport request" check box in the
selection screen.
For importing changed templates, press the arrow next to the "Upload
templates" button in the function menu bar and select the standard
customer templates. After you enter the corresponding directory on
the local PC and the name of the template, the changed template is
copied to the system. This overwrites old versions of the template.
6. How can I create a layout-specific template?
Refer to the documentation (Release 4.6c access path: SAP
Library->Getting Started->Lists->SAP List Viewer (ALV)->Layouts).
7. Why do I not see a template that was loaded through transaction OAOR
in the ALV integration although all naming conventions were adhered?
In order for the naming convention not to conflict with other
applications, an internal key is assigned. This key is not
distributed with an import through transaction OAOR. Therefore,
cross-application templates can only be uploaded via the
'BCALV_BDS_MAINTENANCE' report.
Page 3
8. How can I delete temporary and unreferenced templates?
You should delete these templates from time to time using the
"Delete templates" option on the selection screen of the
BCALV_BDS_MAINTENANCE report. By creating a corresponding selection
variant, this can also be carried out in the background.
9. Can I use the document management of the Business Document Navigator
(BDN) in the ALV environment?
The ABAP List Viewer can only work with a version of a template.
Other functions of the BDN are therefore not supported in the ALV
environment.
10. How can I integrate my own macro?
Use the SAP_MM.XLS template containing the two modules CUS_Module
and SAP_Module as a template. CUS_Module already contains the
ALV_CUS_Exit() macro from which you can call your own macros. The
ALV_CUS_Exit() macro is always called by the Excel integration
shortly before the data display after all formatting (for example,
blue key columns). To download the template, proceed as described
under 2) "Creating a standard customer template". After creating and
saving your macro in the XLS file, decide whether you want to use
the newly generated XLS file as a customer standard template or as a
layout-specific template. You must take account of the corresponding
naming conventions and the different upload processes.
11. Which data is displayed on the individual worksheets in Excel?
- Format: "1:1"- Mapping of data, totals and subtotals lines
with the interaction option (expand and collapse), key
coloring and so on.
- Header: Like the format plus the conversion of an existing
HTML header of the ALV fullscreen. However, this must have
been created by the application in accordance with specific
rules.
- Pivot: Displaying the data in the Pivot format.
- SubN: Totals lines of level N.
- Rawdata: Pure table display of the data from the table body.
- RawHeader: HTML header lines.
12. Which HTML headers of an ALV fullscreen grids are represented in the
Excel in Place display?
An ALV fullscreen display is a prerequisite. If the HTML header was
generated using the REUSE_ALV_COMMENTARY_WRITE function module, this
header can be displayed in Excel. Otherwise, you can program free
HTML, which cannot be displayed in Excel. In this case, from a
programming point of view, a registration using the
I_CALLBACK_HTML_TOP_OF_PAGE parameter was made at the interface to
the REUSE_ALV_GRID_DISPLAY function module.
13. How can I organize the templates?
For each application (report/transaction), you can define a
cross-user layout to which you can attach the corresponding
Page 4
templates. However, using one template in each case, you can also
create 5 cross-user layouts that you can then transport separately.
There are the following grades:
o SAP STANDARD TEMPLATE: Applies to all transactions if a
layout-specific template or a customer standard template was not
defined
o CUS STANDARD TEMPLATE (customer standard templates): Applies to
all transactions if a layout-specific template was not defined.
o Layout-specific templates:
- Layout-specific templates in cross-user ALV layouts: These are
templates that are attached to one or several ALV layout(s)
for a specific application. In this case, the transport object
is always the ALV layout. The templates are then available to
all users with the S_ALV_LAYO authorization object (provided
that the application did not switch off the function).
- User-specific ALV layouts with template(s): see above,
however, the visibility is limited to the respective user.
14. How can I transport templates?
o Layout-specific templates: These templates are transported
together with the ALV layout and can be initiated in the ALV
using the 'Layout administration' menu option.
o SAP STANDARD TEMPLATE: See the explanation under point 1)
o CUS STANDARD TEMPLATE:
If one or more of these types of templates under this note are
transported from a source system into a target system, all the
templates found under this node in the target system are
overwritten.
For the templates that are not on the transport request, two
options are possible:
- Other templates that may already exist in the target system
remain unchanged.
- Other templates that may already exist in the target system
are deleted.
For ALV templates, only the second variant is supported: In the
target system, all templates that are not on the request are
deleted.
For the transport, use the BCALV_BDS_MAINTENANCE report that
transports all templates under an object key. Existing templates
in the target system are deleted. Note 822943 is a prerequisite
for using the report because the user action was exposed at this
point. Switch to the SAP list and customer standard templates by
choosing the selection point 'Transport templates'. Select the
'CUS_STANDARD_TEMPLATES' menu button entry there and fill the
subsequent transport dialog box accordingly.
Page 5
You can delete a template in the target system by deleting the
template in the source system and then starting another transport
using BCALV_BDS_MAINTENANCE.
Technically, for the transport of ALV templates through the
transport connection for all existing BDS objects in the /noaor
business document navigator, you can of course use the following
selections:
Class name: ALVLAYOUTTEMPLATES
Class type: OT
Object key: CUS_STANDARD_TEMPLATE
however, this may result in unwanted effects in the ALV templates
(see below).
Also remember that you are working directly in the BDS layer
here. Incorrect procedures can therefore also have adverse
effects on other applications. As a result, we recommend that you
do not use the transport option using /noaor for ALV templates.
o Technical explanation for unwanted effects:
Templates from an external system still have the signature of the
source system (source system/release/client). As a result, you
find yourself directly in the list again after the import in the
OAOR with the templates that already exist in the target system
(signature: target system/release/client). As soon as the ALV
layer comes into play (for example, by calling any ALV using
templates) the existing templates are deleted and the imported
templates receive the signature of the current system. As a
result, you can repeat the transaction as often as you wish
because the target system always has the current record of
templates. Therefore, if templates are imported consecutively
into the target system and you use the templates in parallel in
the ALV layer, it can happen that the template that was imported
beforehand is deleted.
Example:
Target system B contains templates CUS_1.XLS and CUS_2.XLS.
CUS_1.XLS is imported from source system A. In transaction OAOR,
either three templates are displayed for the administrator, that
is: CUS_1.XLS(old), CUS_1.XLS(new) and CUS_2.XLS; or two
templates are displayed when you use the same template with
changed contents from source system A, that is: CUS_1.XLS(new)
and CUS_2.XLS.
If you now call the ALV layer, CUS_1.xls receives the signature
of the current system and CUS_2.XLS is deleted.
CUS_2.xls is now imported from source system A and bot both
templates are displayed in transaction OAOR, whereby CUS_1.XLS
already has the signature of the current system. Therefore,
calling the ALV layer causes CUS_1.XLS to be deleted, which is
definitely not what you want to happen. For this reason, the
safest thing to do is to enter all templates that have to be
transported on a transport request.
Other terms
List viewer SAP, list viewer ABAP
Excel-Inplace, BDS, BDN
Reason and Prerequisites
Manage the view change and layouts in the ALV grid or ALV fullscreen.
Solution
Page 6
Implement the solution as described above.
________________________________________________________________________
Note is release independent
________________________________________________________________________
Reference to related Notes
Number Short text
____________________________________________________________
748405 RFFMFG_SF132: ALV layout 0SAPSF132 does not call excel
534624 ALV view: Consulting
________________________________________________________________________
_________________
We were somewhere around Barstow on the edge of the desert....