cancel
Showing results for 
Search instead for 
Did you mean: 

Link for displaying documents

former_member205842
Participant
0 Kudos

     Hi Experts,

                      I have a requirement that i have to add a button or link ...in standard portal when user click on button or link it has to display 9 documents in pdf format and it should b available every time ...the documents which am going to display after action of user on button or link in portal it will change rarely like once in a year. please suggest me how to achieve this requirement.

Regards

Syed

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Syed,

Your requirement can be achieved as below

  • To create new button / link in standard component
    • Enhance the view of standard component
    • Create an ui element button/link to action and create an action in view and bind it to the event of button/link
  • To display 9 pdf documents and these documents changes very rarely

      • Approach 1
        • First, you need to provide a provision to store these documents in a ZTABLE
        • User can change whenever, he/she wants as per his/her requirement

                             Please refer the below document

                             

      • Approach 2
        • Create mime objects in your components for all pdf documents
        • Use CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE to display your pdf documents from mime

Hope this helps you.

Regards,

Rama

former_member205842
Participant
0 Kudos

Hi  Ram,

              Thanks for replying its very help ful for me...actually i have created button in portal, on action on button i have to read pdf file from my system  and display as  pdf file,  i want to display PDF in popup file ...please let me know how to achieve give me some code so that  i can read from source ( from my system drive ) and display as PDF.

Regards

Syed

former_member184578
Active Contributor
0 Kudos

Hi,

You cannot show PDF file from your local machine( even if you do, if other user logs in to other machine, the pdf will not be available)

As said in your original query, since the documents are static( and change rarely) I suggest you to Import those PDF files in MIME Object of your WDA Component and create a Interactive Form UI and bind the source to the MIME Object to display the PDF Files.

Hope this helps u,

Regards,

Kiran

former_member205842
Participant
0 Kudos

HI Kiran,

             Please let me know how to store my PDF file in WDA or ZTable and how to dispaly it..

Regards

Syed

former_member205842
Participant
0 Kudos

Hi Experts,

                  I have done with PDF display in popup but am in stuck that user want's to change PDF file when he/she want's ...am not getting point that how allow user to change PDF file?  I have uploaded PDF file in Webdynpro application using MIME object and displaying in popup window. Please suggest me how to achieve my issue.

Regards

Syed

former_member184578
Active Contributor
0 Kudos

Hi,

PDF Files cannot be edited ( unless using Acrobat ), Why user want's to change the file, if it is jus to dislay information?

To provide user's to edit the document, use Office Control UI and display the File in MS word.

Hope this helps u,

Regards,

Kiran

former_member205842
Participant
0 Kudos

HI Kiran,

             Thanks for replying . ..Actually PDF file is for display only .....but user wants to display that pdf file for 1 year later he want to show other pdf file in next year ...so what am trying to do is i want make user to upload pdf file and store in table, when he /she want's to display other pdf file...my req is i want's to display that pdf file which he/she updated recently in table..please help me how to store pdf file in ztable and what are the fields i have to use in table to store pdf file.

Regards

Syed

ramakrishnappa
Active Contributor
0 Kudos

Hi Syed,

To store pdf files and retrieve from Ztable, please refer the below doucment

Attach files with save, retrieve and delete functionality in Web Dynpro ABAP - Part 1

Hope this helps you.

Regards,

Rama

former_member184578
Active Contributor
0 Kudos

Hi,


how to store pdf file in ztable and what are the fields i have to use in table to store pdf file.

Apart from the key fields, create a field CURRENT with data type boole_d and FILE_DATA of type RAWSTRING to store the PDF File.

Then while uploading file and inserting, set the field Current = 'X' and unset the Current field with same key. And while displaying, get the file with current as set and display.

Or, you can create a date/year field in the Z Table, and store the current year when uploading the file, and then while displaying, display the latest File.

Hope this helps u,

Regards,

Kiran

Answers (1)

Answers (1)

former_member205842
Participant
0 Kudos

Hi Experts,

                  I have created table with FILE_DATA of type RAWSTRING and FILE_TYPE type char.

i have written a report program in that am using GUI_UPLOAD FM to upload file ...amable to upload file, but in TABLES of  GUI_UPLOAD FM am getting multiple line of data but am not getting how to store in ztable? DO i need to convert anything ..After storing file in ztable while extracting do i need to convert that data to get name of pdf file to pass in MIME objet for diaplaying.

Regards

Syed

ramakrishnappa
Active Contributor
0 Kudos

Hi Syed,

Hope you are getting data in BIN format.

Use the FM 'SCMS_BINARY_TO_XSTRING' to convert from binary to xstring and save it into table.

Please refer the below document for an example

SAP - XML File Upload |

Hope this helps you.

Regards,

Rama