How to Execute WebDynpro Applications as Background Job ?

Hi Gurus,
We have developed a lot of WDJ applications with component reusage; ie,
quite a lot of business logic are wrapped in WDJ Components which are
re-used by other WD UIs.
Now we'd like to automate some of the processes with background jobs
and faced with a few problems :
#1. How can we write a background WD application which can be
triggered by external mechanism and without presenting any UI?
#2. If we write the background program in a Java DC, how can we
invoke existing methods in WD components ?
Anyone got a clue ??
Ying-Jie Chen

Hello Amit,
> Well I can think of a workaround in this case.If you are aware
> of the suspend-resume functionality of the WD application then
> its possible to run the WD application virtually in background.
[ stuffs deleted ...]
It sounds like a possible alternative to our requirement, I'll
spend some time to investigate on the WD suspend-resume mechanism !
> Also let me know why are you preffering the WD if you dont
> require its UI
Our application requires the process to be performed with UI interaction;
with some instances it should be run as a background job. Either case involves
RFC calls to backend SAP R/3 and it's easy for RFC access with WD
Component.  Though it's also possible to use CAF application service for
RFC access; due to some technical constrains, we did not use CAF
framework. Therefore it ends up where we are now ...
Thanks for your tip!
Ying-Jie Chen

Similar Messages

  • How to Execute Webdynpro Applications

    Hi Gurus,
    Iam new to Webdynpro for ABAP . When iam executing Webdynpro Applications iam getting message like Service Connot Reached. Error no 403.
    I think my server need some setting, Please  solve my problem.
    Thank you.
    Regards
    Peram Srinivas

    go to start->run.. and type
    Ping <server domain name> -t and enter
    you can see the server round trip time
    if you dont't have domain name check out this
    http://help.sap.com/saphelp_nw04s/helpdata/en/67/be9442572e1231e10000000a1550b0/content.htm
    Abhi

  • How to Execute RMDATIND inside another Background Job using a variant?

    Hi,
    It is only possible to start RMDATIND (direct input) in background from transaction BMV0 u2013 it is impossible just to place the program in another job in SM37 or SM36.
    In a related thead I saw : u201DSolved my self by using BI_START_JOB. If I use this function module along with RS_CREATE_VARIANT and RS_VARIANT_DELETE. u201C
    Following is the link to that thread
    Re: Problem in using JOB_OPEN, JOB_SUBMIT & JOB_CLOSE
    RS_CREATE_VARIANT (Creating a variant (not using a selection screen))
    RS_VARIANT_DELETE(Variant to be deleted)
    BI_START_JOB
    Can some one provide me with all the parameters required to execute the above Function Modules?

    Hi,
    Refer below thread:
    Process Control in Confirmation Parameters
    All the relevant details are explained in detail..
    Best Regards,
    Siva

  • How to find process chain using background job in sm37

    How to find process chain using background job in sm37

    Better is to select the job.
    Select (Define) Step (s) or F6.
    Select the line and Menu Goto>Variant.
    The variant contains the name of the CHAIN and its VARIANT.
    Success
    We faced an old job and via job monitoring we were informed about a cancelled job every 'interval'.
    We noticed that the related chain was deleted but still the job was scheduled each interval again and was cancelled because an event was missing
    We could not find the scheduled job via SM37.
    Via view V_OP, view over tbtco abd tbtcp, we find the related entry.
    We delete these entries via function BP_JOB_DELETE....
    Edited by: Jack Otten on Jul 9, 2010 2:50 PM

  • How to connect webdynpro application to database (Sql server)

    Hi Experts,
    Can someone suggest me how to connect webdynpro application to SQL Server. (Possibly in detail)
    Thanks Regards,
    Sandeep

    hi sandeep,
    here is a sample code which connects to a backend database Oracle; Connection is same for all DBs as you are using open sql commands.
    <b>   try {
         String eposta = wdContext.currentContextElement().getEposta();
         String tel = wdContext.currentContextElement().getTelefon();
         String company = wdContext.currentContextElement().getCompany();
         String message = " ";
         String onerikonusu = " ";
         String oneri_mdurum = " ";
         String oneri_odurum = " ";
         String oneri_bfaydalar = " ";
         String oncelik1 = " ";
         String uygulama = " ";
         String tarih = (new SimpleDateFormat("dd-MM-yyyy").format(new java.util.Date()));
         String saat = (new SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
         //java.sql.Date tarih = java.sql.Date.valueOf(creationDate);
         //java.sql.Time saat = java.sql.Time.valueOf(creationTime);
         if (wdContext.currentContextElement().getMesaj() != "")
            { message = wdContext.currentContextElement().getMesaj(); }
         if (wdContext.currentContextElement().getOneri_konusu() != "")
              { onerikonusu = wdContext.currentContextElement().getOneri_konusu(); }
         if (wdContext.currentContextElement().getOneri_mdurum() != "")
              { oneri_mdurum = wdContext.currentContextElement().getOneri_mdurum(); }
         if (wdContext.currentContextElement().getOneri_konusu() != "")
              { oneri_odurum = wdContext.currentContextElement().getOneri_odurum(); }
         if (wdContext.currentContextElement().getBekfaydalar() != "")
              { oneri_bfaydalar = wdContext.currentContextElement().getBekfaydalar(); }
         if (wdContext.currentContextElement().getOncelik() != "NULL")
              { oncelik1 = onceliktxt.toUpperCase(); }     
         if (wdContext.currentContextElement().getUygulama() != "NULL")
              { uygulama = app.toUpperCase(); }
       InitialContext ctx = new InitialContext();
       javax.sql.DataSource ds =
       (javax.sql.DataSource) ctx.lookup("jdbc/SAPEPPDB");
       java.sql.Connection con = ds.getConnection();
       con.setAutoCommit(false);
       java.sql.Statement stmt = con.createStatement();
         String sql;
          int rows;
          sql = "insert into tmp_feedbacks " +
               "(puid, name, tel, email, company, konu, oncelik, uygulama, mesaj, onerikonusu," +
               "oneri_mdurum, oneri_odurum, oneri_bfaydalar,tarih,saat) " +
               "values ('" + username + "', " +
                         "'" + name + "'," +
                         "'" + tel + "'," +
                         "'" + eposta + "'," +
                         "'" + company + "'," +
                         "'" + konutxt.toUpperCase() + "'," +
                         "'" + oncelik1 + "'," +
                         "'" + uygulama + "'," +
                        "'" + message + "'," +
                        "'" + onerikonusu + "', " +
                        "'" + oneri_mdurum + "', " +
                        "'" + oneri_odurum + "', " +
                        "'" + oneri_bfaydalar + "', " +
                        "'" + tarih + "', " +
                        "'" + saat + "' " +
         stmt = con.createStatement();
         rows = stmt.executeUpdate(sql);
         con.commit();
         stmt.close();
       catch(Exception e){
            IWDMessageManager msgMgr =
                    wdComponentAPI.getMessageManager();
       msgMgr.reportException(e.getMessage(),true);
       }</b>
    The value <b>ctx.lookup("<jdbc_pool>");</b> depends on your system id.
    if your system id is SID the the string has to be <b>jdbc/SAPSIDDB</b>
    you can check it via visual admin >> server >> services >> jdbc con.

  • How to submit the report in Background job.

    Hello Friends,
    In the selection screen I have 2 radio buttons one for background Process & other for foreground processing. if the user selects the background processing the program should execute in background and output need to be sent to SAP Inbox.
    Issues:
    1) If I am using the JOB_Submit FM or Report Submit the program is going to infinite loop and many continiously jobs are are being scheduled. How to avoid.
    2) Is there any best possible way to send the mail to SAP Inbox.
    Note: I am using OOALV in my program....
    Thanks,
    Ravi

    Hi,
    the first problem looks like you have an infinite recursion. You just need to avoid background scheduling again. There is a system field sy-batch. So if this field is equal to 'X' then you are already in background mode and you don't need to schedule your background job again. Another way is to split your program in two programs. The first will be responsible for scheduling or executing the second one.
    You can use FM SO_NEW_DOCUMENT_SEND_API1 to send message to workflow inbox. You need to user receiver type B. There are so many posts on this forum about sending emails from ABAP which may help you with implementing this requirement.
    Cheers

  • How to execute ME22N transaction in background.

    Hi experts,
    How to execute ME22N and ME23N in background, when execute the transaction in background, , it should generate a spool, with out any printpreview. How can we do this....?
    thanks

    Hi,
    Write a BDC program for updation of tables for u r user-exit.
    After that Schedule u r program in back gound job scheduling.
    Using  SM36 - Define Background job.
    Give the job name and Press job wizard button.
    It's asking about job name and job class -prioritty.
    press continue and give program name .
    Select radiobutton based on u r requirement.
    Then specify periodic job or only in holidays.
    Then u select hours and all.
    In SM37 give u r job name and and press execute.
    Reward if useful.
    Regards,
    Narasimha

  • How to immigrate Webdynpro application into EP ?

    Hi all.
    Is there any example to describe how to immigrate one webdynpro application into Enterprise Portal ?
    I need to develop some application in Enterprise Portal. I think I have 2 ways to achieve it.
    1. develop the application in webDynpro, then migrate it into EP.
    2. develop it directly in EP.
    I prefer 1st way, because in this way my maintenance job will becomes easy.

    Hi,
    See this tutorial for integrating webdynpro with portal
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on integrating web dynpro in portal - 19.htm
    Hope this helps you
    Regards
    Rohit

  • How to select server in which background job should run

    Hi,
    I want to run my program as background job. I want the user to select the server, in which background job should be run, in the selection screen of my program. When it is sheduled in background the job should run in the selected server.
    How to do this?
    Regards,
    Sriram

    Hi,
    please write the code like as below.
    DATA : D_GROUP like TBTCJOB-JOBGROUP.
    use the function moulde JOB_OPEN.
      D_JOBNAME = SY-REPID.
      D_GROUP- BTCSYSREAX =  " pass the target server name Here
         CALL FUNCTION 'JOB_OPEN'
            EXPORTING
                 JOBNAME          = D_JOBNAME
                 JOBGROUP       =  D_GROUP
            IMPORTING
                 JOBCOUNT         = D_JOBNO
            EXCEPTIONS
                 CANT_CREATE_JOB  = 1
                 INVALID_JOB_DATA = 2
                 JOBNAME_MISSING  = 3
                 OTHERS           = 4.
    submit   <Program name>
                  USER SY-UNAME VIA JOB D_JOBNAME NUMBER D_JOBNO
                  USING SELECTION-SET '  var1 '   " Give varient name
                  AND RETURN.
    CALL FUNCTION 'JOB_CLOSE'
               EXPORTING
                    JOBCOUNT             = D_JOBNO
                    JOBNAME              = D_JOBNAME
                    STRTIMMED            = 'X'
               IMPORTING
                   JOB_WAS_RELEASED     = D_REL
               EXCEPTIONS
                   CANT_START_IMMEDIATE = 1
                   INVALID_STARTDATE    = 2
                   JOBNAME_MISSING      = 3
                   JOB_CLOSE_FAILED     = 4
                   JOB_NOSTEPS          = 5
                   JOB_NOTEX            = 6
                   LOCK_FAILED          = 7
                   OTHERS               = 8.
    Hope this will helps you
    Regards
    Kiran

  • Error while executing webdynpro application : he URL does not contain full

    Dear All,
    I had installed SAP in my system.But when I am testing webdynpro application I am getting the belwo error. Please let me knwo what setting I need to do to avoid this error.
    Error when processing your request
    What has happened?
    The URL http://hari:8000/sap/bc/webdynpro/sap/z_test_pg was not called due to an error.
    Note
    The following error text was processed in the system DEV : The URL does not contain full domain specification (hari statt hari.<domain>.<ext>).
    The error occurred on the application server HARI_DEV_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: CHECK of program CX_FQDN=======================CP
    Method: LATE_CONSTRUCTOR of program CL_WDR_UCF====================CP
    Method: HANDLE_REQUEST of program CL_WDR_UCF====================CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DEV in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server HARI_DEV_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server HARI_DEV_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 800 -u: SAPUSER -l: E -s: DEV -i: HARI_DEV_00 -w: 0 -d: 20080109 -t: 073032 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team

    Hello,
    Little extract from the SAP online help :
    In Web Dynpro ABAP it is imperative that a client browser with a fully qualified domain name (FQDN) has access to the AS-ABAP. For this reason the full URL must be assigned to a Web Dynpro ABAP application when it is called. The URL must not be shortened (for instance, no domain specification).
    More info on how you should do this can be found here :
    [Click|http://help.sap.com/saphelp_nw70/helpdata/en/67/be9442572e1231e10000000a1550b0/content.htm]
    This will solve your problem.
    Success.
    Wim

  • Error while executing WebDynpro Application with Adobe interactive forms.

    I have created a webDynpro application which involves an adobe interactive form. When i deploy and run the application, i am able to deploy it on the J2EE engine on the EP server but while executing it, i get the following exception -
    <b>Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Error during call to AdobeDocumentServer: Processing exception during a "UsageRights" operation. Request start time: Thu Oct 12 17:30:39 GMT+05:30 2006
        at com.sap.tc.webdynpro.clientserver.adobe.AdobeFormHelper.createPDFDocumentForUIElement(AdobeFormHelper.java:486)
        at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:185)
        at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterHandleActionEvent(ClientApplication.java:1154)
        at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:402)
        at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
        ... 21 more</b>
    I would appreciate any help in this matter.
    Thanks...

    Hi,
    Check the note in this site...
    https://websmp204.sap-ag.de/notes
    Regards,
    <i><b>Raja Sekhar</b></i>

  • How to execute a application folder with space

    Hi All,
    Can any one help to execute the application folder or a file that contains space.
    Below I have pated my sample coding:
    var myFile=new File("/E/test text/lanch.app");
    myFile.exceute();
    If I remove the space between "test test", it works perfect.
    Request advice.
    Thanks,
    Christober

    Hi,
    Run this:
    alert (mFolder = Folder.selectDialog());
    and notice how "spaced name" is alerted by your OS;
    Jarek

  • How to fill selection screen in background job

    Hi experts,
    I use FM BP_JOB_CREATE to create background job. This job is program with one parameter on selection screen - production order number.
    This job is created when production order is saved.
    How can I fill production order number on selection screen? Do I need to create variant for every production order number?
    Thanks&regards,
    Jirka

    To create variants you can use !
    RS_CREATE_VARIANT
    You can also use
    JOB_OPEN
    JOB_SUBMIT
    JOB_CLOSE.
    to create a job.
    Regards,
    Lalit Mohan Gupta.

  • How to run the program in background job,program should run in 3 days.

    Dear Gurus,
    i have a program , that program should run approximately 3 days to get the result.
    i scheduled this program as a background job.
    how can i run sto5 t-code for this same program.
    i that case how we can trace the output.
    Experts please help me out.
    Thank u very much.
    Regards
    sudheer

    Hello Sudheer,
    The trace can be set on background jobs by using ST12 transaction. Please make sure that the trace is activated for only few minutes in production environment.
    Contact your basis team to activate trace on background job and the transaction used is ST12.
    Thanks

  • How to execute web applications without deploying them?

    How can I execute web applications without deploying them (without mentioning them in the server.xml)?
    I have an IWS 6.1 SP1 installed with default parameters (JES). I would like that a posix user could execute his own web application without administrator collaboration.
    Does it exist some sort of "autodeploy" like in tomcat?
    (I know about the invoker mapping in default-web.xml, just I don't realy understand what does it eventuate. I tried to unzip webapps-simple.war in the directory $IWS_SERVER_HOME/webapps/$instance_name/servlet/tmp/
    but the http://a.a.tg/servlet/tmp request failed:
    javax.servlet.ServletException: WEB2784: Wrapper cannot find servlet class tmp or a class it depends on
    ----- Root Cause -----
    java.lang.ClassNotFoundException: tmp
    How can I solve this? Users should have write permission to the directories in the classpath to put their servlet.class files into? Bad idea...
    (I tried to "execute" the $IWS_SERVER_HOME/plugins/java/samples/webapps/simple/webapps-simple.war)
    (Sorry for my language skills)

    Do as many of the rest of us do, until this behavior is changed (if ever). Eport your WEb gallery to your Hd and use an FTP client, there are so many, including Drreamweaver's, and Shareware ones, and upload just the relevant files/folders. Some can even check and do this for you.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

Maybe you are looking for