Abap Programm zum Öffnen eines Word Dokuments

Getting started ... Alles für einen gelungenen Start.

Abap Programm zum Öffnen eines Word Dokuments

Postby Brian3250 » Wed Dec 04, 2013 4:55 pm

Hallo zusammen

Ich möchte ein ganz einfaches Programm schreiben, um aus einem ABAP Programm ein Word Dokument öffnen zu lassen. Es soll weder irgendetwas reingefüllt werden, sonst noch abgespeichert werden oder sonst etwas. Wir haben SAP ERP 6.0 im Einsatz.

Könnte mir jemand behilflich sein?
Brian3250
.
.
 
Posts: 7
Joined: Mon Jun 04, 2012 2:23 pm

Re: Abap Programm zum Öffnen eines Word Dokuments

Postby Brian3250 » Wed Dec 04, 2013 5:01 pm

Das File befindet sich lokal auf meinem Computer als docx
Brian3250
.
.
 
Posts: 7
Joined: Mon Jun 04, 2012 2:23 pm

Re: Abap Programm zum Öffnen eines Word Dokuments

Postby Tron » Thu Dec 05, 2013 2:01 pm

Moin.
Ist recht einfach :
Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. REPORT ztest14.
  2.  
  3. DATA lv_docu TYPE string VALUE 'C:\tmp\MMPO_ext.docx'.
  4.  
  5. CALL METHOD cl_gui_frontend_services=>execute
  6.   EXPORTING
  7.     document               = lv_docu
  8. *    application            =
  9. *   parameter              =
  10. *   default_directory      =
  11. *   maximized              =
  12. *   minimized              =
  13. *   synchronous            =
  14. *   operation              = 'OPEN'
  15.   EXCEPTIONS
  16.     cntl_error             = 1
  17.     error_no_gui           = 2
  18.     bad_parameter          = 3
  19.     file_not_found         = 4
  20.     path_not_found         = 5
  21.     file_extension_unknown = 6
  22.     error_execute_failed   = 7
  23.     synchronous_failed     = 8
  24.     not_supported_by_gui   = 9
  25.     OTHERS                 = 10.
  26.  
  27. IF sy-subrc <> 0.
  28. * Implement suitable error handling here
GeSHi ©


gruß Jens
Tron
.....
.....
 
Posts: 1112
Joined: Sat Aug 04, 2007 10:21 pm

Re: Abap Programm zum Öffnen eines Word Dokuments

Postby Quirin4280 » Mon Feb 03, 2014 7:18 pm

ich habe das problem, das ich gerne eine excelliste öffnen möchte, habe jedeoch open office also ".ods" dokumente... gibt es da auch hilfen von experten???
Quirin4280
.
.
 
Posts: 6
Joined: Tue Jan 21, 2014 8:46 am

Re: Abap Programm zum Öffnen eines Word Dokuments

Postby Bianka187 » Tue Feb 04, 2014 8:25 am

hallo Sebastian,

hast du es mit dem Coding von Tron probiert? Den richtigen Dateipfad in lv_docu und einen auf dem Client ordentlich registrierten Dateityp ".ODS" vorausgesetzt müsste es auch in deinem Fall funktionieren.
Bianka187
....
....
 
Posts: 612
Joined: Thu Feb 23, 2006 5:34 pm


Return to ABAP® für Anfänger

Who is online

Users browsing this forum: No registered users and 5 guests