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"?
Similar Messages
-
How to convert the 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......Hello,
If your question is about the format spreadsheet, it is not possible from Reports Builder :
http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwwhthow/whatare/output/output_a_simpleexcel.htm
Restrictions
It is not possible to generate spreadsheet output directly from Reports Builder. Instead, on the command line, you can run the report using rwrun or Reports Server clients (rwservlet, rwclient, rwcgi), with DESFORMAT=SPREADSHEET. You cannot store DESFORMAT=SPREADSHEET as a system parameter value in the report definition (.rdf file).
Regards -
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 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 -
Report Builder: output to Excel removes leading zeros
I'm trying to use the Report Builder to output a numeric
field to EXCEL , but on numbers that start with zero EXCEL removes
the leading zero's. ex. 00123 becomes 123.
Is there something that I can put in the expression builder
on the field to overcome this.
I've tried concatonating a single quote on the front of the
field but the single quote shows up on the output. I've tried this
on both the SQL and on the expression builder.
I've read on some of the posts where people have tried using
'mso-number-format:"\@'" within a TD tag but I can't seem to get
the syntax right inside the Expression Builder.
Has anybody got any suggestions?Excel will remove leading zeros in a numeric field because it is treating the column as numeric. Putting a ' in front of the number forces Excel to treat the column as text.
-
How to convert report to PDF format
Hi,
Please let me know the procedure to convert reports into PDF format.
Thanks in Advance
Irfan HussainRefer 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 use Report Builder with permission extension
Is there any method to let web site which use SSRS and Report Builder use different permission extension module?
In our web site project we use ReportingService2010 Methods to show and operate folder and report which stored in Report Service, in our project configuration file, we use windows authentication mode for Report Service.
In requirement 1.User can do any operation in folder “A” and folder “B” (we can create and delete report or folder) in web site. 2.User can’t use “Report Builder” to save reports which created by Report Builder to folder “B”, Reports which created by Report
Builder only can be saved in folder “A”. [User click “Report Builder” button in our web page to start Report Builder, use “Report Builder” to create report, if user want to save report, we need to hidden folder “B” in “Report Builder” or we need to remove
some operate right from folder “B”.]
We have two solution:
1. We want to write extension module to process this issue, we want to re-write CheckAccess method which will be called by web site backend and Report Builder, but how can we know who called CheckAccess method[Web site backend called CheckAccess method
or Report Builder?]
2. We want to let Web site back-end use permission extension module named WebSitePer.dll, and Report Builder use PBPer.dll, how to modify the configuration file?Hi Fang,
As far as I know, SQL Server Reporting Services (SSRS), have no permission extension. In Reporting Services, it is use role-based security to grant user access to a report server. There are two types of roles: Item-level roles and System-level roles.
Based on my test, if we assign user with System User System-level role, the user will have permission to user Report Builder to create report. However, if we only assigned Browser or Report Builder Item-level role to the user, he/she will have no permission
to publish the report to the report server. In this situation, although user have permission user Report Builder to edit the report, it will have no effect of the report in report server. User who has assigned Browser or Report Builder Item-level role will
have no permission to delete report in the report server.
There is an article about Setting Permissions in Reporting Services, you can refer to it.
http://technet.microsoft.com/en-us/library/aa337491(v=sql.105).aspx
Hope this helps.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Converting Report Builder time-based metrics in Excel
I am having trouble with my time-based metrics (avg. time spent) when I pull it in using Report Builder. Excel seems to take it out of the HH:MM:SS format and makes it a number. So when I run a report with the Avg Time Spent metric in the Adobe Interface, the correct format is displayed but when I run it with Report Builder a random number is displayed. I can't seem to convert it to the correct time. Can anyone help?
Hi
I've just resolved a similar problem in Visual Studio whereby I had created a matrix with several columns and wanted to show each column as an overall percentage of each row.
It wasn't in sharepoint, but it may give you an idea of where to look to help you resolve this issue?
Basically, you have to tell the formula which set of data you want to add together to use as the number to do the divison by:
For example:
|Column1| Column 2 | Column 3 |
Row 1 | 10 | 10 | 10 |
Row 2 | 10 | 10 | 20 |
If we assume we want to add the numbers in row 1 and show them as a percentage, we would expect to see 33% across all columns. In row 2, we would expect to see 25%, 25% and 50%. The formula to do this is:
Sum(Field)/Sum(Field,"RowGroupName")
It works in Visual Studio in a report matrix - hope it helps point you in the right direction for Sharepoint?
Regards
Kaz -
How to run report builder engine????
Hi!
I want to run Oracle Report Builder Engine from FrontEnd(java).
Please mention me the steps i can proceed.The better way could be that the Repor Builder engine, be started when the database starts up.
Why should i be done from the front end ? -
How to run Report Builder Report from Command line
Hello,
Can Oracle Report Builder Report (run time report) run from Command line ( SQL prompt or Shell script).
Quick response will be appreciated.
Thanks,
AtifHi Atif,
please see Note 74648.1 on Metalink.
Monica -
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 AMHello 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
DurgeshHi ,
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 (multiple) rows output to multiple (columns)
Hii
I have wierd query. But not sure of how to get result out of it!!!
My query returns two rows for a query that i have posed.
Current Result
10
20
Expected Result
10 20
My problem here is i wanted the above two values to be stored in two variables in a single select statement.
If i use a cursor my problem will be solved.But i am not much intrested to use a cursor for a simple select statement.
is there any possibilty that i can convert the output of two rows to two columns??
I am using Oracle Release 10.1.0.2.0
Operating system Windows Xp.
People here will not appreciate the tags "Urgent". I know that :-(.
But some how i am forced to use this tag "urgent". Sorry for that.
If no answers i will in other way have to go to cursor :-(
Any help will be appreciated.
Thanks,
PavanAnother solution with model and you don't need a subquery
SELECT DEPT ,SUBSTR(LOCATION1,2) LOCATION1, SUBSTR(LOCATION2,2) LOCATION2,SUBSTR(LOCATION3,2) LOCATION3
FROM T
MODEL
RETURN UPDATED ROWS
PARTITION BY ( DEPT )
DIMENSION BY ( ROW_NUMBER() OVER (PARTITION BY DEPT ORDER BY LOCATION ) AS POSITION )
MEASURES ( location,CAST ( LOCATION AS VARCHAR2(15)) AS LOCATION1 ,CAST ( LOCATION AS VARCHAR2(15)) AS LOCATION2,
CAST ( LOCATION AS VARCHAR2(15)) AS LOCATION3 )IGNORE NAV
RULES
UPSERT
ITERATE( 1000)
UNTIL ( PRESENTV(LOCATION[ITERATION_NUMBER+2],1,0) = 0)
( LOCATION1[0] =LOCATION1[0] || CASE WHEN ITERATION_NUMBER+1=1 THEN ',' || LOCATION1[ ITERATION_NUMBER+1] END,
LOCATION2[0] =LOCATION2[0] || CASE WHEN ITERATION_NUMBER+1=2 THEN ',' || LOCATION2[ ITERATION_NUMBER+1] END,
LOCATION3[0] =LOCATION3[0] || CASE WHEN ITERATION_NUMBER+1=3 THEN ',' || LOCATION3[ ITERATION_NUMBER+1] END )
ORDER BY DEPT
Demo
SQL> WITH T AS ( SELECT 'AB' DEPT,'MEB' LOCATION FROM DUAL UNION ALL
2 SELECT 'AB','MEB1' FROM DUAL UNION ALL
3 SELECT 'AB','MEB2' FROM DUAL UNION ALL
4 SELECT 'BC','MEB' FROM DUAL UNION ALL
5 SELECT 'BC','MEB' FROM DUAL UNION ALL
6 SELECT 'CD','MEN' FROM DUAL UNION ALL
7 SELECT 'CD','MEN' FROM DUAL
8 )
9 SELECT DEPT ,SUBSTR(LOCATION1,2) LOCATION1, SUBSTR(LOCATION2,2) LOCATION2,SUBSTR(LOCATION3,2)
LOCATION3
10 FROM T
11 MODEL
12 RETURN UPDATED ROWS
13 PARTITION BY ( DEPT )
14 DIMENSION BY ( ROW_NUMBER() OVER (PARTITION BY DEPT ORDER BY LOCATION ) AS POSITION )
15 MEASURES ( location,CAST ( LOCATION AS VARCHAR2(15)) AS LOCATION1 ,CAST ( LOCATION AS
VARCHAR2(15)) AS LOCATION2,
16 CAST ( LOCATION AS VARCHAR2(15)) AS LOCATION3 )IGNORE NAV
17 RULES
18 UPSERT
19 ITERATE( 1000)
20 UNTIL ( PRESENTV(LOCATION[ITERATION_NUMBER+2],1,0) = 0)
21 ( LOCATION1[0] =LOCATION1[0] || CASE WHEN ITERATION_NUMBER+1=1 THEN ',' || LOCATION1[ I
TERATION_NUMBER+1] END,
22 LOCATION2[0] =LOCATION2[0] || CASE WHEN ITERATION_NUMBER+1=2 THEN ',' || LOCATION2[ ITER
ATION_NUMBER+1] END,
23 LOCATION3[0] =LOCATION3[0] || CASE WHEN ITERATION_NUMBER+1=3 THEN ',' || LOCATION3[ ITER
ATION_NUMBER+1] END )
24 ORDER BY DEPT
25 /
DE LOCATION1 LOCATION2 LOCATION3
AB MEB MEB1 MEB2
BC MEB MEB
CD MEN MEN
SQL>
SQL> -
How to convert characters in output
Hello
I try to write output that automatically converts special characters in simpler versions. Like � to n, � to e, etc.
I use the structure:
FileOutputStream fo = new FileOutputStream("output.txt");
OutputStreamWriter ow = new OutputStreamWriter(fo,"character-encoding");
ow.write(String,0, String-length);
But, I do not find a character set that converts the characters in what I want. Instead, all unknown characters come out as ?
I tried it with ISO8859-1, ISO-8859-15, US-ASCII, ASCII, Cp1252, Cp500 ...
Is it possible at all what I try or is any unknown character always converted in a question mark?
Regards, JanIs it possible at all what I try
Only if you replace the characters yourself. There is no relation between the characters ñ and n, or é and e, apart from the typography. No general way to "remove" the accent/diacretical mark/umlaut/whatever exists.
or is any unknown character always
converted in a question mark?That seems to be the case with character encodings in Java. -
How can 'Consolidated' Report takes OutPut of 'Line Item' Report
Hi
I have 'Line Item Detail Report'(REPORT1) which gives the latest records . I want use these detail records as a input records to another consolidated report(REPORT2).
I mean ,
REPORT1 -
contains 'lastest detailed line items' .
REPORT2 -
contains 'consolidated records'.
And User enter the 'DATE1' as a input selection screen of REPORT2. Then it needs to go to REPORT1 and fetch the corresponding records from the REPORT1.
So how can i get like this one
regards
kumarIn the second Report create a variable of type Replacement Path. This will pull the records from The Query Result of the first Query.
Check the follwoing links.
http://help.sap.com/saphelp_nw70/helpdata/en/bd/589b3c494d8e15e10000000a114084/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/2c/78a03c1178ad2ce10000000a114084/content.htm
Maybe you are looking for
-
Adobe Creative Cloud Desktop causes PC to hang
Hi there, Up to yesterday, Creative Cloud Desktop (CCD) was working fine. However, yesterday when I tried to run it, it would cause my whole system to hang. All my apps would start working. I've tried the following: 1) Stop all running applications a
-
Hello Friends, I am trying to write a balance sheet report. I was adviced to read figures from FAGLFLEXT instead of BSIS and BSAS. But I can not figure out which field is what. Is there any documentation on how to read from this table based on fiscal
-
Please excuse me, this seems to be a very simple issue but being resonably new to message mapping I am having issues solving it. Ok each field maps to a repeating structure in the target IDOC, I ahve duplicated the subtree in the Structure and mapped
-
Is there any built-in Hotkeys function to macro regular text inputs?
I've not yet fathomed out the automator to do the function that I used to do on windows with a Keyboard Hotkeys program. I wondered if maybe automator was the wrong road to go down for something fairly basic like that eg I could assign a keyboard sho
-
Applet and Data Base. Help me PLEASE!!!
Hi, I'm a brazilian man. Can a applet make consults in my data base each "x" seconds? I need open a frame with other applet inside him (the frame)... Open the frame after check a flag in my data base. Have you a source code for this problem? I hope y