File to RFC scenario want to read file name

Hi All,
I am having file to RFC scenario in which i am having file name in format  text_yyyymmdd.txt.
i want to read this file name and by separating the date in file name i have to pass this to one of the RFC date parameter.
please help me to sort out this.
Thanks
Swapnil

Hi,
By writing simple UDF in your mapping you can Acheive this
Try this Once
DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
String MyFileName = dynamicconfiguration.get(key);
String str[] = MyFileName.split("_");
return str1[1];
Map this to the date parameter(RFC) in the mapping .
Thank & Regards,
Deepthi
Edited by: Deepthi Muppasani on Sep 23, 2011 8:17 AM

Similar Messages

  • File-PI-RFC scenario with extraction of contents in the filename

    Hi All,
    I am working on File to RFC scenario.
    Here the file name is like 'ABCD_XYZ_1234_DATE' where the date is in yyyymmdd format.
    I have to read this filename & the date in the filename is to be mapped with one of the RFC parameter.
    Also how would I trigger the Interface if the file resides in PI server or on local mchine.
    How to configure the processing parameters in sender comm channel if I want to read the file after every 15 mins?
    Thanks,
    Amit Patil

    Hi,
    By writing simple UDF in your mapping you can Acheive this
    Try this Once
    DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    String MyFileName = dynamicconfiguration.get(key);
    String str[] = MyFileName.split("_");
    return str1[1];
    Map this to the date parameter(RFC) in the mapping .
    If the file resides on Local machine then you can use FTP and if it is on PI server then NFS as Transport protocol.
    If you want read the file for every 15 min there are 2 options
    1) Set the poll interval time to 900 sec
    2) Configure ATP in RWB
    Configuring ATP in RWB :
    http://www.dataxstream.com/2010/11/configuring-availability-time-planning-in-sap-pi/
    Thank & Regards,
    Deepthi

  • Step by Step Guide Details for RFC to File and File to RFC scenario

    Hi Guru's
    Good day to you. I am tyring to develop some scenarios based on RFC adaptor. so i want to start up with basic scenarios like RFC to File  scenario(Here i just want to pull some data from SAP using RFC and put it in destination folder as an text file) and FILE to RFC scenario (Here i just want to take some data from the file and update into SAP).
    For doing these scenarios i would like to request you people to send me the step by step guide which explains me about the complete steps of configurations required to do the RFC to FILE scenario and FILE to RFC scenario.
    I found some scenarios and i am in confused state. so i request you to please put your experience to help me out.
    thanks in advance.
    Regards
    Raj

    Hi Aaron,
    I don't know your scenario and your ECC and PI versions but I learned how to use ABAP Proxy more than 1 year ago with the following tutorial:
    Edit--> The forum doesn't allow me to post external link, just search "ABAP Proxy Communication Scenario" in google and visit the 1st result
    The way to develop ABAP Proxys has changed a little if your PI is 7.1. In the ECC side, the transaction SPROXY looks much better too if you have a recent version of the ECC.
    Edited by: Marshal on Oct 8, 2009 5:08 PM
    I've found that SDN Document. Maybe the scenario is not the most simple to start with ABAP Proxy but is very well documented and is for PI 7.1. The document also handles the inbound and outbound proxys
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c00ca32e-f991-2b10-f5be-97114bd2b08f&overridelayout=true]
    Edited by: Marshal on Oct 8, 2009 5:22 PM

  • Error while calling RFC adapter(FILE-XI-RFC scenario)

    Hi,
    I am trying for FILE-XI-RFC scenario. I am getting the following error. I have checked in message monitoring. The error is coming while calling the RFC adapter. Can any body tell what problem is this?
    Regards,
    Dhana
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
      <SAP:P1>af.f23.sofd00001530a</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>2: Unable to find URL for Adapter Engine af.u7a.us4296</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error while reading access data (URL, user, password) for the Adapter Engine af.f23.sofd00001530a</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

    Hi,
    I did SLD check.
    The status says 'Summary: Connection to SLD works correctly'.
    But it fails while checking the access to XI profile.
    Here is the status
    Summary: Connection to SLD works correctly
    Now checking access to the XI Profile
    Properties of RFC destination LCRSAPRFC
      RFC host:
    %%RFCSERVER%%
      program id:      LCRSAPRFC_DZ1
      gateway host:
      gateway service:
    Testing the RFC connection to the SLD java client...
    RFC ping returned exception with message:
    / CPIC-CALL: 'ThSAPOCMINIT' : cmRc=2 thRc=679#Transaction program not registere

  • File to RFC scenario with no BPM

    I want to create File to RFC scenario with no BPM. I want to invoke RFC synchronously to verify that I'm getting correct response back, but i dont wanna process the response. So, In SXMB_MONI i can check the response back from RFC right? Or do I need to have BPM if want to see the response back from RFC?
    What kind of business system i need to create for RFC? can i use same business system for both File and RFC? I'm using one Business System created on Third party technical system, which i'm using for file Input, also for RFC. Is that OK?
    Thanks,
    Deepesh

    Hi,
    I need to have BPM if want to see the response back from RFC? ... yes
    The BPM will help you find the response very comfortable.
    What kind of business system i need to create for RFC? can i use same business system for both File and RFC? I'm using one Business System created on Third party technical system, which i'm using for file Input, also for RFC. Is that OK? ..Yes you can .
    Regards
    Agasthuri Doss

  • Fixed Length of a field in the File-XI-RFC Scenario

    Dear All,
    I am doing one File-XI-RFC scenario in which user is sending me the file with some delivery nos (VBELN) in it and I am sending those all delivery nos to my RFC in R/3.
    Now I want one conition to be put that if any delivery no is of less than 10 characters than that delivery no should not be sent to RFC rest the remaining will be processed to RFC.
    I have put one UDF for this whose code is as follows:
    int len = a.length();
    if  (len == 10)
    int b=1;
    b = (1/len); 
    return a;
    But this code is not working. Please guide me how to solve this problem.
    Regards,
    N.Jain

    HI,
    Input is A : Delivery No take all the delivery no in one context.
    for(i=0;i<A.length;i++)
    int b= Integer.parseInt(A<i>); it will remove all the leading zeros if it has any.
    int j=(new Integer(b).toString().length()); count the lenght of the Del no.
    if(j>10)
        result.addValue(A(i));
    else
         result.addValue("null"); will not send anything.
    Thanks and Regards,
    Chirag gohil

  • File to Rfc scenario,not updated in rfc

    Hi,
    File to RFC scenario,not updated in RFC?
    i checked communication channels ,smq1,smq2,sm58,cache refresh.but issue was not solved.
    Please advise where need to check?
    Thanks
    Amita

    Hi Amita,
    First check whether the configuration between PI and ECC has been set up properly.
    Are you using a stand RFC or custom RFC?
    Import the RFC metadata from ECC to PI and use that structure in your service interface and configure the remaining objects that we normally do.
    Now, try to process the file and check in the communication channel, whether file Adapter is able to pick up and send the message to PI system.
    If the message is successfully processed through PI system then check the messages in Queues. Also, check the RFC communication channel in the adapter engine.
    Follow the process, you might get some clue regarding the issue.

  • What are the connections to be done for file-to-RFC scenario in XI & R3 ?

    Hi,
    What are the connections to be done for file-to-RFC scenario in XI & R3 & also if it is RFC-to-File .
    I need to know what type connections used for  file-to-RFC in backend .
    In SLD it should be Third Party or  WEB AS ABAP..

    Hi Nandan,
    Perform the following configurations...
    <b>SAP XI</b>
    <b>1) RFC Destination (SM59)</b>
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    <b>2) Create Port (IDX1)</b>
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    <b>SAP R/3</b>
    <b>1) RFC Destination (SM59)</b>
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    <b>2) Create Port (We21)</b>
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    Regards
    San
    Remember to set the thread to solved when you have received a solution there is a Way.

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • Problem in storing data in BAPI in File to RFC Scenario

    Hi everyone,
    I m doing File to RFC Scenario.......I completed design and configuration part and actived the Communication Channels.....
    Now when I check in Runtime workbench I am getting succefully executed both at outbound and Inbound Channels.......but
    data is not updated in BAPI...........
    I m getting following error when I check in Component monitoring......
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: RfcAdapter: receiver channel has static errors: configuration exception caused by: com.sap.aii.af.rfc.core.config.RfcChannelInactiveException: channel has status inactive: com.sap.aii.af.rfc.afcommunication.RfcAFWException: RfcAdapter: receiver channel has static errors: configuration exception caused by: com.sap.aii.af.rfc.core.config.RfcChannelInactiveException: channel has status inactive
    Please help me out.......
    Regards,
    Sudheer.

    Hi
    "I took Business Service as Service but not Business System.....Will it effect the scenario???......"
    I suggest While dealing with the SAP Systems we should use Business systems.
    Pls check the foolowing Threads for the above Query
    RFC - Business Service
    Re: business service for file to rfc
    Regards
    Abhijit

  • FILE to RFC Scenario in PI

    Hi,
    I am working on File to RFC Scenario. Can u tell me how to do this scenario using RFC Lookups.
    Thanks,
    Seenu.

    do a lookup from your mapping?
    RFC Lookup -
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    in case of 7.1, you can try - /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups

  • File to RFC Scenario - Not working with AAE

    I have a File to RFC Scenario (calling RFC /POSDW/CREATE_TRANSACTIONS_EXT)  using AAE but it is failing with following error in PI .
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: functiontemplate from repository was <null>
    Adapter Framework caught exception: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: functiontemplate from repository was <null>
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: functiontemplate from repository was <null>.
    But When I run the same scenario using IE instead of AAE, it is successful from PI. So probably there is nothing wrong in RFC channel configuration.
    There's an OSS note-730870  on this error ,it says the XML document sent to RFC Adapter may not be RFC-XML but as I am using AAE, payload generated after technical routing cannot be viewed.
    Could you all please suggest why this error is coming and solution for the same?
    Thanks,
    Ankit

    Hi Debashish,Monica,
    Thanks for your help, I checked this SAP note its question 16 do describe my problem but do not provide solution and as I am using AAE it does not allows me to see the target structure generated whereas if I use IE the target structure generated is sucessfully getting posted.
    Also, the functional module is present in target system. I have reimported the RFC also.
    Is there some AAE related configuration required to enable AAE with RFC which could be missing?
    This is what I get in log as the RFC reciever is called..
    06.09.2011 14:15:31 Information MP: entering1
    06.09.2011 14:15:31 Information MP: processing local module localejbs/RfcAFBean
    06.09.2011 14:15:31 Error MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: functiontemplate from repository was <null>
    06.09.2011 14:15:31 Error Adapter Framework caught exception: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: functiontemplate from repository was <null>
    06.09.2011 14:15:31 Error Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: functiontemplate from repository was <null>.
    Thanks,
    Ankit

  • File-xi-rfc scenario

    Hi all,
    I am working on File-xi-RFC scenario.
    i have done IR and ID working.
    Now I have Done test cofiguration there is NO ERROR ......working
    File is picked .....as mode is delete.......working..
    I check in Adapter Monitoring...............there i got a ERROR. That is..........below
    "- Error: 2006-12-16 15:59:57 IST: Message processed for interface MIIS_filetorfc: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: functiontemplate from repository was "
    please help me...........
    what i have to do??
    Regards,
    Umesh Laxkar

    hi
    wht i am suggesting u his...
    Check whether UR RFC ie. SM59 t-code... its proterly working or not do test connections also actvate every thing ans see...
    see the below link.. i hope it will be usefull...
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    regards,
    vikram.c

  • Help in file to RFC scenario

    hey guys i m doing a File to RFC scenario using BPM and taking help from the following blog /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit i m a bit confused about the services being used in figure 19 and figure 20,for a File to RFC(sync) scenario,do i need to have 2 business systems,one of WEB as ABAP and one of third party?
    why is he using two different services in figure 19 and 20.
    thanx
    ahmad

    Dear Bhavesh,
                          Someone earlier told me via SDN that, it is mandatory to create a WEB AS ABAP business system for any SAP system running on ABAP stack participating in the integration scenario. If the above is true than Ahmad needs to create one WEBAS ABAP business system for the R/3 end
    also a third party business system or a business service for file system.
    Pls advice.
    Regards,
    Ashish

  • File to RFC scenario - receiver determination problems

    Hi ,
    Im trying to work out a flat file to RFC scenario, and am facing problems in configuring the receiver determination .
    While creating my receiver determination, in the configured receivers, when i click on the F4 help to select service, i do not see the business system that i configured in SLD .
    This system i have configured as an WAS ABAP system and provided all relevant data. I can also import objects from this system into IR, so i dont think i have set it up wrongly. I have also created RFC destination .
    Is there some setting that has to be made that im missing ? Could somebody point out why im not able to see this system in the list of business services available at receiver configuration time ?
    Thanks,
    Joe
    I also cleared the SLD cache by the way.. that didnt work either .
    Message was edited by:
            Joe Stein

    Thanks a lot for you replies guys , but problems still not solved ;
    1. I looked at the blog given and ive done everything pretty much as given . My problem lies in not finding the business system itself  in the list of services for the configured receiver. How to implement this has not been shown in the blog.
    2. I tried refreshing the cache and checking again, but it still doesnt show me the necessary step.
    SOS !
    I checked in the inbound system , and found that an RFC wasnt created for the XI system . I created that but i still cant see this system as a business system when i try to create the receiver determination . Do i need to recreate the technical system in the landscape to incorporate this change ?
    Any pointers at all ??
    Message was edited by:
            Joe Stein

Maybe you are looking for

  • My iPhone 5 is not focusing when taking pictures

    My iPhone 5 is not even a year old, and lately I have been having problems with camera "focus".  The view looks clear, then I get the square in the middle showing the camera is focusing, and then it is blurry, resulting in a blurry picture.  Has anyo

  • JavaFX image url

    Hello everybody! I have troubles understanding the way image urls work in JavaFX. The tutorials only use __DIR__, which of course references the package the script lies in or an absolute URL. But i dont want to place an image folder inside my package

  • Faulty hard drive? Memory analysis

    Hey Been trying to figure out whether or not my new MBP's hard drive is faulty. It's a 13" 2,56GHz (Core2Duo) with 4 GB RAM Can you help me find out by "analyzing" these numbers? I did this clean install and got these numbers - after the clean instal

  • Xml data island loadXML() as well as XMLDocument property is undefined

    <xml id="xml_data"></xml> document.all("xml_data").XMLDocument document.getElementById("xml_data").XMLDocument xml_data.loadXML("some xml data");   XMLDocument as well as loadXML () is undefined whereas it was working for lower version of IE

  • AME CC 2014 missing FLV export profiles?

    AME CC has FLV export, what happened with 2014??