RFC Call through BSP - Issue with RFC logon credentials

Hi everyone,
I have an BSP application running on a 6.40 which calls a RFC function module on a backend system (4.6c) using a trusted RFC connection.
The BSP is started with an URL which contains in encoded form the username and password. So we don't use the standard sap-username & sap-password.
In the first step the user is logged in with the anonym user (user type 'service') which is entered in the SICF. So sy-uname = 'anonym'.
After a couple of checks and verifications the BSP makes a user switch using 'SUSR_INTERNET_USERSWITCH'. Exporting parameters are the now decoded values from the URL. So after the switch sy-uname is e.g.  'blabla'.
Now a function module on the backend system is called. What I would now expect is that on the backend system sy-uname is also 'blabla'. But it isn't. The sy-uname is still 'anonym', which isn't very helpful regarding object authority checks.
Only after an reload of the BSP page and a second RFC call of the function module the sy-uname = 'blabla'.
I wonder what causes this problem?
Thanks for your replies & regards
Kruno

Hi,
I solved it.
Before I execute function 'SUSR_INTERNET_USERSWITCH' I first check if user has a valid backend account by using function module 'BAPI_USER_EXISTENCE_CHECK'.
And this is the problem. When 'BAPI_USER_EXISTENCE_CHECK' is executed once all other RFC function calls to the backend get the wrong user.
Why? I don't know yet. Maybe I will get an useful anwer from an OSS note.

Similar Messages

  • RFC Call through BSP

    Hi ,
               Can we do a RFC call from a  system having WAS to another R/3 system not having WAS installed.
    Regards,
    Divyanshu

    Hi Divyanshu
    here is the code for RFC. Its the same as calling a  function module. You have to just specify the RFC destination name here it is 'ABC'. RFC destination you can create thru SM59
    CALL FUNCTION 'ZTM_TI_CREATE' destination 'ABC'
    EXPORTING
    STARTDATE = strtripbegin
    STARTTIME = strstarttime
    ENDDATE = strtripend
    ENDTIME = strendtime
    FIRSTDEST = watidisp-arrival
    COUNTRY = strcountry1
    REASON = strreason
    CASHADVANCE = strcashadvance
    CASHCURR = 'INR'
    BANKADVANCE = strbankadvance
    BANKCURR = 'INR'
    EMPLNO = employeeno
    IMPORTING
    REINR = watripno
    TABLES
    MESSTAB =
    ADDDEST = adddest
    Regards
    Naresh

  • UPGRADE : RFC call to subst_save_upgeval_db failed with key UPDATE_ERROR

    Hello.
    We are upgrading our NW 7.01 to NW 7.3 ABAP.
    In Postprocessing phase MAIN_POSTP/CREATE_UPGEVAL we encounter the following error:
    ERROR: RFC of "subst_save_upgeval_db" failed
    key: ERROR UPDATE
    message: EXCEPTION UPDATE_ERROR RAISED
    Here is the troubleshooting ticket:
    This trouble ticket was created by SAPup on 20111125120155
    SAPup broke during phase CREATE_UPGEVAL in module MAIN_POSTP / Post Processing
    Error Message: RFC call to subst_save_upgeval_db failed with key UPDATE_ERROR (UPDATE_ERROR): EXCEPTION UPDATE_ERROR RAISED
    Summary of SAPup:
    SAPehpi Release:        lmt_002
    SAPehpi Version:        SAPup release lmt_002 version 41.001
    Start Release:          701
    Target Release:         730
    Summary of host system details:
    SID:                    TA1
    Host:                   sapta1
    MS Host:                sapta1
    GW Host:                sapta1
    Start Path:             /usr/sap/TA1/DVEBMGS02/exe
    Kernel Path:            /usr/sap/TA1/DVEBMGS02/exe
    Summary of operating system details:
    OS Type:                Linux X86_64
    OS Version:             2.5
    Summary of database details:
    Database Type:          ora
    Database Version:       11.2.0.2.0
    Summary of RFC details:
    Host:                   sapta1
    GW Host:                sapta1
    Client:                 000
    Destination:            TA1
    Language:
    System No.:             02
    here is the PHASES.LOG:
    1 ETQ201 Entering upgrade-phase "CREATE_UPGEVAL" ("20111125120352")
    4 ETQ399 Set environment for standard connect:
    2 ETQ367 Connect variables are set for standard instance access
    4 ETQ399 System-nr = '02', GwService = 'sapgw02'
    4 ETQ399 Environment variables:
    4 ETQ399   dbs_ora_schema=SAPSR3
    4 ETQ399   auth_shadow_upgrade=0
    1 ETQ200 Executing actual phase 'MAIN_POSTP/CREATE_UPGEVAL'.
    1 ETQ399 Phase arguments:
    2 ETQ399 Arg[0] = 'STORE_DB'
    4 ETQ359 RFC Login to: System="TA1", Nr="02", GwHost="sapta1", GwService="sapgw02"
    4 ETQ232 RFC Login succeeded
    Do you have anu ideas ?

    Here is the dev_rd log:
    Fri Nov 25 14:07:04 2011
    ***LOG S23=> GwIDisconnectClient, client disconnected (020) [gwxxrd.c     10423]
    ***LOG S74=> GwIDisconnectClient, client disconnected ( sapta1) [gwxxrd.c     10434]
    ***LOG S0R=> GwIDisconnectClient, client disconnected () [gwxxrd.c     10451]
    ***LOG S0I=> GwIDisconnectClient, client disconnected ( SAPCPIC) [gwxxrd.c     10464]
    LOCATION    SAP-Gateway on host sapta1.sap.fr.alten.com / sapgw02
    ERROR       connection to partner 'localhost.localdomain:0' broken
    TIME        Fri Nov 25 14:07:04 2011
    RELEASE     720
    COMPONENT   NI (network interface)
    VERSION     40
    RC          -6
    MODULE      nixxi.cpp
    LINE        4850
    DETAIL      NiIRead: 127.0.0.1:0
    SYSTEM CALL recv
    COUNTER     58

  • Multiple (parallel) RFC Calls through  one connection?

    Hi SAP gurus,
    Is there a possibility for parallel RFC calls through one open connection via one SAP system user?
    As I know when calling RFCs it opens a new session and the dialog users have only 6 sessions permitted.
    Do you know any possible solution for this?
    Thanks a lot in advance

    Is this question about the SAP StreamWork APIs. I think you have posted to the wrong forum.

  • So, about a week ago my macbook pro started having lots of issues: wifi connectivity, slow performance, sound issues, spotlight wasn't working. After going through the issues with apple support, they decided the best course of action was to erase it...

    So, about a week ago my macbook pro started having lots of issues: wifi connectivity, slow performance, sound issues, spotlight wasn't working. After going through the issues with apple support, they decided the best course of action was to erase the hard drive and do a reinstall. Since I have a recent backup this seemed like a good enough option. They were kind enough to send me a copy of the snow leopard disk to do the install since we couldn't get it to complete through the disk utility. Not sure why, since it says we are fully connected, it just never completed.
    Anyway, so now that you have the background here is the new issue. The macbook pro keeps spitting out the disk I'm trying to install from. Disk utility and using the 'Startup Disk' function from the apple menu doesn't read the disk.
    Can anyone suggest a solution to this vexing problem?
    Thanks in advance.

    Jeremy.Laurin,
    have you tried agb76’s approach here?

  • RFC Call from BSP Page

    Hello All,
    I have a standard SAP BSP application(which is statefull, but does not have a script for handling WINDOW closing EVENT , for removing the orphaned sessions, also I cannot add that code now as it's standard).
    In one of the bas page I'm calling an RFC function module to a second R/3 system.
    When I call the RFC and after doing some processing if I close the application( Please note that underlying session is still active), I still can see the RFC Login in 2nd system.
    Is there any way to remove the RFC connection immediately after the RFC call? so that there is no persistent RFC connection, and a connection will be established only on demand.
    Regards
    Geogy

    Hi Geogy,
    Please use the FM "RFC_CONNECTION_CLOSE" after the corresponding RFC call with the same destination.
    This will close the connection opened by the previous call.
    Thanks
    Madhan

  • Calling a BSP page with flow logic from LAYOUT

    Hello all.  I am developing a BSP transaction to update HR data on SAP.  I initially developed this with one 'page with flow logic' and several 'page fragment's.  It has been suggested that I break this out into several pages with flow logic because the code in  the 'OnInputProcessing' Event Handler was getting quite complicated.  I was using the BSP directive to execute my 'page fragments'.  This was very simple to do.  What do I replace the BSP directive to call a page fragment with in order to call a page with flow logic.  I have included the code below.  I have converted the 'body.htm' 'page fragment' to a 'page with flow logic' and I am not sure of the correct way to call the page.  I do not have access to the navigation->goto_page( 'body.htm' ) at this point.  I am new to BSP and appreciate any help offered.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%@extension name="phtmlb" prefix="phtmlb" %>
    <%@extension name="xhtmlb" prefix="xhtmlb" %>
    <htmlb:content id     = "content"
                   design = "design2002+design2003" >
      <htmlb:document disableBackspaceNavigation="TRUE" >
        <htmlb:documentHead title="ESS: Employee Self Service" >
        </htmlb:documentHead>
        <htmlb:documentBody>
          <htmlb:form id="OOEform" >
            <%-- Positioning --%>
            <htmlb:gridLayout columnSize = "2"
                              rowSize    = "2"
                              width      = "100 %" >
              <%-- Row 1 - Header --%>
              <htmlb:gridLayoutCell columnIndex       = "1"
                                    rowIndex          = "1"
                                    colSpan           = "2"
                                    width             = "100 %"
                                    verticalAlignment = "MIDDLE" >
                <DIV style="border-bottom-style:solid;border-color:#A5B1BF;border-width:20px">
                <%@include file="header.htm" %>
                </DIV>
              </htmlb:gridLayoutCell>
              <%-- Row 2; Column 1 (Body Area) --%>
              <htmlb:gridLayoutCell columnIndex       = "1"
                                    rowIndex          = "2"
                                    width             = "80%"
                                    verticalAlignment = "MIDDLE" >
                <%@include file="body.htm" %>
              </htmlb:gridLayoutCell>
              <%-- Row 2; Column 2 (Right Area) --%>
              <htmlb:gridLayoutCell columnIndex         = "2"
                                    rowIndex            = "2"
                                    width               = "20%"
                                    verticalAlignment   = "TOP"
                                    horizontalAlignment = "LEFT" >
                <%@include file="right.htm" %>
              </htmlb:gridLayoutCell>
            </htmlb:gridLayout>
          </htmlb:form>
        </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>

    Hi,
    uhmmm, as it was previously suggested, you should perhaps think about MVC for your development. Working with classes and methods gives you more room for a better looking code. But at this point I´m not sure where your real problem is. You mentioned first that you created one page with logic and several page fragments and then you are worried because the code in the OnInputProcessing event is getting out of control
    First, you cannot insert a page in a page. You can only insert fragments in a page with <%@include file="header.htm" %>.
    Second, if you don´t have idea of MVC or you don´t want to switch to MVC, then create a modules program (SE38) where you´ll enter your code as subroutines and you call these subroutines from OnInputProcessing as follows:
    perform subrout1 in program XXXXXX tables YYYYY using AAAAA.
    In your programm XXXXX you declare the code as:
    form subrout1 in program XXXXXX tables YYYYY using AAAAA.
    This can be a substitute to classes and methods.

  • Calling a BSP application with MVC and send one start value

    Hi,
    I developed a BSP application with BSP. The application has a start page with one input field. The user gives a number and click the send button. The controller creates the modeler and gives the userinput as start parameter for the data search. After the data are read/found, the controller calls a view to show the data.
    This is very easy and does work.
    I have to call this simply application from another one: the caller application sends the start value.
    I don't know, if is better to send the start value in the URL or not. I tried it, but the controller cannot read it.
    How can I call the controller with a start value?
    Thank you!
    Bye
    Patrizia

    Hi ,
    what you need to do is
    1) for the "Send" button attach a java script.
    <htmlb:button id="myButton" text="Submit ...." onClick="sendRequestWrapper()"/>
    this javascript should take the inputfrom the field,
    then in the javascript create the URL.
    function sendReqeustWrapper(){
    sendRequest(InputField);
    function sendRequest(InputField)
    var URL;
    URL  = window.location.protocol + "//" ;
    URL += window.location.host ;
    <b>Note: its only Example link,</b>
    URL += "/sap/bc/bsp/sap/<BSPApplication>/controller.do";
    URL +="?InputFieldName=";
    URL +=InputFieldValue;
    <b>then use</b>
    Your URL will look like:
    http://ld0507.wdf.sap.corp:50007/sap/bc/bsp/sap/<bsp appl>/controller.do?InputFieldName=XXXXX
    window.open(URL,"_self","");
    so once this URL is triggered  you need to goto the respective controller and handle the input. You can see the reply from Mr. Akshaya Rao .
    regards,
    Vijaya Kumar M.
    Message was edited by: Vijaya Kumar

  • Rfc call within bsp

    Hi,
    in my bsp page i call an RFC fm thus:
      CALL FUNCTION 'Z_VLB_RFC_SAP_EXTERNAL'
        EXPORTING
          z_vlb_rfc_rpta = wa_rfc_rpta
        IMPORTING
          return         = l_return.
      IF sy-subrc = 0.
    if everything has gone OK display a message to the user
        wa_zevlb_messages-message = 'Data sent correctly to external application'.
        wa_zevlb_messages-message_type = 'OK'.
            output = wa_solic_clean_i-solicitud.
      ENDIF.
    The problem is that when i try to debugg, after the call to the rfc fm
    the flow of the program doesn´t pass through the "IF sy-subrc = 0.".
    why is this happenning?
    is it because when calling the fm i´m openning a new LUW
    or something like this?
    Best regards.

    pablo,
    Specify your Destination in your function module,
    for ex..
    CALL FUNCTION 'Z_VLB_RFC_SAP_EXTERNAL' DESTINATION NULL
    Rgds,
    Jothi.P

  • RFC call through BPM

    Hi,
    Iam trying to build a scenario like this. WMQSeries->XI 3.0->SAP R/3--->WMQSeries.
    Can someone please tell me whether my approach is right or wrong.And the steps iam missing.WMQ>XIBPM>R/3>XIBPM>WMQ.
    Totally created 5 interfaces.
    MQ Request -->Refering to MQ Request Message Type
    MQ Response -->Refering to MQ Response Message Type
    BAPI_SYNC_ABS -->Refering BApI Request and Response
    BAPI_REQUEST_ABS -->Refering BAPI Request
    BAPI_RESPONSE_ABS.-->Refering BAPI response.Last 3 Abstract Interfaces created from the BAPI imported to XI.
    Created 2 Interface Mapping Between   MQ Request <> BAPI_REQUEST_ABS and BAPI_RESPONSE_ABS<>MQ Response.
    Created Integration Process with 3 steps(Async Receive, Syc Send to SAP, Asyc Send to WMQ) and
    created 2 container elements for hoding BAPI_REQUEST_ABS and BAPI_RESPONSE_ABS.
    In ID, created 2 service's of type business service one for sending&receiver of MQ Request&Response and second one for SAP system.
    Created 3 ReceiverDeterminations,3 Interface dterminations, 1 Sender Agreement and 2 Receiver Agreements.
    When i send the message from WQ, it goes through BPM well, after that iam getting error in Receiver determination.
    Can anyone please tell me when am doin worng??? I did go through the weblog /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    Navin

    Hi,
    we have the same requirment and run into the same problem.
    We stuck at the point where the response message from the
    RFC has to send back to MQ.
    It must link the conversation ID to the Response message.
    There we need the possibility to set the ConversationID
    into the response message. The ConversationID is taken
    from the Request Message.
    The problem is how to set the field ConversationID or
    RefToMsgID in the Mapping or BPM. Could it be done via
    Java or ABAP-Maping?
    Is the header field only readable and can not be set
    in the mapping? Maybe somebody have ane idea or a solution.
    thanks,
    Ly-Na Phu

  • Debug RFC called from external system with no dialog user

    Hi all,
    We need to debug the rfc function module which is called from the external system( Siebel ) .
    The user id is not dialog user so can not set external debugger.
    Need you help.
    Thanks,
    Anmol.

    Hi Suhas,
    Nice to know you became Moderator...
    Hmmm the solution you provided was the last option..
    Any ways the issue is resolved we changed the user to dialog user and then debugged the code.
    Thanks a Lot,
    Anmol.

  • RFC call through JCo or webservice

    Can anybody point differences(advantages/disadvantages) between a)calling a BAPI using JCo b)creating a web service for the RFC and calling the webservice fron WD application.
    regards,
    Bhupesh

    Hi Bhupesh,
               Jco is written in java and it convert the java calls into the native ABAP calls ..so comunication is done between a java program and r/3 system through the JCo.....if the BAPI is exposed as a webservice ..then the processing language use is XML and SOAP protocol any language which can create and process XML can communication to BAPI(r/3) system...like java,dotnet etc....else u need a middleware like JCO which can convert java calls to abap calls  for that language ...and now a days ....XML is commanly used by most of the Internet technologies...
    hope this will clear ur doubt.
    Regards,
    yash

  • Password inconsistancy issue with RFC users in ECC 6.0 System after upgrade

    Hi,
    We have upgraded the system from 4.7 to ECC 6.0, but facing the password inconsistancy problem for RFC users. We have set the parameters like "login/min_password_lng" as "8" and "login/password_downwards_compatibility" as "3" & RFC user Type is "system". Could you please suggest how to resolve the password inconsistancy issue.

    Hi Chandan,
    you need to run the txn. SECSTORE and there it will shows you all the RFCs that have inconsistent passwords. Please maintain the correct passwords there.
    In case the existing passwords are no longer acceptable due to new security policies as per the new SAP version, you will have to change the password from SU01.
    Regards,
    Shitij

  • SAP PI Issue with RFC Receiver Adapter

    Hello,
    Iam using File-RFC scenario, where every thing executed fine, but in ECC iam unable to get the DATA coming from PI, Iam using Z RFC to insert data to a Z table.
    I did'nt any errors in PI, is there any option to find the output data at receiver adapter where iam using RFC adapter.
    Kindly Help,
    Thanks in Advance,
    Ravi.

    Yes. If you enable the logging you should be able to see the post mapping xml.
    Message Staging and Logging Options in Advanced Adapter Engine of PI 7.3x
    Scenario specific message staging and logging in PI 7.31 AAE
    Did you debug the RFC with test data? were you able to insert something?

  • Mapping Exception Issue with RFC LookUp

    Hi,
    My scenario is Idoc To file, in my idoc user who created a purchase order filed is not there but in xml file i want the user who create that PO, for this i am using RFC LooUp. I want the user who created a purchase order.
    Graphical Mapping looks like below.
    Belnr-->User Defined Function--
    >UserName
    Please find the code bloew:
    String DBTABLE = "EKKO";
    String lookUpField = "ERNAM";
    String WHERE_CLAUSE = " EBELN "" = "" ' "a" ' " ;
    JCO.Repository mRepository;
    JCO.Client mConnection = JCO.createClient(
                   "500",
                    "RFCUSER",
                   "abc1234",
                   "EN",
                   "cxylo06",
                   "05");
    // connect to SAP
    mConnection.connect();
    // create repository
    mRepository = new JCO.Repository( "GenericRFCMappingLookup", mConnection );
    // create function template to select data from any table
    JCO.Function function = null;
    IFunctionTemplate ft = mRepository.getFunctionTemplate("RFC_READ_TABLE");
    function = ft.getFunction();
    // Obtain parameter list for function
    JCO.ParameterList input = function.getImportParameterList();
    // Pass function parameters
    // set import parameters table name and RFC
    input.setValue( DBTABLE, "QUERY_TABLE");
    input.setValue( "," , "DELIMITER");
    //Fill the where clause of the table
    JCO.ParameterList tabInput = function.getTableParameterList();
    JCO.Table inputTable = tabInput.getTable("OPTIONS");
    inputTable.appendRow();
    inputTable.setValue(WHERE_CLAUSE,"TEXT");
    mConnection.execute( function );
    //Find the position of the field that has to be lookedUp
    JCO.Table lookupFieldPos = function.getTableParameterList().getTable("FIELDS");
    int pos = -1;
    for (int i = 0; i < lookupFieldPos.getNumRows(); i++)
              lookupFieldPos.setRow(i);
              if (lookupFieldPos.getString("FIELDNAME").equals(lookUpField))
              pos = i;
    //Get the exact lookupvalue from the position obtained above
    JCO.Table valueSet = function.getTableParameterList().getTable("DATA");
    valueSet.setRow(0);
    String resultSet = valueSet.getString("WA");
    result.addValue(resultSet);
    mConnection.disconnect();
    I am not aware of java coding so kindly make necessary  modifications.
    Kindly suggest what changes i need to do to execute perfectly.
    Your help will be greatly apprecited.
    Regards,
    Venkat

    Hi Venkat,
         If you use the JCO connection to get the value from RFC, it would be a problem in futherly like when you move this interface DEV to Q, then you need to change the connection parameters to establish the JCO connection.Same in Production environment too.It is not advisable to do JCO lookup. Go for RFC lookup as the link given by Farooq.
    Create Reciever RFC communication channel and take the XML signature of u r RFC by importing that RFC under imported objects.Create an UDF, for this see the sample code which is exisitng in document to pass the Export parameter to RFC.
    In this way u r RFC channel establish the connection to R3 and your RFC will execute and return the value.U just need to change the Reciever RFC channel parameters respective of environment.
    Cheers
    Veera

Maybe you are looking for

  • Background Scheduling of Maintenance order for Calibration.

    Dear Experts, I want to scheule my calibration order in QM for calibration of Test Equipment in background. I have created my maintenance order for calibration of Gauges / Instruments (which are defined as Equipments). The dates for the calibration h

  • ICloud Photostream Mac vs PC

    So, in setting up iCloud Photostream synchronization on my Mac and PC, Mac requires iPhoto to sync.  My ultimate goal is to auto-download the pictures that I take on my iPhone without intervention.  On the PC, my photos automatically download to a fo

  • Line number in Classical Report

    Hi All, How to get current line number in Classical Report? i want to show that in my o/p. regards, Anuj

  • Use of Oracle pump utility as equivalence of SQL bcp utility??

    can anyone throw any pointers to how to use Oracle pump utility as equivalence of SQL bcp utility??

  • BDC For VK11

    Hi All, I got a requirement to upload Condition records through trnx VK11 , but I have one doubt , how can we handle the radio buttons  ( Table ) dyamically for every Condition type??? Ex : for condition type 'X' it has choose the table '111' and for