Sending response back to RFC in UDF

Hi All,
I have a Sync scenario from RFC to SOAP. I want to check the line items in RFC request. If there are no line items , then i want to stop the scenario and use UDF to send the constant (Invalid line items based on validations) back to RFC responce by using RFC lookup.
Is it possible to send response back to RFC in UDF?
Please suggest me, i want to handle exceptions without BPM.
Thanks and regards
Uma

hi,
>>Is it possible to send response back to RFC in UDF?
I don't think such an option exists in standard
but maybe you can do the check in the RFC much faster instead os checking
this in XI ?
Regards,
Michal Krawczyk

Similar Messages

  • Sending response back

    Hi
    I’m getting message from source system (MQ) for   which I need to validate the header details and mandatory field information in XI, if success then send to SAP system through proxy otherwise send the response back to MQ system with batch number or some mandatory fields missing information.
    Client not agrees to send this information through alert want to send response to MQ system only.
    Please suggest good design option for sending response back. Can we achive this through acknowledgement or how? Please provide suggestive document on the approach suggesting would be grateful
    Thanks,
    Srini

    Hi,
    See you can use two target messages , in mapping , handle the condition and route the message , in determination use interface mapping.
    see the below links also
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html
    Regards
    Chilla

  • Sync-Sync Scenario.. To Send Response back to Sender.

    Hi All,
    I got a scenario to send the data to BI through proxy and get the response back to PI and pass it to sender system.
    Request:
    Store system Sync call(Soap)>PI->Sync call(ABAP proxy)>BI
    Response:
    BI(response to Sync call)>PI>Store system.
    The response has to go back to sender system with in few seconds. So I need to priotirize this scenario separately in both Integration and Adapter engine. This scenario should not collide with any other scenarios as the response has to deliver ASAP.
    Can we acheive this? Is there any better method to deal with this kind of scenario in terms of performance? Kindly suggest your ideas.
    Thanks
    Deepthi

    i conused why are you using BPM for this, any way SOAP adapter,ABAP proxy supports sync calls . dont required BPM.
    Yes. Now I decided to go without BPM.  I'm getting the below error from the proxy. Any idea about this error?
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIProxy</SAP:Category>
      <SAP:Code area="ABAP">DYNAMIC_CALL_FAILURE</SAP:Code>
      <SAP:P1>UNCAUGHT_EXCEPTION</SAP:P1>
      <SAP:P2>ZPI_CL_MI_BAPI_SYNC1</SAP:P2>
      <SAP:P3>EXECUTE_SYNCHRONOUS</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error during proxy processing An exception with the type CX_SY_DYN_CALL_PARAM_NOT_FOUND occurred, but was neither handled locally, nor declared in a RAISING clause Call of the function BAPI_COMPANY_GETDETAIL failed; the formal parameter COMPANY_DETAIL does not exist</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>

  • RFC- XI -SOAP and response back to RFC

    Hi,
    I am doing RFC-XI-SOAP and get response back from SOAP to RFC.
    if I am not check the "Do Not Use SOAP Envelop" then it gives error in SXMB_MONI says  - NO SOAP envelop.
    "No SOAP Envelope but 1 {}RESPONSES; HTTP 200 OK"
    if I check thet  check bos ""Do Not Use SOAP Envelop" then it gives no error in SXMB_MONI , but message is not giving response back from webservice in SXMB_MONI it shows only
    <?xml version="1.0" encoding="UTF-8" ?>
      <ns1:MYRFC.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions" />
    gurus ...Pl. reply asap

    hi, all
    you are right the XML sp/tcpgateway response structure is different than what I used earlier,
    now I build the same structure,but then also some problem occures it is giving only one element from structure in response.
    it is giving
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MYRFC.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
      <STATUS>Success</STATUS>
      </ns1:MYRFC.Response>
    while actual inbound from WS is ...
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message   -->
    - <ns0:testrequestResponse xmlns:ns0="conversion" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" Status="Success" DbgCmd_="testrequest" DbgTag_="REQUEST">
    - <ns0:SAP_OUTPUT>
      <ns0:E1 Value="3000194" />
      <ns0:E2 Value="300"/>
      <ns0:E3  Value="3"/>
      </ns0:E4 Value="94">
      </ns0:testrequestResponse>

  • Sending response back to client

    The result of a request is in the format of inputStream before sending back to client... I used to use getPrinter() method to write my output back to the client... so how can I write the output from the inputStream back to the client without reading the data from the inputstream then writing them to the PrintWriter object??
    Thanks...

    Actually I miss-stated one point.. the result should be in Output stream format...
    eg. the cleint makes a request to servlet A, then A asks class B to get the result and B writes the result to an output stream and return the stream back to servlet A...
    now servlet A has the result in the format of Output stream..... so how can servlet A get the data from the output stream (as output stream only has write methods) and sends them back to the client?

  • How to send response back to db adapter

    Hi,
    I have a requirement where I need to update a status field and last activity time field ( time of instance completed) in a database table. I used Polling option in database adapter, but it is updating the status field immediately once it is read. I don't want like that, I want to update the status field after completion of instance. Also, how to update the last activity time field ( i mean the field has to update at what time the instance got completed successfully). Actually, i am using
    1. A database adapter for polling followed by receive activity, assign activity, invoke activity and this invoke activity invokes one more database adapter ( the adapter selects a table row with the ID given by database adapter 1).
    2. Followed by transform activity, and again a invoke activity which invokes a webservice ( I am passing output values of 2nd database adapter as a input to webservice).
    Let me explain clearly, I have a base table and duplicate table. When ever values gets inserted or updated in base table it needs to be reflected in duplicate table ( wrote a trigger for this and it is working fine). Apart from this I added two more fields in duplicate table ( with column names status, and instance completion time). I am using two database adapters one is for polling from duplicate table and other one for selection of values from base table based on ID provided by duplicate table. Further, the invoke activity receives the output from database adapter and again i am passing the output values as a input to external webservice. My question is how can I update the status field and instance completion time in duplicate table. Someone please help me.
    Thanks,

    Hi,
    If I understand your requirement, you have few options:
    1.     Build your process in a way that it will act as a synch process. That way you will have the option to rollback the transactions
    and allow to poll the table again.
    (see explanation: Re: Reading 5K records from DB
    2.     You can go with your solution. Create a table that acts only as a trigger table.
    If something happens in you process and you want to poll from it again, just insert new record in it, in the end of the process.
    Arik

  • UDF to send Response to RFC

    Hi Experts,
    We have a scenario where we have to send a response back to RFC from UDF .
    How can we do this without using RFC lookups ?
    Regards,
    Syed

    Hi,
    I think UDF don't have nature to send response back to RFC meanwhile RFC request and response are different mapping windows, better to go for RFC lookup, we can fulfill your requirement easily.

  • Can I get a response back when I use HTTP adapter

    Hi ,
    I am doing a integration between SAP and ThirdParty Product using PI 7.1.
    The scenario is ThirdParty -> PI -> SAP ,using HTTP adapter between ThirdParty and PI , and IDoc adapter between SAP and PI.
    So,its a HTTP sender and IDoc receiver.
    So I was just curious to know if the IDoc posting failed in SAP ,can I send a response from SAP to Thirdparty regarding the failure along with some error message.
    Thanks for your responses.
    Venu

    Hi,
         It may lead to some timeout problems if you design your scenario as synchronous i.e sending response back to HTTP..
    as SAP may take time to process idoc and need to provide response back to PI ..by that time the connection may become invalid and thirdparty may receive response as timeout error...
    As anyway PI has the option of Alert managements..you can trigger the error mail to the third party recipients for letting them the status...
    HTH
    Rajesh

  • Webservice to proxy - response back to webservice

    Hello expert,
    I am working on webservice to proxy scenario. When request to create purchase order received by PI thru webservice, PI will do proxy call to create purchase order in ECC and send response back.
    We don't want to send ECC response back to Webservice, but we would like to send positive response back as soon as PI recieve the message irrespective of what happens in ECC.
    Need some advise.
    thanks.

    >We don't want to send ECC response back to Webservice, but we would like to send positive response back as soon as PI recieve the message irrespective of what happens in ECC.
    One way of doing is after sending request to ecc, you can code in proxy as response in the same interface with single field element like mesg receiveed and map that response to soap response on the sender side. (in this case you dont really process the soap request in ecc directly. you do it at later or convenient time or after sending success transfer message).  Basically you handle logic in abap proxy side.
    Mapping 1 soap request to proxy request (Per business requirement)
    Mapping 2  proxy response (status : messg received ) to soap response
    Rest are all same. Basically you do SOAP (sender) to PRoxy (receiver)   synchronous mode
    If you dont want to pass the soap request message directly to ECC and within that timeframe want to send successful mesg from pI itself then you have to design to store the mesg temporarily. What will happen if your ecc is down? How do you handle that situation.

  • Post response back to html page

    How to send response back to html page which sent request to my jsp page.
    please reply me b'coz I have sent two problems already,but there is no response for any of them.
    Please reply as soon as possible.
    --Thanks in advance                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Yes I know all these implicit objects,but all these are in JSP.
    I want reply from JSP in HTML means at client side.
    See my steps:
    1.creating HTML page.
    2.creating form in that html page
    3.Then Accessing Database(some data which is required at client side for further processing like mapping in Google map) through JSP
    So here how do I get data from JSP page.
    help me with code if u can?
    thanks

  • In OUT Bound of a Jaxws provider, how can we stop the provider invoking its endpoint and send a response back?

    Hi One & All
    While we are working on Delegate(provider) for JAXWS client handler in Weblogic10 , we have some technical issues and need some assistance.
    Problem Description
    In OUTBound of a provider, how can we stop the provider invoking its endpoint and send a response back?
    Example:
    I have a provider with some handlers configured for both IN and OUT flows. When the Jaxws provider is making a request, the OUTBound Handler gets invoked and in this Handler I would like to stop invoking actual endpoint and send back my own response. That means I should be able to tell the Handler chain to stop further processing of this flow, set a response message into message exchange and invoke the IN flow. How do I do that?
    This kind of mediation/interception is possible in standard specifications like JAX-WS, Servlets etc… wondering if Weblogic10 JAXWS provides any sort of this kind.
    Also we would like to know who is invoking a provider endpo     int in JAXWS stack in weblogic10? Is it an OUTBound handler at the end of handler chain or some other transport component after the handler chain?
    Thanks in Advance
    Suresh
    Edited by: user12494412 on Jan 22, 2010 7:06 AM

    I completely agree with this....I have used Windows and Skype for many years. I recently installed an older version of Skype to run on Windows 8.1 because the new version is SO AWFUL. As much as I prefer the older version (6.14), the daily number of SPAM CONTACT requests is rediculous and most are just variations of the same spammer. Maybe it is time to look for a replacement for both?

  • (SOAP sender) --- XI ---- R/3 (RFC receiver) this sync scenario

    Hi Experts,
    Webservice(SOAP sender) < - > XI <--> R/3 (RFC receiver) this sync scenario tested with Infopath successfully.
    I have given partner number,student object id are the two input fields(request) and i am getting student number as response. This scenario is working when i use MS infopath.
    I have generated WSDL file embedded with below URL
    http://xxxx.yyytec.passh.ed:7271/XISOAPAdapter/MessageServlet?channel=:Webservice_Sender_BS:GET_NUMBERS_Sender_CC&version=3.0;amp;Sender.Service=Webservice_Sender_BS;amp;Interface=urn%Apache
    Sender business system: Webservice_Sender_BS
    Sender CC: GET_NUMBERS_Sender_CC
    Msg Interface: STU_GET_NUMBERS_Synch_MI
    now we want to test from third party website, what are the things to be provided to the website developer to test the scenario.
    the way i generated URL, is it correct?
    if i provide above URL and generated WSDL in XI , is it enough for web developer to enter the input fields to RFC(r/3) via XI as webservice request and getting back response from RFC(r/3) to webservice via XI.
    can you please advice if any body worked on this kind of scenario.
    Thanks
    Dhanush.

    For the developer you have to provide WSDL file so that they know the input/output fields and write the code.
    URL is correct.
    Other informatino they required is Username and password of you PI system.
    Gaurav Jain
    Points if answer is helpful

  • Sending multitracks back to FCP

    I'm working with HDV. I sent the time line to Color, did my magic and rendered out selected clips on this multi-track timeline. When I sent it back to Final Cut it was okay, then I reopened it later and the clips were not on the time line, but they appeared in the canvas when viewing it, like they were phantom clips? And only their render markers were to be seen....spooky, huh? A few days later someone else opened it and the clips weren't even there, not even on a phantom level, they were completely missing from the timeline.
    In addition to this, when I try to open up the rendered color file, the clips are on the timeline but I can't view them, but only the video track under them, with my color corrections on it!
    I found a couple of other threads that referred to this issue but only one was answered and I don't think it was exactly the same format I was working with. Does anyone know if there is a setting that I need to adjust or if it would really make the difference to put it all on one track? Has anyone else had this exact same issue? An could you tell me what I'm doing wrong? Thank you in advance.

    Thank you for your response. I actually did manage to send it back correctly this time. I think I had responded "no" to quicktime codec originally, also I had tried to just render the shots rather than the timeline in its entirety. I find that the sync problem that is so evident in Color really isn't the issue, it still returns to its original place in FCP if I just match the codec correctly. However, I was surprised to see that my renderings didn't quite look as good as I thought they did in color. Which can quite possibly be a monitor issue.
    So yes, its safe to say that its definitely easier with one Vtrack, but its not impossible to work with multiclip. Its just tedious because there's not really a quick and easy way to copy and paste attributes to other clips outside of "drag and drop". If anyone knows of great way, please let me know.
    I will use the Media manager option next time I work with it.
    Thank you very much.

  • IDoc to webservice and get the response back into another IDoc.

    Hi guys
    We have a scenario where we need to send an IDoc to webservice and get the response back into another IDoc.
    Questions:
    1. Is this scenario possible without a BPM? or do we need to use BPM (Sync-Async bridge).
    2. Is there a Async to Sync bridge in BPM?
    3. How do I use this bridge in my scenario and customize it?
    4. If not possible, provide me the related docs using BPM for the same scenario.
    Appreciate your quick response
    Regards
    Naidu

    Hi,
    this link may help u............,
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1134. [original link is broken] [original link is broken] [original link is broken]
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403. [original link is broken] [original link is broken] [original link is broken]
    Regards,
    Azeez khan.

  • Calling RFC using UDF

    Hi,
    I have a small doubt.
    In file to IDOC mapping, I am mapping two fields using a UDF.
    That UDF in turn calls a RFC.
    But that RFC is not moved to quality server.
    If now I try to test that in quality environment, the mapping works fine and IDOC is posted because the error handling is done in ABAP.
    My doubt is why did the messge did not failed in XI, saying the RFC not available??
    I tried to search in sdn, by did not get anything related to this.
    Please try to clarify my doubt.
    Regards,
    Sachi

    Ravi,
    Below is the UDF code:
    MappingTrace importantTrace = container.getTrace();
    String query = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Z_RFC_UOM xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\">";
    String restQuery = "</ns0:Z_RFC_UOM>";
    String Lookup_Key_Tag = "I_MATNR";
    String Lookup_Key_Tag1 = "I_VKORG";
    String Lookup_Key_Tag2="I_VTWEG";
    String Lookup_Value_Tag = "E_MENEE";
    String Lookup_key_StartTag = "<" + Lookup_Key_Tag + ">";
    String Lookup_key_EndTag =  "</" +Lookup_Key_Tag + ">";
    String Lookup_key_StartTag1 = "<" + Lookup_Key_Tag1 + ">";
    String Lookup_key_EndTag1 =  "</" +Lookup_Key_Tag1 + ">";
    String Lookup_key_StartTag2 = "<" + Lookup_Key_Tag2 + ">";
    String Lookup_key_EndTag2 =  "</" +Lookup_Key_Tag2 + ">";
    String Lookup_Value_StartTag = "<" + Lookup_Value_Tag + ">";
    String Lookup_Value_EndTag = "</" +Lookup_Value_Tag + ">";
    String comm_channel = "";
    String content = "";
    String items = "";
    String item1 = "";
    String item2 = "";
    String item3 = "";
    String ItemsTag = "";
    String Lookup_Value = "";
    int j =0;
    String Rec = Service[0];
    for(int i= 0;i< material.length;i++)
                ItemsTag =  Lookup_key_StartTag material<i> Lookup_key_EndTag;
                item1 = item1 + ItemsTag;
    for(int i= 0;i< sales_org.length;i++)
                ItemsTag =  Lookup_key_StartTag1 sales_org<i> Lookup_key_EndTag1;
                item2 = item2 + ItemsTag;
    for(int i= 0;i< dist_channel.length;i++)
                ItemsTag =  Lookup_key_StartTag2 dist_channel<i> Lookup_key_EndTag2;
                item3 = item3+ ItemsTag;
    items=item1item2item3;
    items = items + restQuery;
    query = query + items;
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    comm_channel = "CC_Recv_RFC";
    try
                Channel channel = LookupService.getChannel(Rec,comm_channel);
                accessor = LookupService.getRfcAccessor(channel);
                InputStream inputStream = new ByteArrayInputStream(query.getBytes());
                importantTrace.addWarning(query);
                XmlPayload payload = LookupService.getXmlPayload(inputStream);
                Payload result1 = accessor.call(payload);
                InputStream in = result1.getContent();
                out = new ByteArrayOutputStream(1024);
                byte[] buffer = new byte[1024];
                for(int read = in.read(buffer);read>0;read = in.read(buffer))
                            out.write(buffer,0,read);
                content = out.toString();
                importantTrace.addWarning("RFC Response::" + content);
                //Parsing RFC output
                j= 0;
                while ( content.indexOf(Lookup_Value_StartTag) != -1 )
                                                                Lookup_Value = content.substring( content.indexOf(Lookup_Value_StartTag) + Lookup_Value_StartTag.length()  , content.indexOf(Lookup_Value_EndTag) ) ;
                                                                importantTrace.addWarning("LookupValue::" + Lookup_Value);
                                                                j++;
                                                                content = content.substring(content.indexOf(Lookup_Value_EndTag) + Lookup_Value_EndTag.length() );
                                                                result.addValue( Lookup_Value);
    }//end of try
    catch(Exception ex)
                importantTrace.addWarning("Error while lookup"+ ex.getMessage());
    //catch(LookupException e){  importantTrace.addWarning("Error while lookup"+ e.getMessage()); }
    //catch(IOException e) { importantTrace.addWarning("Error while IOException"+ e.getMessage()); }
    finally
                if(out!=null)
                            try
                                        out.close();
                            catch(IOException e)
                                        importantTrace.addWarning("Error while IOException"+ e.getMessage());
                if(accessor!=null)
                            try
                                        accessor.close();
                            catch(LookupException e)
                                        importantTrace.addWarning("Error while lookup"+ e.getMessage());
    result.addValue("");

Maybe you are looking for