How to get app.processId from Guided Procedures? Please I need You help

Hi everyone, I need your help, I need to recover the processId once time the Procees was started in Guided Procedures
I found this link from maintenance process in Guided Porcedures administration
http://host:port/webdynpro/dispatcher/sap.com/cafeugpui~rt/Runtime?app.processId=IDnumber
the parameter I need is IDnumber, I dont know if it is possible with web dynpros or with web services please I need you help
How Can I do this?
Thank you very much my friends
Regards from Mexico
Atte Israel

Hi,
I am not sure about the version. But you can follow the steps below.
1. Create a Web Dynpro Poroject (Ideally create a DC , but if you don't have NWDI setup a project will do).
2. Add reference to com.sap.security.api.jar and sap.comcafeugpapi.jar
3. Under WebDynpro References -> Library References add sap.com/cafeugp~api
4. Put following code in wdDoInit()
public void wdDoInit()
    //@@begin wdDoInit()
     IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
     IWDMessageManager msgMgr= wdComponentAPI.getMessageManager();
     try{
     IWDClientUser wdUser = WDClientUser.getCurrentUser();
     IUser user = wdUser.getSAPUser();
     IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(user);
     Date startDate = new Date(110,1,1); // Start date as 01-Jan-2010
     Date endDate= new Date(111,12,31); // End date as 31-Dec-2011
     IGPProcessInstanceInfo[] array = rtm.getRunningInstances(GPSearchRole.SEARCH_ROLE_OWNER, startDate, endDate, userContext);
     for (int i=0; i<array.length; i++){
     String instanceId = array<i>.getProcessInstanceID();
//        Write logic to pass the instance ID to the RFC
msgMgr.reportSuccess("Instance id =" + instanceId);
     catch(Exception ex)
     msgMgr.reportException(ex.getLocalizedMessage(),false);     
    //@@end
Let me know if you face any issues.
Thanks
Prashant

Similar Messages

  • How to get a resultset from Stored Procedures

    How to efficiently and portably get resultsets from Oracle stored procedures? Oracle does not seem to follow JDBC standards here. A standard way in Oracle is to use a ref cursor and call getObject() on CallableStatement. However, Oracle seems to get all the data in the resultset in getObject(), which is inefficient and leads to large memory usage when the resultset is large.
    Another way in Oracle is to use getCursor() on an OracleCallableStatement, which is efficient but not portable across different application servers. For example, in WebSphere, this OracleCallableStatement is not available if we want WebSphere to manager the datasource.
    Any ideas will be greatly appreciated. Please email to [email protected]

    Oracle JDBC did not support return a result set, if you are using Oracle 9i, you can use pipeline function, then using the TABLE() function the get the row.
    Good Luck.
    Welcome to http://www.anysql.net/en/

  • How to get return values from stored procedure to ssis packge?

    Hi,
    I need returnn values from my stored procedure to ssis package -
    My procedure look like  and ssis package .Kindly help me to oget returnn value to my ssis package
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    ALTER PROCEDURE [TSC]
    -- Add the parameters for the stored procedure here
    @P_STAGE VARCHAR(2000)
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    -- Insert statements for procedure here
    --SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
    truncate table [INPUTS];
    INSERT
    INTO
    [INPUTS_BASE]
    SELECT
    [COLUMN]
    FROM [INPUTS];
    RETURN
    END
    and i am trying to get the return value from execute sql task and shown below
    and i am taking my returnn value to result set variable

    You need to have either OUTPUT parameters or use RETURN statement to return a value in stored procedures. RETURN can only return integer values whereas OUTPUT parameters can be of any type
    First modify your procedure to define return value or OUTPUT parameter based on requirement
    for details see
    http://www.sqlteam.com/article/stored-procedures-returning-data
    Once that is done in SSIS call sp from Execute SQL Task and in parameter mapping tabe shown above add required parameters and map them to variables created in SSIS and select Direction as Output or Return Value based on what option you used in your
    procedure.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to get line error from a procedure?

    Hello,
    I want to know the line where the error occurs, since when I treat the exception to show a user friendly error page this erro is not logged at OAS.
    How to do it?
    Thanks in advance.
    EXCEPTION WHEN OTHERS THEN
    HTP.P('Sorry');
    emailme(SQLERRM);
    emailme(line where erro occurs);???????
    END;
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Paula Bronfman ([email protected]):
    Hello,
    I want to know the line where the error occurs, since when I treat the exception to show a user friendly error page this erro is not logged at OAS.
    How to do it?
    Thanks in advance.
    EXCEPTION WHEN OTHERS THEN
    HTP.P('Sorry');
    emailme(SQLERRM);
    emailme(line where erro occurs);???????
    END;
    <HR></BLOCKQUOTE>
    Hi;
    your best bet would be to set a variable in the procedure every 10 lines or so, and email the contents of that var.
    begin
    mydebug:=0;
    mydebug:=10;
    when others then
    emailme(SQLERRM&#0124; &#0124;' '&#0124; &#0124;mydebug);
    end;
    Cheers
    Paulo

  • Okay so my ipod got disabled, so i had to restore it and i was wondering how to get my music from itunes to my ipod?

    okay so my ipod got disabled, so i had to restore it and i was wondering how to get my music from itunes to my ipod?

    You can sync it to your iPod by:
    To sync to your iPod go to iTunes>Help>iTunes Help>Sync your iPod.... and follow the instructions.
    You can also redownlaod iTunes purchases directly to the iPod by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I have a Verizon IPhone 4 and i can't figure out how to get my ringtones from an app to my iTunes account, it doesn't have a tab for Ringtones! I have tried unplugging it and checking if would show up but it didn't, how do you enable the ringtone folder?

    I have a verizon IPhone and i can't figure out how to get my ringtones from the app to iTunes, my account doesn't have a ringtone section in the liRingtone Folder?brary, how do you enable the ringtone folder?

    Edit > Preferences.  Select the check box for Ringtones, this will add them to the listing in iTunes. 
    Not sure that really answers your question though.

  • How to get current/present version guid from CRMD_ORDERADM_H ?

    Hi,
    Can any one tell me  how to get the current version guid value from CRMD_ORDERADM_H table for Business Object type 'BUS2000113' .
    For example for one contract if we have more than one version then how to get the latest version guid from this table?
    If I use FM ' BBP_PD_CTR_GETDETAIL'  and in version table how to know which one is the latest/current version?
    Need information for versions.
    Thanks a lot.
    Kevin.

    Hello Kevin,
           In FM  <b>' BBP_PD_CTR_GETDETAIL'</b> look at version table <b>E_VERSION</b> - Here you can check 'VERSION_' or there is another field 'CREATED_AT' - by using these you will get latest version.
    Regards,
    Shiv

  • How to get apps from iTunes to play on my computer

    how to get apps from iTunes to play on my computer

    That is correct if there is a similar application made for the computer. It will not be sold through iTunes. Either you get it from the developer's website or look for it in the App Store or look for it at MacUpdate or CNET Downloads .

  • Hi how I get the refund from the unauthorised in app purchase? I just bought the phone n had yr staff do the personal setup n end up I had been charged for the in apps purchased

    Hi how I get the refund from the unauthorised in app purchase? I just bought the phone at yr store few days ago n had yr staff do the personal setup n end up I had been charged for the in apps purchased. Pls help.

    yr store few days ago n had yr staff do the personal setup n end up I had been charged for the in apps purchased. Pls help.
    NOT at mine or anyone else's  here
    This is a User to User technical support community .There is no-one from Apple here and Apple neither read nor respond here
    Did you not work that out when you agreed to the terms of use of this community when joining today

  • Deleting running processes from Guided Procedure runtime

    Dear all,
    Does anybody know how to delete running process i.e. incomplete process from Guided Procedure runtime dashboards.  The administration workset contains archiving & deleting sections but they can only delete if a process is completed or Erronous or Terminated. 
    In need to delete a running process or incomplete process as some process instances are kicked off and left alone.
    Thanks
    -Bharath

    Hi Ramien,
    I suppose you have acces to the executionContext of GP...
    You can use the following method to get the process Id:
    String processId = executionContext.getProcessId();
    Regards
    Sundeep

  • How to get column value from DB grid

    Hi!
    I wander how to get col value from GridControl?
    My app consists of one rowsetinfo with two
    columns CODE and DESCRIPTION and a jbutton
    titled SELECT. When user clicks SELECT button
    the app should show the value of the CODE col
    of the selected row in GridControl.
    I wander how to make this action ?
    XxpsTransTimesMasterIter.setAttributeInfo( new AttributeInfo[] {
    CODEXxpsTransTimesMasterIter,
    DESCRIPTIONXxpsTransTimesMasterIter} );
    XxpsTransTimesMasterIter.setName("XxpsTransTimes");
    XxpsTransTimesMasterIter.setQueryInfo(new QueryInfo(
    "XxpsTransTimesMasterIterViewUsage",
    "lov.XxpsTransTimes",
    "CODE, DESCRIPTION",
    "XXPS_TRANS_TIMES",
    null,
    null
    ));

    Hi,
    You could attach an ActionListener on the JButton, and try the following code :
    NavigationManager fm = NavigationManager.getNavigationManager();
    DataItem dataItem = fm.getFocusedControl().getDataItem();
    ImmediateAccess col_code = null;
    String code = null;
    if (dataItem != null && dataItem instanceof RowsetAccess) {
    RowsetAccess rowset = (RowsetAccess)dataItem;
    try {
    col_code = (ImmediateAccess) rowset.getColumnItem("CODE");
    code = col_code.getValueAsString();
    } catch (DuplicateColumnException de) {
    return;
    } catch (ColumnNotFoundException ce) {
    return;
    } catch (SQLException se) {
    return;
    JTextField tf = new JtextField();
    tf.setText(code);
    I haven't tested this code.
    I am curious to know, the Object type of the dataItem.If it doesnot happen to be RowsetAccess ..try.. ScrollableRowsetAccess OR ImmediateAccess.
    Your code would change accordingly, depending on the instance.Refer to the product documentation for this.
    Do let me know, if this works.
    TIA
    Sandeep

  • How to get a value from JavaScript

    How to get return value from Java Script and catch it in c++ code. I have tried following code, but its not working in my case.
    what I want is if it returns true then call some function if it returns false then do nothing, so how to get those values in c++
    ScriptData::ScriptDataType fDataType = resultData.GetType();
    if (fDataType == kTrue)
           CAlert::InformationAlert("sucess");
           //call some function
                        else
                                  CAlert::InformationAlert("Error");
         // do nothing
    JavaScript Code:
        if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
               alert(value);
                return true;
      else
               alert ("SORRY");
               return false;

    How to get java script result into JSResult i m not getting it.
    I have wriiten follwing code in c++ :
              WideString scriptPath("\\InDesign\\Source1.jsx");
              IDFile scriptFile(scriptPath);
              InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFi le));
              if(scriptRunner)
                        ScriptRecordData arguments;
                        ScriptIDValuePair arg;
                        ScriptID aID;
                        ScriptData script(scriptFile);
                        ScriptData resultData;
                        PMString errorString;
                        KeyValuePair<ScriptID,ScriptData> ScriptIDValuePair(aID,script);
                        arguments.push_back(ScriptIDValuePair);
                        PMString paramkeyname1;
                        Utils<IScriptArgs>()->Save();
                        Utils<IScriptArgs>()->Set("paramkeyname1",scriptPath);
                        Utils<IScriptUtils>()->DispatchScriptRunner(scriptRunner,script,arguments,resultData,erro rString,kFalse);
                        Utils<IScriptArgs>()->Restore();
                        ScriptData::ScriptDataType fDataType = resultData.GetType(); // here i should get true or false which i m passing it from javascript code......not as s_boolean
                        if (fDataType == kTrue)
                                       //CAlert::InformationAlert("sucess");
                                     iOrigActionComponent->DoAction(ac, actionID, mousePoint, widget);
                        else
                                    this->PreProcess(PMString(kCstAFltAboutBoxStringKey));
    Java script code:
    function main()
           var scrpt_var;
           var scriptPath,scrptMsg;
           var frntDoc=app.documents[0];
           if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
                alert(value);
                 return true; // i want this value i should get in c++ code...How to get these values in c++
           else
              alert ("Error");
              return false; // i want this value i should get in c++ code...How to get these values in c++

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • Restored my 4S. How to get pictures back from the cloud?

    Background: I had a 3GS and on launchday of the 4S I picked one up. A white 32GB on AT&T to be exact.
    I had been having some issues with the battery, so today I figured I'd try and start fresh. Well, I backed up everything on the cloud, and I also backed up everything onto the computer in iTunes when I did the restore.
    I've got my music back. Cool.
    I've got my apps back. Great.
    I can't seem to figure out how to get my photos from the camera roll back. Nor do I know how or if it is even possible to get the photos and my old text messages back on this new restore. Also, none of my mail is coming back either.
    I can see my most recent backup in the iphone settings under iCloud. And I can also see my most recent computer backup on the computer. But I'm not sure what I need to do.
    Any help would be great. Thanks.

    OK - understood.
    There are a couple of ways of going about this. First, my recommended method:
    Restore from a backup (so your photos, SMS etc are on the phone
    Connect to iTunes
    Set the phone to sync photos to a relevant app on your desktop (what app depends whether you're Windows or Mac) - this gets your pics onto the desktop and safe.
    If you want to save SMS, use PhoneView (Mac) or TouchCopy (Windows) or similar to copy them off the phone
    Restore the phone as a new device
    Get the photos back the way you got music etc back - via iTunes sync
    The second method entails using one of the utuilities around the place that can extract from the backup - I have no experience with them, so I don't know how well they work. That's why I go for the first method - simpler, more robust.
    By the way, I came across this other method for SMS:
    http://hints.macworld.com/article.php?story=20090624022758268
    Hope this helps

  • How to get app I bought on iPad also on iPhone

    how to get app I bought on iPad also on iPhone

    Provided it is an app that works both on iphone and ipad try Downloading past purchases from the App Store, iBookstore, and iTunes Store

Maybe you are looking for

  • Can't send MMS after iOS 4.3 update on 2 different iphone 4s

    Me and my sister both own a iphone 4, we updated to 4.3 via itunes. Now we both cant send any MMS, the bar will go half way then get a ! mark saying it didnt send. -1 phone is on rogers, 1 is on telus so they are on completely different carriers! - w

  • Starting a web page

    Hello I am new to this but have been muddling through dreamweaver for a few months. I now need a bit more help. Does anyone know how to set up a web page that takes a persons name and email address before they enter the next page of the site. I want

  • IMac constant crashing

    My late 2009 IMac running OS X 10.9.1 is contantly crashing.  Sometimes the fan starts blowing and sometimes it doesn't.  Sometimes I hear clicking, sometimes not.    I will get the spinning beach ball.  It is unresponsive to quit so I have to do a h

  • How to format HDD for mixed Mac/Windows on shared USB drive

    I've been doing a lot of reading so that I can get my new Seagate 500MB USB external drive connected via my AEBS. I'll be sharing the USB with a G3 PowerMac, an iBook, two XP and one Vista Laptop. I've been able to print from all machines to my Canon

  • Not 'authorized' to play music in slideshow by itunes even though I AM

    iphoto slideshow I made last year with song I bought last year on itunes. Same slideshow already saved as Quicktime last year! BOTH refuse to play song without extra 'authorization' from itunes. So I do that and itunes tells me I am authorized 5 time