cancel
Showing results for 
Search instead for 
Did you mean: 

how to code for print operation in dialog programs

Former Member
0 Kudos

hi,

    how to code for print button in a dialog program, that is in PAI event.

thanks

patrick

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

It depends on what you want to print. Do you want to print the screen-shot? If so, you don't need a button - just use SAP's menu Alt+F12 -> Hard copy.

Do you want to print the contents of a ALV grid control? Still you can use ALV's print button.

Former Member
0 Kudos

If you're putting a button on your dynpro, yoo'll have to give a status to the program that deals with that button. You'll have to use the menu painter for that. Then you'll have to ask in PAI if the button has been pressed (i.e. the status has been set) and then you write a routine with the content what to do if this button was pressed.

Kind regrads Axel Kiltz

Former Member
0 Kudos

Sorry!

My previous answer was only half the truth! You do so if you use a function key, pushbutton on top or menu entry in the top menu.

You can put a big fat pushbutton in the middle of your dynpro or wherever you want. Then you have to give a character identifier (f.e. "my_p") with that pushbutton. If the pushbutton is pressed in PAI the action is taken that is coded under:

if sy-ucode = 'MY_P'.

  • action

endif.

Regards Axel Kiltz