Calling standard Report from a zprogram
Hi Experts,
We want to call ME5J transaction code from a zprogram using Submit statement.
We used following code to call the report
SUBMIT RM06BKPS WITH TCNT-PROF_DB EQ '000000000001' WITH CN_PROJN IN PROJECT EXPORTING LIST TO MEMORY AND RETURN.
After using this statement we are getting output of the report. We don't need to display the result. We want to fetch data from above report using
CALL FUNCTION 'LIST_FROM_MEMORY'.
How to hide output display of ME5J?
Regards,
Sibin
Hello,
you can use the class cl_salv_bs_runtime_info=>get_data_ref to get the standard report output without displaying the ALV grid.
Check the Blog by glen simpson.
http://scn.sap.com/community/abap/blog/2011/07/07/gain-programmatic-access-to-data-of-sapgui-alv-reports
you would get the result in a type table declared and then do the Processing as per the requirement.
Sample code for same.
*& Report ZCALL_STANDARD*&*&---------------------------------------------------------------------**&*&*&---------------------------------------------------------------------*
REPORT zcall_standard.
TABLES : cdhdr.
PARAMETERS : udate TYPE sy-datlo DEFAULT sy-datlo OBLIGATORY,
udate_to TYPE sy-datlo DEFAULT sy-datlo OBLIGATORY,
utime_fr TYPE sy-timlo DEFAULT sy-timlo OBLIGATORY,
utime_to TYPE sy-timlo DEFAULT sy-timlo OBLIGATORY.SELECT-OPTIONS : user FOR cdhdr-username.
FIELD-SYMBOLS <lt_data> TYPE ANY TABLE.DATA: lr_data TYPE REF TO data,
ls_metadata TYPE cl_salv_bs_runtime_info=>s_type_metadata.DATA lr_data_descr TYPE REF TO cl_abap_datadescr.
DATA: r_alv_table TYPE REF TO cl_salv_table,
r_func TYPE REF TO cl_salv_functions.DATA: r_display TYPE REF TO cl_salv_display_settings.
DATA: r_columns TYPE REF TO cl_salv_columns.DATA: r_column TYPE REF TO cl_salv_column.
DATA: lr_events TYPE REF TO cl_salv_events_table,
lr_functions_list TYPE REF TO cl_salv_functions_list.
cl_salv_bs_runtime_info=>set(
EXPORTING display = abap_false
metadata = abap_true
data = abap_true ).
SUBMIT rsvtprot WITH cusobj = 'V_T001B'
WITH dbeg = udate* WITH tbeg = utime_fr
WITH dend = udate_to* WITH tend = utime_to
WITH users = user[]
WITH alv_grid = 'X' AND RETURN.
TRY.
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data_descr = lr_data_descr ).
CREATE DATA lr_data TYPE HANDLE lr_data_descr.
ASSIGN lr_data->* TO <lt_data>.
cl_salv_bs_runtime_info=>get_data(
IMPORTING
t_data = <lt_data>
* TRY.
CALL METHOD cl_salv_bs_runtime_info=>get_metadata
RECEIVING
value = ls_metadata.* CATCH cx_salv_bs_sc_runtime_info .* ENDTRY.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE `Unable to retrieve ALV data` TYPE 'E'.
ENDTRY.
cl_salv_bs_runtime_info=>clear_all( ).
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = r_alv_table
CHANGING
t_table = <lt_data>.
CALL METHOD r_alv_table->get_functions
RECEIVING
value = r_func.
CALL METHOD r_func->set_all
EXPORTING
value = abap_true.
r_display = r_alv_table->get_display_settings( ).
r_display->set_striped_pattern( cl_salv_display_settings=>true ).
lr_functions_list = r_alv_table->get_functions( ).
r_columns = r_alv_table->get_columns( ).
r_columns->set_optimize( if_salv_c_bool_sap=>true ).
CALL METHOD r_alv_table->display.
Similar Messages
-
How to call standard report with in zprogram?
Hi Sap experts,
How to call standard report with in zprogram.
For example if country is 'US' then call Zprogram(zprog_US).Inside zprogram call standard report(rhecm_change_proc_status).If country is 'CA' then call zprogram.Inside zprogram call standard report.For same othercountres like 'PR','GB','ES'.Actually HR_ECM_READ_FEATURE_CARGP will having the input as employee id and will return the CAREA(County like 'US','PR'......).Kindly help me what is the procedure?
Regards,
Sujan>
sujan T wrote:
> Thanks for your reply.
>
> What is the logic to call the standard report from zprogram?Inside the zpogram how to call standard report?
>
> Regards,
> Sujan
no special logic is required
If u want to use
RPUAUDOO IN THE ZREPORT.
Put the submit button where ever required
ex: In zreport after certain process reacedu want to call then use
submit rpuaudoo and return.
Regards
Sas -
Dear all,
I am trying to create a customer from external system through bapi. For this is i have to follow these steps.
1) I am trying to call a report from external system through bapi.
2) I want to pass data from bapi to a bdc program and run it to create a customer.
3) After creating a customer I need to send the ceated customer no again to the bapi from where i passed the data to bdc.
is it possible .
Give me a good idea on this how to work with it.
Regards,
Madhu.Hi Madhu,
SAP has already given standard BAPI to create customer creation "BAPI_CUSTOMER_CREATEFROMDATA". So there is no need for you to create any thing new. Jut test this BAPI first whether this suit your requirement or not. If it satisfy your requirement then call it directly from external system. On how to call this BAPI or other BAPis searc google or SDn you will definetaly find something.
second approach is if nothing works for you( No BAPI satisfy your requirement) then only go for BDC aapproach. To do that, create a RFC function module( BAPi and RFC FM are diff thing, they looks same but they are not ). Inside your RFC FM directly write the BDC code to create customer.
Regards
Anurag -
Calling a report from function module
Hi Friends,
I have requirement for Function Module i.e. we will add the button to the standard T-code and ( Function added in config ) then
Function to be called from Customizing
Program A called from customizing function
CalculationPDFFunction is called from program A.
So can any one help me the logic for "calling a report from function module ".
Thanks in Advance.
Regards,
OSReddy.
Edited by: OSReddy on Sep 23, 2011 7:31 AMHi Jaya,
Yes. It is possible to call ur custom program using SUBMIT statement.
1. If u have data to pass then build table type RSPARAMS and use below statement.
data:
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
SUBMIT report1 WITH SELECTION-TABLE rspar_tab
AND RETURN.
1. If u want to create variant to the program and use that. use the below statement .
SUBMIT report1 USING SELECTION-SET 'VAR1' "variant
AND RETURN.
Regards,
Venkat.O -
Calling Crystal Reports from Oracle Forms 6i
Hello
I am trying to invoke/call Crystal Reports from Forms 6i.
I have created OCX Item, while right click on item and insert-object, i am unable to see "Crystal Report" Control.
I have installed crystal Reports 2008 (Version 12) and CR Standard Production version 9.
Is there any Active X control registration in forms.
I could see "Crystal Report Viewer Control 9" and "Crystal Report Print Control 12.0"
Could some one help me,
Thanks
TumugantiDid u Succeed in calling crystal Reports XI from Forms 6i
or from Forms10g
for me also the same Requirement
please send any document ,Attachment ,steps to call Crystal Reports XI from Forms
[email protected]
Message was edited by:
user501763 -
Call oracle reports from MENU in oracle ebs
is it possible in oracle ERP EBS R12
how to call oracle reports from menu [any screen] in oracle ebs erp r12??
please helpyou may do a few things from menus and by adding buttons, but this is not really standard.
You may add button on the form or web page that after a certain action or event. You'll have to do personalization / extension and everything is present in oracle for normal report submission.
Why this is not done thru normal submission ? -
Hi Expert,
I want to call a report from a form.My problem scenario like, a user is login to his account and there is a option called ADMIT CARD(Push Button).Now when he pressed the button a report will generate.I want that when he pressed the button the user id of the user will passed to the report and the report will generate corresponding to his details which was stored in the database.This scenario is like any online admit card.
Suppose I want a details report of employee whose employee_id=100.How could I pass this value(employee id) to report which will generate a report details.
Thanks,
TAPAN
Message was edited by:
user630863Thanks for replying.
Actually I am a beginner.I think that I have to use RUN_REPORT_OBJECT built-in.But I cannot understand the parameterlist.Can u plz give me any example or code then I am very thankful.
Suppose I want a details report of employee whose employee_id=100.How could I pass this value(employee id) to report which will generate a report details.
Thanks,
TAPAN -
Calling a report from a form based on procedure
I created a form based on a procedure.
It is a entry form where the user is selecting or enters data then on submit I must display the report based on selected data.
I know I can simply create a report with all bind variable and do the job.
My question is what is the syntax to call the report from the procedure for the selected parameters values.
Thanks
LawrenceIf you want to display other HTML page after successful submission, you need to use
either go or call method.
I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
the deptno. Here is my on successfull submission code:
declare
l_dept number;
l_url varchar2(2000);
begin
l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='| |l_dept;
go(l_url);
end;
null -
How to call a report from a web application
Hi,
I have a web server in wich is installed Reports 6i. My question is how can I call reports 6i to generate a pdf using a .rep file from my web application (built with java)?Hi,
The below link will be very useful for one who need idea on calling Oracle Report from Java Application,
http://www.oracle.com/technology/products/reports/htdocs/getstart/examples/reportswebservice/index.html
Thanks & Rgds,
M T -
Call Oracle Reports from Forms ver 9i or 10g
Hi,
Can somebody guide me, how to call Oracle Reports from the Oracle form 9i,
Run_product is no more available into 9i & 10g, Run_report_object is not working with out put type "Screen" or "preview".
What is the best way to call the reports from the form ??? pls help...
Thanks in avdance.
Jitesh ([email protected])You can use RUN_REPORT_OBJECT with CACHE type, and WEB.SHOW_DOCUMENT to view the document on the screen.
In the Forms help you should find examples.
If you have access to Metalink, have a look at Note:207396.1. -
How to call a report from a menu ?
I am converting 6i client/server forms to 9i.
I have a menu that has an option on it to run a report for each menu item selected using RUN_PRODUCT.
9i is making this obsolete, so how can I call a report from a menu (not a form) now then ?
In a form it is fine cos I just use the Report Object - a menu does not have this facility.
Thanks in advance.Hi,
so here is how this should be done:
1. Create a Reports node in the Forms module that uses the menu (you don't have to create one Reports Object for each report that you want to run)
2. From the menu, before calling Run_Report_Object() use Set_Report_Object_Property() to set the phsical file name of the Reports that should be executed. This is kind of best practice and does not have a performance hit.
There is a bug filed against Forms to extend the menu files with a reports Object node. This could require a change to teh file structure which is why we looking for Forms 10i to implement this. (If it turns out that we can have it without recompiling the menu modules then it may go into a patch set - however this seems unlikely from my point of view)
Fran -
Hi,
I want to call a report from Form 6i at run time. And I write the following code in When Buttton Press trigger . when I press the button it will gives no response.
declare
x report_object;
y varchar2(100);
begin
x:=find_report_object('billform');
y:=run_report_object(x);
end;
for more information , path of my report is: C:\REP\billform.rdf
please send me the solution of this problem
E_mail: [email protected]
Shahzadhi,
now i am using the following code in when button press trigger. if u give me ur e_mail address i will send u FMB and RDF files used for Scott/tiger EMP table for the sample.
declare
repo_Para ParamList;
BEGIN
repo_Para:=Get_Parameter_List('Report_para');
IF not Id_null(repo_Para) THEN
destroy_parameter_list(repo_para);
end if;
repo_Para:=Create_Parameter_List('Report_para');
Add_Parameter(Repo_para,'PARAMFORM',TEXT_PARAMETER,'No');
Add_Parameter(Repo_para,'MAXIMIZE',TEXT_PARAMETER,'Yes');
Add_Parameter(Repo_para,'BDATE',TEXT_PARAMETER,:BLOCK3.a_dptno);
Add_Parameter(Repo_para,'EDATE',TEXT_PARAMETER,:BLOCK3.b_dptno);
RUN_PRODUCT(REPORTS,'c:\apu\DDATE.rep', SYNCHRONOUS,
runtime, FILESYSTEM,Repo_para,NULL);
end;
BDATE & EDATE are two user parameters created in report.
when i press the button in form pass parameters the report will be called but no data will be display but when i directly run reprot from report buider and pass same values of BDATE & EDATE it will show data.
please give me ur e mail address or help me for this problem
best regards,
shahzad -
I have uploaded my form to the app server and compiled to Linux. I have copied my RDF file to the reports_path/demo directory. I can run the report via a link from our portal using the URL as follows:
/reports/rwservlet?report=IndRpt.rdf&desformat=pdf&destype=cache&userid=' target="_blank"
That opens the report in a separate window, which is what we want. So far, so good.
I can run the form via a link from our portal as well using the URL as follows:
/forms/frmservlet?config=bsc_ind
The config section hides all the form parameters very nicely.
In the portal, I created a Report Server Access portlet, REP_OMHAST2_MIDTIER, and use the following set_report_object calls in my form:
repid := find_report_object('IndRep');
SET_REPORT_OBJECT_PROPERTYrepid,REPORT_EXECUTION_MODE,BATCH);
SET_REPORT_OBJECT_PROPERTYrepid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
SET_REPORT_OBJECT_PROPERTYrepid,REPORT_SERVER,'rep_omhast2_midtier');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,ls_param);
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
rep_status := report_object_status(v_rep);
END LOOP;
IF rep_status = 'FINISHED' THEN
/*Display report in the browser*/
WEB.SHOW_DOCUMENT('http://omhast2.omh.state.ny.us:7777/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rep_omhast2_midtier ','_blank');
All that comes right out of the white paper.
Now here's the weird part, I have never seen this before. When I click my "Show Report" button in my form, the report seems to be running, but then I get a very strange dark grey, square icon superimposed over my mouse pointer. The icon has a small yellow "starburst" pattern with a tiny red exclamation point inside. The report does not appear on screen.
Incidentally, all of this works correctly when I run the same scenario on my workstation using the call to rwserver as: rwserver server=rep_omhast2_midtier. But when we port it to the app server, it does not run. I think it has to be in the way the form calls the report because the report will run as a stand-alone object.
Anything apparent to anyone out there?Well, it looks like I stumped the band. And with good reason. Sorry for the error. The problem was that the user running the form and the report had a pop-up blocker that was blocking the report. The form and the report ran from another machine. I allowed pop-ups from the report's URL and that enabled the report to appear.
So, here we have another example of how to call a report from a form. Again, I am sorry for any angst this may have caused. -
CALLING A REPORT FROM FORMS (PROBLEM)
MY PROBLEM IS THE NEXT:
I CREATED A MASTER-DETAIL REPORT CALLING 'ASUNTOS'WITH THE NEXT QUERY:
SELECT ABOGADOS.APELLIDO_P,ABOGADOS.APELLIDO_M,ABOGADOS.NOMBRES,
ASUNTOS.EXP_INT,ASUNTOS.MATERIA,ASUNTOS.GERENCIA,
ASUNTOS.EMPRESA,ASUNTOS.RECLAMA,ASUNTOS.PESOS,
ASUNTOS.DOLARES
FROM ABOGADOS,ASUNTOS
WHERE ABOGADOS.FICHA = ASUNTOS.F_ABOG
AND ASUNTOS.F_ABOG = :ABOGADO ;
-- ABOGADO = PARAMETER.
THIS REPORT WORKS FINE THE PROBLEM IS WHEN I TRY CALL THIS REPORT FROM FORM I'VE USE A BUTTON(WHEN_BUTTON_PRESSED) WITH THE NEXT CODE:
DECLARE
LISTA PARAMLIST := GET_PARAMETER_LIST('ABOG');
BEGIN
IF ID_NULL(LISTA) THEN
LISTA := CREATE_PARAMETER_LIST('ABOG');
ADD_PARAMETER(LISTA,'DESTYPE',TEXT_PARAMETER,'PRINTER');
ADD_PARAMETER(LISTA,'DESNAME',TEXT_PARAMETER,'LPT2');
ADD_PARAMETER(LISTA,'ABOGADO',TEXT_PARAMETER,TO_CHAR(:ASUNTOS.F_ABOG));
-- ADD_PARAMETER(LISTA,'PARAMFORM',TEXT_PARAMETER,'YES');
END IF;
RUN_PRODUCT(REPORTS,'ASUNTOS',SYNCHRONOUS,RUNTIME,FILESYSTEM,LISTA,NULL);
END;
BUT THE REPORT NOTHING DISPLAY.
THERE ARE SOMETHING WRONG WITH THE CODE IN THE BUTTONRoberto,
Does your report work when it is not called from Forms?
try the following:
[TOOLS_HOME]\BIN\RWRUN60 module=ASUNTOS destype=screen userid=<username>/<password>@<tns> ABOGADO=<some_valid_code>
where TOOLS_HOME is the directory where Reports is installed.
I can see nothing wrong with your code.
Maybe some error in the query?
Also, I would check for the existence of multiple ASUNTOS report definitions. Maybe Forms is calling an older one.
Hope this helps,
Pedro das Neves
([email protected]) -
Calling a Report from Form in 10g
Hi all,
I am very new to Oracle Form builder, I wana to call a report from a Form.
we are using Oracle 10g Developer suit.
Can any body please help me regarding on this?
Regards
Tanmaya Pradhan(Tam)..or
Take a look at
Re: Run Report10g Through form 10g
Maybe you are looking for
-
Process exited with code 0 while executing loan application
Hello, when i run the ejb bean i am getting the below error.anybody can help me that would be appreciated. E:\softwares\Jdevelopver\jdevstudio10131\jdk\bin\javaw.exe -client -classpath E:\softwares\PracticeSOA\LoanApps\SOAService\classes;E:\softwares
-
IDOC to file...Error for Access is denied
Hello Friends, I am triggering IDOC WBBDLD from SAP ECC. It is successfully sending IDOC to XI In XI, in SXMB_MONI, message is successful. But when I am checking in message monitoring with message ID in adaptor level. I am facing given below error. 2
-
Using a first gen iPad. Video and audio from internet sites simply stopped working all of a sudden. Any suggestions? Thanks.
-
USE OF FM MODULE HRIQ_READ_INFTY_1001 URGENT
Hi, My best wishes in the new year for all. Well, I've been using the FM HRIQ_READ_INFTY_1001 in order to read the infotype HRP1001. I need to get the info of the field ADATANR, in order to build the key of the HRPAD500. Now, the gotten data by using
-
Moving songs around in playlists
I have several playlists set up in iTunes. Is there any way to manually move the songs within these playlists so that I can have them play in the order I want? I have tried to drag them and it does not work, and I have also right-clicked to see if th