Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
raja_thangamani
Active Contributor
0 Kudos
* *Introduction: This blog describes how to display/delete the documents, which are stored in any SAP Business transactions like IE01, VA01, FB01 and WTY etc from BSP Application.

 

If you have not read the [overview | Organize your business attachments from Web] & {code:html}BSP/How To: Create attachment in Business transactions{code}, I would recommend to read those before you continue this blog.

 

Let's look at the outcome of this blog before we jump into the details.

 

*Note:* We will display & delete those documents, which we created in {code:html}BSP/How To: Create attachment in Business transactions{code} of this series blog.{code:html}

 

  1. Let's say my notification number has 2 attachment as shown below.
  2. Using this BSP Application we will view those attachment in web.
  3. Once you execute the BSP Application, enter the Object Key Number for which you already created the attachment. In my case it's Notification.
  4. You will get the list of attachments based on your Object key.

  5. You can see 2 buttons at footer to display & delete the attachment. Select the one of the row & click on display button -
  6. The moment you click on display button, popup window will come up with attachment as shown below.
  7. Lets look at the delete functionality. Again select anyone of the line & click on delete button -
  8. Look at the updated attachment list below.
h3. Let's look at the development steps:
  1. Create the BSP Application, let's name it as ZATTACH_DISPLAY with Page List.htm (Page With Flow Logic)
  2. I used Iterator methodology to display the tableview. Here are the steps:
    • Create the Iterator class; let's name it as ZCL_ATTACH_ITR.
    • Under the Interface Tab, mention "IF_HTMLB_TABLEVIEW_ITERATOR" as interface.
    • Place the below code in method GET_COLUMN_DEFINITIONS

      method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.

      CLEAR p_column_definitions.
      CLEAR p_overwrites.

      DATA: tv_column TYPE TABLEVIEWCONTROL.
      tv_column-COLUMNNAME = 'FILE_DATE'.
      tv_column-sort = 'X'.
      tv_column-TITLE = 'Date'.
      tv_column-WIDTH = '70'.
      APPEND tv_column TO p_column_definitions.

      CLEAR tv_column.
      tv_column-COLUMNNAME = 'FILE_NAME'.
      tv_column-TITLE = 'File Name'.
      tv_column-WIDTH = '120'.
      APPEND tv_column TO p_column_definitions.
      endmethod.

  3. Create the below variable in page attribute:
4 Comments
Labels in this area