cancel
Showing results for 
Search instead for 
Did you mean: 

Printing from Hupast upon saving

0 Kudos

Hallo Experts,

I'm having some problem with the printing from transaction hupast. Currently I have 7 packing stations and the users have to hit "print label" to get a label. Unfortunately this allows them to print "unsaved" data.

What I would like to achieve is that all labels are printed upon saving. I have created the recordset for  HU messages in vv61 and I get the labels upon saving. My problem is that I can only setup one printer in the vv61, but I have 7 label printers - one for each station.

When the print is done from TA hupast, the correct label printer is read from the customizing in transaction hupast_c. But this does not happen when the messages are created after saving.

Can anyone tell me how to do the setup correctly so that labels are printed upon saving and on the correct printer?  We're running ECC 6.0, EHP 6.

Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Christian,

should work if (as Yibing said) you create one PRPPRO profile per packing station with individual printer an no or invalid printer in the w61 hu message itself because this message is never printed directly.

Regards,

Matthias

0 Kudos

Hi Matthias,

thanks for the input. I did exactly that and it still doesn't work for me. I've set up the output types for each label, assigned them to a procedure and assigned that to the packing material types.

I've also set up one record per packing station and label with the printer assigned to it.

If I set up the vv61 without any printer at all, I don't get an output when I create an HU from hupast and save it.

If I set it up with an invalid printer, I get an output for the HU - but on the invalid printer and not the printer that I set up for tha packing station and the output type.

This is what it looks like when I check the HU output from vl03n.

What DOES work is a modification. When I call the "print_hu" in the save_hus in a loop for all HU, I get the labels on the correct printer because that "print_hu"- replaces the printer from the output with the printer from the packing station customizing.

However, that only works when I call it before the actual save is called and that still gives me the problem that unsaved data is printed (if something goes wrong in the saving). And in addition to that I have another modification.

regards

Christian

Former Member
0 Kudos

Hi Christian,

As you said, the FORM print_hu around line 1630 changes the printer in NAST &

performs immediate output (if found in NAST) if you hit PRINTHU button.

As I understood, you don't like to print at the PRINTHU button, you like to print at SAVE timepoint.

To be honest, we changed a lot here in HUPAST to get runnig like you (and most users) want to.

Also, some time users want to reprint the same messages by hitting PRINTHU and then a immediate output is required, and and and ...

You may use code from PRINT_HU to change printer to change NAST data at SAVE_HUS (e.g. by an implicit enhancement at begin of FORM ).

You may also change vsztp to 4 before save if you determined the NASTs with vsztp=3 before.

Then they are hopefully printed only during delivery_update. But then the PRINTHU may notprint any more

Regards,

Matthias

0 Kudos

Hi Matthias,

thanks again. I think the packing station is the most modified transaction that we run. Unfortunately it's giving me some trouble after upgrading from 4.7 => ECC 6.0.

I've added a pop-up to allow the packer to add serial numbers to the shipment. But that's giving me a headache since the ECC 6.0 upgrade. Upon saving, this produces more or less random errors, telling the user that the assigned serial number is in status "ELIE".

I suspect that this error is caused by my modification of printing/saving. I found some sap note that describes a similar problem when too many success/warning messages are being processed when saving.

So my real problem isn't printing, but getting some standard solution for printing. I think I'm going to try some of your input and see if that also solves my real problen.

Thanks

Christian

Former Member
0 Kudos

I am thinking if output determination can be used to address this requirement.

1) Do a small development to copy the packing station ID to HU header e.g. VEKP-VEGR1

2) Extend one of the condition table to include VEGR1 for ZMSS output type

3) Create condition record with key combination including VEGR1 to determine the printer

Former Member
0 Kudos

Hi Christian,

function WS_DELIVERY_UPDATE can drive you crazy .... I know ...

"random errors" often occur if 1) memory initialization of global data is missing or 2) asynchronous processes (timing/locking) is an issue.

For 1) as a bad workaround, you may reacall the total transaction with leave to transaction sy-tcode after each processed delivery)

At least at ECC6, you have the chance now to use implicit enhancments instead of modifications.

So good luck to fix your HUPAST extensions at ECC6:-)

You may close this thread then.

Best regards,

Matthias

0 Kudos

Hi Matthias,

I checked again after you mentioned the ws_delivery_update. It seems that I simply forgot to call the functions serial_liste_post_ls and serial_inttab_refresh just before the ws_delivery_update is called. I had put in those ages ago in the 4.7, but the upgrade kicked my precious coding! 

Thanks

Christian

Answers (2)

Answers (2)

racingpro
Explorer
0 Kudos

This message was moderated.

Former Member
0 Kudos

I guess the printer assigned to packing station (via Packing Station Profile) is only used when printing is initiated from HUPAST.

Please try the following customizing to see if the printer can be determined for the output upon saving the HU:-

1) Create a print profile for application V6 - tcode: PRPPRO

2) Assign output type and printer to the profile - tcode: PRPHU

3) Assign the profile to packing station - tcode: HUPAST_C

I haven't tried this yet. Please let me know if it works.

0 Kudos

Hallo Yibing,

thank you for your reply. I have already customized the print profiles and assigned them to packing stations. That works like a charm when you print from HUPAST.

Unfortunately it doesn't work when the print is not triggered directly from HUPAST.