Can i execute bapi two times if yes then wht code i need to write 2 time.

Hi,
I am trying to execute my bapi at wdDoInit() method of view . Same Bapi will execute at  Controller.
But my view bapi is not running.
Why this is happeded?
My code for View is like this
public void wdDoInit()
    //@@begin wdDoInit()
     IWDMessageManager manager = wdComponentAPI.getMessageManager();
               try
                           wdContext.currentZcrm_Sales_Orders_InputElement().setRun_Bp("ALL");
                           wdContext.currentZcrm_Sales_Orders_InputElement().setUname("SUNIL103");
                           wdContext.currentZcrm_Sales_Orders_InputElement().modelObject().execute();     
wdContext.nodeOutput().invalidate();
               catch(WDDynamicRFCExecuteException e)
                                manager.reportException(e.getMessage(), false);
    //@@end
Please help me to trace this thing ,
Regards,
Gurprit Bhatia

Hi,
   Change this code a bit:
Zcrm_Sales_Orders_Input input = new Zcrm_Sales_Orders_Input();
wdContext.nodeZcrm_Sales_Orders_Input().bind(input);
input.setRun_Bp("ALL");
input.setUname("SUNIL103");
wdContext.currentZcrm_Sales_Orders_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
Regards,
Satyajit.

Similar Messages

  • Hi i want to execute bapi two times with different paramters....Possible

    Hi,
    i want to execute bapi twice times.Possible please explain where i put which code.Means i put bind code at doinit() method of conpopnent controller and execute bapi code in doinit() iof view. But for second time where i put bind and execute code. 
    Regards,
    Gurprit
    Edited by: GURPRIT BHATIA on Dec 17, 2007 1:24 PM

    Hi Gurprit,
    For executing the bapi second time, you can put the execute bapi code in the action of the button which is on your form. You need not write the bind code again.
    Bye
    Ankur

  • Why JRC executes query two times? (reports.queryengine(?:?) - Executing query: ...)

    Hello! Using JRC. While creating the report for viewing, I noticed one interesting thing. Why JRC executes query two times AND first time is executed with default parameters AND if default parameters are NULL the query can be invalid (even if it is marked to convert all database NULLs to defaults in Report Options).
    <!break>
    1. Why do you need to execute query the first time with these default parameters, which are later set to the others? We need to make some valid default parameters to make everything work. Also it is not efficient to execute unnecessary query.
    2. If I'm wrong could you explain please? If I'm right, is it a bug and when do you fix it?
    Waiting for answer,
    Anton Stalnuhhin
    Java-developer, Webmedia AS

    .

  • Hello. I m Harminder Singh from punjab. Currently i m using iphone5 with ios 6. 1     .bt now i want to upgrade it to ios 7.  I want to know that can i upgrade it now. If yes then pls help me how can i upgrade at home

    Hello. I m Harminder Singh from punjab. Currently i m using iphone5 with ios 6. 1     .bt now i want to upgrade it to ios 7.  I want to know that can i upgrade it now. If yes then pls help me how can i upgrade at home

    If you purchased Lion for your iMac, just log into the Mac App Store from your MacBook using the Apple ID under which you purchased Lion and go to the Purchases page. You will be able to download and install Lion there. 
    searching the internet i found a link to upgrtade to 10.7
    The only place you get get Lion is from the Mac App Store. If you found some other site, that was an illegal copy and almost certainly tied to someone else's Apple ID and hence unusable by you. If the link was just to the Mac App Store, see above.
    As to the problem with synchronization to iCloud, that's not a 10.6 question, so I'd suggest you take up that specific issue in either the Lion or iCloud forums, providing full details, and someone there can probably help you sort things out.
    Regards.

  • I purchased Pages. But i can't find the icon or where it was loaded. I need to write a resume...

    I purchased Pages. But i can't find the icon or where it was loaded. I need to write a resume

    Did you purchase it from the iTunes Store or did you do the purchase from the App Store on the iPad?
    Go to Search, and type in Pages, if nothing shows your iPad hasn't downloaded it.
    Tap on App Store > Updates > Purchases, any sign of installation in progress? It is reasonably large so may take a while.
    Peter

  • Executing BAPI Multiple Times

    Hello Everyone,
    I am trying to execute BAPI_ACC_DOCUMENT_POST multiple times in an application. My requirement is to post multiple documents in one click. The Context is as follows.
    --Context
    BAPI_ACC_DOCUMENT_POST(model node)---cardinality(0..1)
    Accountgl(model node)---cardinality(0..n)
    AccountPayable(model node)---cardinality(0..n)
    Currencyamount(model node)---cardinality(0..n)
    DocumentHeader(model node)---cardinality(0..1)
    Output(model node)---cardinality(0..1)
    -Document(Value Node)-cardinality(0..n)
    I have create the Value node Document and I am trying to get few values from the user and assigning it to the model nodes during runtime. The BAPI should execute depending on the number of rows in the Document Table that the user decides at the runtime.
    Could anyone give me some basic idea about how to acheive this requirement. I hope you can understand my requirement and please do let me know if you need any further explanation. I would greatly appreciate your help.
    Regards,
    Gopal.

    Hi Siva,
    My issue is resolved by using the following code.
    public void onActionPostDocument(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionPostDocument(ServerEvent)
        //$$begin ActionButton(-761385096)
    for(int i=0; i<wdContext.nodeDocument().size(); i++){
    wdContext.currentDocumentheaderElement().setHeader_Txt(wdContext.nodeDocument().getDocumentElementAt(i).getHeader_Txt());
              wdContext.currentDocumentheaderElement().setRef_Doc_No(wdContext.nodeDocument().getDocumentElementAt(i).getRef_Doc_No());                    wdContext.currentAccountglElement().setGl_Account(wdContext.nodeDocument().getDocumentElementAt(i).getGl_Account());
    wdContext.currentAccountglElement().setCostcenter(wdContext.nodeDocument().getDocumentElementAt(i).getCostcenter());
    wdContext.currentAccountpayableElement().setVendor_No(wdContext.nodeDocument().getDocumentElementAt(i).getVendor_No());
    wdContext.nodeCurrencyamount().setLeadSelection(0);
    wdContext.currentCurrencyamountElement().setAmt_Doccur(wdContext.nodeDocument().getDocumentElementAt(i).getAmt_Doccur().negate());
    wdContext.currentCurrencyamountElement().setItemno_Acc("0000000001");
    wdContext.nodeCurrencyamount().setLeadSelection(1);
    wdContext.currentCurrencyamountElement().setAmt_Doccur(wdContext.nodeDocument().getDocumentElementAt(i).getAmt_Doccur());
    wdContext.currentCurrencyamountElement().setItemno_Acc("0000000002");
    wdThis.wdGetMultipleDocCompController().executeBapi_Acc_Document_Post_Input();                                   
    Thanks a lot for your help.
    Regards,
    Gopal.

  • If I bought an album on Itunes, ¿Can i burn it two times (two cd's, one for me and another one for my girlfriend)?

    Just like the title of the topic said it, ¿Can I?

    Welcome to the Apple community.
    Yes you can burn two copies of an album purchased from the iTunes Store.

  • In Report How To Execute Query Two Times in One Layout

    hi
    All
    In My Report i have creating on main Query and then query run two type with Defrent Parameter how is possible in Oracle Report 6i
    example
    my Query is
    For Example First time query run defrent parameter and again run some other parameter in same layout help me
    select decode(art_mkt,'1',art_brc,art_mkt) art_mkt,
    &f1 art_prd,
    sum(nvl(art_amt,0)) art_amt,
         sum(nvl(art_net,0)) art_net,
    nvl(substr(art_vou_ser,2,1),' ') art_mfg_type,
    nvl(substr(art_vou_ser,3,1),' ') art_src_code
    from art
    where art_rec_ty = 58
    and art_ml in (:art_ml1,:art_ml2)
    and art_dt between to_date(:start_dt,'dd-mm-yyyy')
    and to_date(:end_dt,'dd-mm-yyyy')
    and art_vou_dt between to_date(:dt1,'dd-mm-yyyy')
    and to_date(:dt2,'dd-mm-yyyy')
    group by decode(art_mkt,'1',art_brc,art_mkt),
    substr(art_vou_ser,2,1),
    substr(art_vou_ser,3,1),
    &g1
    order by decode(art_mkt,'1',art_brc,art_mkt),
    substr(art_vou_ser,2,1),
    substr(art_vou_ser,3,1),
    &g1

    That would be a great question in the [url http://forums.oracle.com/forums/forum.jspa?forumID=84]Reports Forum wouldn't it ;)
    Tony

  • Can I run ck40n two times in the current month??

    Hi,
    I execute ck40n for June month, but after finish there was an activity price should be change,
    so can i change and run ck40n again in the current month??

    Hi,
    Somehow, I agree with Ali.
    Though the system allows you to release more than once but it is not recommended as there will more one standard price available for the same material which may lead inappropriate variance calculation and other inconsistency may crop up. Further system will revaluate all the inventory value with the new price.
    You can also change the price manually through MR21 (this is not recommended but it is a work around).
    Regards
    Mohit

  • Can we execute BAPI in background?

    Hi All,
    I have a report in which i have used BAPI . I need to execute that report in background via a variant.
    Is it possible to run a BAPI in background ?
    Please suggest ?
    Thanks,
    Srinivas

    Hello Srinivas,
    BAPI is not standalone entity it has to be called by some other entity for e.g. report, function module, object method etc.
    So, it is not possible to run BAPI in background. Workaround to this problem is to create report calling BAPI and then schedule
    that report in background.
    For more information on JOB scheduling see following link:
    https://wiki.sdn.sap.com/wiki/display/Snippets/HowtocreateandreleaseaJob
    Thanks,
    Augustin.

  • Within reason it would be better and more secure for user to have more latitude in Id and password security. We can make a tool so difficult that it loses its usefulness. the need to write down scores of passwords to make a control freak happy stinks

    The balance between security and ease of use is way out of control with Apple. Where does Security end and Controlfreak begin I have a very secure password that I use on many really high security programs and applications where peoples lives, safety and finances are at risk. There has never ever been a problem because I have chosen the usernames and passords  carefully, I use them all the time so I don't forget them. If I wrote different ones down so that I could access them from different locations that would be a huge violation of security.
    This policy is so extreme that it makes the tools that Apple makes available. I have used Apple as my music management system for years. This has become so impossible that I am going to have to convert to another system. This will cause me time and work. This is quite un-necessary. Control freaks are hard to deal with.I give up, I'm going to go away.

    I have no idea what your issue is, but if you want to comment to Apple, use their feedback page:
    http://www.apple.com/feedback/itunesapp.html
    Posting complaints here, and in particular threats to go to other products, where only we your fellow users will be likely to see them do no one any good. None of us here will really care if you decide that iTunes doesn't work for you and you have chosen to shift to some other product. That's you perogative as a consumer.
    Regards.

  • Only firefox executing mysql query two times. but other browser works perfect why?

    i am a web developer. and i am facing a problem only with firefox. every time i use MySQL query in my php code fire fox execute it two times. but same query is working fine on other browsers.

    Yes, the problem is seen without extensions and also in safe mode.
    But, I am starting to think that firefox is running low on memeory or CPU.
    Without extensions the possibility of failing is 1 in 3.
    I am still unable to explain why closing the browser or aborting the request can cause the stuck request to immediately reach the server.
    Is there a way to collect Firefox logs and post it here ?

  • Controller method executed two times

    Hi,
    i created one method called :FileLov
    i called this method in PR like:
    am.invokeMethod("FileLov");
    in am i implemet the code :
    public void FileLov() {}
    method is working fine but it is executing two times.
    when each time executes values are inserted into tables , so that table contains duplicate values.
    can any one please help me why this method is invoked two time, how can i resolve this issue.

    once the page is loaded method is executed automatically two times.
    i used if condition but still it is not effected.
    please find the below
    Target URL -- http://xxxxx.corp.xxxxx.com:8988/OA_HTML/runregion.jsp
    13/04/23 14:33:01 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    13/04/23 14:33:03 TIME: runregion: initialization [15 ms]
    13/04/23 14:33:05 TIME: runregion: session and transaction creation [1657 ms]
    Apr 23, 2013 2:33:06 PM oracle.adf.share.config.ADFConfigFactory findOrCreateADFConfig
    INFO: oracle.adf.share.config.ADFConfigFactory Reading META-INF/adf-config.xml
    13/04/23 14:33:06 java.lang.IllegalArgumentException: Unknown signal: ALRM
    13/04/23 14:33:06      at sun.misc.Signal.<init>(Signal.java:126)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.AppsDiagnosticsHandler.install(Unknown Source)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.initializeSignalHandler(Unknown Source)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.<clinit>(Unknown Source)
    13/04/23 14:33:06      at java.lang.Class.forName0(Native Method)
    13/04/23 14:33:06      at java.lang.Class.forName(Class.java:242)
    13/04/23 14:33:06      at oracle.jbo.common.java2.JDK2ClassLoader.loadClassForName(JDK2ClassLoader.java:38)
    13/04/23 14:33:06      at oracle.jbo.common.JBOClass.forName(JBOClass.java:164)
    13/04/23 14:33:06      at oracle.jbo.common.JBOClass.findCustomClass(JBOClass.java:177)
    13/04/23 14:33:06      at oracle.jbo.server.ApplicationModuleDefImpl.loadFromXML(ApplicationModuleDefImpl.java:836)
    13/04/23 14:33:06      at oracle.jbo.server.ApplicationModuleDefImpl.loadFromXML(ApplicationModuleDefImpl.java:770)
    13/04/23 14:33:06      at oracle.jbo.server.MetaObjectManager.loadFromXML(MetaObjectManager.java:534)
    13/04/23 14:33:06      at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:547)
    13/04/23 14:33:06      at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:425)
    13/04/23 14:33:06      at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:358)
    13/04/23 14:33:06      at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:340)
    13/04/23 14:33:06      at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:700)
    13/04/23 14:33:06      at oracle.jbo.server.ApplicationModuleDefImpl.findDefObject(ApplicationModuleDefImpl.java:232)
    13/04/23 14:33:06      at oracle.jbo.server.ApplicationModuleImpl.createRootApplicationModule(ApplicationModuleImpl.java:401)
    13/04/23 14:33:06      at oracle.jbo.server.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:91)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.createStaticAKApplicationModule(Unknown Source)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.getStaticAKApplicationModuleSync(Unknown Source)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.getStaticAKApplicationModule(Unknown Source)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    13/04/23 14:33:06      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
    13/04/23 14:33:06      at OA.jspService(_OA.java:71)
    13/04/23 14:33:06      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    13/04/23 14:33:06      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    13/04/23 14:33:06      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    13/04/23 14:33:06      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    13/04/23 14:33:06      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    13/04/23 14:33:06      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    13/04/23 14:33:06      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    13/04/23 14:33:06      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    13/04/23 14:33:06      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    13/04/23 14:33:06      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    13/04/23 14:33:06      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    13/04/23 14:33:06      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    13/04/23 14:33:06      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    13/04/23 14:33:06      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    13/04/23 14:33:06      at java.lang.Thread.run(Thread.java:595)
    13/04/23 14:33:06 **************************************************************************
    13/04/23 14:33:06 *** WARNING: Oracle BC4J debug build executing - do not use for timing ***
    13/04/23 14:33:06 **************************************************************************
    13/04/23 14:33:10 filelength is 11
    13/04/23 14:33:11 filelength is 11
    here i wrote one printout statement in a method
    it displays two times.

  • Can I go back to Time Machine on my External Hard Drive?

    I have been using an OWC 1TB External Hard Drive for my Time Machine backups. The OWC stopped working, so I sent it back to them to fix. Turns out it was the case and all my information is ok. They are shipping it back.
    Meanwhile I backed it up on Time Machine on another external in case my laptop went down.
    Now that I am getting back my original, can I pick up where I left off or do I have back it up all over again?
    For the future, can you back up two Time Machines in case this happens again?
    I am sure i am not the first to face this situation.

    can I pick up {with Time Machine} where I left off or do I have back it up all over again?
    You should be able to continue where you left off.
    For the future, can you back up two Time Machines in case this happens again?
    Yes, but you'll have to change Time Machine's settings to switch from one disk to the other and back.

  • Execute BAPI for different input values and dispaly data in a table

    Hi all,
    I have a specific problem about executing BAPI multiple times for different input values and didplay result in a table.
    I am using the code similar to the following logic.
    Bapi_Mydata_Input in = new Bapi_Mydata_Input();
    wdContext.nodeBapi_Mydata_Input().bind(in);
    String in = wdContext.currentperdataElement.getnumber();
    in.setDestination_From(10)
    wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
    in.setDestination_From(20)
    wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
    in.setDestination_From(30)
    wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
    And I want to display the data in a single table. I want the result in a table for Bapi execution based on input parameters passed 10,20 30.
    But I am getting the table data only for the input parameter 30.I mean its actually display the data in table only for the last input parameter.
    So May I ask you all if you know the solution for this problem.PLease advise me with some tips .or sample code is very much appreciated.I promise to award points to the right answer/nice advises.
    Regards
    Maruti
    Thank you in advance.

    Maruti,
    It seems that WDCopyService replaces content of node, rather then adds to content.
    Try this:
    Bapi_Persdata_Getdetailedlist_Input frelan_in = new Bapi_Persdata_Getdetailedlist_Input();
    wdContext.nodeBapi_Persdata_Getdetailedlist_Input().bind(frelan_in);
    final Collection personalData = new ArrayList();
    String fr1 = wdContext.currentE_Lfa1Element().getZzpernr1();
    frelan_in.setEmployeenumber(fr1);
    wdThis.wdGetFreLanReEngCompController().executeBapi_Persdata_Getdetailedlist_Input();
    WDCopyService.copyElements(wdContext.nodePersonaldata(), wdContext.nodeNewPersonaldata());
    for (int i = 0, c = wdContext.nodePersonaldata().size(); i < c; i++)
      personalData.add( wdContext.nodePersonaldata().getElementAt(i).model() );
    String fr2=wdContext.currentE_Lfa1Element().getZzpernr2();
    frelan_in.setEmployeenumber(fr2);
    wdThis.wdGetFreLanReEngCompController().executeBapi_Persdata_Getdetailedlist_Input();
    WDCopyService.copyElements(wdContext.nodePersonaldata(), wdContext.nodeNewPersonaldata());
    for (int i = 0, c = wdContext.nodePersonaldata().size(); i < c; i++)
      personalData.add( wdContext.nodePersonaldata().getElementAt(i).model() );
    wdContext.nodeNewPersonalData().bind( personalData );
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

Maybe you are looking for

  • How can I create a slide show and insert it into an email

    I created a slide show of some pictures I want to share with my sales associate but can't seem to figure out how to Email it.  any help would be appreciated!  Thank you!

  • Font Book Automatic Font Activation

    Hello I have been happily using Automatic Font Activation from font book for quite long time. Today i noticed that feature absolutely died. Did not heal cleaning caches, restarting ATS Server via ATSUtil in Terminal command line. Simply feature stop

  • How to import mpeg files downloaded from a Google Drive?

    I recently downloaded 18 large clips of a recital which were in .mpeg format. iMovie refused to import any of them. Is there a way to do it and make a movie out of them? The combined files total almost 2 GB. Thanks.

  • Converting Image.jpg to byte array

    Hi, How do i convert a image (in any format like .jpeg, .bmp, gif) into a byte array And also vice versa, converting byte array to image format Thank you

  • Limit for numeric values ?

    Hello, I'm using a trial version of FormsCentral (Acrobat Pro XI) and when trying to define the range of values in a text box with number format option I do not see any, nor to set the number of decimal places (only I see options to set as Mandatory