Get handle to "model" after RFC call

I need to place in httpsession the "model" (structure) returned from my RFC call.
This code does not work:
Zemployee = wdThis.wdGetGetEmployeeController().wdGetContext().nodeOutput().nodeE_Employee().currentE_ReturnElement();
How do you get a handle to the "model" following an adaptive rfc execute?
Thanks,
Kevin

Hi kevin
get this like
wdContext.currentmodeloutputelement().getmethod();
And explain you want to handle the outputelement?
Handle the outputelement means,
Determine the number of outputs
Case 1:
if single
get,
wdContext.current<BapiOutputElement>.get<attribute>
Case2:
If it is multiple rows,
using the loop,
for(int i=0;i<size of the outputnode;i++)
wdContext.node<BapiInputElement>.getElementAt(i).get<Attribute>

Similar Messages

  • Handle timeout exception in rfc call

    Dear SAP Experts,
    I have been searching for a while and could not find a satisfactory answer to my problem.
    I use SAP - CRM and call other SAP and non-SAP systems via RFC.
    I need to handle all exceptions, otherwise WEB UI displays a full page exception details, which is unacceptable on a production system.
    I have the following piece of code:
    CALL FUNCTION FUNCTION_NAME DESTINATION DEST
        EXPORTING
          S_IMPORT              = INPUT_DATA
        IMPORTING
          S_EXPORT              = OUTPUT_DATA
        EXCEPTIONS
          SYSTEM_FAILURE        = 1  MESSAGE err_msg " catch system failure
          COMMUNICATION_FAILURE = 2  MESSAGE err_msg " catch communication errors
          OTHERS                = 99.                " catch everything else
    It handles most of exceptions, however, it cannot process timeouts. Is there a way to handle timeout in ABAP RFC call? Is timeout exception uncatchable? If so is there a way around?
    Can you please suggest some solution as I am running out of ideas.
    Regards,
    Dominik

    I have found a solution. To approach this I use asynchronous function call.
    TRY.
        CALL FUNCTION ZZ_TEST_TIMEOUT' DESTINATION lv_dest STARTING NEW TASK 'TIMEOUT_TASK'
        CALLING me->callback ON END OF TASK
            EXCEPTIONS
              SYSTEM_FAILURE        = 1  MESSAGE err_msg " catch system failure
              COMMUNICATION_FAILURE = 2  MESSAGE err_msg " catch communication errors
              OTHERS                = 99.                " catch everything else
            WAIT UNTIL READY EQ 'X' UP TO 55 SECONDS.
            IF READY NE 'X'.
              RAISE EXCEPTION TYPE CX_TIMEOUT.
            ELSE.
              WRITE / 'success'.
            ENDIF.
      CATCH CX_ROOT INTO OREF.
       WRITE / 'TIMEOUT EXCEPTION'.
    ENDTRY.
    callback sets variable READY to abap_true when data is received.
    The trick is to use  UP TO 55 SECONDS. after wait, which is shorter than the server timeout. This terminates function call and gives opportunity to code your own timeout behavior.

  • Can't get the tables normally using RFC call to BC

    SAP Business Connector Developer.
    ->IDataUtil.getIDataArray function (can't work properly using RFC CALL)( I think it's the source of problem)
    I use the SAP Business Connector Developer(4.7) to get data from db2.
    and I create a JAVA service in th BC named writeData,
    the most important snippet shown below.
      // Get IDataCursor to manipulate pipeline
      IDataCursor idcPipeline = pipeline.getCursor();       
      // If the value is not an IData[], returns null.
      IData[] recordListIn = IDataUtil.getIDataArray( idcPipeline, "ORICONTENT" );
      idcPipeline.first( "CHECKEDDATE" );
      String checkedDate  = (String) idcPipeline.getValue();
      idcPipeline.first( "CPYCOD" );
      String cpycod= (String) idcPipeline.getValue();
       /* if ( recordListIn == null )
              errMsg += "No Input Data";
              recLen=0;
      }else{
            recLen= recordListIn.length;
      try{
         recLen= recordListIn.length;
      catch(Exception ed){
         errMsg += "\r\nExceptionIn: " + ed.getMessage();
         recLen=0;
      In BC, the variable recLen can get the record list length normally, but if i call the function in the SAP,
    the system throw an exception, the ed.getMessage() return value NULL.
      I think the problem which the rfc can't work properly is that the method IDataUtil.getIDataArray execute unnormal.
      I have set value to ORICONTENT(record list) in SAP, and it can return the record that i have set to the SAP System,
    and in the java service,  I have return another record list creating using the following spippet, It can work normally.
    com.wm.app.b2b.server.DBConnection db
            =new com.wm.app.b2b.server.JDBCConnection(driverString,userName,
                    userPwd);
              com.wm.util.Values ida= db.execSQL(selectSql);
              idcPipeline.insertAfter("OUTDATAREC", ida );
              db.close();
    I have tried some adjustments, but nothing can work.
    The reason That I use one jave service instead of standard flow services is I have to transfer data to more than two db2 servers, and I have to keep the consistency.
    Attached please find the SAP test page (using se37) and the java service code.
    May you kindly help me to solve this problem, I don't know the real reason, and which is very emergent, but i can't changed Priority(If I changed it ,the page is unuseful).
    Additional,I have added some code shown below,
    idcPipeline.first( "ORICONTENT" );
    java.lang.Object curObj = idcPipeline.getValue();
    if (curObj == null)
    errMsg +=" object is null ";
    else{
    errMsg +=" object isnt null ";
    try{
    recordListIn=(IData[])curObj;
    } catch(Exception ed){
    errMsg += " ExceptionOBj: " + ed.getMessage();
    recLen=0;
    In BC, everything is ok. but call the function in the sap, Show the following informatin:
    Object isnt null
    ExceptionOBj: com.wm.util.Table

    Hi, Mei Xie
    you mentioned 'In BC, everything is ok. but call the function in the sap, Show the following informatin: ....', I think the return value of RFC is null.
    have you tried to add a try catch around the RFC call, like following:
    try {
      IDataCursor idcPipeline = pipeline.getCursor();
    } catch (Exception ...)
    I'm not familiar with jave, only worked on C#, but I think try to catch the exception on RFC call is worth doing. Maybe it will descript some information around the problem.
    By the way, can you tell me which RFC/BAPI you are calling?
    I don't know what 'In BC, everything is ok.' mean. I have no experience on BC, only used dotnet connector. So can you explain how you use BC for me?
    thanks

  • Authorization Scheme - Getting handle on which object is calling the scheme

    Hi
    I'm currently trying to write a custom authorization scheme using a plsql returning boolean. What I'm wondering is whether there is a way to reference the application object (e.g. page, region, page item, button etc) that has triggered the authorization plsql to run.
    What I'm ultimately wanting to do is to create a generic authorization scheme that can be applied to any object, and that auth scheme will look up a database table containing what users can access what object. I can only do this if I know at run-time which object the plsql is currently checking authorization for. (I can get the user from :APP_USER.
    For example I have an authorization scheme "test_scheme". I have applied test_scheme to the button "CREATE" on page 1. This button has a button_id which I can find from APEX_APPLICATION_PAGE_BUTTONS view.
    During page rendering the buttons authorization scheme will be checked (and so the plsql returning boolean will be triggered). When the plsql is triggered I want to reference the fact that the CREATE button on page 1 (or better the button_id) has triggered the plsql, from within the plsql itself.
    I hope this makes sense.
    Many thanks in advance.

    Hi Scott,
    Looks like there are a few others out there encountering the limiatations of authorization schemes.
    Hopefully there will be an enhancement at some point to enable referencing the component id which has triggered the authorization scheme to run.
    Until then I will go down the route of creating an authorization scheme for each component that needs one.
    Many thanks for pointing me to that discussion.
    Jimbo

  • Import parameter is empty after an RFC call from BW to JCo

    I am calling a Java function (implemented using JCO and deployed on J2EE stack of the Portal box) from within a user-exit in BW (on a separate box) using RFC. The code in BW looks like:
    CALL FUNCTION 'Z_BW_VALIDATE_PROXY' DESTINATION 'ACF2PROXY'
        EXPORTING
            IREQUESTOR = 'AE012345'
            IREQUESTED = '012345'
        IMPORTING
            ERESULT = lv_result
        EXCEPTIONS
            SYSTEM_FAILURE = 1 message lv_rfc_mess
            COMMUNICATION_FAILURE = 2 message lv_rfc_mess.
    The following are working/setup correctly:
    1. RFC destination ACF2PROXY, in BW using transaction SM59;
    2. Java function 'Z_BW_VALIDATE_PROXY' , as the server log on the Portal(J2EE) shows the correct IMPORT and EXPORT parameters after processing a call from BW;
    The data types of the parameters in the function call above matches with those of the formal parameters in Java function where they are defined using JCO data types (export parameter is defined at CHAR 1 at both places).
    The problem is that I am not getting any value back in the IMPORT parameter 'lv_result'. I am expecting either '0' or '1' which is populated correctly in the Java function.
    Any insight is appreciated.

    The following is the code of the method in the class that inherits from JCO.Server. In this method the export parameter ERESULT is set with the value of variable 'result'. I thought it may be helpful to reporduce it here.
    protected void handleRequest(JCO.Function function) throws MMException
              if (function == null) {
                  LOGGER.logInfo("handleRequest - JCO.Function object is null.");
                   return;
              LOGGER.logDebug("handleRequest(" + function.getName() + ")");
              //process this function only, although I don't know what else would fall to this
              //server request method...
              if (function.getName().equalsIgnoreCase(ACF2Listener.ABAP_RFC_PROXY_FUNCTION)) {
                   //get input & output definitions from RFC. These are defined in the repository interface definition
                   JCO.ParameterList input = function.getImportParameterList();
                  JCO.ParameterList output = function.getExportParameterList();
                  LOGGER.logDebug("Received the following from ABAP: " + input.toString());
                  String requestor = input.getString("IREQUESTOR");
                  String requested = input.getString("IREQUESTED");
                  //call DAO to read ACF2 for these values
                  String result = null;
                  try {
                       ACF2DAO acf2 = ACF2DAO.getInstance();
                       if (acf2 != null) {
                            result = acf2.getACF2Delegation(requestor,requested);
                  catch (MMException e) {
                      LOGGER.logError("Exception occured during ACF2 DAO lookup: " + e.getMessage());
                      throw e;
                 output.setValue(result, "ERESULT");
                 LOGGER.logDebug("ACF2 Service Call returning: " + output.toString());
              else {
                   throw new JCO.AbapException("NOT_SUPPORTED","This service is not implemented by the ACF2 Proxy external server.");
    Thanks
    Sanjeev

  • Get SSO Ticket from RFC call

    Hi,
    i want to connect  to a SAP Portal Webservice with a widget, after i used the SAP Widget Foundation to execute some RFC calls.
    I wonder if there is a possiblitity to get the mysapsoo2 ticket from the SAP RFC response, which i can use than for connecting to the portal.
    Thank you very much for your help!
    Best regards
    Jochen

    Hi Jochen,
    Are you wanting to make the service call directly from the Widget? Can you use the foundation for the service call and reuse the credentials from there?
    Regards
    John

  • SAP BW User getting locked by BO RFC calls

    Hi,
    we are encountering a problem with BO RFC calls locking SAP BW users that recently changed their password in BW.
    Description of the problem in the ticket we raised at the SAP support:
    SAP BO 4.1 SP2 Patch 4, linux installation
    Backend: SAP BW 7.01 EHP8
    BICS interface with SAP authentication
    One of our users gets locked again and again in SAP BW (P19). The cause is a RFC connection that the BusinessObjects server (P59) tries to establish. The user used SAP BO last Friday for the last time and had to change his password in P19 this Tuesday. We think that there is some
    process within SAP BO still trying to connect to SAP BW from time to time, using the old password. There is no open session visible for that user in the CMC. User is even getting locked when not in the office and during night time. RFC calls are established almost regualary every hour.
    We already had this behaviour in our test-system. Restarting the BO-Server solved it. However, this is not the solution we want to use
    in the productive environment. There has to be some way to kill the process that uses the old password on the BO server without restarting
    the whole server. We do not understand why BO would still try to connect to BW with the old password - this has to be some kind of a bug.
    Meanwhile the error disappeared for the first user (some days after it started, maybe the BO process ran into a timeout). However, other users started having the same behaviour after changing their password.
    Our basis team tried to check the log files for advanced information on the conversations between BO and BW, but did not find any hints on which BO process might try to establish the connections.
    The SAP support seems to be a little helpless at the moment...
    Has anyone had similar problems?
    Regards,
    Robert

    Hi again,
    additional information: after approximately one week after the error appeared for the first time BO stops trying to establish the rfc connection for this specific user. Almost as if the "old-password-BO-process" ran into a 1 week timeout or something like that.
    The problem is really strange. The SAP support is still not able to tell us how the gather the information they require.
    Regards,
    Robert

  • I have an ipone 4 32gb model no. mc605za. it gets hanged while receiving or making calls. internet and messaging or working properly

    i have iphone 4 32gb. the internet and messaging and other application are working properly but while making or receiving calls it gets hanged.the model no is MC605ZA.

    Have you taken the basic troubleshooting steps recommended in the User Guide? 
    What happened after you took those steps?
    What exactly have you done thus far to troubleshoot?

  • After I've upgraded my iPhone iOS to 5.0.1, I got problems with connectivity. If my iPhone lose network, then it gets frozzen and I cannot make calls. After restart the telephone still does not work.

    After I've upgraded my iPhone iOS to 5.0.1, I got problems with connectivity. If my iPhone lose network, then it gets frozzen and I cannot make calls. After restart the telephone still does not work.

    1. Download the iOS 5.0.1: http://www.tobias-hartmann.net/2011/11/download-ios-5-0-1-veroffentlicht-direkte -downloadlinks/
    2. open itunes,Click in iTunes while holding down the Shift key (on Windows) or Alt key (Mac) to restore and firmware

  • I'm new to Mac and the program/all called Numbers. I'm trying to use both Average and small in the same formula. What's I'm trying to do is take 20 cells, find the 10 lowest numbers, then get the average and after that multiply it by .96

    I'm new to Mac and the program/all called Numbers. I'm trying to use both Average and small in the same formula. What's I'm trying to do is take 20 cells in a column,  find the 10 lowest numbers, then get the average and after that multiply it by .96  I used to use Excel and the formula worked fine in that. Here is my Formula
    =(average(small(H201:H220,{1,2,3,4,5,6,7,8,9,10})))*.96
    This formula worked in Excel and when I converted my spreadsheet over to Numbers, this formula no longer works.
    The best that I have been able to do so far is use small in 10 different cells, then get the average of the 10 cells and finally multiply that average by .96  So instead of using 1 cell, I'm using 12 cells to get my answer.
    This is a formula that I will be using all the time. The next cell would be =(average(small(H202:H221,{1,2,3,4,5,6,7,8,9,10})))*.96
    Hoping I explain myself well enough and that someone can help me.
    Thanks

    You can still do it in one cell but it will be more unruly than the Excel array formula.
    =average(small(H201:H220,1),small(H201:H220,2),small(H201:H220,3),...,small(H201:H220,10))*0.96
    where you would, of course, replace the "..." with the remaining six SMALL functions.

  • It is possible to get a response of a asynchronous RFC call thru wait loop

    Hi Experts,
    The requirement is that i queue up all the requests from a web services ( One queue per plant for example) which i set in the HTTP sender URL ( i mean the queue name ). and i am posting the records thru a RFC call.
    1. Let the RFC call be synchronous and in case the R/3 system is done.. Will the XI queue keep the Call and keep on retrying it till the R/3 system is up.
    2. Otherwise if the RFC call be asynchronous, is it possible to introduce a wait loop in BPM to listen to the RFC till i get some response ( i think this is not possible).
    Need your suggestion on the same...
    The requirement demands that no single request from the web service should be lost.. in case of failure of R/3 they should be queued up and re tried.. Forget about the error because of exception in RFC this will be taken care manually..
    Thanks for your response in advance.

    Hi Rajesh,
    you can queue and restart only asynchronous messages. I think you can build a Business Process, where you repeat sending a message til you have success or maximum number of tries is reached. But no good idea, coz you will get timeout at HTTP sender. Aynchronous messages dont have a response.
    May be, XI can solve your task in the standard: In transaction SMQR you can just configure what you describe. All asynchronous messages will be queued and restartet in case of receiver not reachable. You can configure no of retries and intervall between.
    Regards,
    Udo

  • I have iPad air, screen freezes after FaceTime call and cannot get back to home screen, have to power down and turn back on to get back to home screen.  What am I doing wrong?

    I have iPad air, screen freezes after FaceTime call and cannot get back to home screen, have to power down and turn back on to get back to home screen.  What am I doing wrong?

    Hi RWD2,
    Welcome to the Support Communities!
    To resolve your issue with Facetime freezing when you end a call, I would try the first three steps in the article below. 
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    Resolution
    If a single application is not responding or stops responding when it opens, you can force it to close.
    If the device is unresponsive or if certain controls aren't working as expected, restart your device.
    If the device remains unresponsive or does not turn on (or power on), reset your device.
    If you are using Wi-Fi, it may be helpful to try these troubleshooting steps as well:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/TS1398?viewlocale=en_US
    Reset network settings by tapping Settings > General > Reset > Reset Network Settings.
    Note: This will reset all network settings including previously connected Wi-Fi networks and passwords
    iOS and OS X: Recommended settings for Wi-Fi routers and access points
    http://support.apple.com/kb/HT4199
    I hope this information helps ....
    Have a great day!
    - Judy

  • Prevent a dump after a RFC call

    Hello.
    I created a function group wich is used in a program through a RFC call.
    I'm trying to prevent a dump of the program, in case the RFC can't reach his destination for example.
    How can i do that ? Is it in the exception of the function or do you have other solutions ?
    Thanks for the help.

    Hi helder,
    1. we have to manually add the code/lines
      for exceptions, almost in all RFC calls.
    <b>(THEN IT WON'T GIVE RUN TIME ERROR)</b>
    2.
    EXCEPTIONS
    SYSTEM_FAILURE  = 1
    COMMUNICATION_FAILURE  = 2
    3 just copy paste
    report abc.
    CALL FUNCTION 'GUI_RUN' DESTINATION 'ABC'
      EXPORTING
        COMMAND          = 'XYZ'
      PARAMETER        =
      CD               =
    IMPORTING
      RETURNCODE       =
    EXCEPTIONS
    SYSTEM_FAILURE  = 1
    COMMUNICATION_FAILURE  = 2
    regards,
    amit m.

  • RFC calls with SAP table insert - lock tables

    Hi,
    I have an external server program, which is calling a rfc function many times the same time with different transaction types. There are transaction types, which are downloading information from SAP (only send data back to the caller), and there are transaction types which are uploading data to SAP (inserting/updating data on SAP).
    The function calls are synchronous as the server needs to get feedback directly. The parallel work processes for RFC calls are limited, so a system overload can´t happen.
    The problem now is, if the server is down for while and going to be restarted, it´s opening parallel threads and calls the function in SAP at nearly the same time. That means, it will call the function with upload requests (table must be locked), and download requests the same time.
    In the upload requests, the table has to be locked, that it can´t occur that we get wrong entries...
    I can only enqueue the table with just two fields... I know, that is almost like locking the whole table, but it´s not possible to lock it in a different way.
    I tried to use the enqueue function with the parameter WAIT, but it didn´t help, as there where too many parallel calls and after some seconds, they were ending up with an error (Because the table has been locked by another call).
    It seems that it´s trying to lock the table again for all parallel calls at exactly the same time....
    The calls has to be synchronous, as the server needs to get the feedback directly. Any ideas how top solve this, that it handles all incoming calls parallel and waits for the table is unlocked again?
    Thank you for your help!

    Hi,
    thank you for your answer!
    I have investigated something new yesterday:
    I thought at the beginning, that the problem just occurs, when the system work processes are reached. The system has for example set up 15 dialog processes and the external server is calling the function 20 times in parallel. Then we normally need 5 dialog processes more. The system is taking then all 15 dialog processes and the locks got stucked.
    That means, that I´ll maybe only get 4 or 5 uploads, which have really been updated the tables. All the others couldn´t get the table locked for their process.
    But if I now let the server call the function just about 13 times in parallel, nearly all uploads have been updated the table!
    From my point of view, the lock from SAP gets stucked, when the limit of dialog processes is reached. It´s not working in the right way anymore...
    The same is happening, when you set up in the system, that only 10 work proecesses can be used by RFC. If I have more than 10, it´s going to be critical with the locks....
    WEIRD!
    Can anybody help me out of trouble?
    Thank you!

  • RFC call failed: JCO.Server could not find server function 'SET_SLD_DATA'

    Hi, All
    the system is PI 7.0 EHP1 oraclei Win2003 server, I configured SLD but I run RZ70, having error "RFC call failed: JCO.Server could not find server function 'SET_SLD_DATA' ". I know there are lot of tread about this error, but none of themsolve my problem. all JCO, RFC connections and SDL DATA supplier(VA) seem OK. error message in SM21 is "Could not send SLD data"
    detail from SM21
    The system could not send the data that has been collected automatical
    for the System Landscape Directory (SLD). Check whether the gateway
    configured in transaction RZ70 has been started and whether the SLD
    bridge has been registered with this gateway.
    You can use transaction SM59 to check this in the sending system for t
    implemented RFC destinations. The RFC destinations have the standard
    names "SLD_UC" for Unicode sending systems and "SLD_NUC" for non-Unico
    sending systems. If a different RFC destination has been entered in
    RZ70, check this destination instead.
    You can use the Gateway Monitor to check the target gateways. In ABAP
    systems, this monitor is started with transaction SMGW, or you can use
    the external SAP program "gwmon". Check whether the specified gateway
    has an active registration.
    OF COURSE I checked  RFC of  SLD_UC and SMGW
    any different ideas
    Regards
    ABH

    Hi
    Please check the following notes are implemented
    Note 906454                           
    Note 907729
    You may be aware but if you are not --->RZ70 creates the required SLD* RFCs during runtime - therefore if you have defined these RFCs manually first using the same namespace you can get RFC conflicts which result in a failed submission    
    Please also check the user in the RFC is known to both systems and has required authorization to write to SLD
    Generally with SLD you have to install or select a suitable gateway to handle incoming data supply traffic
    Also the gateway you are using has be known to SLD and reflected in RZ70 - i.e these defintions have to be the same
    It is also recommended to delete all references to SLD_* RFCs in data supplier and target SLD
    after a failed submission attempt to allow RZ70 to recreate these consistently once the above has been checked
    Best wishes
    Stuart

Maybe you are looking for

  • HT3382 using the thunderbolt to vga adapter, i have to unplug and replug the connection to get my display to "wake up"  what's the deal?

    using the thnderbolt to vga adapter, I have to unplug and replug the connection to get my disply to "wake up"  What's the deal?  otherwise works fine. Same on initial boot up

  • Wireless Keyboard Battery Level Not Changing?

    Hi, I have got a new iMAC machine 21.5" , almost 6 weeks since. I am a regular user. The machine has Mountain Lion OS 10.8.2. In System Preferences, I can see the Battery level for Blue tooth mouse dropping to 57%, but the keyboard has been showing 1

  • How enable a disabled ipod to another pc

    my ipod is dasbled well my other one how do i fix it it was connected to another computer and i tunes now that other computer is broken and i am trying to get itworking and it has a passcode on it and it is not allowing me to do anything wth it ?? he

  • PO Based Downpayment

    Hi Gurus, If we make PO based downpayment of Rs 100000 to a vendor. There is an invoice related to this PO of 40000 and there is one invoice related other PO of 30000. So, While running APP, system should block payment for 40000 and should make payme

  • Automatically labeling plot legend using XY Graphs?

    I want to plot: Time Amp 1       2 2       4 3       9 How do I get the legend to automatically say Amp, instead of Plot 0? I went to property node -> legend and I don't see any option that would read the "column" header and label the legend accordin