Friday, March 16, 2012
  • File Upload steps 
    • Define One attribute(e.g FILE_CONTENTS) of type XSTRING. 
    • Create FileUpload UI element in the Layout of View. 
    • Bind the FILE_CONTENTS with FileUpload. 
    • Read FILE_CONTENTS at run time 
    • Convert FILE_CONTENTS into Binary format using SCMS_XSTRING_TO_BINARY function module. 
    • Convert BINARY to TEXT format using SCMS_BINARY_TO_TEXT function module. 
    • Please click here and Check the example program 
  • File Download steps - (Let us assume that we want to download table into xls format)
    • Create one button UI element in the layout of view
    • Create one button UI element  and create OnAction event for that. 
    • Loop table data and Concatenate table columns separated by horizontal table into STRING variable. 
    • Convert string variable data into XSTRING format 
    • Use method ATTACH_FILE_TO_RESPONSE of class interface CL_WD_RUNTIME_SERVICES to download  XSTING format data to desktop. 
    • Please click here and Check the example program  

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.