cancel
Showing results for 
Search instead for 
Did you mean: 

Print WWI without using Report Shipping

Former Member
0 Kudos

Hi Experts,

I have a requirement to print out WWI report in a specification but the printer needs to be specified during the process.

I know that one way of printing WWI reports is through the report shipping, but the printer configuration is fixed and specified in the SPRO(EH&S->Product Safety->Report Shipping->Basic Settings->Assign Default Printer). I need something that I can specify an SAP printer dynamically and report shipping doesn't allow that.

Is there an existing Function Module or BAPI that I can use to trigger a WWI to print?

Thanks in advance!

Regards,

Jorenz Llanes

Accepted Solutions (0)

Answers (2)

Answers (2)

christoph_bergemann
Active Contributor
0 Kudos

Dear Jorenz

as Mark explained: any SAP printer can be used in the CG54 process (with or without subseqeunt shipment). You can differentiate two "subprocess".One using the "MAN_CALL" variant and the second is the "PRINT_CALL": In your case "PRINT_CALL" is may be the "right" option; But I would assume that in >90% of the cases the MAN_CALL is used.

Here you can use e.g. a "report recipient" having an e.g. assigned printer or an assigned eMailaddress (to get document as SDS) etc.

You need to prepare proper set upo of customizing (e.g. may be own cover letter etc.)

For SD_CALL etc. as you correctly explained. one printer per sales organisation is the "standard".

So as Mark asked. what kind of process do you have in mind? What would be you parameter to define: now print on printer X in comparison to printer Y (and can the SAP system analyse some data to decide this?)

Check e.g.: Shipping Reason - Product Safety (EHS-SAF) - SAP Library

and Using the Report Information System - Product Safety (EHS-SAF) - SAP Library

C.B.

PS: check as well:

Error while generating a MAN_CALL | SCN

Former Member
0 Kudos

Hi Christoph,

Thanks for responding.

as I have responded with Mark's query, we have a requirement to automate the printing as business doesn't want to go through CG54 after every Transfer Order.

Currently they do have the SAP printer identified but they also have a backup printer in which case a dynamic printer parameter in the screen would fit to make the printer dynamically assigned during the process.

But if one printer pet sales org is the "standard", I'm thnking if there is a way to customize that.

Regards,

Renz

christoph_bergemann
Active Contributor
0 Kudos

Dear Jorenz

this is my understanding now regarding your requirement:

1.) per sales organisation you can specify one SAP printer;  this is SAP standard (and I can therefore confirm your findings)

2.) we talk about SD_CALL requirement (and not using CG54)

I am sorry. There is no SAP standard to "switch" in SD_CALL the printer; anything in this area would be very customer specific; in different thread e.g. it has been asked to have a printer by plant. This is as well not possible (or you need to do your own may be quite complex printing)

The selection of the printer is very "static" (in SD_CALL and CG54); there is no option by standard to change dynamically the printer; and you need some "parameter" to decide: should now the system use printer A or B.

in SD_CALL: won't know which parameter you would like to use

in MAN_CALL: may be you can think about this: part of your "user profile": you can select a SAP printer. This need not to be the "default printer"; then by "clever" programming may be you can try to use the printer from "user profile"

IF we talk about CG54: the best option might be to use the "Userexits" which are available here to select the printer (dynamically); Nether tried it. You you then e.g.: select material, specificaiotn, report, sales organisation and the using the "exit" you coould get a screen with "SAP default printer" which you could then change

BUt this is the same if you use the "report recipent"approach; here you have a lot of options using "standard" (without programming !). But this is "manual" work and not "automated"..

Coming back to your original statement:

"Currently the business do print the reports via CG54. The requirement is to automate the printing after Transfer Order. Labels needs to be printed after each process automatically without going through CG54."

If we defined "transfer order" as the "normal EHS" setup: This is the "normal" automatic SDS distribution process to customer (ONLY ONE STATIC PRINTER (refer above); so nothing "special" (check the may threads regarding report shipment and the most important OSS note in which the report distribution process is explained (you will find many references here to the OSS note)

This part:

Labels needs to be printed after each process automatically without going through CG54."


I have not commented yet. This is very special; If we talk about GLM then the story is without CG54 (but you can use it as well) but you use the "label workbench" (depending on your release); If I need to compare the complexity of EHS solutions based on some blue print this is my sequence (roughly)

GLM (most complex!) > report distribution > set up of reports > DG part; that means GLM projects does have highest complexity (even more complexer as report distribution)


Regarding:

And because the printer can vary depending on the market that will use this functionality, I feel that report shipping may or may not be used. It can be used if we configure 1 per market but it will be too many to do


This is not the SAP approach; in SD_CALL etc. you do not have "enough" information to select a "printer" based on a "market";  Not knowing your "market" definition: I would assume. not possible using SAP approach


Regarding:

1. Retrieve DMS of the report/label per spec

2. Print document to spool

Just stop your actions here.You will not find solutions without complete reprogramming of EHS;

For part 2: check the GLM options (BUT ONLY AVAILABLE IN GLM ! and not for SDS etc.); check as well:


C.B.

PS: may be check: SDB output(MSDS) for delivery | SCN

PPS: for SD => interface e.g. check:

Output Data in SD - Product Safety (EHS-SAF) - SAP Library

or moste recent SAP help version. Check the structures:

RCGUSDATA

RCGSDDOC


These two structures are the main element of communication between SAP SD and SAP EHS to support SD_CALL related  report distribution

Mark-Pfister
Active Contributor
0 Kudos

Hello Jorenz,

Can't you just use CG54 (you can navigate from CG02 to CG54):

- select and mark all reports there that you want to print

- change the printer via the menu 'Utilities' -> 'Change Print Parameters'.

- Print via menu 'Report' -> 'Print'

Can you elaborate more on the reason for this requirement?

Hope this helps


Mark

Former Member
0 Kudos

Hi Mark,

Currently the business do print the reports via CG54. The requirement is to automate the printing after Transfer Order. Labels needs to be printed after each process automatically without going through CG54.

And because the printer can vary depending on the market that will use this functionality, I feel that report shipping may or may not be used. It can be used if we configure 1 per market but it will be too many to do. So the flexibility to print reports/labels by using a parameter in the screen will make it more dynamic.

Also I am trying to do some research about this approach:

1. Retrieve DMS of the report/label per spec

2. Print document to spool

Regards,

Jorenz

Mark-Pfister
Active Contributor
0 Kudos

Hello Jorenz,


Automatic printing of SDS for Transfer Orders seems a bit strange to me because of the following:


- Do you really want to print the same SDS over and over again - just because the same material as yesterday / the week before was transferred today as well?
- What should happen to these printed out SDSs? Should someone manually compare that version with the printed version a month ago and replace it?

- Who will ensure there is always enough paper in the printer / who will restart printing if the printer had a paper jam

- MSDS can be - thanks to the ANNEX - more then 100 pages,  if not hundred of pages big.

- To what kind of physical locations do you print the SDS to? To the storage cite / warehouse? What are the people there supposed to do - put it in a binder?

- etc...


However - I do not know your business and you might have very valid reasons for automated SDS printing! [I however would prefer a solution where you would e-mail - only changed SDS - to a "person in charge".]

You can set up automated MSDS shipment - with automated printing - for the order creation process as well (VA01). It is very similar to the process for the delivery and fully supported in the SAP Standard.  (However - it might be a bit tricky to have set up both at the same time - but I'm sure it is possible)


Within report shipment you have the exit CVFE001 which allows you to define your own logic for the printer selection - you would have the key data from the order available here.


If that for some reasons doesn't work for you - you have two other options:

  • Analyze the CG54 Printing logic. This will tell you how to set up your own printing requests

  • To a look at the report RC1SDAL Form-routine 'Entry.' This is the logic that is executed for the automated report shipment from deliveries / oders. In the end the FM C1CA_SD_INTERFACE_TO_EHS_NEW is called to create the shipment request (set up with automated printing if you wish so)

Jorenz Llanes wrote:

Also I am trying to do some research about this approach:

1. Retrieve DMS of the report/label per spec

2. Print document to spool

Regards,

Jorenz

This will not work - the document in DMS is a RAW report which is still missing some data. You would need to involve WWI to make the RAW report a finial report. This is what report shipment does for you.

Hope this helps

Mark

Former Member
0 Kudos

Hi Mark,

The document to be printed is actually a label(6x4 inches) and not an SDS report. So it is okay to print multiple times per transfer order. Apologies if I confused you on printing SDS reports.

I will try exit CVFE001 and check if I can retrieve the printer from a custom table for example.

I will let you know if it works. Thanks a lot!

Regards,

Renz

christoph_bergemann
Active Contributor
0 Kudos

Dear Jorenz

still may be I do not understand your requirement. For printing labels in most cases you do not use CG54 but GLM; GLM set up can not be compared to SDS etc. report distrbution process.

For use of the so called "GLM+" you need appropriate SAP release. But even in this case: I am not sure regarding any kind of suitable approachfor "dynamic" printer selection

More or less: if we talk about labels any kind of solution is at least in many casses (not all) two times complexer than other stuff. PLease read the "introduction" document regarding label topics which I have added as a link

C.B.

christoph_bergemann
Active Contributor
0 Kudos

Dear Mark

can you please explain:

Within report shipment you have the exit CVFE001 which allows you to define your own logic for the printer selection


I am working now quite long one EHS. I could not find the exit you have mentioned

What kind of exit is this?

C.B.

Mark-Pfister
Active Contributor
0 Kudos

Hello Christoph,


Christoph Bergemann wrote:

I could not find the exit you have mentioned

Sorry - I missed a zero - the name is "CVFE0001"  (three zeros).

It is classical SAP Customer Exit which you can implement via transaction CMOD.

I think it might have been there for a while - otherwise SAP would have used a BADI (but that's really just speculation). The exit was last changed in December 2014.

You can find it in the customizing:

If you can not find it in your system you might be on a to low EhP or you some EHS switches are not activated in your system. Our system is on "EHP7 FOR SAP ERP 6.0" SP 6.

The documentation states:


You can use this SAP enhancement to define a function module exit which is used to automatically determine the output device for report shipping.

The customer exit can be found in the function group XC1A and is called when report shipping orders are generated.

As return value, the enhancement has the determined output device with the appropriate parameters (for example, Format, Print immediately indicator, Delete after printing indicator, and so on).

The output device is determined through Customizing as a default setting (see Assign Default Printer).

The enhancement has the following interface parameters:

  • I_COMM
    Structure that contains the communication type and communication group (FAX COM, for example).
  • I_REASON
    Shipping reason that indicates where report shipping was started.
  • I_REC_COUNTRY
    Recipient country of the report shipping order. Depending on the communication, the system determines whether the report is sent to the recipient company or the recipient contact person. The recipient country is then transferred to the company address or contact person address correspondingly.
  • I_REPORT
    Structure with data for the report (see structure CVDREPORT in DDIC)
  • I_RECINFO
    Structure with data for the recipient (see structure CVDRECINFO in DDIC)
  • I_INITIATOR
    Initiator (sales organization) of the report shipping order
  • I_PARAM_TAB
    Table with parameter data for the report shipping order. If the report shipping order was initiated from a delivery or sales order (SD_CALL), this table contains data for the corresponding SD document (see structure RCGSDDOC and RCGCUSDATA in DDIC).


Hope this helps

Mark

christoph_bergemann
Active Contributor
0 Kudos

Dear Mark

upps; yes now it is clear. Clearly I know this exit... hihi..

C.B.

PS: Dear Jorenz: this exit is (according to my knowlegde) only useful for report distribution part, it should not be used for "labels", as mentioned: if the "really" talk about labels in 90% of the cases you need to use the GLM part to print (and in most cases using CG54 is the wrong approach)

Former Member
0 Kudos

Hi Christoph,

I am not aware of GLM, and only reading it now as we speak. Our system does not have the label workbench CGBLWB. but we do have the label stock CBGL_LS02 and CBGL_MP01.

We have treated labels as part of CG42 templates and print it manually based on the generation variant specified for each labels.

But even though we utilize GLM, the dynamic printer, will still not be an option right? since the user exit CVFE0001 is only for report distribution?

Regards,

Jorenz

christoph_bergemann
Active Contributor
0 Kudos

Dear Jorenz

please answer these questions:

1. ) did you read the online SAP EHS help for GLM and do you understand the GLM approach?

2.) based on 1.) can you write down exactly what you are doing today (I still do not 100% understand it) and your challenge?

3.) did you read the document which I posted as a link and did it help?

4.) can you show an exampe of the "label" to be printed (refer to topic below)?

5.) please close this thread and make your question "more specific"

As explained. if we are really talking about a GLM process accordsing to SAP standard: any GLM "project" is a challenge

Regarding your release topic: in most cases the use of CBGL_MP01 can be a solution as well (but you must ! understand the GLM process !). The label workbench CGBLWB is not a "must" (but it depends really on your requirement....)

Once again: if the talk about a "real" label (check the link to the document: we have lots of variants of labels!!!!) using GLM can be an option (I "skip" here fore a moment the discussion about "printer"; you need to define your approach from "higher" level)

C.B.

Mark-Pfister
Active Contributor
0 Kudos

Hello Jorenz,


Jorenz Llanes wrote:

But even though we utilize GLM, the dynamic printer, will still not be an option right? since the user exit CVFE0001 is only for report distribution?

You can set up GLM to automatically print labels without user interaction.

And it should be possible to automatically determine the printer during that process as well.

But setup / customizing of GLM might be an overkill depending on the complexity of your labels.

I think generating a EHS print request automatically based on a transfer order - and dynamically selecting the printer during this process - would be a cost effective solution (no need to install and configure another sub SAP EHS Modul like GLM).

Kind Regards

Mark