How to convert Report Model to Report Designer DataSet

To all,
I have a two part question. One is I am experiencing the error at the end of this question when migrating SQL Server 2005 SSRS Native Reports, the report uses a Report Model, to SQL Server 2008 SSRS Native. I bring the Report and Report Model to SQL Server 2008 SSRS and get the error at the end of the question below. Background and the 2nd question are below.
I have a bunch of Report Builder based Reports. I need to convert them to VS BIDS based Report Designer Reports with Shared Datasources and MDX based DataSets.
How can I grab the MDX from the Report Builder Report Model so I can put it into the Report Designer DataSet Query Definition?
What is the easiest way to make this migration between these Report development environments.
I am able to open the Report.RDL file in VS BIDS and can see the entire UI layer. The DataSet I see here is the one that is related to the error at the end of the question. The RD/DataSet holds:
<SemanticQuery xmlns="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rb="http://schemas.microsoft.com/sqlserver/2004/11/reportbuilder" xmlns:qd="http://schemas.microsoft.com/sqlserver/2004/11/semanticquerydesign">
  <Hierarchies>
    <Hierarchy>
      <BaseEntity>
        <!--Fact Messages-->
        <EntityID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Entity_MeasureGroup_DW_Text_Fact_Messages</EntityID>
      </BaseEntity>
      <Groupings>
        <Grouping Name="Date">
          <Expression Name="Date">
            <Path>
              <RolePathItem>
                <!--Dim Date-->
                <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Date_Entity_Dimension_DW_Text_Dim_Date</RoleID>
              </RolePathItem>
            </Path>
            <AttributeRef>
              <!--Full Date-->
              <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Date.Full_Date</AttributeID>
            </AttributeRef>
          </Expression>
        </Grouping>
        <Grouping Name="Hour">
          <Expression Name="Hour">
            <Path>
              <RolePathItem>
                <!--Dim Time-->
                <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Time_Entity_Dimension_DW_Text_Dim_Time</RoleID>
              </RolePathItem>
            </Path>
            <AttributeRef>
              <!--Hour24-->
              <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Time.Hour24</AttributeID>
            </AttributeRef>
          </Expression>
        </Grouping>
        <Grouping Name="Year">
          <Expression Name="Year">
            <Path>
              <RolePathItem>
                <!--Dim Date-->
                <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Date_Entity_Dimension_DW_Text_Dim_Date</RoleID>
              </RolePathItem>
            </Path>
            <AttributeRef>
              <!--Year-->
              <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Date.Year</AttributeID>
            </AttributeRef>
          </Expression>
        </Grouping>
      </Groupings>
      <Filter>
        <Expression Name="expr1">
          <Function>
            <FunctionName>And</FunctionName>
            <Arguments>
              <Expression>
                <Function>
                  <FunctionName>And</FunctionName>
                  <Arguments>
                    <Expression>
                      <Function>
                        <FunctionName>GreaterThanOrEquals</FunctionName>
                        <Arguments>
                          <Expression>
                            <Path>
                              <RolePathItem>
                                <!--Dim Date-->
                                <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Date_Entity_Dimension_DW_Text_Dim_Date</RoleID>
                              </RolePathItem>
                            </Path>
                            <AttributeRef>
                              <!--Date-->
                              <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Date.Date</AttributeID>
                            </AttributeRef>
                          </Expression>
                          <Expression>
                            <Function>
                              <FunctionName>DateAdd</FunctionName>
                              <Arguments>
                                <Expression>
                                  <Literal>
                                    <DataType>String</DataType>
                                    <Value>Day</Value>
                                  </Literal>
                                </Expression>
                                <Expression>
                                  <Function>
                                    <FunctionName>Negate</FunctionName>
                                    <Arguments>
                                      <Expression>
                                        <ParameterRef>
                                          <ParameterName>Date  in last  (n)  days</ParameterName>
                                        </ParameterRef>
                                      </Expression>
                                    </Arguments>
                                  </Function>
                                </Expression>
                                <Expression>
                                  <Function>
                                    <FunctionName>Today</FunctionName>
                                  </Function>
                                </Expression>
                              </Arguments>
                            </Function>
                          </Expression>
                        </Arguments>
                      </Function>
                    </Expression>
                    <Expression>
                      <Function>
                        <FunctionName>LessThan</FunctionName>
                        <Arguments>
                          <Expression>
                            <Path>
                              <RolePathItem>
                                <!--Dim Date-->
                                <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Date_Entity_Dimension_DW_Text_Dim_Date</RoleID>
                              </RolePathItem>
                            </Path>
                            <AttributeRef>
                              <!--Date-->
                              <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Date.Date</AttributeID>
                            </AttributeRef>
                          </Expression>
                          <Expression>
                            <Function>
                              <FunctionName>Today</FunctionName>
                            </Function>
                          </Expression>
                        </Arguments>
                      </Function>
                    </Expression>
                  </Arguments>
                </Function>
                <CustomProperties>
                  <CustomProperty Name="qd:FilterCondition" />
                </CustomProperties>
              </Expression>
              <Expression>
                <Function>
                  <FunctionName>Equals</FunctionName>
                  <Arguments>
                    <Expression>
                      <Path>
                        <RolePathItem>
                          <!--Dim Volume-->
                          <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Volume_Entity_Dimension_DW_Text_Dim_Volume</RoleID>
                        </RolePathItem>
                      </Path>
                      <AttributeRef>
                        <!--Description-->
                        <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Volume.Description</AttributeID>
                      </AttributeRef>
                    </Expression>
                    <Expression>
                      <Literal>
                        <DataType>String</DataType>
                        <Value>Volume</Value>
                      </Literal>
                    </Expression>
                  </Arguments>
                </Function>
                <CustomProperties>
                  <CustomProperty Name="qd:FilterCondition" />
                </CustomProperties>
              </Expression>
            </Arguments>
          </Function>
          <CustomProperties>
            <CustomProperty Name="qd:Filter" />
            <CustomProperty Name="qd:ContextEntityID">
              <Value xsi:type="xsd:string">http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling:Entity_MeasureGroup_DW_Text_Fact_Messages</Value>
            </CustomProperty>
            <CustomProperty Name="qd:AutoChangeBaseEntity" />
            <CustomProperty Name="qd:Design">
              <Value xsi:type="xsd:string">expr2</Value>
            </CustomProperty>
          </CustomProperties>
        </Expression>
      </Filter>
    </Hierarchy>
  </Hierarchies>
  <MeasureGroups>
    <MeasureGroup>
      <BaseEntity>
        <!--Fact Messages-->
        <EntityID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Entity_MeasureGroup_DW_Text_Fact_Messages</EntityID>
      </BaseEntity>
      <Measures>
        <Expression Name="Volume">
          <AttributeRef>
            <!--Volume-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Volume</AttributeID>
          </AttributeRef>
        </Expression>
        <Expression Name="Auto %">
          <AttributeRef>
            <!--Automated_Pct-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Automated_Pct</AttributeID>
          </AttributeRef>
        </Expression>
        <Expression Name="Send Now %">
          <AttributeRef>
            <!--Send_Now_Pct-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Send_Now_Pct</AttributeID>
          </AttributeRef>
        </Expression>
        <Expression Name="Use %">
          <AttributeRef>
            <!--Use_Pct-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Use_Pct</AttributeID>
          </AttributeRef>
        </Expression>
        <Expression Name="Stock Ans %">
          <AttributeRef>
            <!--StockAns_Pct-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_StockAns_Pct</AttributeID>
          </AttributeRef>
        </Expression>
        <Expression Name="Charged">
          <AttributeRef>
            <!--Charged_Pct-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Charged_Pct</AttributeID>
          </AttributeRef>
        </Expression>
        <Expression Name="Billed">
          <AttributeRef>
            <!--Billed_Pct-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Billed_Pct</AttributeID>
          </AttributeRef>
        </Expression>
        <Expression Name="Avg TTA (s)">
          <AttributeRef>
            <!--Avg_TT_Answer-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Avg_TT_Answer</AttributeID>
          </AttributeRef>
        </Expression>
        <Expression Name="Avg TTC (s)">
          <AttributeRef>
            <!--Avg_Time_To_Customer-->
            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Avg_Time_To_Customer</AttributeID>
          </AttributeRef>
        </Expression>
      </Measures>
      <SubtotalSets>
        <SubtotalSet>
          <SubtotalGroupings>
            <GroupingName>Year</GroupingName>
          </SubtotalGroupings>
          <SubtotalMeasures>
            <MeasureName>Volume</MeasureName>
            <MeasureName>Auto %</MeasureName>
            <MeasureName>Send Now %</MeasureName>
            <MeasureName>Use %</MeasureName>
            <MeasureName>Stock Ans %</MeasureName>
            <MeasureName>Charged</MeasureName>
            <MeasureName>Billed</MeasureName>
            <MeasureName>Avg TTA (s)</MeasureName>
            <MeasureName>Avg TTC (s)</MeasureName>
          </SubtotalMeasures>
        </SubtotalSet>
        <SubtotalSet>
          <SubtotalGroupings>
            <GroupingName>Date</GroupingName>
            <GroupingName>Year</GroupingName>
          </SubtotalGroupings>
          <SubtotalMeasures>
            <MeasureName>Volume</MeasureName>
            <MeasureName>Auto %</MeasureName>
            <MeasureName>Send Now %</MeasureName>
            <MeasureName>Use %</MeasureName>
            <MeasureName>Stock Ans %</MeasureName>
            <MeasureName>Charged</MeasureName>
            <MeasureName>Billed</MeasureName>
            <MeasureName>Avg TTA (s)</MeasureName>
            <MeasureName>Avg TTC (s)</MeasureName>
          </SubtotalMeasures>
        </SubtotalSet>
      </SubtotalSets>
    </MeasureGroup>
  </MeasureGroups>
  <Parameters>
    <Parameter Name="Date  in last  (n)  days">
      <DataType>Integer</DataType>
      <Expression>
        <Literal>
          <DataType>Integer</DataType>
          <Value>14</Value>
        </Literal>
      </Expression>
    </Parameter>
  </Parameters>
  <CustomProperties>
    <CustomProperty Name="qd:PerspectiveID">
      <Value xsi:type="xsd:string">http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling:Perspective_Cube_DW_Text</Value>
    </CustomProperty>
  </CustomProperties>
</SemanticQuery>
I have created a Shared Datasource that points the the correct Analysis Services cubes that the original Report Model pointed at.
However, I get this error when running the report:
An error occurred during client rendering.
An error has occurred during report processing.
Semantic query compilation failed: e EmptySemanticQuery The SemanticQuery does not contain any Groupings or MeasureGroups. SemanticQuery must contain at least one of these elements. (SemanticQuery '').

Actually the error above is from running the report on SSRS 2008 Native. Does anyone know why I get this error and how it may be resolved.
Then I try to bring the report into BIDS RD and create a SDS and DataSet. The Semantic Query above is from the RD DataSet Query window.
I get the following error when running the report in BIDS RD:
An error occured during local processing.
An error has occured during report processing.
Query execution failed for dataset 'dataSet'.
The SemanticQuery element at line 7, column 351 (namespace http://schema.microsoft.com/sqlserver/2004/10semanticmodeling) cannot appear under Envelope/Body/Execute/Command.
So I have two errors with two scenarios. I'd like to know how to resolve one of them.
I'd also like to know how to get the MDX from the RB/RM report so I can put it into the VS BIDS Version and get that to work properly.
Thanks,
Eric

Similar Messages

  • How to use report designer  in bex analyser ,quary designer, wad give scree

    how to use report designer  in bex analyser ,quary designer, wad give screeeenshots detail

    Hi,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/910aa7a7-0b01-0010-97a5-f28be23697d3
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4487dd91-0b01-0010-eba1-bcd6419
    /people/michael.eacrett/blog/2006/06/07/whats-new-in-sap-netweaver-702004s--an-introduction-to-the-functionality-deltas-and-major-changes
    http://searchsap.techtarget.com/cgi-bin/rd.pl/ftID-1121728-ctID-1064004?//expert/KnowledgebaseAnswer/0,289625,sid21_gci1064004,00.html
    http://help.sap.com/saphelp_nw04s/helpdata/en/9d/24ff4009b8f223e10000000a155106/content.htm
    WAD
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cea68c65-0901-0010-f5a4-fd34189d8078
    http://help.sap.com/saphelp_nw04s/helpdata/en/a9/71563c3f65b318e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a9/71563c3f65b318e10000000a114084/frameset.htm
    /people/prakash.darji/blog/2006/07/16/bim253-at-teched--query-report-and-web-application-design-with-the-sap-business-explorer-suite
    http://help.sap.com/saphelp_sem40bw/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    GTR

  • How to use report designer using bex analyser  give screenshots  details

    how to use report designer using bex analyser  give screenshots  details

    Hi,
    As per my understanding you want to see Query Designer when you execute the query in BEx Analyzer.
    When you launch BEx analyzer,you should be able to see  new tab of "Business Explorer" in your Toolbar.
    So,when you execute the query in BEx analyzer,in order to goto query designer screen,click on Tab "Business Explorer",select option "Change Query" and then select the option "ChangeQuery (Global Definition)".
    It will open the query designer in which you can modify the query and save it.
    Regards,
    Nilima

  • How  to use report designer   using bex analyser ineed screeenshots  steps

    how  to use report designer   using bex analyser ineed screeenshots  steps

    Please try to search and stop asking for all types of screen shots. Thanks!

  • How to create report designer report

    Hi all,
    can u tell me how to create report designer report in sap bi can u send me any detailed links how to work on report designer.
    regards,
    naveen

    Hi,
    go through this link you may get some idea about report designer
    http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/90b95f53-7c5c-2a10-f98d-cc78ec4ec12d     
    http://forums.sdn.sap.com/search.jspa?q=Report%20designer&objID=c4&dateRange=lastyear&searchID=37696538&rankBy=10001&start=15
    regards
    sivaraju

  • How to convert report into alvgrid please hepl

    how to convert report into alvgrid please hepl

    BALVSD01 check this program u will know r see below code
    sample prog
    REPORT  ZMAT11                                  .
    TYPE-POOLS : slis.
    TABLES : mkpf,
             mseg,
             t001w,
             t001l.
    TYPES : BEGIN OF ty_t001w,
              werks TYPE t001w-werks,
              name1 TYPE t001w-name1,
            END OF ty_t001w,
            BEGIN OF ty_makt,
              matnr TYPE makt-matnr,
              maktx TYPE makt-maktx,
            END OF ty_makt,
            BEGIN OF ty_t001l,
              lgort TYPE t001l-lgort,
              lgobe TYPE t001l-lgobe,
            END OF ty_t001l.
    DATA :  BEGIN OF it_mat OCCURS 0,
            mblnr LIKE mseg-mblnr,
            zeile LIKE mseg-zeile,
            mjahr LIKE mseg-mjahr,
            bldat LIKE mkpf-bldat,
            budat LIKE mkpf-budat,
            bwart LIKE mseg-bwart,
            matnr LIKE mseg-matnr,
            maktx LIKE makt-maktx,
            erfmg LIKE mseg-erfmg,
            erfme LIKE mseg-erfme,
            werks LIKE mseg-werks,
            name1 LIKE t001w-name1,
            lgort LIKE mseg-lgort,
            lgobe LIKE t001l-lgobe,
            umwrk LIKE mseg-umwrk,
            name2 LIKE t001w-name1,
            umlgo LIKE mseg-umlgo,
            lgobe1 LIKE t001l-lgobe,
            END OF it_mat.
    DATA : it_t001w TYPE TABLE OF ty_t001w
                     WITH HEADER LINE,
           it_makt TYPE TABLE OF ty_makt
                   WITH HEADER LINE,
           it_t001l TYPE TABLE OF ty_t001l
                    WITH HEADER LINE.
    DATA : ls_layout TYPE slis_layout_alv,
           it_fcat TYPE slis_t_fieldcat_alv ,
           wa_fcat TYPE slis_fieldcat_alv,
           lh TYPE slis_t_listheader,
           ls TYPE slis_listheader,
           it_events TYPE slis_t_event  ,
           ls_event TYPE slis_alv_event ,
           w_var TYPE i.
    DATA : l_date(10).
    DATA : l_date1(20),
           ztabix LIKE sy-tabix.
    DATA : l_repid LIKE trdir-name.
    l_repid = 'ZMAT11'.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_werks FOR mseg-werks,
                     s_lgort FOR mseg-lgort,
                     s_umwrk FOR mseg-umwrk,
                     s_umlgo FOR mseg-umlgo,
                     s_bwart FOR mseg-bwart,
                     s_budat FOR mkpf-budat,
                     s_mjahr FOR mkpf-mjahr.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN.
      SELECT SINGLE * FROM t001w INTO t001w
                              WHERE werks IN s_werks.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Supplying Plant'.
      ENDIF.
      SELECT SINGLE * FROM t001w INTO t001w
                              WHERE werks IN s_umwrk.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Receiving Plant'.
      ENDIF.
      SELECT SINGLE * FROM t001l INTO t001l
                              WHERE lgort IN s_lgort.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Supplying St.Loc'.
      ENDIF.
      SELECT SINGLE * FROM t001l INTO t001l
                              WHERE lgort IN s_umlgo.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Receiving St.Loc'.
      ENDIF.
    START-OF-SELECTION.
      ls-typ = 'H'.
      ls-info = 'Material Document List'.
      APPEND ls TO lh.
      ls-typ = 'S'.
      WRITE: sy-datum TO l_date USING EDIT MASK '__/__/____'.
      CONCATENATE 'DATE :' l_date INTO l_date1 SEPARATED BY space.
      ls-info = l_date1.
      APPEND ls TO lh.
      PERFORM field_cat.
      PERFORM f001_get_data.
    END-OF-SELECTION.
      IF it_mat[] IS INITIAL.
        MESSAGE i000(8i) WITH 'No data Found'(m01).
        EXIT.
      ENDIF.
      PERFORM process_data.
      PERFORM display_data.
    *&      Form  f001_get_data
          text
    -->  p1        text
    <--  p2        text
    FORM f001_get_data .
      SELECT amblnr azeile amjahr abwart a~matnr
               aerfmg aerfme awerks algort aumwrk aumlgo
               b~budat
               b~bldat INTO CORRESPONDING FIELDS OF TABLE it_mat
                       FROM mseg AS a
                 INNER JOIN mkpf AS b
                    ON amblnr = bmblnr
                   AND amjahr = bmjahr
                 CLIENT SPECIFIED
              WHERE a~mandt EQ sy-mandt
                AND a~werks IN s_werks
                AND a~lgort IN s_lgort
                AND a~umwrk IN s_umwrk
                AND a~umlgo IN s_umlgo
                AND a~bwart IN s_bwart
                AND b~budat IN s_budat
                AND b~mjahr IN s_mjahr.
      IF sy-subrc = 0.
        SELECT matnr maktx INTO TABLE it_makt FROM makt
        CLIENT SPECIFIED
        FOR ALL ENTRIES IN it_mat
        WHERE mandt EQ sy-mandt
          AND matnr = it_mat-matnr.
      ENDIF.
      SELECT werks name1 INTO TABLE it_t001w FROM t001w
      CLIENT SPECIFIED
      WHERE mandt EQ sy-mandt.
      IF sy-subrc <> 0.
        MESSAGE i000(8i) WITH 'No Plant Found'(m02).
      ENDIF.
      SELECT lgort lgobe INTO TABLE it_t001l FROM t001l
      CLIENT SPECIFIED
      WHERE mandt EQ sy-mandt.
      IF sy-subrc <> 0.
        MESSAGE i000(8i) WITH 'No Storage Location Found'(m03).
      ENDIF.
    ENDFORM.                    " f001_get_data
    *&      Form  field_cat
          text
    -->  p1        text
    <--  p2        text
    FORM field_cat .
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'MBLNR'.
      wa_fcat-key = 'X'.
      wa_fcat-hotspot = 'X'.
      wa_fcat-ref_fieldname = 'MBLNR'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Material Doc'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'ZEILE'.
      wa_fcat-ref_fieldname = 'ZEILE'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Item No'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'MJAHR'.
      wa_fcat-ref_fieldname = 'MJAHR'.
      wa_fcat-ref_tabname = 'MSEG'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'BWART'.
      wa_fcat-ref_fieldname = 'BWART'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Mvmt Type'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'BLDAT'.
      wa_fcat-ref_fieldname = 'BLDAT'.
      wa_fcat-ref_tabname = 'MKPF'.
      wa_fcat-seltext_m = 'Document Date'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'BUDAT'.
      wa_fcat-ref_fieldname = 'BUDAT'.
      wa_fcat-ref_tabname = 'MKPF'.
      wa_fcat-seltext_m = 'Posting Date'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-ref_fieldname = 'MATNR'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Material No'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'MAKTX'.
      wa_fcat-ref_fieldname = 'MAKTX'.
      wa_fcat-ref_tabname = 'MAKT'.
      wa_fcat-seltext_m = 'Material Description'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'ERFMG'.
      wa_fcat-ref_fieldname = 'ERFMG'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Quantity'.
      wa_fcat-do_sum = 'X'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'ERFME'.
      wa_fcat-ref_fieldname = 'ERFME'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Uom'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'WERKS'.
      wa_fcat-seltext_m = 'Supplying Plant'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'NAME1'.
      wa_fcat-seltext_m = 'S.Plnt Desc.'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'LGORT'.
      wa_fcat-seltext_m = 'Supplying St.Loc'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'LGOBE'.
      wa_fcat-seltext_m = 'Su.St.Loc Desc.'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'UMWRK'.
      wa_fcat-seltext_m = 'Receiving Plant'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'NAME2'.
      wa_fcat-seltext_m = 'R.Plnt Desc.'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'UMLGO'.
      wa_fcat-seltext_m = 'Receiving St.Loc'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'LGOBE1'.
      wa_fcat-seltext_m = 'Re.St.Loc Desc.'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
    ENDFORM.                    " field_cat
    *&      Form  process_data
          text
    -->  p1        text
    <--  p2        text
    FORM process_data .
      LOOP AT it_mat.
        ztabix = sy-tabix.
        READ TABLE it_makt WITH KEY matnr = it_mat-matnr.
        IF sy-subrc = 0.
          it_mat-maktx = it_makt-maktx.
        ENDIF.
        IF it_mat-bwart+2(1) = '2'.
          it_mat-erfmg = - ( it_mat-erfmg ).
        ENDIF.
        READ TABLE it_t001w WITH KEY werks = it_mat-werks.
        IF sy-subrc = 0.
          it_mat-name1 = it_t001w-name1.
        ENDIF.
        READ TABLE it_t001w WITH KEY werks = it_mat-umwrk.
        IF sy-subrc = 0.
          it_mat-name2 = it_t001w-name1.
        ENDIF.
        READ TABLE it_t001l WITH KEY lgort = it_mat-lgort.
        IF sy-subrc = 0.
          it_mat-lgobe = it_t001l-lgobe.
        ENDIF.
        READ TABLE it_t001l WITH KEY lgort = it_mat-umlgo.
        IF sy-subrc = 0.
          it_mat-lgobe1 = it_t001l-lgobe.
        ENDIF.
        MODIFY it_mat INDEX ztabix .
      ENDLOOP.
    ENDFORM.                    " process_data
    *&      Form  display_data
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
              I_INTERFACE_CHECK                 = ' '
              I_BYPASSING_BUFFER                = ' '
              I_BUFFER_ACTIVE                   = ' '
               i_callback_program                = l_repid
              I_CALLBACK_PF_STATUS_SET          = ' '
               i_callback_user_command           = 'LINE'
               i_callback_top_of_page            = 'TOP'
              I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
              I_CALLBACK_HTML_END_OF_LIST       = ' '
              I_STRUCTURE_NAME                  =
              I_BACKGROUND_ID                   = ' '
              I_GRID_TITLE                      =
              I_GRID_SETTINGS                   =
              IS_LAYOUT                         =
               it_fieldcat                       = it_fcat
              IT_EXCLUDING                      =
              IT_SPECIAL_GROUPS                 =
              IT_SORT                           =
              IT_FILTER                         =
              IS_SEL_HIDE                       =
              I_DEFAULT                         = 'X'
              I_SAVE                            = ' '
              IS_VARIANT                        =
              it_events                         =
              IT_EVENT_EXIT                     =
              IS_PRINT                          =
              IS_REPREP_ID                      =
              I_SCREEN_START_COLUMN             = 0
              I_SCREEN_START_LINE               = 0
              I_SCREEN_END_COLUMN               = 0
              I_SCREEN_END_LINE                 = 0
              IT_ALV_GRAPHICS                   =
              IT_HYPERLINK                      =
              IT_ADD_FIELDCAT                   =
              IT_EXCEPT_QINFO                   =
              I_HTML_HEIGHT_TOP                 =
              I_HTML_HEIGHT_END                 =
            IMPORTING
              E_EXIT_CAUSED_BY_CALLER           =
              ES_EXIT_CAUSED_BY_USER            =
              TABLES
                t_outtab                          = it_mat
            EXCEPTIONS
              PROGRAM_ERROR                     = 1
              OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " display_data
    *&      Form  TOP
          text
    FORM top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = lh
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP

  • How to access report designer in customer system

    How to access report designer in customer system as we dont have direct acces to Customer BI System. Is there sny transaction code for report designer/web application designer or we can go through RRMX.
    Thanks in Advance.

    Hi
    If I got your question properly, You need authorization for the accessing Client System. You can see the Reports at RSRT , RRMX may also lead to Query Analyser.
    Hope it helps

  • How to convert Report Builder output to .XLS

    Dear All,
    Let me please know how to convert the Report Builder output to Excel Format.
    As there are having the facility to convert the output in .PDF or .HTML format but i want to convert that into Excel Sheet......
    Please Guide me in this regards
    Thanks in advance
    Regards,
    Vishal......

    What version of reports are you running?
    If it's Reports 10g then have you looked at the help under the topic "About spreadsheet output"?

  • How to convert report to PDF format

    Hi,
    Please let me know the procedure to convert reports into PDF format.
    Thanks in Advance
    Irfan Hussain

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    <b>CONVERT_ABAPSPOOLJOB_2_PDF</b> FM convert abap spool output to PDF

  • How to convert BPA model to BPEL process flow?

    Hi All,
    I am looking for documentation which explains below concepts
    1. Converting BPA model into a BPEL process
    2. Just wanted to add single human task definition from BPA model to BPEL process
    Can anybody please point me to correct documentation?
    Regards,
    Praveen

    Hi Don,
    you can perform this task with ASSIGN activity.
    For example, you have two variable V_ENV_TYPE (with type of environment) and V_TEXT ("Failed mapping <mapping name>"). Define additinal variable V_NEW_TEXT, bind Variable parameter of Assign activity to V_NEW_TEXT variable and define value in Assign activity as
    V_ENV_TYPE || ' ' || V_TEXTRegards,
    Oleg

  • How to Convert Report into Excel Sheet when Sending Mail.

    Dear Friends,
    i want to send mail to HOD of Product with an Excel Sheet .
    i want to send Pending Issue details to HOD in Excel Sheet attachment .
    here i have pending issue report now i need to send it in Excel Sheet attachment .
    i have table where i have manage Product ID and HOD OF PRODUCT.
    CREATE TABLE  "MAP_USER_PRODUCT_DTL"
       (     "ID" NUMBER NOT NULL ENABLE,
         "PRODUCT_ID"NUMBER,
         "USER_ID" VARCHAR2(5) NOT NULL ENABLE,
         "HOD_PROD" VARCHAR2(100)========================================Value is Y OR N IF HOD then Y else N
         CONSTRAINT "MAP_USER_PRODUCT_DTL_PK" PRIMARY KEY ("ID") ENABLE
    /i have one more table where all complete issue detail insert.
    CREATE TABLE  "CRM_ISSUE_PROBLEM"
       (     "ID" NUMBER,
         "SUBJECT" VARCHAR2(255) NOT NULL ENABLE,
         "CLIENT_ID" NUMBER,
         "ASSIGNED_TO_ID" VARCHAR2(100),
         "ASSIGNED_ON" DATE,
         "DESCRIPTION" VARCHAR2(4000),
         "PRODUCT_ID" NUMBER NOT NULL ENABLE,
         "STATUS_ID" NUMBER NOT NULL ENABLE,
          CONSTRAINT "CRM_ISSUE_PROBLEM_PK" PRIMARY KEY ("ID") ENABLE
    Here STATUS_ID is Like Pending ISsue,Open Issue and Close Issue .i want to send mail to HOD with Pending Issue Report convert into Excel Sheet and send to HOD?
    How can i do this.
    Thanks
    Edited by: Vedant on Oct 12, 2011 12:36 AM
    Edited by: Vedant on Oct 12, 2011 2:22 AM

    Hello Vedant,
    Would it suffice if you send a CSV file?
    If yes, then see following code.. run the code under APEX > Home > SQL Workshop > SQL Commands
    DECLARE
            ln_id NUMBER;
            lc_clob CLOB;
         lb_blob BLOB;
         li_in PLS_INTEGER := 1;
         li_out PLS_INTEGER := 1;
         li_lang PLS_INTEGER := 0;
         li_warning PLS_INTEGER := 0;
         lv_mail_rcpts VARCHAR2(2000) := '[email protected]';
         lv_mail_from VARCHAR2(100) := '[email protected]';     
           lv_clmn_separator VARCHAR2(1) := ',';
    BEGIN
         -- Build file content as CLOB
      -- Replace with your query
         FOR i IN (select object_id A, object_name B, object_type C, status D, temporary E, generated F, secondary G,namespace H from user_objects where rownum < 10)               
         LOOP
        IF lc_clob IS NULL THEN
          lc_clob := i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
        ELSE
          lc_clob := lc_clob||CHR(10)||i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
        END IF;
         END LOOP; 
         -- Convert CLOB to BLOB
         DBMS_LOB.CREATETEMPORARY(lb_blob,TRUE);
         DBMS_LOB.convertToBlob(lb_blob,lc_clob,DBMS_LOB.LOBMAXSIZE,li_in,li_out,DBMS_LOB.DEFAULT_CSID,li_lang,li_warning);
         -- Send mail
         ln_id:= APEX_MAIL.SEND(
           p_to        => lv_mail_rcpts,
                 p_from      => lv_mail_from,
                 p_subj      => 'Subject Goes here',
                 p_body      => 'Body goes here'
           -- add CSV file as attachment
         APEX_MAIL.ADD_ATTACHMENT
           p_mail_id   => ln_id,
           p_attachment => lb_blob,
           p_filename   => 'filename.csv',
           p_mime_type  => 'application/csv'
      -- push mail queue
      APEX_MAIL.PUSH_QUEUE;
         -- empty temporary space
         DBMS_LOB.FREETEMPORARY ( lob_loc =>  lb_blob);       
         COMMIT;
    END;Regards,
    Hari

  • How to convert report to pdf format  after that I want to send on mail

    Hi
    Guru
    What is my requirement . I want put push button on output list of a normal report. When user click on mail push button, mail should go to customer mail id according to customer  no i gave input  for customer no in selection screen.
    For this I need what is function module (Code) for convert a report to pdf format and whats function module for send mail to customer.
    Plz help me out
    thanks
    Durgesh

    Hi ,
       I think this is helpful
      FM are used to convert pdf file and attachem.
    CONVERT_ABAPSPOOLJOB_2_PDF
    SO_DOCUMENT_SEND_API1
    *& Report  ZSPOOLTOPDF2                                                *
    *& Converts spool request into PDF document and emails it to           *
    *& recipicant.                                                         *
    *& Execution                                                           *
    *& This program can be run in background or online and a spool request *
    *& will still be created                                               *
    REPORT  zspooltopdf2.
    PARAMETER: p_email1 LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_sender LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_delspl  AS CHECKBOX,
               p_online no-display.
    *DATA DECLARATION
    DATA: gd_recsize TYPE i.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i,
           w_spool_nr like sy-spono.
          %_print LIKE pri_params.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Write statement to represent report output. Spool request is created
    if write statement is executed in background. This could also be an
    ALV grid which would be converted to PDF without any extra effort
      WRITE 'Hello World'.
      new-page.
      commit work.
      new-page print off.
      If p_online = 'X'.
      Processing performed when program calls itself when run online 
        gd_spool_nr = sy-spono.
        EXPORT gd_spool_nr TO MEMORY ID 'SPOOLTOPDF'.
        EXIT.
      endif.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
      ELSE.
        gd_spool_nr = sy-spono.
    If executed online, it submits a program to perform the write statements
    instructing it to create a spool request, this could be another program
    which just performs the write statements and then exports sy-spono
    to memory. But in this example it calls itself passing X to parameter
    p_online, which takes it down an alternative procesing path.
        submit ZSPOOLTOPDF2
               with p_online = 'X'
               to sap-spool
               spool parameters   %_print
              archive parameters %_print
               without spool dynpro
               and return.
      ENDIF.
    Get spool id from program called above
      IMPORT gd_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
      PERFORM convert_spool_to_pdf.
      PERFORM process_email.
      if p_delspl EQ 'X'.
        PERFORM delete_spool.
      endif.
      IF sy-sysid = c_dev.
        wait up to 5 seconds.
        SUBMIT rsconn01 WITH mode   = 'INT'
                        WITH output = 'X'
                        AND RETURN.
      ENDIF.
          FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
          FORM get_job_details                                          *
    FORM get_job_details.
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
          FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
          FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    perform send_email using p_email2.
    ENDFORM.
          FORM send_email                                               *
    -->  p_email                                                       *
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
          FORM delete_spool                                             *
    FORM delete_spool.
      DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
      ld_spool_nr = gd_spool_nr.
      CHECK p_delspl <> c_no.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                spoolid = ld_spool_nr.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.

  • How to convert report list to an excel

    HI all,
    i have a requriment that i want to convert list which has been displayed
    into excel format
    please help me

    Kiron, hi
      If it is a classical ABAP list (i.e. constructed using the WRITE keyword) then once the list is displayed, use the system drop down menu, then the list sub-menu, then the save sub-menu, then select the option 'Local file'. You will have radiobutton options representing the file formats to save to, one of which is spreadsheet.
    Good luck.

  • Convert report from SAP to Excel

    Hi All,
    How to convert report from SAP to Excel.Here now taking default text(.txt) format.But we want defualt taking (.xls) format only.
    Regards
    Usha

    hi usha
    u can even export the text in txt format and later right click and open with excel , u wont be able to directly import it into excel as it is not giving u any option to upload in excel directly
    Regards,
    Manish

  • Report designer in BI 7

    Hi,
    Can any one provide documents on how to use report designer in BI 7 to create formated reports.
    Regards
    Venkata Devaraj

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9c059b57-0701-0010-3283-e5e8669f827e
    http://help.sap.com/saphelp_nw70/helpdata/en/c8/2d1442505d5033e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/43/8af9fecf797107e10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/dd/cea14119eb9f09e10000000a155106/frameset.htm

Maybe you are looking for