Sie sind auf Seite 1von 2

SAP Business One Notes

1403943 - Crystal Layout for Special Prices


Version 1 Validity: 05.11.2009 - active

Language English

Symptom
You created Crystal Layout for a certain form, which is not document (e.g. Special Prices), and you
would like to preview/print the form with this layout in SAP Business One application without
choosing selection criteria.

Cause
Consulting

Solution
There are special Tokens in Crystal Reports for SAP Business One, to create SAP Business One
controls.
The DocKey@ token is mandatory in a Crystal Reports .rpt file that you want to use as a layout. The
DocKey@ token is used to identify the current active document. SAP Business One populates its value
when you preview or print a layout.
When you apply the DocKey@ token for documents, in the Select
Expert window, you need to specify a filter condition, such as:
{OINV.DocEntry}={DocKey@}.
(Please find more details of the Tokens in the Documentation Resource Center, How to Guide "How to
Work with Crystal Reports in SAP Business One")
Since the Special Prices form is not a document, and has no DocEntry, you have to use the Token
differently, and check what the key of this form is.
In case of the Special Prices, (OSPP table) you can see that there are two keys (check the SQL
design): 'ItemCode' and 'CardCode'. Since in our case we would like to preview the form according to
CardCode, we will use that one as our key.
Example of using the token DocKey@ in Special Prices:
1. Create a Crystal report. Choose table: OSPP (Special prices), choose any fields to the report and
also Card Code field to the report header.
2. Create new Parameter: Name: DocKey@ (leave all other settings as default).
3. Right click on the CardCode field in the report > Select expert record.
Condition: 'Is equal to', and choose the parameter DocKey@.
As a result you get the string: ({OSPP.CardCode} = {DocKey@}).
4. Save the report in SAP Business One as layout for SPP1.
5. Set the layout as default.
6. Print/preview the Special Prices for a specific BP.
Results:
No selection criteria window is open, and you get the printout for the Card Code in the active
window.

Other terms
interface, token structure, tokens, syntax, BP, Business Partner, RPT,

Header Data
Released On 05.11.2009 13:23:38
Release Status Released for Customer
Component
SBO-REP-CR SAP Crystal Reports for SAP Business One
Priority
Recommendations/additional info
Category
Consulting

Validity
Software Component Version
SAP BUSINESS ONE 8.8

Das könnte Ihnen auch gefallen