In fnd_request.add_layout how to get the layout in EXCEL Format
Hi All,
After applying the patch (5688014), in WSH_DOCUMENT_SETS package fnd_request.add_layout is getting called as below. I am getting the output in PDF format, when called from Document sets.
But my requirement is i want the report to be in EXCEL Format. Is there any other patch is available to get the report in EXCEL when called from Document Sets/ Or any other alternative solutions to acheive this..
Can any body help me on this...
l_print_pdf := 'N';
IF(l_output_file_type = 'XML' ) THEN
IF l_debug_on THEN
WSH_DEBUG_SV.logmsg(l_module_name, 'template' || l_template_code);
END IF;
IF (l_template_code is not NULL) then
IF l_nls_lang.COUNT <> 0 THEN
select iso_language,iso_territory into l_language, l_territory
from fnd_languages
where language_code = l_nls_lang(l_nls_count).lang_code;
ELSE
select iso_language,iso_territory into l_language, l_territory
from fnd_languages
where language_code = userenv('LANG');
END IF;
IF l_debug_on THEN
WSH_DEBUG_SV.logmsg(l_module_name, ' language ' || l_language || ', territory ' || l_territory);
END IF;
l_ret_status :=fnd_request.add_layout(l_appl_short_name,
l_template_code,
l_language,
l_territory,
'PDF');
IF l_ret_status THEN
l_print_pdf := 'Y';
ELSE
IF l_debug_on THEN
WSH_DEBUG_SV.logmsg(l_module_name, 'Error returning from fnd_request.add_layout :'||x_return_status);
END IF;
wsh_util_core.add_message(x_return_status);
END IF;
ELSE
IF l_debug_on THEN
WSH_DEBUG_SV.logmsg(l_module_name, 'No template was specified for this report. Hence could not generate the pdf output' );
END IF;
fnd_message.set_name('WSH', 'WSH_NO_DEFAULT_TEMPLATE');
fnd_message.set_token('CONC_PROG_NAME', document.user_concurrent_program_name);
x_return_status := wsh_util_core.g_ret_sts_error;
wsh_util_core.add_message(x_return_status);
END IF; --} If template_code is not null
END IF; --} If l_output_file_type = 'XML'
Thanks in Advance..
Hi,
I tried your approach and got the following error..
------------- 1) PUBLISH -------------
Beginning post-processing of request 14808954 on node FAHQSNA09SFTD07 at 24-JAN-2012 04:13:08.
Post-processing of request 14808954 failed at 24-JAN-2012 04:13:09 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
------------- 2) PRINT -------------
Not printing the output of this request because post-processing failed.
After analysing the log i found there is some issue in OPP Service log.
Below is the service log error..
It says there is 'No corresponding LOB data found' in below query
SELECT l.file_data file_data, DBMS_LOB.getlength (l.file_data) file_length,
l.LANGUAGE LANGUAGE, l.territory territory,
b.default_language default_language,
b.default_territory default_territory,
b.template_type_code template_type_code,
b.use_alias_table use_alias_table, b.start_date start_date,
b.end_date end_date, b.template_status template_status,
b.use_alias_table use_alias_table,
b.ds_app_short_name ds_app_short_name,
b.data_source_code data_source_code, l.lob_type lob_type
FROM xdo_lobs l, xdo_templates_b b
WHERE l.application_short_name = :1
AND l.lob_code = :2
AND l.application_short_name = b.application_short_name
AND l.lob_code = b.template_code
AND (l.lob_type = 'TEMPLATE' OR l.lob_type = 'MLS_TEMPLATE')
AND ( (l.LANGUAGE = :3 AND l.territory = :4)
OR (l.LANGUAGE = :5 AND l.territory = :6)
OR ( l.LANGUAGE = b.default_language
AND l.territory = b.default_territory
But i see the data for this query.
Please let us know is there any setups that needs to be done to achieve this..
below is the OPP log error...
Thanks in Advance.
[1/24/12 4:13:09 AM] [710131:RT14808954] Executing post-processing actions for request 14808954.
[1/24/12 4:13:09 AM] [710131:RT14808954] Starting XML Publisher post-processing action.
[1/24/12 4:13:09 AM] [710131:RT14808954]
Template code: EMP_DETAILS
Template app: EMP_DETAILS
Language: en
Territory: US
Output type: EXCEL
[1/24/12 4:13:09 AM] [UNEXPECTED] [710131:RT14808954] java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA,DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.DS_APP_SHORT_NAME DS_APP_SHORT_NAME, B.DATA_SOURCE_CODE DATA_SOURCE_CODE, L.LOB_TYPE LOB_TYPE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE L.APPLICATION_SHORT_NAME= :1 AND L.LOB_CODE = :2 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND (L.LOB_TYPE = 'TEMPLATE' OR L.LOB_TYPE = 'MLS_TEMPLATE') AND ( (L.LANGUAGE = :3 AND L.TERRITORY = :4) OR (L.LANGUAGE = :5 AND L.TERRITORY = :6) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ))
at oracle.apps.xdo.oa.schema.server.TemplateInputStream.initStream(TemplateInputStream.java:402)
at oracle.apps.xdo.oa.schema.server.TemplateInputStream.<init>(TemplateInputStream.java:235)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.getTemplateFile(TemplateHelper.java:1163)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3450)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
Similar Messages
-
In fnd_request.add_layout how to get the layout in user login language
Hi All,
I am using fnd_requet.add_layout
function add_layout (template_appl_name in varchar2,
template_code in varchar2,
template_language in varchar2,
template_territory in varchar2,
output_format in varchar2,
nls_language in varchar2 default null) return boolean;
how to pass these template_language and template_territory to get the output in user login language.
Thanks in advance
JanaYou can get the values from NLS_SESSION_PARAMETERS
Query for language
SELECT LOWER(FL.iso_language)
FROM NLS_SESSION_PARAMETERS NSP
,fnd_languages FL
WHERE NSP.parameter = 'NLS_LANGUAGE'
AND NSP.value = FL.nls_language;
Regards
Nishka -
Are You All Able to get the Output In EXCEL Format
Hi All,
I have one question. Are You All Able to get the Output In EXCEL Format?? I am working on Oracle Apllication 11.5.10.2 and my XML builder is 5.0.1. Problem which i m facing is this...... Whenever i am submitting a concurrent program with format type different from PDF i could not able to view the ouput in desired format. When i am pressing view output it gives me a file in XML and when i save that file with extention 'xls' or 'rtf' then i could able to see the saved file in desired format.
Can anyone tell me where is the problem??? Is it a bug?
I am using microsoft world 2000 sp-3.
Please give your valuable comments. May be your comments can solve my problem..
Thanks
RaviHi I got Same issue
When I change Format to EXCEL from
Submit request>> Option>> Format = EXCEL
In window I am getting something HTML code and
when I try to copy it to Browser from Tools>> Copy File in to Browser I am getting following message
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
End tag 'p' does not match the start tag 'a'. Error processing resource 'http://our url.com:8000/OA_CGI...
<p class="c0"><a name="Text4" id="Text4"><a name="Text1_1" id="Text1_1"><span class="c1">Dept No <...
But I can see the output when Format is PDF
Pls suggest solution ,I am using EBS 11.5.10.2.
Thanks
Rahul
Message was edited by: Rahul
user576181 -
How to get the output in .xls format instead of .csv.
Dear All,
I have added a exportButton on a table through personlization, when I click on the button it is opening in .csv instead of .xls file .
Please let me know if I can change the format of that to .xls .
Regards
Karan deep.Hi,
I tried that but I am not able to get the outplut in .xls format .......I think "export all rows" property is used to export all the rows of the particular table "VO attached to it".....I dont think that this property has any control of file format.... -
How to get the layout by the layout name
Dear guys:
I had a program show the oo alv, and it could change the layout and download file with the layout format. My user want to run it in the background now,but the background enviorment not support the GUI,so i want to get the default layout setting when the sy-batch = 'X',I kown the layout name was saved in the table LTDX,but how can I get the field , or any other method ??Hi,
check FM REUSE_ALV_VARIANT_SELECT. Probably you will have to convert field catalog from this FM to your type used in your classes. There are small difference but conversion is pretty straightforward.
Good luck -
How to get the layouts in ABAP program/Query
Hi -
I had created some layouts for a ABAP query and I can see them in the table LTDX as well.
But I had deleted the layouts while changing the query settings.
How can I get those layouts back in my query? Please suggest. Thanks.Hi,
Did you check with the below function modules,
ALV_LAYOUT_GET
REUSE_ALV_VARIANT_F4
Also try executing the report, RSVARDOC_610, which will enable the variants sometimes after some modifications.
I am not sure, but may be you can have a look..... -
How to get the layout field setting from the oo ALV
Hi:
My user want me to save the data to the email attachment when he change the alv layout.
For example there are 10 fields in a alv report ,and the user change the layout setting to 5 fields,I need to know which field is he need first, how can I get it ?
Pls help me ,thanks a lot !Hello Jerry
When you call method go_grid->GET_FRONTEND_FIELDCATALOG you can retrieve the current layout of the ALV list.
LVC_S_FCAT-COL_POS = Position of column
LVC_S_FCAT-NO_OUT = 'X' = not visible
LVC_S_FCAT-TECH = 'X' = technical column, neither visible nor selectable
Regards
Uwe -
How to get the layout values in F4 help from Other program ?
Hello All,
I have a program P1which calls other program P2 .
When I execute P1 I have a parameter for Layout with F4.
When I press F4 I want the help values which are there in the lay out of the other program P2.
For this I'm using the following code :-
DATA spec_layout TYPE disvariant. "specific layout
DATA v_save TYPE c. "Save mode
DATA gs_variant TYPE disvariant. "for parameter IS_VARIANT
DATA gv_exit TYPE c.
PARAMETERS: p_vari TYPE disvariant-variant.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
* gs_variant-report = sy-repid.
* gs_variant-variant = p_vari.
CLEAR gs_variant.
MOVE '/BSHP/FP_CALL_OF_PLAN' TO gs_variant-report. "Report von Original CALL_OF_PLAN
gs_variant-variant = p_vari.
CALL FUNCTION 'LVC_VARIANT_F4'
EXPORTING
is_variant = gs_variant
i_save = v_save
IMPORTING
e_exit = gv_exit
es_variant = spec_layout
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF gv_exit NE 'X'.
* set name of layout on selection screen
p_vari = spec_layout-variant.
ENDIF.
ENDIF.
But still I'm not able to get the values.
Can anyone help me out ?
Regards,
Deepu.K
nullThis question has been asked and answered many times before. Please read the following blog for a good start:
/people/yohan.kariyawasan/blog/2009/03/18/ui-framework-news-f4-help
Before posting further please do a search in this forum and also read the rules of engagement listed here:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/rulesofEngagement
I'm now locking this thread as it is a duplicate of an already answered question.
Thank you,
Stephen
CRM Forum Moderator -
How to get the metadata (in xml format) of all the fileds in SQl query ?
Good day ,
I am using the dbms_xmlgen.getXMLfunction to get the result of any query in xml format.
With this XML I also want the metadata information about all the fields used in the query (passed to getXML function). Is it possible and how can I achieve this.
I tried to Google it but couldn't find any solution , it's easy to do it in java where I can get the resultset meta data from the resultset but I have to do it in Oracle function since I want the result in xml format and want to use the oracle XML API.
You may think why I need metadata , the reason is the application will later use this information to sort the data contained in these fields according to their data type provided to.
Regards
Sajjad Ahmed ParachaHi,
Please always say which version of Oracle you're using (SELECT * FROM v$version).
With this XML I also want the metadata information about all the fields used in the query (passed to getXML function). Is it possible and how can I achieve this.It is possible but with a bit of effort.
I would use DBMS_SQL utility to parse the query, extract each column's description and then build a METADATA element with the required information.
Here's an example (11g) :
DECLARE
v_query varchar2(30) := 'select * from scott.emp';
v_cur integer;
v_desc_tab dbms_sql.desc_tab;
v_col_cnt number;
v_col_lst varchar2(4000);
v_xml_query varchar2(32767);
xml_metadata_coll xmlsequencetype := xmlsequencetype();
xml_metadata xmltype;
res clob;
BEGIN
v_cur := dbms_sql.open_cursor;
dbms_sql.parse(v_cur, v_query, dbms_sql.native);
dbms_sql.describe_columns(v_cur, v_col_cnt, v_desc_tab);
dbms_sql.close_cursor(v_cur);
for i in 1 .. v_col_cnt loop
if i > 1 then
v_col_lst := v_col_lst || ', ';
end if;
v_col_lst := v_col_lst || v_desc_tab(i).col_name;
xml_metadata_coll.extend;
select xmlelement("COLUMN"
, xmlattributes(v_desc_tab(i).col_name as "name")
, xmlforest(
case v_desc_tab(i).col_type
when 1 then 'VARCHAR2'
when 2 then 'NUMBER'
when 12 then 'DATE'
when 180 then 'TIMESTAMP'
else 'UNKNOWN'
end as "DATATYPE"
, v_desc_tab(i).col_max_len as "MAX_LENGTH"
, v_desc_tab(i).col_precision as "PRECISION"
, v_desc_tab(i).col_scale as "SCALE"
into xml_metadata_coll(i)
from dual;
end loop;
v_xml_query :=
'SELECT XMLSerialize(document
XMLElement("ROOT"
, :1
, XMLElement("ROWSET"
, XMLAgg(
XMLElement("ROW", XMLForest(' || v_col_lst || '))
) as clob indent
FROM ( ' || v_query || ')';
select xmlelement("METADATA", xmlagg(column_value))
into xml_metadata
from table(xml_metadata_coll)
execute immediate v_xml_query into res using xml_metadata;
dbms_output.put_line(res);
END;
/Ouput :
<ROOT>
<METADATA>
<COLUMN name="EMPNO">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>4</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="ENAME">
<DATATYPE>VARCHAR2</DATATYPE>
<MAX_LENGTH>10</MAX_LENGTH>
<PRECISION>0</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="JOB">
<DATATYPE>VARCHAR2</DATATYPE>
<MAX_LENGTH>9</MAX_LENGTH>
<PRECISION>0</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="MGR">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>4</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="HIREDATE">
<DATATYPE>DATE</DATATYPE>
<MAX_LENGTH>7</MAX_LENGTH>
<PRECISION>0</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="SAL">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>7</PRECISION>
<SCALE>2</SCALE>
</COLUMN>
<COLUMN name="COMM">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>7</PRECISION>
<SCALE>2</SCALE>
</COLUMN>
<COLUMN name="DEPTNO">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>2</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
</METADATA>
<ROWSET>
<ROW>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<MGR>7902</MGR>
<HIREDATE>1980-12-17</HIREDATE>
<SAL>800</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-02-20</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7521</EMPNO>
<ENAME>WARD</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-02-22</HIREDATE>
<SAL>1250</SAL>
<COMM>500</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7566</EMPNO>
<ENAME>JONES</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>1981-04-02</HIREDATE>
<SAL>2975</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW>
<EMPNO>7654</EMPNO>
<ENAME>MARTIN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-09-28</HIREDATE>
<SAL>1250</SAL>
<COMM>1400</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7698</EMPNO>
<ENAME>BLAKE</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>1981-05-01</HIREDATE>
<SAL>2850</SAL>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>1981-06-09</HIREDATE>
<SAL>2450</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
<HIREDATE>1981-11-17</HIREDATE>
<SAL>5000</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7844</EMPNO>
<ENAME>TURNER</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-09-08</HIREDATE>
<SAL>1500</SAL>
<COMM>0</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7900</EMPNO>
<ENAME>JAMES</ENAME>
<JOB>CLERK</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-12-03</HIREDATE>
<SAL>950</SAL>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7902</EMPNO>
<ENAME>FORD</ENAME>
<JOB>ANALYST</JOB>
<MGR>7566</MGR>
<HIREDATE>1981-12-03</HIREDATE>
<SAL>3000</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW>
<EMPNO>7934</EMPNO>
<ENAME>MILLER</ENAME>
<JOB>CLERK</JOB>
<MGR>7782</MGR>
<HIREDATE>1982-01-23</HIREDATE>
<SAL>1300</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
</ROWSET>
</ROOT>A couple of comments :
<li> I handle only four datatypes here (VARCHAR2, NUMBER, DATE, TIMESTAMP). Of course you can add more.
The list of Oracle Type Number is available here : http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements001.htm#i54330
Starting with 11g (not sure which release), DBMS_SQL package also declares these numbers through named constants.
<li> I don't use DBMS_XMLGEN in this example. Instead I rebuild the query using SQL/XML functions and the list of columns that's just been described. -
How to get the output in ALV format
Hi All,
this is my program, in this i want to get the output in ALV, i hv created two containers and m able to get the ALV layout successfully but i am not able to fetch the correct data.
the output it is showing is some RFC value.
here we have used - abaplist, soli.
Please provide me the solution.
SELECT * FROM varid INTO CORRESPONDING FIELDS OF TABLE t_varid WHERE report in s_report.
LOOP AT t_varid .
SUBMIT (t_varid-report) USING SELECTION-SET t_varid-variant
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listtab
EXCEPTIONS
not_found = 1
OTHERS = 2.
**************Old System Entry********
CALL FUNCTION 'Z_GET_DETAILS'
DESTINATION 'BWDCLNT900'
EXPORTING
report = t_varid-report
variant = t_varid-variant
TABLES
listtab = list_tab.
IF sy-subrc EQ 0.
CALL FUNCTION 'LIST_TO_TXT'
TABLES
listtxt = listtxt1
listobject = list_tab
EXCEPTIONS
empty_list = 1
list_index_invalid = 2.
ENDIF.
if p_flag eq 'X'.
clear p_flag.
write : / 'Program Name',
41 'Variant Name',
66 'Output Match'.
endif.
IF listtxt EQ listtxt1.
WRITE : / t_varid-report,
41 t_varid-variant,
66 icon_green_light AS ICON HOTSPOT.
ELSE.
WRITE : / t_varid-report,
41 t_varid-variant,
66 icon_red_light AS ICON HOTSPOT.
ENDIF.
CLEAR : listtab,list_tab,listtxt,listtxt1.
REFRESH : listtab[],list_tab[],listtxt[],listtxt1[].
ENDLOOP.
AT line-selection.
v_report = sy-lisel(40).
v_variant = sy-lisel+40(14).
call SCREEN 400.
module STATUS_0400 output.
SUBMIT (v_report) USING SELECTION-SET v_variant
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listtab
EXCEPTIONS
not_found = 1
OTHERS = 2.
CALL FUNCTION 'LIST_TO_TXT'
TABLES
listtxt = listtxt1
listobject = list_tab
EXCEPTIONS
empty_list = 1
list_index_invalid = 2.
**************Old System Entry********
CALL FUNCTION 'Z_GET_DETAILS'
DESTINATION 'BWDCLNT900'
EXPORTING
report = v_report
variant = v_variant
TABLES
listtab = list_tab.
CREATE OBJECT CCONT1
EXPORTING
CONTAINER_NAME = 'C1'.
CREATE OBJECT CCONT2
EXPORTING
CONTAINER_NAME = 'C2'.
CREATE OBJECT GRID1
EXPORTING
I_PARENT = CCONT1.
CREATE OBJECT GRID2
EXPORTING
I_PARENT = CCONT2.
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'abaplist'
CHANGING
IT_OUTTAB = list_tab.
CALL METHOD GRID2->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'abaplist'
CHANGING
IT_OUTTAB = listtab.
SET PF-STATUS 'ZUTDEMO2'.
endmodule.
module USER_COMMAND_0400 input.
IF SY-UCOMM = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
endmodule. " USER_COMMAND_0400 INPUTsolved
-
How we can get the output in excel format for Spawned programs?
My requirement is to get the excel output for some of the programs (like -Adjustment Register, Applied Receipts Register). I am trying to achieve this by BI Publisher. But these programs has "Spawned" executable. And when I am changing the output type as"XML" I am getting below error in output-
"XML Parsing Error: syntax error"
Can anyne suggest how we can get an XML output and then excel output for Spawned programs?
Thanks in advance,Hi,
If I get it right, you want to convert RXi (Reports Exchange) reports such as Adjustment Register & Applied Receipts Register into XML Publisher. Normally, you need to change the "Output Format" of the program called by the "Spawned" program to 'XML' -- not the "Spawned" program itself.
However, I believe RXi reports does not support XML output (atleast in 11i). It could only work on Text & Html format. Check on the metalink note below:
432719.1 - RXi-Only Reports Generate XML Format Exception With No Output Setting the Output Format to XML
Hope this helps.
regards,..
Rownald -
Subject: How to get MB5B report in excel format
Dear experts,
Please help me how I get automatically MB5B Report in excel format. In Layout there is no option to convert excel format.
regards,
rss
Edited by: rs_sharma on Jun 26, 2011 10:16 AMDear experts,
Please help me how I get automatically MB5B Report in excel format. In Layout there is no option to convert excel format.
regards,
rss
Edited by: rs_sharma on Jun 26, 2011 10:16 AM -
How to get the output in EXCEL form from RIDC.
Hi,
I want the list of all views from UCM in EXCEL form. In RIDC code i am using GET_SCHEMA_VIEWS service to get
all the defined schema views.
But i want this list in EXCEL sheet. How can i do this in RIDC code?
Thanks,
SSJBut i want this list in EXCEL sheet. How can i do this in RIDC code?You can't. RIDC will help you to get data from UCM to Java (in a form of an object in memory). If you want to store this object persistently as a file (e.g. in Excel spreadsheet format) you have to use other Java techniques/libraries like this one: http://www.vogella.com/articles/JavaExcel/article.html or http://jexcelapi.sourceforge.net/
-
Converting the layout from OTF format into PDF
Hi Experts,
I am new to SMART FORMS,I don't have a clue about how to convert the layout from OTF format into PDF format and how to store it in Presentation server.
Please send me a Model program or step by step approach of the same.
Useful inputs will be rewarded higher points.
Thanks in Advance,
DharaniHi,
The steps are given below:-
1) First get the name of your generated function module for the smartforms.
2) Then call the generated function module.
3) Then use the FM:CONVERT_OTF' to convert into PDF as shown below:-
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = w_pdf_len
bin_file = w_pdf_xstring
TABLES
OTF = OUTPUT_DATA-OTFDATA
LINES = LT_LINES
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 5.
Hope this is clear.
Pravat.
<i>*Reward points if helpful.</i> -
How to get a report in pdf format.
Hi Experts,
Could any one let me know that, how to get the report in PDF format.
Once a report is generated it should be displayed in pdf format or downloaded in pdf format.
Thanks in Advance,
Regards,
Irfan HussainHi,
Check out this code:
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_sender LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_delspl AS CHECKBOX.
*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.
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 sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
*** Alternative way could be to submit another program and store spool
*** id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
* to sap-spool
* spool parameters %_print
* archive parameters %_print
* without spool dynpro
* and return.
* Get spool id from program called above
* IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
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.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
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 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.
Regards,
Gayathri
Maybe you are looking for
-
Hi all, I am trying to create a customized list view using custom.js file. List is being created successfully, when i do a second online request in the same session on the same list, the list is loosing its css and is coming as a hyperlink. this has
-
Not able toView Data in Answers
Hi, I created small Repository sai.rpd but when i logon to the answers i am un able to see the data. i am getting the below error Odbc driver returned an error (SQLExecDirectW). Error Details Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P State: HY000. Code
-
Exporting 16:9 qt from final cut pro
Have tried adjusting various settings and QT movies are all coming out 4:3 from widescreen project. Can adjust aspect ratio for viewing in QT but this isn't being read properly when burning to video. Any suggestions?
-
Every disc-based installed fails. New iMac. What's the culprit?
I have a relatively new 27" iMac. Received it in July 2011. Since the beginning, I've been having problems and AppleCare/Geniuses still haven't figured it out. I figured I would go to the community to get some thoughts. My computer has an i7 and 16GB
-
Connecting to Camstreams/external webcam
Hi I have had a weather webcam operating on my old router (Orange) for many years. Its connected to my computer by a firewire cable and then viewed on the web via camstreams. I have now joined BT and have a homehub 4, but unable to get my video/pictu