‎2006 Jun 28 1:00 PM
Hi Guys,
I have a problem with the class cl_dd_document.
The manual says that it is possible to print a dd_document without viewing it, it says:
1. Build document
2. Merge document
3. Print document
Until step 2 theres no Problem, but when i call the method print_document( ) the report crashes.
The dump information indicates that there's a null-pointer-exception for a html_control.
is it impossible to call this method, without displaying the document in a custom control first?
‎2006 Jun 28 1:10 PM
Hi,
if you are in ECC 5.0 version then check the example <b>DD_STYLE_TABLE</b> there you have option to print in the output , it is working fine.place a button in the screen and when you click on it , in PAI do this code.
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'. "Beenden
LEAVE PROGRAM.
<b>WHEN 'PRN'.
CALL METHOD DO->PRINT_DOCUMENT
EXPORTING REUSE_CONTROL = 'X'</b>.regards
vijay
‎2006 Jun 28 1:10 PM
Hi,
if you are in ECC 5.0 version then check the example <b>DD_STYLE_TABLE</b> there you have option to print in the output , it is working fine.place a button in the screen and when you click on it , in PAI do this code.
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'. "Beenden
LEAVE PROGRAM.
<b>WHEN 'PRN'.
CALL METHOD DO->PRINT_DOCUMENT
EXPORTING REUSE_CONTROL = 'X'</b>.regards
vijay
‎2006 Jun 28 1:28 PM
Hi vijay,
this report is a good demonstration but it it can't solve the problem.
I have to call the method display_document(parent=...) first, that means i need a custom control filled with the html control. Otherwise the report will crash.
regards
benjamin