<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Excel into a container in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584736#M1273476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the following demo program "BCALV_GRID_02".&lt;/P&gt;&lt;P&gt;In this Program the output will be as an ALV container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;KK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 May 2009 16:33:41 GMT</pubDate>
    <dc:creator>KK07</dc:creator>
    <dc:date>2009-05-18T16:33:41Z</dc:date>
    <item>
      <title>Excel into a container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584733#M1273473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A have tested this program RSDEMO01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do as this program, I want to load my excel file in a contenair not in external file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 14:55:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584733#M1273473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T14:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Excel into a container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584734#M1273474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can try using interface I_OI_DOCUMENT_VIEWER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: custom_container  TYPE REF TO cl_gui_custom_container,
           document_viewer  TYPE REF TO i_oi_document_viewer.


IF custom_container3IS INITIAL.
    CREATE OBJECT custom_container3
      EXPORTING
        container_name = 'CONTAINER100'.

    CALL METHOD c_oi_container_control_creator=&amp;gt;get_document_viewer
      IMPORTING
        viewer = document_viewer.

    CALL METHOD document_viewer-&amp;gt;init_viewer
      EXPORTING
        parent = custom_container.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;View document using classname and classtype (they have to be defined in Business Document Service):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: content    TYPE sbdst_content,
          components TYPE sbdst_components,
          wa_components LIKE LINE OF components.

  CALL METHOD cl_bds_document_set=&amp;gt;get_with_table
    EXPORTING
*    logical_system  =
      classname       = l_classname     "'HRFPM_EXCEL'
      classtype       = l_classtype        "'OT'
*    client          =
*    object_key      =
    CHANGING
      content         = content
*    signature       =
    components      = components
*  EXCEPTIONS
*    error_kpro      = 1
*    internal_error  = 2
*    nothing_found   = 3
*    no_content      = 4
*    parameter_error = 5
*    not_authorized  = 6
*    not_allowed     = 7
*    others          = 8
          .

  DATA: l_type(20),
        l_subtype(20),
        l_size TYPE i.

  READ TABLE components INDEX 1 INTO wa_components.
  SPLIT wa_components-mimetype AT '/' INTO l_type l_subtype.
  MOVE wa_components-comp_size TO l_size.
  BREAK-POINT.

  CALL METHOD document_viewer-&amp;gt;view_document_from_table
    EXPORTING
      show_inplace   = 'X'
      type           = l_type
      subtype        = l_subtype
      size           = l_size
    CHANGING
      document_table = data_tab."document_table
*    EXCEPTIONS
*      dp_invalid_parameter = 1
*      dp_error_general     = 2
*      cntl_error           = 3
*      not_initalized       = 4
*      invalid_parameter    = 5.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MayM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 15:09:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584734#M1273474</guid>
      <dc:creator>MaryM</dc:creator>
      <dc:date>2009-05-18T15:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Excel into a container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584735#M1273475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;This code can't works, and I don't undersand this lines:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: content    TYPE sbdst_content,&lt;/P&gt;&lt;P&gt;         components TYPE sbdst_components,&lt;/P&gt;&lt;P&gt;         wa_components LIKE LINE OF components.&lt;/P&gt;&lt;P&gt;document_table = data_tab.&lt;/P&gt;&lt;P&gt;classname       = l_classname     "'HRFPM_EXCEL'&lt;/P&gt;&lt;P&gt;classtype       = l_classtype        "'OT'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;View document using classname and classtype (they have to be defined in Business Document Service)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: BOBALICE on May 18, 2009 6:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 16:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584735#M1273475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T16:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Excel into a container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584736#M1273476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the following demo program "BCALV_GRID_02".&lt;/P&gt;&lt;P&gt;In this Program the output will be as an ALV container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;KK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 16:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584736#M1273476</guid>
      <dc:creator>KK07</dc:creator>
      <dc:date>2009-05-18T16:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Excel into a container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584737#M1273477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, I understand this program "BCALV_GRID_02" , I have a same program. &lt;/P&gt;&lt;P&gt;I want to add a button to this screen to display this ALVGRID in Excel FILE into another container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 16:40:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584737#M1273477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T16:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Excel into a container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584738#M1273478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the part of code you need to add to your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. create container&lt;/P&gt;&lt;P&gt;2. call document_viewer in container&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be able to use METHOD document_viewer-&amp;gt;view_document_from_table, you need to have &lt;/P&gt;&lt;P&gt;1. data_tab (type standard table) that contains your excel file in binary.&lt;/P&gt;&lt;P&gt;2. Mime type and subtype for excel - to get type and subtype you can use (no obligatory though) &lt;/P&gt;&lt;P&gt;METHOD cl_bds_document_set=&amp;gt;get_with_table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2009 08:29:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-into-a-container/m-p/5584738#M1273478</guid>
      <dc:creator>MaryM</dc:creator>
      <dc:date>2009-05-19T08:29:18Z</dc:date>
    </item>
  </channel>
</rss>

