cancel
Showing results for 
Search instead for 
Did you mean: 

DocKey@ and ObjectID@ tokens required for Crystal Layout

Former Member
0 Kudos

Hi Everyone,

I have created a Crystal Layout for AR Invoice.  I want to be able to either print or PDF the AR Invoice I am viewing in SAP without SAP asking me for any Parameters etc.

I looked in the Working With Crystal for 882 which says to create two Parameters, one DocKey@ and the other ObjectId@.  I have done this.  I then go to Select Expert and try this:

{OINV.DocEntry} = {?DocKey@} and

{OINV.ObjType}={?ObjectId@}

however it does not let me save, I get an error saying 'A string is required here'.

Does anyone know exactly what is needed to print the viewed AR Invoice (or any document) without SAP asking for Parameters and Object ID please - or can anyone advise what I am doing wrong or need to do please?

Thanks so much in advance for any advice.

Caroline

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I got it working   I needed to change the Server on the Layout Manager for this layout to the actual Server instead of leaving it as default.  It was fine after that.  Thanks very much.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I have the same problem as you, can you help me please?

Thank you very much.

Regrads

KennedyT21
Active Contributor
0 Kudos

Hi  Caroline Parkinson

Make a parameter with the name DocKey@

and set the Record Selection formula {Command.DocEntry} = {?DocKey@}


http://www.pioneerb1.com/wp-content/uploads/2012/04/How-to-work-with-Crystal-Reports-8.8.pdf

Crystal Report as Default Print Layout Parameter

This is a document which contains details about tokens in B1


Also check with this Link

http://scn.sap.com/thread/3220668

Hope Helpful

Regards

Kennedy

Former Member
0 Kudos

Hi Kennedy,

Thanks for your reply, and for the links, I have already seen these links on the forum and looked at CR guide for 882 hence using {?DocKey@} and {?ObjectId@}

Unfortunately

{Command.DocEntry} = {?DocKey@} and

{OINV.ObjType}={?ObjectId@}

does not work either because SAP doesn't have a table/field called Command.DocEntry and so I get an error message in Crystal that the Field does not exist when trying to use that too.

So I still am trying to understand how to create a correct parameter which enables me to PDF the AR Invoice (or any document) without having to enter parameters when I click on the PDF button.

Thanks again,

Caroline

KennedyT21
Active Contributor
0 Kudos

Hi  Caroline Parkinson

Have you tried with this

DocKey@ token does not exist, create a new parameter with the following settings:

In the Name field, enter DocKey@

In the Type dropdown list, select Number

In all other fields, leave the default settings

Then Save report as layout to B1

Try previewing this layout as you will notice it will no longer ask for a parameter.

This likely behaves as a standard layout

Regards

Kennedy

Former Member
0 Kudos

Hi Kennedy,

Thanks for your email.

Yes...this information is from the CR for 882 Guide which I have tried.  Have you tried this in your db?

Thanks!

Caroline

KennedyT21
Active Contributor
0 Kudos

Hi Caroline

Try to remove the report and try again...

Regards

Kennedy