10-06-2008 11:52 AM
Hi all,
Please help me out with the above issue.
Need printing Capability for ZEDIR03. Currently the ZEDIR03 transaction does not have the capability to print an EDIR hard copy. Just need to enable the print functionality in the transaction.
Thanks in advance.
10-06-2008 11:54 AM
Hi,
On your GUI status add the print icon with the okcode of %PRI.
Darren
10-06-2008 2:54 PM
Hi Darren,
Thanks for answering to my question.
I have added the icon but when i click on it nothing happens,please help me on how to proceed further.
But can you please tell me how to find the Okcodes for different icons.
Thanks,
Bhanu.
10-06-2008 3:00 PM
in the user_command module (PAI module) you have to handle that button. you want to print script/smartform..?
accordingly you have to call the functions/code the logic.
10-06-2008 3:31 PM
after doin the above mentioned steps u need to code the fnctionality of the button. have a look at the below code snippet which calls a sapscript form...
*this function calls the user print interface
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'.
IF sy-subrc <> 0.
ENDIF.
*start working on the form by specifying the sapscript form name
CALL FUNCTION 'START_FORM'
EXPORTING
form = 'ZUPDC_PURCHASE'.
IF sy-subrc <> 0.
ENDIF.
*write data on the form window
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN_01'.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN_02'.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'FOOTER'.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'LOGO'.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'LINES'.
IF sy-subrc <> 0.
ENDIF.
*end working on the form
CALL FUNCTION 'END_FORM'.
IF sy-subrc <> 0.
ENDIF.
*close the form and exit
CALL FUNCTION 'CLOSE_FORM'.
IF sy-subrc <> 0.
ENDIF.
this should shed light on grey areas..
award points if useful