cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1 8.82 Cascading Parameters for Layout Report using (DocKey@) - Print Labels

Former Member
0 Kudos

Hi,

I am trying to achieve the following:

     -     I want the Layout to be available from the PO Goods Receipt module.

     -     I want to print labels from a PO Goods Receipt, but, want to be able to select one Item code at a time (As label will change based on item).

I can do this using Cascading Dynamic Parameters in Crystal Reports, but don't know how to achieve this when run in SAP.

I want the user to select the layout report in the PO Goods Receipt Module (Token DocKey@) then be presented with a list of Itemcodes rom the rows (PDN1), user selects itemcode them report runs, labels can then be printed.

Kind Regards,

Eric

Accepted Solutions (0)

Answers (2)

Answers (2)

gaurav_bali
Active Participant
0 Kudos

Hi Eric

To select item codes you will need to use Dynamic Parameters.

Follow following steps

1) Create a new dynamic parameter as shown below

2) Click the "Click to create parameter" to create respective parameter under Parameters column

3) The final parameter will look like below screen shot.

4) Then create a selection formula for the parameter like {Command.ItemCode} = {?Test}

When you load and run the report in SAP it will prompt for selection of item Code

Cheers 🙂

julie_jamieson2
Active Contributor
0 Kudos

Have you tried creating a static parameter in the SAP token format?

ItemCode@ Select ItemCode from PDN1 where docentry = @DocKey

Former Member
0 Kudos

Thanks Julie,

You have gotten me much closer with this parameter

ItemCode@ Select ItemCode from PDN1 where docentry = @DocKey

The only remaining issue is that the Layout does not prompt with a dropdown list of ItemCodes from PDN1.

I however can copy and paste the part number from the PO Goods Receipt.

I would love to have the drop down list appear it anyone can add suggestions.

I can only test this by running it in SAP, not from Crystal using the add-in, I assume as I need the DocKey@ (docentry link to document)

See my screen shoots below for Julies solution

Response to Gaurav: I had tried this solution but it does not work in a Layout as you need the DocKey@

Using Julies Suggestion

Open PO Goods Receipt, copy itemcode that I want labels printed for

Select Preview Layouts

Paste Itemcode.

NOTE: No drop down list is appearing

Click OK Report runs OK

julie_jamieson2
Active Contributor
0 Kudos

Hi Eric,

You may need to edit the parameter and have a play around with the parameter settings (Allow custom, allow multiple etc).

I think there is some detail on this in the training material provided by SAP for Crystal & Business One

gaurav_bali
Active Participant
0 Kudos

HI Eric

Response to Gaurav: I had tried this solution but it does not work in a Layout as you need the DocKey@

The Dynamic Parameter I created is additional parameter. It will work as per requirement only if @dockey is selected and shows Item Codes in drop down according to result set.

Former Member
0 Kudos

Gaurav,

It is so close to working,but I am missing a detail.

When I do what you say, the drop down is for all items from all PDN1, see below.

How can I create second parameter and still have the DocKey@ active?

Kind Regards,

Eric

Problem too many items from all PDN1

Former Member
0 Kudos

Gaurav,

Maybe your step 4) I have wrong.

Regards,

Eric

gaurav_bali
Active Participant
0 Kudos

Hi Eric

I am using DocKey@ parameter in command so that it filters the results only for required docentry

Former Member
0 Kudos

Gaurav,

How are you accessing the modify command?

Regards,

Eric

gaurav_bali
Active Participant
0 Kudos

Hi Eric

I am using command based results in RPT. To get results via command, follow following steps.

1) Go To Database Expert.

2) Select data source > Add Command (Double Click). Add Command to report opens

3) Paste your sql query in Enter SQL Query Box.

4) Create New parameter DocKey@ (type number) by pressing Create Button on right hand side.

5) Insert parameter in where clause (Double click created parameter) as shown in above screen shot.

You will need to remove selection formula for OPDN.Docentry

Former Member
0 Kudos

OK I can see I need to Use the Database Expert to Add command,

I enter SQL, as per example, I then hit Create I get error. I have tried using Parameter name = DocKey@.

Can you give example how you created Command.

Kind Regards,

Eric

gaurav_bali
Active Participant
0 Kudos

Hi Eric

Here are the steps.

1) Paste Sql query in the respective field then create parameter as per below screen shot and press OK.

2) A new parameter will be created by name of DocKey@

3) Then place your cursor in front of = sign and double click the parameter, It will be inserted in the query as per below screen shot.

Then Click OK. cheers 🙂

gaurav_bali
Active Participant
0 Kudos

Also here is a link to PDF it explains the Crystal reports with SAP B1 in details.

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

Former Member
0 Kudos

Gaurav,

Thank you so much.

I have not used this technique (ADD COMMAND)  before and will need to do some reading. I eventually got the step correct and it is now working.

I will try the full report requirements next week.

Thank you again for your kind help

Kind regards,

Eric Walker

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please create parameter for Item code with dynamic values. So that user can select item code that to be added into layout.

Thanks

Former Member
0 Kudos

Nagarajan,


Thanks.


I can only test this next week will let you how it goes.


Kind regards,



Eric

Former Member
0 Kudos

Nagarajan,

As the document is a layout  and by default connected to the module via the DOCKey@ parameter,

I don't think you can do this.

When I tried in SAP the a box appears requesting the itemcode, whereas I want a drop down list.

From the PO Goods Receipt Module I want to select Preview Layouts, then select Layout. I then want to be presented with a list of Itemcodes from PDN1 rows.

Can you help further.

Kind regards,

Eric