cancel
Showing results for 
Search instead for 
Did you mean: 

HELP !!! Problem in R/3 trying to get a PDF on to Web Dynpro

former_member184029
Participant
0 Kudos

Hi,

I read a note about <b>How to get PDF on to Web Dynpro iView </b>, it was very helpfull, but the problem is in R/3 because I need that the Print Window do not open and send data direct to Web Dynpro.

the code is:



  control_parameters-no_dialog  = 'X'.
  control_parameters-preview    = ' '.
  control_parameters-langu      = 'S'.
  control_parameters-getotf     = 'X'.

...

  output_options-xsfcmode   = 'X'.
  output_options-xsf        = space.
  output_options-xdfcmode   = 'X'.
  output_options-xdf        = space.
  output_options-tdnoprev   = 'X'.

...

*  OUTPUT_OPTIONS-TDNOPRINT  = 'X'.
  output_options-xsfoutdev = output_options-tddest = 'ZWIN'.
  output_options-tdimmed    = 'X'.
  output_options-tddelete   = 'X'.
call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
      formname              = 'Z_REP_TRANS_PRES'
*   VARIANT                 = ' '
*   DIRECT_CALL             = ' '
   importing
     fm_name                  = formato
* EXCEPTIONS
*   NO_FORM                 = 1
*   NO_FUNCTION_MODULE      = 2
*   OTHERS                  = 3


call function '/1BCDWB/SF00000022'
 exporting
*   ARCHIVE_INDEX              =
*   ARCHIVE_INDEX_TAB          =
*   ARCHIVE_PARAMETERS         =
   control_parameters         = control_parameters
*   MAIL_APPL_OBJ              =
*   MAIL_RECIPIENT             =
*   MAIL_SENDER                =
   output_options             = output_options
*   USER_SETTINGS              = 'X'
*   USUARIO                    =
*   FECHA_INI                  =
*   FECHA_FIN                  =
   tipo_rep                   = tipo_rep
*   TIPO                       =
*   LOGO                       = 'ZHR_CANTV_LOGO'
 importing
*   DOCUMENT_OUTPUT_INFO       =
   job_output_info            = output_job
*   JOB_OUTPUT_OPTIONS         =
  tables
    transf_pres                = transf_pres
* EXCEPTIONS
*   FORMATTING_ERROR           = 1
*   INTERNAL_ERROR             = 2
*   SEND_ERROR                 = 3
*   USER_CANCELED              = 4
*   OTHERS                     = 5

  call function 'CONVERT_OTF'
    exporting
      format                = 'PDF'
*/      MAX_LINEWIDTH         = 132
    importing
      bin_filesize          = numbytes
      bin_file              = bin_file
    tables
      otf                   = zoftdata
      lines                 = zpdf
    exceptions
      err_max_linewidth     = 1
      err_format            = 2
      err_conv_not_possible = 3
      err_bad_otf           = 4
      others                = 0.

Thanks in advance!!!

tgfch

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Please see this sample applications

WDR_TEST_ADOBE_PDF_ONLY

WDK_SPOOL_TO_PDF

dirk_dautermann
Explorer
0 Kudos

Hi Parry,

thanks for the samples, but my problem is still alive!

I have an internal table which contains the PDF-Data from type "DOCS" (from "ARCHIVOBJECT_GET_TABLE"). The sample applications work with type "TLINE"!

How do I merge?

Ciao Dirk

Former Member
0 Kudos

Hi Tokio,

I've got a similar problem. We're reading a PDF File from an archive via

CALL FUNCTION 'ARCHIVOBJECT_GET_TABLE'

EXPORTING

archiv_id = is_archiv-archiv_id

document_type = iv_doctype

archiv_doc_id = is_archiv-arc_doc_id

IMPORTING

length = len

TABLES

archivobject = it_archivobject.

receiving the PDF data in table it_archivobject.

Now we're looking for a way to dieplay that PDF Data in a

web dynpro application and have no clue.

Any Help appreciated!

THX!

Former Member
0 Kudos

Hi Claus,

Try use this web dynpro code to open the XSTRING that coming from abap side:

IWDCachedWebResource resource = WDWebResource.getWebResource(

wdContext.currentZReport_OutputElement().getPdf(), WDWebResourceType.getWebResourceTypeForFileExtensio("pdf"));

resource.setResourceName(this.getDescriptionReport());

// Create a External Window with the URL destination

IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(resource.getURL(), this.getDescriptionReport(), true);

// Eliminate some features of the window

window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);

window.removeWindowFeature(WDWindowFeature.MENU_BAR);

window.removeWindowFeature(WDWindowFeature.STATUS_BAR);

window.removeWindowFeature(WDWindowFeature.TOOL_BAR);

window.setWindowSize(780,430);

window.setWindowPosition(20,140);

window.open();

This code will open its PDF report!!!

Regards,

Luciano Leite

Former Member
0 Kudos

Hi Luciano,

thanks for your response.

Is there any chance to handle that within ABAP?

luciano_leitedasilva
Contributor
0 Kudos

Claus,

My webdynpro code is waiting for a paramenter type XSTRING from abap side.

What is the type of parameter it_archivobject?

Regards,

Luciano

Former Member
0 Kudos

Hi Luciano,

the CALL FUNCTION 'ARCHIVOBJECT_GET_TABLE'

returns it_archivobject as table with linetype DOCS

that contains the PDF data.

Regards,

Claus

dirk_dautermann
Explorer
0 Kudos

Hi Claus,

i´ve the same problem like you (but some months later)!

Could you solve the problem?

I´m at the point, where the table "it_archivobject" is filled with the PDF-Data.

But I have no idea how to display in WD4A!

Hope, you hava a solution!

Regards,

Dirk

Former Member
0 Kudos

Hi Tokio,

The PDF or any other data has to be requested from the webdynpro application. And there are some standard BAPIs

(SDOK_****) which deal with upload or download of any binary data.

Hope it helps.

Regards

MK

thomas_szcs
Active Contributor
0 Kudos

Hi Tokio,

For displaying a pdf document you could use the InteractiveForm ui element provided by Web Dynpro. It is available for Web Dynpro ABAP and Java.

Best regards,

Thomas

Former Member