Sie sind auf Seite 1von 3

15/01/2014

ABAP Development: Displaying a DMS PDF Document... | SCN


Getting Started New sletters Store

Welcome, Guest

Login

Register

Search the Community

Products Industries Lines of Business

Services & Support Training & Education University Alliances

About SCN Partnership Events & Webinars

Downloads Developer Center Innovation


Activity Brow se Communications Actions

ABAP Development

Displaying a DMS PDF Document in Web Dynpro


Posted by Mohammed Yakub Shah in ABAP Development on 11-Jun-2013 14:19:12
Share 0 Tw eet 1 Like 0

Previous Next

Purpose
The plain technical requirement is that a PDF document is stored in SAP needs to be displayed as a Pop-up to the portal user.

Details
Earlier, I used to use SAP GUI for HTML and call the 'DOCUMENT_SHOW_DIRECT' in a wrapper program with submit. But here is a better way.
postpost

Create a New method DISPLAY_DOCUMENT in your assitance class, generally the TYPE of document is static but you can keep all as parameterised. Inside the method call the following code

DATA : W _ U R L type s t r i n g , v _ u r l type M C D O K -U R L . C A L LF U N C T I O N' C V A P I _ D O C _ V I E W ' E X P O R T I N G P F _ D O K A R =I _ D O K A R P F _ D O K N R =I _ D O K N R P F _ D O K V R =I _ D O K V R P F _ D O K T L =I _ D O K T L P F _ H O S T N A M E =' D E F A U L T ' P F _ A P P L _ S T A R T ='' P F _ G E T _ U R L =' X ' I M P O R T I N G P F X _ U R L =v _ U R L E X C E P T I O N S E R R O R =1 N O T _ F O U N D =2 N O _ A U T H =3 N O _ O R I G I N A L =4 O T H E R S =5 . I FS Y S U B R C< >0 . *M E S S A G EI DS Y M S G I DT Y P ES Y M S G T YN U M B E RS Y M S G N O * W I T HS Y M S G V 1S Y M S G V 2S Y M S G V 3S Y M S G V 4 . E N D I F . W _ U R L=v _ u r l .

data l o _ w i n d o w _ m a n a g e r type ref to i f _ w d _ w i n d o w _ m a n a g e r . data l o _ a p i _ c o m p o n e n t type ref to i f _ w d _ c o m p o n e n t . data l o _ w i n d o w type ref to i f _ w d _ w i n d o w .

l o _ a p i _ c o m p o n e n t =w d _ c o m p _ c o n t r o l l e r -> w d _ g e t _ a p i ( ). l o _ w i n d o w _ m a n a g e r= l o _ a p i _ c o m p o n e n t -> g e t _ w i n d o w _ m a n a g e r ( ). CALL METHOD l o _ w i n d o w _ m a n a g e r -> C R E A T E _ E X T E R N A L _ W I N D O W EXPORTING U R L M O D A L H A S _ M E N U B A R I S _ R E S I Z A B L E =W _ U R L =A B A P _ F A L S E =A B A P _ T R U E =A B A P _ T R U E

scn.sap.com/community/abap/blog/2013/06/11/displaying-a-dms-pdf-document-in-web-dynpro

1/3

15/01/2014
H A S _ S C R O L L B A R S= A B A P _ T R U E H A S _ S T A T U S B A R =A B A P _ T R U E H A S _ T O O L B A R H A S _ L O C A T I O N R E C E I V I N G WINDOW =A B A P _ T R U E =A B A P _ T R U E

ABAP Development: Displaying a DMS PDF Document... | SCN

=l o _ w i n d o w .

l o _ w i n d o w ->open( ).

Output
Well, I have called this code on click of ALV on the DMS document number... and here is the result

690 View s

Tags: w eb, abap, dms, pdf, dynpro

Average User Rating (1 rating)

Share

Tw eet

Like

4 Comments
Rambabu Kunuku 11-Jun-2013 14:23

Hi, it is Useful document. thanks for your efforts in posting this. Thanks Rambabu
Like (0)

Satya Srinivas 20-Jun-2013 19:06

Hi Yakub, Really it is very useful. Last time i got similar requirement,but my object is related to Adobe forms. My requirement: I have to print item level DMS document content(based on materials number) in ME23N t-code. Thanks, Satya Srinivas.
Like (0)

Mohammed Yakub Shah 21-Jun-2013 07:44 (in response to Satya Srinivas)

Well Satya, That is a question to be asked in forum..... You cau use the intertative form in that case in WD and pass the OTF output of your ADOBE Form into it Converted to XSTRING.
Like (0)

Ramesh T 03-Aug-2013 12:08

Very useful ... Thanks for sharing...

scn.sap.com/community/abap/blog/2013/06/11/displaying-a-dms-pdf-document-in-web-dynpro

2/3

15/01/2014

ABAP Development: Displaying a DMS PDF Document... | SCN


Like (0)

Site Index Privacy

Contact Us Terms of Use

SAP Help Portal Legal Disclosure

Copyright

Follow SCN

scn.sap.com/community/abap/blog/2013/06/11/displaying-a-dms-pdf-document-in-web-dynpro

3/3

Das könnte Ihnen auch gefallen