How can I execute a query using RSCRMBW_REPORT?
Hi everybody,
I have read the document:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3ba5e590-0201-0010-59b1-cab51fd245b7
and found it is very intersting for my requirement.
I copied the report,and modified it regarding our case.But during the second call,I get runtime error.
I debugged the code, and found the error results from method GET_CUBETYPE() of class CL_RSCRMBW_BAPI.In this method,it tries to create a object which is TYPE REF TO cl_rsd_dta.
CREATE OBJECT lr_dta
EXPORTING
i_infoprov = g_s_status-infocube
But g_s_status-infcube is null.
I am not able to find where this 'infocube' component in this g_s_status struction is filled,even I found,I don't know how I can give this infocube parameter from report which 2 FM are called.
My code is following:
parameters: p_repuid TYPE RSCRMSTATUS-REPORTUID
DEFAULT 'Z_IC_01/Z_COMP_Q003'.
parameters: p_split type BAPI6110DIM-DIM_NAM.
data:name_query TYPE CHAR50,
result_table LIKE RSCRMSTATUS-TABNAME,
it_return LIKE BAPIRET2 OCCURS 2 WITH HEADER LINE,
infocube TYPE CHAR30,
compid TYPE CHAR30.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_repuid.
CALL FUNCTION 'RSZ_COMPONENT_TREE_GET'
EXPORTING
i_title = 'Query auswählen'(031)
IMPORTING
E_INFOCUBE = infocube
E_COMPID = compid
EXCEPTIONS
OTHERS = 1.
IF sy-subrc GT 0.
ENDIF.
concatenate infocube '/' compid into p_repuid.
START-OF-SELECTION.
CALL FUNCTION 'RSCRMBW_REPORT'
EXPORTING
i_mode = 'OPEN'
i_reportuid = p_repuid
I_PACKSIZE = 10000
I_EXECMODE = 'TABLE'
I_EXTRACT = 'ZBWTEST'
I_SPLIT = p_split
I_CLEAREXTRACT = 'X'
TABLES
E_T_RETURN = it_return.
CALL FUNCTION 'RSCRMBW_REPORT'
EXPORTING
i_mode = 'START'
i_reportuid = p_repuid
I_PACKSIZE = 10000
I_EXECMODE = 'TABLE'
I_CLEAREXTRACT = 'X'
TABLES
E_T_RETURN = it_return.
So far this creation of report is only the 2nd step.But I am not sure how step 3 to step 6 should be done so that the report can be execute exactly.
What should I do? Pleas help me!
Thanks in advance
Regards,
Liying
Message was edited by: Liying Wang
Message was edited by: Liying Wang
Message was edited by: Liying Wang
Liying
Were you able to get a solution to this problem? I am facing the same issue too. The g_s_status-infocube is showing blank.
Regards
Dilip
Similar Messages
-
How can I execute a query from a BSP application?
How can I execute a query from a BSP application?
I´m trying to execute a Query from intranet. I´ve been looking for examples, but the templates I´ve found doesn´t help me.
does anybody has an example?
Thanks.Hi
Have you designed the BSP application ?
design it first with one page
page will have layout and Event handlers
Design the layout with the fields
in the event handler there are events
in the event On Initiailization or ON inputprocessing write the select query similar to what we write in routine ABAp and fetch the data into ITAB and that has to be passed to the Layout
see the doc
BSP
To learn how to create Web applications with Business Server Pages, you can work through the simple tutorials that build on each other. You should be able to run through all of the steps described here in your own system.
If you want to develop Web applications with BSPs, your system must meet the following requirements: Prerequisites for Creating Web Applications.
The following tutorials are available:
· First Tutorial: First Steps with Business Server Pages
· Second tutorial: A Small BSP Application and A Small BSP Application with HTMLB
· Third tutorial: Our First Online Bookshop
· Fourth tutorial: Further Developing the Bookshop
· A small Tutorial is also available for your first steps with the Model View Controller design pattern.
· For a more complex MVC tutorial based on the third tutorial, see: Our Little Online Bookshop Using MVC and HTMLB
When creating BSP applications, note the browser dependencies described in Note 598860.
steps:
1) start the transaction RZ10.
2) now u u have to select Profile name, so select the INSTANCE Profile from the list of options given with the Profile parameter list.U may find multiple instance profile in the list, so select the profile in which ur server name is given.
3) u will also find three options in the same window.
Administrator data, Basic Maintenance, and Extended Maintenance. So select the last one from that.
4) Now click on change button.
5) here u will find parameter icm/host_name_full, so now set it as FQDN.
6) Now copy ur settings with new version number.
7) Activate that version.
8) And now please restart ur WAS.
So this will set ur FQDN, and also don't forget to login using Admin User.
Now u also check for following service are active in your ICF setting or not,( just start transaction code SICF)
/default_host/sap/bc/bsp/sap
/default_host/sap/bc/bsp/sap/system
/default_host/sap/bc/bsp/sap/public/bc
/def ault_host/sap/public/bc
/default_host/sap/public/bc/ur
/default_host/sap/public/bsp/sap/public
/default_host/sap/public/bsp/sap/public/bc
/defaul t_host/sap/public/bsp/sap/system
/default_host/sap/public/bsp/sap/htmlb
if not then activate all.
check this link
Read this weblog...
/people/brian.mckellar/blog/2003/09/25/bsp-in-depth-fully-qualified-domain-names
http://www.thespot4sap.com/articles/SAP_WAS_Creating_BSP_Apps.asp
it consists of screen shots also
Check it.
http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/frameset.htm
Regards
Anji -
How can i execute a workflow using a bapi/wapi??
Hi All,
How can i execute a workflow using a bapi/wapi??
pls advice
thanksHi Hrus,
it's not as simple as a single BAPI to approve a workflow.
Workflow comes with a Workflow API (WAPI) that you can use to programmatically interact with the workflow system. The WAPI is implemented as a group of RFC-enabled function modules that are prefixed with "SAP_WAPI_".
Approving a workflow is simply taking a decision path for a workflow item. It is logically no different to rejecting the same workflow item or any other workflow decision.
As part of NetWeaver workflow is tightly coupled to the WAS platform you are running on so you may need to perform WAPI operations slightly differently on older releases.
Some of the WAPI calls you might need to use include: -
SAP_WAPI_GET_HEADER to get the workitem header
SAP_WAPI_READ_CONTAINER to get the workitem container
SAP_WAPI_GET_OBJECTS to get the attached objects
SAP_WAPI_DECISION_READ to get a list of possible decisions
SAP_WAPI_SET_WORKITEM_STATUS to set the workitem status
SAP_WAPI_WRITE_CONTAINER to write to the workitem container
SAP_WAPI_EXECUTE_WORKITEM to execute the workitem
I usually do what you are trying to do by adding the decision to the workflow container and then executing the workflow.
Be warned, you can really stuff things up if you get this wrong! Make sure you know what you are doing.
Quoting from Practical Workflow for SAP by Alan Rickayzen, et al from SAP Press...
Writing directly to the workflow container is dangerous because it can compromise the integrity of the process.
...be careful that you do not waste time duplicating existing ad hoc features of SAP's Workflow Engine.
For example you can use events (combined with wait steps), instead of container modifications to force the workflow to restart.
Cheers
Graham Robbo -
How can I execute program after using F4_Filename function?
Hi all,
I'm a new user on the forum. I've been working with ABAP and SAP for a few weeks. I wrote a program for importing data from excel file to SAP using BDC. During searching this forum I found information about F4_Filename function which allows users to browse the disc for a file. I'd like to add this function to my program. I have a parameter for a file name but this is an ordinary static string field. When I added the code which I found in the message on this forum the rest of program doesn't execute.
This is simple program for example:
REPORT Z_TEST8_AB.
DATA f_name TYPE STRING.
PARAMETERS p_file like rlgrap-filename DEFAULT 'c:\test.xls'.
f_name = p_file.
write:/ f_name.
This program works correctly. There is a field for parameter. I can change the default name for a file.
After all, I can run the program (F8) and rest of the code is executed. The field for parameter dissapears from the screen and the file name is displayed. ( command write)
Now I added a function F4_Filename
REPORT Z_TEST8_AB.
DATA f_name TYPE STRING.
PARAMETERS p_file like rlgrap-filename DEFAULT 'c:\test.xls'.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-repid
dynpro_number = syst-dynnr
field_name = 'p_file'
importing
file_name = p_file.
f_name = p_file.
write:/ f_name.
I can browse a computer for a file now but after selecting the file I can't run the rest of the code. When I click on the icon or press key F8 the field for parameter doesn't dissapier and the command write is not executed.
What do I do wrong?
Could anyone suggest me a solution? How can I executed the code after using this function?
Thanks in advance.
Regards,
Arek.Hi arkadiusz,
1. simple
2.
<b>start-of-selection.</b>
f_name = p_file.
write:/ f_name.
regards,
amit m. -
How Can I Execute Sql Query in Managed bean?
Hi,
I want to execute sql query in managedbean and get the query result. How can I do?
Best wishes!You can do this by having current Database connection your application is using like this
public static synchronized DBTransaction getDBTransaction(){
FacesContext ctx = FacesContext.getCurrentInstance();
ValueBinding vb = ctx.getApplication().createValueBinding("#{data}");
BindingContext bc = (BindingContext)vb.getValue(ctx.getCurrentInstance());
DataControl dc = bc.findDataControl("AppModuleDataControl");
ApplicationModuleImpl am = ((ApplicationModuleImpl)(ApplicationModule)dc.getDataProvider());
return am.getDBTransaction();
and then user DBTransaction object to create Statement and PreparedStatement you can find those in java doc. -
ADF how can i execute a query with parameters when the page renders
hi
i am using ADF web 11g
i need to execute a query with parameters when the page renders
thankshello,
I'm a fan of Java code, I really am.
But when you use ADF, you decided to move to a more declarative environment.
So why not do it declarative, the adf way?
In your pagedef insert a action binding.
This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
Create an invokeAction in your pagedef and set the condition.
This example refreshes(Action 2 is execute query) the data.
First the method binding:
<action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
<invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
-Anton
PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming. -
FRM-40737 How can I execute a query in a post block ?
Hi,
I have two blocks based on the same table. Then it is not a 'real' master detail case. The first block contains two fields who are the values in the where clause of the second block. In which trigger or where do I place the EXECUTE-QUERY ? I can't place it in the post-block because post-block don't accept EXECUTE-QUERY and I dont want to use a timer because it bring me some troubles.
Than'k you !I have two blocks based on the same table. Then it is not a 'real' master detail case. You can easily create a master-detail here, if your data model allows it. A table can have a foreign key relation to itself. E.g. emp.manager_id if the fk to emp.empno.
-
In ST03 , how can i see the Query name, user id,how many times executed the
HI Experts,
In ST03 , how can i see the Query name, user id,how many times executed the query.
these details how do i get from the above transaction.
EX:-if there is one report name X,I want to know how many users had executed X report today,weekly,monthly.
ex:-query userid total number of execution
sales order 0000555 5 times
custmer 05855 2 times
fast reply will be appreciated,Hi,
Look here:
http://help.sap.com/saphelp_nw04/helpdata/en/3b/54df4204892a78e10000000a155106/frameset.htm
Also check these:
http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/b8be3befaefc75e10000000a114084/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/25/ece73a39e74d27e10000000a114084/frameset.htm
Hope this helps..
Bye
Dinesh -
How can i execute codedui scripts by using dll
how Can I Execute Coded UI scripts by using the DLL from anywhere after creating the build
Hi yellesh,
If you mean that you want to run your test with bat file, as far as I know, we could call the MSTEST command line.
set mstestPath="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
%mstestpath%\mstest /testcontainer:AutomatedUITest.dll /resultsfile:TestOutput.trx
Reference:
https://social.msdn.microsoft.com/Forums/en-US/29af65b3-598b-4205-80e6-35b942113f3b/how-to-run-coded-ui-scripts-trhu-bat-file?forum=vsautotest
https://social.msdn.microsoft.com/Forums/en-US/42a5d8f2-fe58-4133-b09d-28fa0553ab1a/run-coded-ui-test-in-certain-moment-in-future?forum=vsautotest
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hi all, how can i do a query precalculated
Hi all, how can i do a query precalculated step by step please, cause my client want some queries without wait 1 min, cause the query last about 5 min cause it shows like 40 InfoObjects of master data, now, i read about this queries precalculated and can help to execute it in the mourning, and when the client execute the query , it'll be ready to show the data, thanks all, i need this help and any other commentary please let me know, thanks
You need to create template and in the property of the template Data store, select precalculated. And following that if you are in 3.x you can use a reporting agent in resrep TC to schedule the query gets executed at specific time period, if you are in 7.0 then you can use broadcaster to schedule the time to fill the cache.
thanks.
Wond -
How can I Improve the Performance using Global Temo Tables ??
Hi,
Can anyone tell me , How can i make use of Global Temporary Tables to improve the Performance.
I have few sample scripts ,
Say i have the View based on some Complex query like ,
CREATE OR REPLACE VIEW Profile_values_view AS
SELECT d.Profile_option_name, d.Profile_option_id, Profile_option_value,
u.User_name, Level_id, Level_code
FROM Profile_definitions d, Profile_values v, Profile_users u
WHERE d.Profile_option_id = v.Profile_option_id
AND ((Level_code = 'USER' AND Level_id = U.User_id) OR
(Level_code = 'DEPARTMENT' AND Level_id = U.Department_id) OR
(Level_code = 'SITE'))
AND NOT EXISTS (SELECT 1 FROM PROFILE_VALUES P
WHERE P.PROFILE_OPTION_ID = V.PROFILE_OPTION_ID
AND ((Level_code = 'USER' AND
level_id = u.User_id) OR
(Level_code = 'DEPARTMENT' AND
level_id = u.Department_id) OR
(Level_code = 'SITE'))
AND INSTR('USERDEPARTMENTSITE', v.Level_code) >
INSTR('USERDEPARTMENTSITE', p.Level_code));
Now i have created the Global temp Table as ,
CREATE GLOBAL TEMPORARY TABLE Profile_values_temp
Profile_option_name VARCHAR(60) NOT NULL,
Profile_option_id NUMBER(4) NOT NULL,
Profile_option_value VARCHAR2(20) NOT NULL,
Level_code VARCHAR2(10) ,
Level_id NUMBER(4) ,
CONSTRAINT Profile_values_temp_pk
PRIMARY KEY (Profile_option_id)
) ON COMMIT PRESERVE ROWS ORGANIZATION INDEX;
Now I am Inserting the Records into Temp table as
INSERT INTO Profile_values_temp
(Profile_option_name, Profile_option_id, Profile_option_value,
Level_code, Level_id)
SELECT Profile_option_name, Profile_option_id, Profile_option_value,
Level_code, Level_id
FROM Profile_values_view;
COMMIT;
Now what my doubt is, when do i need to execute the Insert Statement.
Say , if the View returns few millions of records , then loading such a data into Global Temporary table takes lot of time.
Then what is the use of Global Temporary tables and how can i improve the Performance using the same.
RajThanks for the responce ,
There are 2 to 3 complex views in our database, and there always be more than 5000+ users will be workinf on the application and is OLTP application. Those complex views are killing the application performance.
I what i felt was, if i create the Global Temporary tables for thow views and will be able to load the one third million of records returned by the views in to cache and can improve the application performance.
I have created the Global Temporary tables for 2 views with the option On Commit Preserve , But after am inserting the records into the Temp table and when i Issue the commit statement, the Temp table is getting Cleared.
I really got surpised of this behaviour as i know that with the Option On Commit Preserve , the rows should retain in the Temp Table, Instead , it's getting cleared.
Pelase suggest , what to do ??
Raj -
How can I create a query with tables in INFOSET?
Dear Gurus,
How can I create a query with tables in INFOSET?
Just tables and fields INFOSET?
Kind Regards,Hello
Check following SCN Article for your understanding/reference:
- [Using Infoset Query ,SAP Query and Quick Viewer|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10eab7af-0e54-2c10-28a5-87b47adbe1a5]
Regards
JP -
How can I create a query with web service data control?
I need to create a query with web service data control, in WSDL, it's query operation, there is a parameter message with the possible query criteria and a return message contains the results. I googled, but cannot find anything on the query with web service. I cannot find a "Named Criteria" in web service data control like normal data control. In Shay's blog, I saw the topics on update with web service data control. How can I create a query with web service data control? Thanks.
Hi,
This might help
*054. Search form using ADF WS Data Control and Complex input types*
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html -
How can I execute a Procedure with OUT variable is %ROWTYPE on SQL Prompt
Hi,
I have a procedure with OUT variable is %ROWTYPE
How can I execute the following procedure on SQL prompt.
(without creating anonymous block)
CREATE OR REPLACE PROCEDURE zz_sp_EMP(VEMPNO IN EMP.EMPNO%TYPE,
V_REC IN OUT EMP%ROWTYPE)
AS
BEGIN
SELECT * INTO V_REC FROM EMP WHERE EMPNO = VEMPNO;
END;
Thanks & Regards,
Nareshas previous posters said: it's not possible to do this without declaring a variable in the anonymous block.
With anonymous block it would look like this (had to change it a bit, since i'm using hr-schema on oracle XE):
declare
l_rec EMPLOYEES%ROWTYPE;
begin
zz_sp_EMP(VEMPNO => 100, V_REC => l_rec);
DBMS_OUTPUT.PUT_LINE ( 'first_name = ' || l_rec.first_name );
DBMS_OUTPUT.PUT_LINE ( 'last_name = ' || l_rec.last_name );
end;
first_name = Steven
last_name = King -
How can i execute vb scripts in java program
hi
how can i execute any batch files or any other exe files (vb scripts) from java programs
thanksHi,
You use Runtime.exec to execute commands / exe-files. See the documentation (and remember that it will only work on windows):
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
/Kaj
Maybe you are looking for
-
Filemaker Pro 7 will not open in all my accounts.
Files open normally in all accounts except 1 account where Filemaker crashes upon program startup. Same exact files opens fine in 1 account, crashes program in the other. Deleted prefs, plist, etc. Stumped!!!! Program works fine in all accounts excep
-
Lost installation CD, got a new compu
I have a Zen Nano Plus, and I lost the installation CD so I can't access the library or anything. It used to be on my old computer but we just changed from Windows 95 to Windows XP. Do you know how I can get either the CD or something dowloadable to
-
Hi Experts I have a DC where the finished products are assembled in the form of a Kit and sold to customer. Mainly for promotional purpose. The sales orders are received at the Kit level but down the line the requirement needs to flow at finished pro
-
Help I am stuck in a never ending loop of windows xp restarting
I have parellels on my iMac but I sometimes still restart in windows using boot camp. When I tried to restart using boot camp today I am stuck in a loop of windows xp starting and trying to run diskcheck, not finding it and trying to restart windows
-
Hi everyone, I created a WD Java application and created an iView for it. I want to add some properties of my own to the properties of that iView. How can I do it ? Thanks in advance. Regards.