How to call one program from another program
Hai,
How to call one program through another program.
Example.
I have two programs 1.ZPROG1 2. ZPROG2.
When i execute ZPROG1 at that time it should call ZPROG2.
Hi ,
u can use submit statement to call a program .
DATA: text TYPE c LENGTH 10,
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
range_tab LIKE RANGE OF text,
range_line LIKE LINE OF range_tab.
rspar_line-selname = 'SELCRIT1'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-low = 'ABAP'.
APPEND rspar_line TO rspar_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'H'.
APPEND range_line TO range_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'K'.
APPEND range_line TO range_tab.
SUBMIT report1 USING SELECTION-SCREEN '1100'
WITH SELECTION-TABLE rspar_tab
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
regards,
Santosh thorat
Similar Messages
-
How to call one .SWF from another?
How do I call one .SWF from another. I built a very beefy
base .SWF, and want to add music overlay, and an intro slide show
to the exsting Flash animation, but put it in a second .FLA/.SWF
file. How do I call one from the other?
This will be embedded in an HTML file but I assume this is
superfluous to my question.
F.Z.I think you should open that Another SWF (FLA),
and add some actionscript..
For example, you could create a movie clip, and write
actionscript in the
first keyframe:
loadMovie("
http://www.somewebpage.com/movie.swf",
this);
"FredZimmerman" <[email protected]> wrote in
message
news:ftnjas$mj5$[email protected]..
> How do I call one .SWF from another. I built a very
beefy base .SWF, and
> want
> to add music overlay, and an intro slide show to the
exsting Flash
> animation,
> but put it in a second .FLA/.SWF file. How do I call one
from the other?
>
> This will be embedded in an HTML file but I assume this
is superfluous to
> my
> question.
>
> F.Z.
> -
How to Call one EJB from another
Hi all
I am trying to call one EJB in one system from another EJB residing on diferent system...
Both are Stateless session beans ...
I can't use No-args Intialcontext() as i need to specify the Ip address of other system to be looked up.....
So i am using properties Dorg.omg.CORBA.ORBInitlalHost....
But its not looking up..Its telling not bound...But i called it from standalone client remotely...
Am i wrong..?
I hope I am in right path....
I hope ill get reply as fast as possible...
Gopal VHi ken Thanks for replying....
Ya i packed it as a jar (using Export tool in Eclipse3.2)....
I am using SUN AS 9.....
I packed bean1 and bean2 as two different jars in the same domain...
Here is my code...
Bean1:
@Stateless(mappedName="ejb/Second")
public class SecondIMPL implements SecondRemote {
public FirstRemote obj;
public String connect() {
try{
InitialContext ctx= new InitialContext();
FirstRemote obj =(FirstRemote)ctx.lookup("ejb/First");
System.out.println("Client :"+obj.bMethod());
}catch(Exception e){
e.printStackTrace();
return "Check server Log";
}Bean2 :
@Stateless(mappedName="ejb/First")
public class FirstIMPL implements FirstRemote {
public String bMethod() {
return "From First Bean";
Client:
public static void main(String[] args) {
try{
InitialContext ctx= new InitialContext();
SecondRemote obj =(SecondRemote)ctx.lookup("ejb/Second");
System.out.println("Client :"+obj.connect());
}catch(Exception e){
e.printStackTrace();
Here is my Stack Trace...
[#|2007-05-24T18:35:17.214+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=18;_ThreadName=p: thread-pool-1; w: 19;_RequestID=bb4848e7-829a-421d-a560-93659898eb02;|
javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.SecondRemote[Root exception is java.lang.ClassNotFoundException: com.SecondRemote]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:350)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:61)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:314)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.FirstBean.rediff(FirstBean.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
at $Proxy36.rediff(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
Caused by: java.lang.ClassNotFoundException: com.Second
at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:701)
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:614)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.ejb.EJBUtils.getBusinessIntfClassLoader(EJBUtils.java:568)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:320)
... 31 more
|#] -
How to call one procedure from another procedure
Hi all,
Could anyone give me clue how to call a procedure contains out parameters
from another procedure.
I had following procedures.
1)
create or replace procedure INS_PUR_ORDER
p_poamt in number,
p_podate in date,
p_poid out number
is
begin
select pkseq.nextval into p_poid from dual;
insert into pur_order(poamt,podate,poid)
values (p_poamt,p_podate,p_poid);
end;
2)
create or replace procedure INS_PUR_ORDER_DETAIL
p_pounits in number,
p_poddate in date,
p_poid in number)
is
begin
Insert into pur_order_detail(podid,pounits,poddate,poid)
values(pdseq.nextval,p_pounits,p_poddate,p_poid);
end;
I need to write a 3rd procedure which calls above two procedures.
like
call first procedure ,basing on the return value
i.e if p_poid != 0 then
we need to call second procedure
in the loop.
thanks in advance.
rampa.Not sure what are you doing, you can not assign cursor to another cursor, may be you are looking for this?
SQL> create or replace procedure proc1 ( result out sys_refcursor)
2 is
3
4 begin
5 open result for
6 select 'HELLO WORLD' from dual ;
7 end proc1 ;
8 /
Procedure created.
Elapsed: 00:00:00.01
SQL> create or replace procedure proc2
2 is
3 l_cursor sys_refcursor ;
4 begin
5 l_cursor := proc1 ;
6
7
8 open l_cursor;
9 fetch l_cursor into l_text;
10 dbms_output.put_line(l_text);
11 close l_cursor;
12
13
14 end proc2 ;
15 /
Warning: Procedure created with compilation errors.
Elapsed: 00:00:00.01
SQL> show error;
Errors for PROCEDURE PROC2:
LINE/COL ERROR
5/4 PL/SQL: Statement ignored
5/16 PLS-00306: wrong number or types of arguments
in call to 'PROC1'
6/4 PLS-00201: identifier 'L_TEXT' must be
declared
6/4 PL/SQL: Statement ignored
8/4 PLS-00382: expression is of wrong type
8/4 PL/SQL: SQL Statement ignored
9/4 PL/SQL: SQL Statement ignored
9/24 PLS-00201: identifier 'L_TEXT' must be
declared
10/4 PL/SQL: Statement ignored
10/25 PLS-00201: identifier 'L_TEXT' must be
declared
---- this is the correct waySQL>ed
1 create or replace procedure proc2
2 is
3 l_cursor sys_refcursor ;
4 l_text varchar2(100);
5 begin
---- procedure call
6 proc1(l_cursor);
7 -- open l_cursor;
8 fetch l_cursor into l_text;
9 dbms_output.put_line(l_text);
10 close l_cursor;
11* end proc2 ;
SQL> /
Procedure created.
Elapsed: 00:00:00.01
SQL> set serveroutput on
SQL> execute proc2;
HELLO WORLD
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> -
CALL TRANSACTION 'ME33K from another program
Hi,
I ma trying to CALL TRANSACTION 'ME33K from another program, but it is not working. The transactions is opening, but it is not opening with the contract number (ls_ekpo-ebeln) i am passing.
ls_ekpo-ebeln does have a valued when CALL TRANSACTION 'ME33K is called.
In debug, I noticed the "value" is blank when step into CALL TRANSACTION 'ME33K .
WHEN 'EBELN'. "Contract
l_field = 'EVRTN'.
IF ls_ekpo-ebeln <> ''.
GET PARAMETER ID 'VRT' FIELD l_field. "EVRTN.
SET PARAMETER ID 'VRT' FIELD ls_ekpo-ebeln.
CALL TRANSACTION 'ME33K AND SKIP FIRST SCREEN.
SET PARAMETER ID 'VRT' FIELD ls_ekpo-ebeln.
ENDIF.
Any help or suggestions would be great.
Thanks,
NaingDear Naing,
I execute the same code
IF ls_ekpo IS INITIAL.
GET PARAMETER ID 'VRT' FIELD LS_EKPO.
SET PARAMETER ID 'VRT' FIELD ls_ekpo.
CALL TRANSACTION 'ME33K' AND SKIP FIRST SCREEN.
SET PARAMETER ID 'VRT' FIELD ls_ekpo.
ENDIF.
And it is working.
Try to do de simple sintax.
A program with one pararmeter to introduce the contract number.
The set parameter for this parameter and the call transaction.
I´m waiting your comments.
Regards.
Antonio. -
Problem regarding calling a program from another program
Hi,
I have a requirement that i need to call a program from another program and in that case the called program should be executed with a value in the selection screen coming from the first program..i.e.
a standard report to view the user Notes for annual leave is RPTARQDBVIEW. Can we create a report to display all the users under a manager as a hyperlink and run the report(RPTARQDBVIEW), with the pernr of the employee selected
Regards,
saumikSubmitting a report using ranges for select-options
* Define range for ltak-tanum
RANGES: r_tanum FOR ltak-tanum.
* Read values from database tabel into the range
* These values are later used for select-options in the report
SELECT * FROM ltak
WHERE lgnum = w_lgnum AND "Warehouse number/complex
vbeln = w_screen1000-io_vbeln. "Transfer order number
MOVE ltak-tanum TO r_tanum-low.
MOVE 'I' TO r_tanum-sign.
MOVE 'EQ' TO r_tanum-option.
APPEND r_tanum.
ENDSELECT.
* Submit report with range
SUBMIT zmm00100 WITH p_tanum IN r_tanum.
or
Submitting a report from ABAP with selection criterias
TYPES: tt_selection TYPE STANDARD TABLE OF rsparams.
DATA: l_iblnr TYPE st_iblnr,
* Define internal table and work area for select-options
l_selection TYPE rsparams,
li_selection TYPE tt_selection.
* Create selectIon table
LOOP AT gi_iblnr INTO l_iblnr.
CLEAR l_selection.
l_selection-selname = 'IM_IBLNR'. "Option name
l_selection-kind = 'S'. "S= select options P=Parameters
l_selection-sign = 'I'. "Sign
l_selection-option = 'EQ'. "Option
l_selection-low = l_iblnr-iblnr. "Value
APPEND l_selection TO li_selection.
ENDLOOP.
* Submit report
SUBMIT rm07idif WITH SELECTION-TABLE li_selection AND RETURN.
Regards,
Prabhudas -
How to call a servlet from another servlet
hi everybody,
i have a problem, i have to call one servlet from another one.
Everything works on my pc, but when i install the application on the customer's server i got an error about an Uknown URL followed by the name of the machine.
Wjat i do is the folloqing :
String urlString = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/"+servletName;
URL url = new URL(urlString);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
the variable servletName is the name of the servlet i have to call.
Is there another way to call the servlet ?
All the servlet are installed in the same server.
Any suggestion ?
Cheers.
StefanoSweep is correct about requestDispatcher being another approach for inter-servlet delegation; the only issue that i recall with this approach is that it defaults the method of the destination servlet to the one it was called from...for example, calling servlet2 from within servlet1.post() resulted in the dispatcher attempting to utilize servlet2.post() - i believe that i searched for a parameterize solution to no avail :( (ended up handling the request by placing a "fake" doPost() in servlet2 that simply called servlet2.doGet())
however, if your application is functioning correctly on your pc/webserver then the problem may be external to servlet communication (e.g. client webserver's ports not configured or blocked, missing runtime classes, etc.)
my suggestion would be to set aside the programmatic concerns for the moment - what is the response if you open a browser on a client's machine and access the URL in question (i.e. http://clientserver:port/stefanoServlet)? If it will not respond to access in this manner then it certainly won't when your application calls for it.
It's possible that there is a coding error but, given the info supplied, i'd start examining the environment, first. Let us know if you have any luck with the test i recommended or not (please provide abundant detail). Or, if you've found the solution then you may want to post back with a quick blub so the next person knows how to escape the trap.
D -
How to call one EJB in another EJB?
How to call one EJB in another EJB? Please explain with some example code.
To refer a Ejb from another Ejb include <ejb-ref> element in ejb-jar.xml
<session>
<ejb-name>EjbA</ejb-name>
<ejb-ref>
<ejb-ref-name>EjbB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.ejb.EjbBHome</home>
<remote>com.ejb.EjbB</remote>
</ejb-ref>
</session>
Include a <reference-descriptor> in weblogic-ejb-jar.xml
<weblogic-enterprise-bean>
<ejb-name>EjbA</ejb-name>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>EjbB</ejb-ref-name>
<jndi-name>com.ejb.EjbBHome</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-enterprise-bean>
In EjbA Bean class refer to EjbB with
a remote reference to EjbB.
InitialContext initialContext=new InitialContext();
EjbBHome EjbBHome=(EjbBHome)
initialContext.lookup("com.ejb.EjbBHome");
EjbB ejbB=EjbBHome.findByPrimaryKey(primarykey); -
How to call a BSP from another BSP?
Hi All,
I've created a BSP for hiring new employees. I have a situation whereby when the user presses a button a pop window will be displayed listing all the positions in the company. The user selects the correct position, which then populates an input box on the originating page and the pop up window closes.
This pop up window is a page in another bsp which goes off and gets the positions and stores the selection in a cookie.
Now my problem is how do i call this 'get postions' bsp from my originating bsp?
I've tried using the <%@ include file="/sap/bc/bsp/sap/z_hr_org_model"%> but i get the error only page fragments can be included.
So how do i call one bsp from another??
Any help would be much appreciated,
Kind Regards,
Liz.Look at the below [link|http://****************/Tutorials/BSP/F4Help/Tutorial.htm]
The only difference in your case is, you need to call the popup from different BSP Application.
To do that, just add the full path when you call the document.open..
For example,
document.open("/sap/bc/bsp/sap/z_hr_org_model/main.do", ............)
Raja -
CallerPrincipal when calling one sessionbean from another
Hi all,
I have a little problem when calling one sessionbean from another sessionbean. The problem is, that in the method, which is called, is used SessionContext's getCallerPrincipal().getName(). This works great from client, but from other sessionbeans getCallerPrincipal() retuns an "ANONYMOUS" principal. How can I set the correct principal (the principal from the first sessionbean)?
Thank you
My env: Glassfish 2.1.1, Netbeans 6.8, Eclipselink 2.0.0, Java 1.6.0.18
My code:
@Stateless
public class ABean implements ASessionRemote{
@Resource
SessionContext ctx;
@Override
public void aMethod(){
String name = ctx.getCallerPrincipal().getName(); // the name is ANONYMOUS, when the call is done from other sessionbean
@Stateless
public class BBean implements BSessionRemote{
@Resource
SessionContext ctx;
@EJB
private ASessionRemote aSessionBean;
@Override
public void bMethod(){
aSessionBean.aMethod();
}"This works great from client"
What do you mean by this, i.e what sort of client are you using (stand alone app, servlet) ?
what shows up if you printout the caller principal in the calling bean ?
are the two ejbs in the same ear ?
what security meta-information are you using in ejb-jar.xml and sun-ejb-jar.xml, if any ? -
How to refer one view from another view?
Hi,
I have 2 views in my Adobe Flash Builder mobile app. I need to refer the first view in my second view.
How to refer one view from another view? Or how to create a reference to a view wherever needed?I don't need any data from my first view. In a certain flow, I need to make my first view to be invisible.
for eg., My First view is in portrait mode. I change the device to Landscape. In the landscape mode, I want to show a completely different view (second view).
In this case, what happens is, I see my first view in Landscape mode for a second. Then the second view appears. When I change to Landscape mode, only the second view should be seen. I need to make my first view to be completely invisible in the OnOrientationChanging event of
StageOrientationEvent
As stage object and StageOrientationEvent works at application level, I need to know how to refer my first view object in the application level.
private function onOrientationChanging(soe:StageOrientationEvent):void
MyFirstView.Visible = False; ====> don't know how to refer MyFirstView here
Is my question clear now? -
How to call one JSFF into another JSFF
Hi,
I am very new to ADf. Could you please tell me how to call one JSFF inside another JSFF. We have a common pop-up written in one JSFF. Is there any best approach to get this pop-up into other JSFF.
Thanks in Advance.
Regards
NarasimhaIf you want to resue the jsff code, make use of bounded task flow with page fragment and then use it as a region.
For more details you can refer: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/taskflows_regions.htm
One more:
http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_57/jdtut_11r2_57.html -
HOW TO CALL A FORM FROM ANOTHER FORM
HOW TO CALL A FORM FROM ANOTHER FORM [local machine]
Balraj wrote:
HOW TO CALL A FORM FROM ANOTHER FORM [local machine]The way you asked question is this bit of request or order?
Secondly, you used capital latters which are being treated as Shouting Language. So, always try to switch off the Capslock of your keyboard.
Thirdly, you are very lazy to serach on forum or google for your problem instead of waiting someone to anwer your question.
Your should seriously have a look at FAQ.
http://wikis.sun.com/display/Forums/Forums+FAQ
Also here.
http://www.catb.org/~esr/faqs/smart-questions.html
Please read documentation for the initial questions.
-Ammad -
How to call a process from another project
Hi;
How to calling a process from another process in another project? Which activity that i need or web service, direct binding? I use 11gHi Tulasi ;
I have wsdl of the process i need to call. Also wsdl address on the server. But CALL activity can't use to service call. CALL activity can use only to reusable process call.
I think, this operation must make on composite.xml. But I have a same problem with this method and it don't work.
I create a base process that looking at below. It's include a direct binding. Is it include a direct binding?
[Base Process|http://d1201.hizliresim.com/t/s/21wqu.png]
Then i create a process that call to base process:
[Caller Process|http://d1201.hizliresim.com/t/s/21wqx.png]
I paste to base process' wsdl address on the server. Then i select port type (BaseProcessPortType) and a warning has occured that you see the picture above. Base Process contain Oracle SOA Composite Type. What's the wrong? It happened for Callback Port Type.
And second question is what's the Address? (under Reference Binding Setails option).
I think, i create the this direct binding correctly, i call to base process into my caller process via service activities. -
Calling one script from another
InDesign has a nice mechanism for calling one script from another, so code can be made modular. What about FrameMaker ExtendScript? What methods are people using to call one script from another? Thanks for any suggestions.
Rick QuatroHi Trevor,
Note that ExtendScript is Javascript plus FM objects and methods, so you need to stick to Javascript syntax rules. The right way to include another script source is as follows:
#include "scriptname.jsx";
If this works when running the main script from the ESTK, you know it finds the included script. When you then Export the script to Binary (from the File menu of the ESTK), the binary will include the embedded script as well. After this you have a jsxbin file, which you can drop into one of the two available startup folders to make it fire automatically when FM starts. Or you can move it anywhere else and run it via the File > Script > Run command. The main idea here is that when compiling a script into binary format, all include references are resolved and the script contains the complete code. If you run the jsx, the script is interpreted and requires a correct relative reference to any included script.
I hope this clarifies things a little
Ciao
Jang
Maybe you are looking for
-
Query on 0TCT_MC23 cube
Hi All, I made my custom query on 0TCT_MC23 provider. It takes so much time to run. When i see in SM50 then it doesnt show any process running from my id. I deleted and created the index too for the cube but still its very very slow. Could you guys t
-
Intercompany billing - using condition type PI01 = VPRS
In the intercompany billing we are going to configure the condition type PI01 to copy the amount in the condition type VPRS in the order. Can anyone give me a proposal of how to do this?
-
We have successfully developed reports in CR XI and have been testing these reports on our website. All the tests had been going great until we realized that if the server was down we received a timeout error and then a connection information box ask
-
Finding and opening iWeb webpage files in iWeb SEO
I have a successfully published website (hosted by GoDaddy). I want to add or enhance tags, but cannot find the files for the published webpage. I can't even find the files using the modification date. Where does iWeb store these files and how can I
-
Is there a service for showing any infotype in ESS ?
Hi All, I wanted to show education infotype in ESS . Is there any specific service which i can use to display any infotype i want in ESS ? i am on ITS version 50.4 . Regards PN