Run time exception while checking dynamic file name in mesage mapping

Hi Experts,
In my file to idoc scenario i need to know the file name dynamicalyy as i require this file name during mesage mapping.
for that i have created UDF with the following code.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
but when i am testing this code in mesage mapping in IR i am getting runtime exception.why its giving so ?
RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:Messages/ns0:Message1/ORDERS05/IDOC/EDI_DC40/MANDT. The message is: Exception:http://java.lang.NullPointerException in class com.sap.xi.tf._MM_EDI_HospitalsToORDERS05_ method filename$com.sap.aii.mappingtool.tf3.rt.Context@545f545f
Can we test this in message mapping itself ?
Best Regards,
Rohit

One more question - I hope you didn't forget return statement in your java code.
this worx 4 sure:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return  ourSourceFileName;

Similar Messages

  • Run Time exception while installing SOA Suite 11g

    Hi A,,.
    I am trying to install soa suite 11g.
    I ahve installed oracle universe xprress edistion database, weblogic server,rcu (repository) successfully and now I tried installing soa suite 11g. It passed all the pre requisits and when i click on install in gives an error:
    OUI-10152: A runtime exception occurred during the execution of the query.
    Do any one else encountered the issue or any suggestions on how to get this done.
    Thanks.

    Hi all,
    Issue solved by deleting the invalid oracle home paths from inventory.xml file, Thanks to Anuj.

  • Dynamic file name while sending to target FTP

    Hi Experts,
    we have a scenario wherein we are trying to implement dynamic file names.
    The scenario is IDOC to file, and  we need to append the data corresponding to all the IDOC triggered n a daily basis.
    Its like  the file abc_01will contain data for day 1(data of oll the IDOC in that day).For day to we need to dynamically name the file as abc_02 and so on.
    But before naming the file as abc_02 we need to check if abc01 is present or not .If abc_01 is not present then for day 2 file  we need to give the name as abc_01 and so on_.This condition is need to be checked becasue there may be the case that a file may not be picked by the script running  at the target system.
    can anyone let me know how to check whether file are correctly picked at target.
    Regards,
    srinivas.

    Hi  Srinivas,
    I think you can achieve this with the next scenario:
    - For getting all the Idocs info, you need a ccBPM to collect them, and then, download them to a file.
    - To dynamically put the filename, you need to use Dynamic Configuration at the File Receiver Adapter (in the Message Mapping, you can write a UDF.)
    - And to check if the daily file exists, you can also write an UDF and then decide the name of the output file.
    Hope this helps,
    Regards,
    Juan

  • Check CSV file name while uploading file?

    Hi All,
    I am uploading data from CSV file.. That part is working fine.
    Now i want to check CSV file name. Ex : CSV file name = W1234H4321AB.
    I want to check 6th letter, if 6th letter is eq 'H', i want to upload data otherwise should display some message.
    I tried by reading this attribute, but i declared this type as XSTRING, i checked value after using get_Attribute in  lv_datasouce. It contains some XSTRING value. How to get CSV file name??
    Cheers,
    Venkys.

    >
    Thomas Jung wrote:
    > >I want to check 6th letter, if 6th letter is eq 'H', i want to upload data otherwise should display some message.
    >
    > Everything that you have been told about using the filename property of the FileUpload is correct. However you should note that the filename will not be available until after the file has already been upload to the server. So you can't stop the fileUpload based upon a check of the filename - its too late and the upload has already occured.
    yeah that is true. but is there anyway to check it otherwise.
    or we need to wait for something in coming versions 7.3 or 7.4.

  • Base run time exception

    hi sdn friends,
    I am doing idoc to file scenario. While mapping in static test it was giving successful message. where as in the tcode sxmb_moni i am getting the run time exception in mapping. The error is
    During the application mapping com/sap/xi/tf/_WBBDLD_TO_ITEM_MASTER_MM_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</
    Can any one give me the suggestion how to solve this problem
    Thanks in advance
    - Vasu

    Hi,
    Copy the payload from SXMB_MONI and test your mapping using this payload.
    Check this blog for this,
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    Regards,
    Bhavesh

  • Run-time error while executing alv grid report

    Hi everyone
    I m trying to run a alv grid report it is giving a run time error while executing the statement CALL METHOD V_ALV->SET_TOOLBAR_INTERACTIVE.
    Actually i added 2 buttons in the toolbar.after that when i execute the report i m getting errors.
    <b>Error Analysis</b>
    An exception occurred that is explained in detail below.                     
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not    
    caught in                                                                   
    procedure "TOOLBAR_MENUS_INIT" "(METHOD)", nor was it propagated by a RAISING
    clause.                                                                     
    Since the caller of the procedure could not have anticipated that the        
    exception would occur, the current program is terminated.                    
    The reason for the exception is:                                             
    You attempted to use a 'NULL' object reference (points to 'nothing')         
    access a component (variable: "ME->M_CL_MENU_BUTTON_VARIANT").               
    An object reference must point to an object (an instance of a class)         
    before it can be used to access components.                                  
    Either the reference was never set or it was set to 'NULL' using the         
    CLEAR statement.

    Hi Dinesh,
    Seems you have not initialised ( Instantiated in OO ) the object and / or the parent container.
    Check if you have create object for both the parent as well as the alv object.
    So when you instatntiate the object of ALV you pass the object ( instantiated before hand ) in the parent container position.
    Also you would have to register the events to the object using method. Then only the buttons will finction.
    eg :
    IF G_CUSTOM_CONTAINER IS INITIAL.
        CREATE OBJECT CUSTOM_CONTAINER_1
               EXPORTING CONTAINER_NAME = CONTAINER_1.
        CREATE OBJECT GRID1
               EXPORTING I_PARENT = CUSTOM_CONTAINER_1.
        CALL METHOD ALV_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
             EXPORTING I_STRUCTURE_NAME = 'VBAK
             CHANGING  IT_OUTTAB        = IT_VBAK.
    Reward points if useful.

  • MIGO run time error while excution

    Hi,
    I have getting run time error while executing MIGO transaction.
    Syntax error in program "CL_EX_MB_MIGO_BADI============CP ".
    the type "MB_MIGO_BADI"  is unknown.
    Regards
    Abdul

    Hi Rashid
    The error clearly states that the BADI MB_MIGO_BADI is not present in your system.
    Just go to SE18 & enter the name of the above BADI & check if it exists there.
    Also if the BADI exists, just check if there is an implementation created for the same.
    Hope this helps.
    Regards
    Abhii

  • Run time error while doing VL10B transaction for STO

    Dear All,
    We are facing problem of run time error while creating Delivery (VL10B) for  STO .We have two company codes .For one company code its working fine .But we are trying for another company code ,this error coming.error detals
    Error in the ABAP Application Program
    The current ABAP program "SAPLV05I" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not cau
         in
        procedure "SD_PARTNER_UPDATE" "(FUNCTION)", nor was it propagated by a RAI
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        If you use an ABAP/4 Open SQL array insert to insert a record in
        the database and that record already exists with the same key,
        this results in a termination.
        (With an ABAP/4 Open SQL single record insert in the same error
    Kindly suggest as to how to resolve this asap.
    regards
    umesh

    These Kind of Errors Generally Occor for the wrong maitnaince of the partner functions. If you are using any user exits to detremine the partner functions. check the logic in that routine.
    Because we do frequently get this error, but only if we hae not maintained as per the rule written in the  user exit..
    The USer exits for partner Determiantion to check is Function Module EXIT_SAPLV09A_003.  THis gets activated, if you have give the source parner function as "X/Y/Z" in your partenr determiantion procedures.

  • Xml file in dynamic file name in file receiver adapter

    Hi,
    I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    All turned out okay. I have got the file name I require. Except that the file format is XML and I need to suppress the filename node occupied by the dynamic file name.
    The content conversion mentioned in /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12, does not seem to solve my problem. As it is only for file format other than the XML one, because we only do the content conversion if we want to "convert" the format of the content from XML to the other format.
    Does anybody have the solution to my problem? thanks in advance

    Thank you Raj for the direction
    The way to do it is :
    1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
    2. Put a "*" on the file name scheme
    3. In IR, create a UDF to set up target file name :
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // set up file name for receiver adapter
    String SourceFileName = conf.get(key);
    conf.put(key, TargetFileName);
    return " ";
    4. Map the above UDF to the header level of the target structure.
    Regards,
    Idi

  • How to give a dynamic File Name for Receiver File/FTP Adapter.

    Hi Experts,
        I have one scenario in which we are creating a flat file of IDOC which is coming from R/3 & sending it to FTP location. For this we have configured Receiver FTP adapter with File Name Scheme as "NT.out"  & in File Consturction mode i have given as "Add Time Stamp".
        therfore while creating a file it is creating as NTyyyyMMdd-HHmmss-SSS.out
    where as my requirement is only to to add Time & not the Date. (NThhmmss.out)
        How to do this ?
        for your info we are using ABAP Mapping.
        Pl help me
    Regards,
    Umesh

    Hi Umesh,
          Add one more field to your target structure for your file name and populate that field as per your requirement like NTyyyyMMdd.out. In receiver communication channel use Variable subtiution option and give the refrence of Payload and file construction mode set as create.
    And refer the below weblogs for Variable Subtiutuion File Name Scheme
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
    Hope this way would be solve u r problem.
    Cheers
    Veera
    >>>Reward points, if it is needful

  • Error in http call soap run time exception

    Hi All,
    we are facing an issue whenever we are sending the file using soap protocal.
    the issue here is.
    when one user trying to send files he is getting error in http call soap run time exception.
    when he try to login to other PC then he can able to send the file without any exception.
    we have checked the local setting and coockies.
    any one please help me.
    Regards,
    Vishal Kommera

    Its not in the notepad file but when I open it in internet explorer etc it appears... But cant see the '-' in the internal table though.
    I have also found one interesting this, when i pass the XML directly i.e hard code it  there is no exception caused...
    Edited by: sk123456 on Oct 19, 2009 9:05 AM
    Edited by: sk123456 on Oct 19, 2009 9:07 AM

  • Portal run time error while accessing R/3 transaction code

    Hi all,
    We have configured R/3 system and BW system to the Portal.
    In R/3 system we have user ids named "ADMIN" and "FIAR" . ADMIN is for adminstrator and FIAR is for FIAR module. I created the same user ids in Portal , for ADMIN i have assigned ADMINSTRATOR role and for FIAR BI as it is also for our BW system.
    But when iam checking the r/3 iviews for FIAR , it shows PORTAL RUN TIME ERROR , while for ADMIN it works fine.
    Can any body have some ideas about this , pts will be assigned,
    Thanks ..

    Have you collected the error log details which looks similar to the below one??
    "The initial exception that caused the request to fail was:
    User has no RFC authorization for function group SDIFRUNTIME.
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: User has no RFC authorization for function group SDIFRUNTIME.
    at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:455)
    at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1442)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3979)
    at com.sap.mw.jco.JCO$Client.execute(JCO.java:3416)
    at com.sap.mw.jco.JCO$Repository.execute(JCO.java:20471)"

  • Run time error while Creating IDN and Inbound Delivery

    Hi All,
    I am getting Run time error while creating Inbound Delivery Notification from Inbound Queue and Inbound Delivery from IDN
    After debugging i come to know that system is looking for Patch Level SAPKNA7026 but in my system Patch is upto SAPKNA7022
    Is there any OSS notes available to deactivate/resolve this run time error ? I tried 0001798794 Deactivation of hierarchical access functionality but system is still giving me run time error
    Regards,
    P@M

    Hi Agrawal
    As you are getting run-time error after entering the sold to party and material and the error is in SAPLV61Z ,
    close the session for sometime and open again and then create sales order and then enter sold to party and material and then check wheather you are getting or not. If you are still facing the problem then take the help of the ABAP & BASIS consultant's.
    Regards
    Srinath

  • Setting dynamic file name in Receiver file adapter - not from payload

    Guys I just remember reading a weblog but can't find it now that I need it, on how to set the file name in message mapping dynamically but not using any payload field.
    Please let me know if you remember this.
    Thanks a lot,
    Viktor Varga

    also u can check in
    <a href="/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II</a>
    <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>

  • Dynamic file name in case of .txt output files

    Hi all,
    I have a query related to dynamic file name scenario.
    In case of IDOC-XI-FILE sceanrio,
    <b>Is it possible to generate .txt file name based on Plant number like</b>
    <b>%<Plantname>%_%<BusinessDay>_filename.txt</b>
    <b>Note:I have implemneted this for .xml output files but I am not able to implement it for .txt output files .</b>
    PLEASE HELP ME .
    Regards
    Prabhat

    Hi Prabhat,
    I think, the normal Dynamic File Name generation should work fine in your case also. Even if you perform Content Conversion, you can use Variable Name Substiution to create your Destination file name as, the name of the file is determined first and only then is the content converison perfromed.
    for info on content conversion, I would suggest that you go through this thread and check my reply,
    Re: Dynamic  File Name for Receiver File Adapter
    Regards,
    Bhavesh

Maybe you are looking for