Calling a transaction and return
Hi all,
I need to call a transaction from a report and the control has to return back to the report after the called transaction is executed.
The "Call Transaction" statement does not have the option to have the return to the calling program neither do "Leave Transaction".How do I achieve it?
Pls help with your ideas.
Thanks,
Stock
Hi,
I am trying to call the customised copy program of CO99( named new Tcode as ZCO99 with all the values of selection screen passed to memory id and imported in the copy program) through another report.
Now I tried with submit as well and the result is the same.
Another thing is with the Pop-up that we have when the CO99 Tcode is called which is for Controlling Area.Two pop-ups at the start and in between.
Does this prevent from returning to the cliing program.
Thanks,
Stock
Similar Messages
-
I can call either:
$.ajax({
type: "GET",
url: "/XMII/Illuminator?QueryTemplate=somePathToXacute/someXacute&Content-Type=text/xml&Params...",
dataType: "xml",
success: function (result) {...}
$.ajax({
type: "GET",
url: "/XMII/Runner?Transaction=somePathToTransaction/someTran&Content-Type=text/xml&Params...&OutputParameter=outXML",
dataType: "xml",
success: function (result) {...}
When I call an Xacute query, the first execution works, but the second doesn't. I figured out that I have to add "cache:false" and then it is okay. If I use a transaction instead of Xacute query, it works with or without cache. Why is that? Transactions are not cached? Only Xacute queries?
What is the cost difference in time if I call directly a transaction, instead of an Xacute query? What is the advantage to call an Xacute at all?
ThxHi Tibor,
These points should clarify your doubts:
1. Transactions are not cached but queries are.
2. Advantage of using Xacute query is that the Illuminator service used to call Xacute query supports JSON from MII 14.0. Use content-type as text/json in the URL. But the restriction is that the transaction should return the XML in MII Rowsets-Rowset format.
3. Though both the calls would take almost time(I think) but you should call transaction directly( no need to wrap it with Xacute query if not required).
Regards,
Rohit Negi. -
Calling stored procedure and returning multiple resultsets
Hello,
Is it possible to create a procedure that return multiple result sets?
e.g.
procedure GetDataFromTables() is
begin
select * from table_one;
select * from table_two;
end GetDataFromTables;
And I want to call this procedure that returns multiple resultsets (one for table_one and another for table_two)
I have referred to the OCCI sample occiproc.cpp, but I am not sure how to handle multiple resultsets.
Your help is highly appreciated.Thank You,
Got the REF cursor in storedproc.cpp.
But as it is documented, getCursor() gets the REF CURSOR value of an OUT parameter as a ResultSet.
So, is it true that if I have to write a procedure that selects * from 50 tables (50 SQL statements) , I have to set 50 OUT parameters to get the result sets.?
Is there any better way of doing this?
e.g. in DB2, we can open multiple cursors in the procedure body and then get the result set one after another.
CREATE PROCEDURE get_staging_data ()
RESULT SETS 1 <no. of result sets>
LANGUAGE SQL
BEGIN ATOMIC
DECLARE L_SQL varchar(5000);
DECLARE c CURSOR WITH RETURN TO CLIENT FOR L_STMT;
SET L_SQL = '';
SET L_SQL = 'SELECT * FROM ';
SET L_SQL = L_SQL || IN_Tab_Name ;
SET L_SQL = L_SQL || ' WHERE VERIFY_FLAG=''S'' FOR READ ONLY OPTIMIZE FOR 2000 ROWS' ;
PREPARE L_STMT FROM L_SQL;
OPEN c; < can open multiple cursors in the prodedure body>
END -
Calling a transaction and skipping the first screen
Dear forumers,
In my report program, I will need to call a custom transaction with skipping the first screen.
And, this custom transaction is created from a query.
Currently, the codes look like below:-
SET PARAMETER ID: 'BUK' FIELD w_output-bukrs,
'AN1' FIELD w_output-anln1.
CALL TRANSACTION 'ZCUSTQ' AND SKIP FIRST SCREEN.
Everything works perfectly alright except for one thing: The first screen is not skipped. When the custom transaction is called, the first screen is still displayed to the user.
Additionally, I also found out that the "SKIP FIRST SCREEN" does not work because the screen's next screen number is the same. This means the screen 1000's next screen is 1000 as well.
(See notes in italics below)
Does anyone have any ideas on how to resolve this? Please help.
This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.For Any Query , if you want to create the Transaction you need to use the Tcode START_REPORT
in general it will skip the first Transaction codes selection screen , Not your query reports selection screen.
I checked and verfied...
Steps to verify the issue..
1.Go to SE93 ,Now you will go for parametric transaction.
2. give the Transaction as START_REPORT, there you will have option Skip Initial Screen. You uncheck that.
3. Now give all information related to your query.
and see the effect
call TRANSACTION 'YYTCODE AND SKIP FIRST SCREEN.
This will always trying to skip the First transaction's selection/initial screen , Not your Query selection screen.
You also try to check and let me know. -
JAVA Calling Oracle Function and Returning OBJECT
HI,
I am working as a developer in java/j2ee project.
I am facing one issue:
I need to call Oracle function from java code. Oracle User define function is residing in oracle package and returning Object which contains data.
Can you please help me
With Best Regardsgolduniya wrote:
I need to call Oracle function from java code. Oracle User define function is residing in oracle package and returning Object which contains data.
Can you please help meIt requires a great deal of Oracle jdbc driver specific code.
[http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraint.htm#1012664] -
How to make a PDF form call Web service and return a static pdf for user to print?
Hi all,
Can anyone help me regarding the feasibility of using PDF forms for my following case?
I would like to create a Dynamic pdf form. User only have the Acrobat reader. they can enter some information. Then have a submit button. when user click the submit button, it can call the web service with data. then Web service returns a Static PDF document based on data and the user can print it out. (and maybe save as separate pdf file)
1. Is that possible to implement? Because I know PDF can call web service, but dont know how it handle when the webservice returns another static PDF document. could it able to handle the responds and open up in another acrobat reader?
2. As I understand I need to have Live Cycle Designer to create a pdf and make it Reader Enabled. So user can user reader to call webservice? am I correct?
3. What minimum reader that user need to have? PDF reader 7 or above?
4. I have a webservice serve the same purpose for web. But if I want the same web services can serve both web and PDF form. So, whatever client (PDF or Web)make the web service call, server returns the PDF document to client. Is that possible ? Do I need to make any changes on web service?
5. Do I need to get any other Adobe server product? (other than Live Cycle Designer )
Thanks a lotWe have done a similar approach in the past and yes, it can be doable.
1. Is that possible to implement? Because I know PDF can call web service, but dont know how it handle when the webservice returns another static PDF document. could it able to handle the responds and open up in another acrobat reader?
Srini: We have developed a Servlet to talk to Webservice. Based on the Webservice response, the Servlet, prepares the Byte stream and sends it to Webbrowser to display as a PDF. The PDF data was submitted to Servlet in XML format.
But if you do not want to use the above approach, then you have to use the Workbench Process.
Submit the PDF data to a Workbench process and the inside process, execute Webservice Service with the data. Once the response is received, prepare the data XML and render a PDF with it.
To do this, you need LiveCycle Server and Reader Extensions server component.
2. As I understand I need to have Live Cycle Designer to create a pdf and make it Reader Enabled. So user can user reader to call webservice? am I correct?
Srini: If you want to use the Servlet, you can Reader extend the PDF with Acrobat.. But if you want to submit the data directly to Webservice, then you need Reader Extensions server component.
3. What minimum reader that user need to have? PDF reader 7 or above?
Srini: Not sure but Reader 8 and above should work.
4. I have a webservice serve the same purpose for web. But if I want the same web services can serve both web and PDF form. So, whatever client (PDF or Web)make the web service call, server returns the PDF document to client. Is that possible ? Do I need to make any changes on web service?
Srini: If you use the Servlet approach, then you can re-use the same webservice. But if you want to submit directly to the same webservice, you may need to change it to suit your data XML.
5. Do I need to get any other Adobe server product? (other than Live Cycle Designer )
Srini: If you use the Servlet approach, you do not need any server component but other approach, you need Livecycle Server and Reader Extensions server component.
Thanks
Srini -
How to call a SM35 transaction and run in BDC report.
Hi Experts,
I knew that how to call a transaction but here, I've to call the SM35 transaction ,which have my BRS BDC recording, to run my session.
Pls help me how to call the transaction and run/process the first session tab in the table control of SM35 window.
thanks & regards
sankar.Hi,
Look up this example..here v have recorded one transaction & running it throough BDC report programming.
report ZBDC_16JUL2008
no standard page heading line-size 255.
include bdcrecx1.
DATA : BEGIN OF it_tab OCCURS 0,
LIFNR(016),
BUKRS(004),
KTOKK(004),
NAME1(035),
SORTL(010),
STRAS(035),
PFACH(010),
ORT01(035),
LAND1(003),
REGIO(003),
SPRAS(002),
TELF1(016),
AKONT(010),
FDGRV(010),
END OF it_tab.
start-of-selection.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'D:\'
FILETYPE = 'ASC'
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
TABLES
data_tab = it_tab
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perform open_group.
LOOP at it_tab.
perform bdc_dynpro using 'SAPMF02K' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
it_tab-LIFNR.
perform bdc_field using 'RF02K-BUKRS'
it_tab-BUKRS.
perform bdc_field using 'RF02K-KTOKK'
it_tab-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-TELF1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
it_tab-NAME1.
perform bdc_field using 'LFA1-SORTL'
it_tab-SORTL.
perform bdc_field using 'LFA1-STRAS'
it_tab-STRAS.
perform bdc_field using 'LFA1-PFACH'
it_tab-PFACH.
perform bdc_field using 'LFA1-ORT01'
it_tab-ORT01.
perform bdc_field using 'LFA1-LAND1'
it_tab-LAND1.
perform bdc_field using 'LFA1-REGIO'
it_tab-REGIO.
perform bdc_field using 'LFA1-SPRAS'
it_tab-SPRAS.
perform bdc_field using 'LFA1-TELF1'
it_tab-TELF1.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-VBUND'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-FDGRV'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'LFB1-AKONT'
it_tab-AKONT.
perform bdc_transaction using 'FK01'.
ENDLOOP.
perform close_group. -
How to call a procude in oracle and return an array
I need to call a procedure and return an array, can give some example code?
First create ArrayDescriptor
like:
public ArrayDescriptor createDescriptor(Connection con, String typename) throws SQLException
if(typename==null)
return null;
//WARNING! typename should be in upper case only! Otherwise Exception "invalid name pattern"
//will be thrown!
return ArrayDescriptor.createDescriptor(typename.toUpperCase(),con);
}Then use SetArray function to a prepared query (just like SetInt() or
SetString()):
public void setArray(PreparedStatement st, int index, Object [] value, ArrayDescriptor ad) throws SQLException
ARRAY array = new ARRAY(ad, st.getConnection(), value);
if(st instanceof OraclePreparedStatement)
OraclePreparedStatement opst=(OraclePreparedStatement )st;
opst.setArray(index, array);
else
throw new SQLException("Oracle JDBC driver required to support setArray() operation!");
}In the same way you could implement RegisterOutParameter() which
accepts Array - it's provided by class OraclePreparedStatement...
look Oracle JDBC manuals - everything is there.
Enjoy!
Paul -
Call long running process and return immediately
Hi everyone,
Here' my problem : I am calling an onDemand application process when clicking on a button. It's a very long running process; and while waiting for the response my browser stops responding (white page).
So, is there a way to call a process and return immediately to the javascript. The process will set a field to a given value when it finishes. In javascript side, I can then check in a while boucle the value of this field to know if the process has ended.But I dont know how to return just after the application process call ...
Thanks and best regards,
OthmanI presume that you can achieve that by means of a batch job.
You can use an automatic page reload every X seconds until a certain "flag" (or similar mechanism) changes state and check it in a before header process. In the meanwhile you can display some animated GIF for instance.
Once the processing is completed you remove the reload timer from the header or you branch to a different page using a programmatic technique like procedure owa_util.redirect_url.
Bye,
Flavio
http://www.oraclequirks.blogspot.com/search/label/Apex -
How to Fill the selection screen while calling the transaction
Hi All,
my requirement is in one of the screen while i will press a push button it will call one transaction and it will fill the selection screen build order number field and skip the first screen i.e the selection screen it will show the output of that report directly.
am using this code .
case sy-ucomm.
while 'FSLR'.
set PARAMETER ID 'ANR' FIELD aufnr.
RANGES s_aufnr FOR afko-aufnr.
s_aufnr-sign = 'I'.
s_aufnr-option = 'EQ'.
s_aufnr-low = aufnr.
APPEND s_aufnr.
CALL TRANSACTION 'ZFS1' USING s_aufnr
MODE 'E' .
AND SKIP FIRST SCREEN.
endcase.
here the problem is i cant use both skip screen and using at a time nither the screen is filling nor its skipping the first screen.
but its not working would any one please help how can i do this functionality?Hi
Do in this way.
DATA: rspar TYPE TABLE OF rsparams WITH HEADER LINE.
rspar-selname = 'S_AUFNR'.
rspar-kind = 'S'.
rspar-sign = 'I'.
rspar-option = 'EQ'.
rspar-low = 'aufnr'.
APPEND rspar.
SUBMIT zfs1_prog VIA SELECTION-SCREEN WITH SELECTION-TABLE rspar AND RETURN.
If this doesnt suit yer requirement, I wud suggest you to use BDC as below.
CALL TRANSACTION 'SE11' USING bdcdata
MODE 'E'
UPDATE 'A'. -
Calling a procedure that returns a cursor inside a procedure
Hi,
I have two stored procedures. They both return a cursor as output variables. On the other hand I have another stored procedure that calls these procedures and return their results again an output variable. I know that this seems quite odd to be wanting to do something like this but how can I do that?You can make the hack generic. Make it execute any SQL as that schema that creates the ref cursor. E.g.
// as schema BILLY, open a huge security hole and grant access to USER1
SQL> create or replace procedure GetTableData( tableName varchar2, refCur out sys_refcursor ) authid definer is
2 dynamicSQL varchar2(32767);
3 begin
4 dynamicSQL := 'select * from '||tableName;
5 open refCur for dynamicSQL;
6 end;
7 /
Procedure created.
SQL>
SQL>
SQL> grant execute on GetTableData to USER1;
Grant succeeded.As USER1, you can now execute SQL (and even PL/SQL) as BILLY:
SQL> create or replace type TStrings is table of varchar2(4000);
2 /
Type created.
SQL> grant execute on TStrings to BILLY;
Grant succeeded.
SQL> --// execute this as the caller (which will be BILLY.GetTableData)
SQL> create or replace procedure ExecSQL( hackSQL varchar2 ) authid current_user is
2 pragma autonomous_transaction;
3 begin
4 execute immediate hackSQL;
5 commit;
6 end;
7 /
Procedure created.
SQL> --// wrap the above into something that BILLY.GetData can execute as a ref cursor
SQL> --// and return a meaningful message as to how successful the hack was
SQL> create or replace function PipeLineHack( hackSQL varchar2 ) return TStrings authid current_user pipelined is
2 begin
3 ExecSQL( hackSQL );
4 pipe row( 'SQL hack successful' );
5 exception when OTHERS then
6 pipe row( 'SQL hack faled with '||SQLERRM(SQLCODE) );
7 end;
8 /
Function created.
SQL>
SQL> grant execute on PipeLineHack to BILLY;
Grant succeeded.
SQL>
SQL> var c refcursor
SQL> --// expected used of the GetTableData() interface
SQL> --// we select from table BILLY.EMP
SQL> exec BILLY.GetTableData( 'EMP', :c );
PL/SQL procedure successfully completed.
SQL> print c
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 1980/12/17 00:00:00 800 0 20
7499 ALLEN SALESMAN 7698 1981/02/20 00:00:00 1600 300 30
7521 WARD SALESMAN 7698 1981/02/22 00:00:00 1250 500 30
7566 JONES MANAGER 7839 1981/04/02 00:00:00 2975 20
7654 MARTIN SALESMAN 7698 1981/09/28 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 1981/05/01 00:00:00 2850 30
7782 CLARK MANAGER 7839 1981/06/09 00:00:00 2450 10
7788 SCOTT ANALYST 7566 1987/04/19 00:00:00 3000 20
7839 KING PRESIDENT 1981/11/17 00:00:00 5000 10
7844 TURNER SALESMAN 7698 1981/09/08 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 1987/05/23 00:00:00 1100 20
7900 JAMES CLERK 7698 1981/12/03 00:00:00 950 30
7902 FORD ANALYST 7566 1981/12/03 00:00:00 3000 20
7934 MILLER CLERK 7782 1982/01/23 00:00:00 1300 10
14 rows selected.
SQL>
SQL> --// getting that interface to run unexpected code - we
SQL> --// rename BILLY.EMP table to something else
SQL> exec BILLY.GetTableData( 'TABLE(USER1.PipeLineHack( ''alter table emp rename to emp_has_been_hacked''))', :c );
PL/SQL procedure successfully completed.
SQL> print c
COLUMN_VALUE
SQL hack successful
SQL> -
Calling mulitple transactions in bdc
sir,
i m trying to upload data into sap system through BDC Call transaction method.I want to insert data into two transactions throgh same abap program.Plz help me how i sholud call two transactions and what bout internal tables for these two different transactions, plz attach if u have any code .
thanks
aafaqHi
What is the confustion here.
Build the data
Call the first transaction
Build the data again (for the second transaction)
Call the second transaction.
There will not be any difference execpt for the BDCDATA you building.
Regards,
Ravi
Note : Please mark the helpful answers -
CALL A TRANSACTION IN SIMPLE REPORT AND RETURN BACK TO REPORT
I 'VE A REQUIREMENT IN WHICH I HAVE TO MAKE A REPORT PROGRAM. IN THIS REPORT PROGRAM I HAVE TO CALL A TRANSACTION cs11 IN BACKGROUND AND THEN PICK ITS OUTPUT VALUE (DISPLAYED IN alv GRID OF cs11) AND THEN RETURN BACK TO MAIN PROGRAM. DO SOME CALCULATION WITH THE BROUGHT DATA AND THEN DISPLAY THEM ON THE REPORT alv OUTPUT.
iS THIS POSSIBLe? IF YES? HOW.
PLEASE HELP.try creating two reports.....ztest_a and ztest_b
do your call transaction in ztest_b
in ztest_a you can write submit ztest_a and return....
see if this works...
Message was edited by:
Priyank Jain -
Calling Transaction code & returning back to calling program
Hi,
I have requirement as below
Write the report to call the transaction code say for example different tcode (1000 in number) need to be executed and after every tcode execution it should return back to calling report. I tried using "CALL TRANSACTION 'ABC' AND SKIP FIRST SCREEN" it does execute the tcode but need the user interaction to return back to report, where here i want do this programatically.
can someone please help me & what is possible ways this can be do able.
Thanks,
John.There are two method of BDC
1- Call transaction method
2- BDC Session method
In this case you can use call tansaction method.
Syntax- call tansaction abc using gt_bdcdata.
Do the recording with t-code SHDB for that particular transaction and after the necessary modification use it in your program.
Please check f1 help of call transaction for details. -
How To call a Tcode From a Program and returning back ?
Dear All,
I have a requirement, i have to show all the open orders as in the the tcode va05 and return back to the my program. so how to display the tcode and getting back to my program. please help?Hi,
Basic syntax to call the transaction is:
SET PARAMETER ID <id name> FIELD <filedname>.
CALL TRANSACTION <TCOde> AND SKIP FIRST SCREEN.
If your are using ALV then snippet is :
FORM user_command USING okcode LIKE sy-ucomm
lselfield TYPE slis_selfield.
CASE okcode.
WHEN '&IC1'. " SAP standard code for double-clicking
CASE lselfield-sel_tab_field."check if double click is only on
WHEN 'ITAB-AUFNR'."aufnr not on any other field
SET PARAMETER ID 'ANR' FIELD lselfield-value.
CALL TRANSACTION 'IW32' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
Endform.
Pooja
Maybe you are looking for
-
Problem in assigning id to DIV inside a datatable
In our JSF application, we have a requirement to display a separate DIV for each row which is iterated inside a datatable. In order to display the contents under a particular DIV, we need to capture the id of that DIV. But since the DIV resides withi
-
Connect time capsule via ethernet to Mac for back-up only. Is it possible without internet connection ?
-
I'm trying to darken overexposed parts of a face, but the burn tool turns them a light greenish-gray color. I have CS5.5, and I have Protect Tones turned on. Is there a way to fix this, or is there some other method I should use to selectively fix ov
-
I have some bookmarks that I want to share with other people and some that I do not want to share. Is there an easy way to maintain two sets of bookmarks and yet sync them (I currently use .Mac) between my two Macs? Ideally, they would be kept in sep
-
Some application to counter the incoming and outgoing calls separately
I need some application to counter the incoming and outgoing calls separately