Beruflich Dokumente
Kultur Dokumente
Welcome, Guest
Login
Register
ABAP Development
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 .
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
=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
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)
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)
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)
scn.sap.com/community/abap/blog/2013/06/11/displaying-a-dms-pdf-document-in-web-dynpro
2/3
15/01/2014
Copyright
Follow SCN
scn.sap.com/community/abap/blog/2013/06/11/displaying-a-dms-pdf-document-in-web-dynpro
3/3