Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Process (for Kishan)

Former Member
0 Kudos

Hi Kishan,

Thank you for your reply, the code works very smooth.

But I found one problem, how do we know if user click cancel in the printing window.

I dont want to execute the code when user click cancel button in the printing window.

Please I need help on this...

Thank you in advance.

Sandi

6 REPLIES 6

Former Member
0 Kudos

Sandi,

When the user presses CANCEL the R_UCOMM will be different, it will NOT be &PRN.

CASE R_UCOMM.

WHEN '&RNT'.

if rs_selfield-before_action = 'X'.

  • Here insert the code to set your data for print

endif.

WHEN OTHERS.

ENDCASE.

So it goes into the other WHEN condition and nothing happens, if you are using the above code.

Regards,

Ravi

Note : Please mark all the helpful answers

0 Kudos

Hi Ravi,

It's not working, it always returns '&RNT' code.

Best regards,

Sandi

0 Kudos

Are you saying that even if the user hits CANCEL, it still returns &RNT function code?

Regards,

Ravi

0 Kudos

yes, it is.

In the menu painter (PF-STATUS) I put &RNT for print button.

Is that the cause of the problem ?

Best regards,

Sandi

0 Kudos

Sandi,

Apart from the PRINT button you also have a CANCEL button in the PF-STATUS, right? What is the function code for that?

When you presse CANCEL, you should get that in your R_UCOMM.

In your code, When OTHERS, you do doing anything anyways, so how come its priting?

Regards,

Ravi

0 Kudos

Please excuse me, I think you have misunderstood my question.

I meant not the Cancel button in the PF-STATUS.

When user click the print button, then the printing window will be shown (there will be 4 buttons, check, properties, cancel, and info button).

Then, let's say user cancel his/her intention to print the report (list). How to manage this event ?

PS. I am using ALV report

Thank you in advance

sandi