Correct my UDF

If TXT02 is null then Blank
else
OBJ=
TXT02 is under one segment say X
My logic which dint work
If X and TX02 exist and
TXT02 =(Equals ,text function) null ->if
Then " "
else TXT02="OBJ= "
actually we used BPM in this scenario.
Using the above logic,it shows error in swwl.
I tried to use a UDF.
TXT02-> if ! ( a[0].equals(null) ){
result.addValue("OBJ=");
}else{
result.addValue(" ");
The above logic doesn't throw any error in swwl,but even if TXT02=null or blank it always show OBJ=
ie it doestn't goto elsepart.
I am my using whitesapce assigned to the field TXT02 as it is one of the fields in the IDOC Segments,the Scenario is IDOC to FILE..I tried many ways using graphicl mapping it doesn't work.
Please suggest .
Thanks,
Srinivasa

Hi,
Try following graphical mapping
Don't change any context for input fields.
                                           (if true)TXT02 --> CollapseContext -->
TXT02 --> CollapseContext -->
                                  Equals-->     If  --> SplitByValue-->TargetField
            Constant(Blank)-->
                                             (if false)OBJ--> CollapseContext -->
-Rohit

Similar Messages

  • OIM 11gR2 UDF

    Hello
    I try to configure new UDF atribute on my enviro. I follow this steps:
    1, create/activate sandbox
    2, edit User form in Form designer
    3, create text field with display label and auto generated name (myText)
    4, db table usr automatically was extended with atribute usr_udf_mytext
    On Identity self service extend user create form:
    1, create user
    2, customize - view source
    3, Basic Information -> panelFormLayout -> Add Content -> Data Component - Manage Users -> UserVO1 -> myText Add -> ADF Input text w/Label
    4, close design
    5, add value to textbox myText and subbmit form
    6, form saved succesfully
    7, when i checked db table usr the value for atirbute usr_udf_mytext not set.
    If i try it with default value of atribut this vaule was set do db, but only the default value.
    Have you any suggestion how can i solve this problem and correctly save UDF?
    thanks
    a.

    For Create User, select Data Component - Catalog but not Data Component - Manage Users.
    Check this http://docs.oracle.com/cd/E27559_01/admin.1112/e27149/customattr.htm#BABGDEIC

  • DTW, UDF and User Tables

    I always see posts about DTW, so I tried looking to see if i could find what I need, but I couldn't...
    The thing is, I've created a UDF called IsExclusive to Item Master Data, and I've set Valid Values for it (Yes and No)
    Now, I'm trying to import the items via DTW, and I needed it to use one of the valid values i've set before.
    In other words, I need it to work like the Ship Type field. While importing I choose a number in my spreadsheet and DTW automatically reads that number in the correct table and shows me the shipping type.
    The IsExclusive field is one example, I'm also going to need to link DTW to an UDF that's linked to an user table.
    Is any of it possible?
    Thanks in advance,
    Dan Souza

    Danilo,
    If I understand this correctly, you UDF in the Item Mater ( U_IsExclusive ) has been definied with Valid Values for Field.  I presume they look like
    Code - Name
    Y - Yes
    N - No
    I think you would know that in your DTW template, you simply have to enter 'Y' or 'N' in the U_IsExclusive column.  SAP will automatically link this to Yes or No and display in the same in OITM.  I am not sure how better you want to handle this.
    What is your thought on the UDT. Can you show an example of how your values are defined in your UDT.
    Suda

  • In message mapping testing i'm getting this   Error

    hi,
       in message mapping testing i'm getting this error..  can u plz explain what is this error.. and how can i solve this error..
    12:27:47 Start of test
    Source code has syntax error:  D:/usr/sap/XID/DVEBMGS10/j2ee/cluster/server0/./temp/classpath_resolver/Mapf3292850763411dcbfab0013726698e1/source/com/sap/xi/tf/_TRNG_TEST_4_IM_RECEIVERS_.java:72: illegal start of expression </textarea> ^ D:/usr/sap/XID/DVEBMGS10/j2ee/cluster/server0/./temp/classpath_resolver/Mapf3292850763411dcbfab0013726698e1/source/com/sap/xi/tf/_TRNG_TEST_4_IM_RECEIVERS_.java:73: ';' expected } ^ 2 errors  Source code has syntax error:  D:/usr/sap/XID/DVEBMGS10/j2ee/cluster/server0/./temp/classpath_resolver/Mapf3292850763411dcbfab0013726698e1/source/com/sap/xi/tf/_TRNG_TEST_4_IM_RECEIVERS_.java:72: illegal start of expression </textarea> ^ D:/usr/sap/XID/DVEBMGS10/j2ee/cluster/server0/./temp/classpath_resolver/Mapf3292850763411dcbfab0013726698e1/source/com/sap/xi/tf/_TRNG_TEST_4_IM_RECEIVERS_.java:73: ';' expected } ^ 2 errors
    12:27:48 End of test
    thanks
    Babu

    BABU,
    In your message mapping correct the UDF code.
    There is a problem in your textarea and you have missed to place semi colon ";".
    Regards,
    Sarvesh

  • DeletionIndicatior in Message Mapping

    Hi Experts,
    I have an requirement like i need to suppress the field and its value in the output structure. the file i need to drop at the output is an xml file.
    the requirement is to drop a file with variable substitution method with
    input file looks like this:
    Field0 -- 000001
    Field1 -- Sai
    Field2 -- Krishna
    Field3 -- AppleSystems
    Field4 -- Bangalore
    all are one to one mapping, in the output fille i require
    Field1 -- Sai
    Field2 -- Krishna
    Field3 -- AppleSystems
    Field4 -- Bangalore
    Field0 is used for variable substitution for generating the file dynamically, so how could i suppress this field.
    I can go with dynamic file naming but i am using multimapping here so i cannot use dynamic configuration i should go ahead with varibale substitution..
    Second Clarification :
    In the data type decleration we have Deletable Option check box across the field decleration
    when we check it, In the message mapping we can see the DeletionIndicator,
    May i know the purpose of this option
    Your inputs are really appreciated..
    Thanks,
    --Sai
    Edited by: sai krishna on Oct 28, 2010 5:14 PM

    BABU,
    In your message mapping correct the UDF code.
    There is a problem in your textarea and you have missed to place semi colon ";".
    Regards,
    Sarvesh

  • Capturing OIM User Attribute Properties in OIM Export

    I spent a significant amount of time going through the UI and creating UDFs and tweaking my existing and UDF fields to make sure specific ones are hidden and others are shown. I then used the deployment manager to export the User Metadata.
    Upon import of my metadata, I found the following behavior
    - UDFs were added (plus!)
    - OIM User Field attribute properties were unchanged (negative!)
    In other words, all the attributes I hid in my old environment are still showing up in my new environment. Does anyone know how I capture these properties in an export file?

    You can try using MDS to see if it helps, but there is are some acknowledged or apparent bugs in OIM 11.1.1.5 on user field export / import.
    1) The visible property does not import correctly and UDFs (bug 13861473 - not fixed at present)
    2) Changed default values of out-of-the-box user fields in a configuration XML do not import (bug pending)
    3) LOV queries in UDFs do not import correctly (fixed in 11.1.1.5.2)
    I would be interested to know if MDS import does resolve such errors.

  • Auto-Increment a UDF with correct format

    Hope someone can help.
    I am trying to auto-increment a UDF and everytime I do it SAP seems to be reformating it incorrectly.
    Here is the query:
    SELECT CAST(MAX(T.[U_UPC]) as numeric)+1
    FROM RDR1 T
    The results should look like 12345678
    But instead SAP places a value of 12,345,678.00
    I have tested this is SQL by itself and it works fine but when I make it into a Formatted Search in SAP it adds the commas and decimal places.
    Thanks in Advance,
    Craig

    Really close,
    Here is what I have.
    I started out with 84573410001
    I need to increment the last 5 digits by 1 each time the formated search is used.
    So next the number should be 84573410002, 84573410003, 84573410003, etc....
    Edited by: Craig Spehar on May 18, 2009 4:25 PM

  • Mail attachment generated in UDF in SAP PI 7.1 - Issue with line feed

    Hello,
    Situation is:
    Implemented a scenario in SAP PI 7.1 with a mail receiver following this thread:
    /people/samuel.chandrasekaran2/blog/2008/10/06/xi-mail-adapter-dynamically-building-attachment-and-message-body-content-using-a-simple-udf
    which is about moving message lines from sender into an attachment forn the receiver mail.
    It is working great!
    The receiver gets the mail including the attachment with all added lines.
    But when opening this mail there is an issue depending on the program we are using to open the attachment
    which is defined as txt file
    - Using MS Editor 5.1 (Windows XP 2007, SP3) the Carriage returns and line feeds (added with
    in the UDF) to separate the message lines are not recognized. In the Editor each 
        is shown as □   within the text.  Word wrap (flag set in the editor) is different to the carriage return/line feeds set in the file.
    - Using MS Notepad 5.1 (Windows XP 2007, SP3)   situation is the same but
        is NOT shown as □ , it simply seems to be unvisible. Word wrap (flag set in the editor) is different to the carriage return/line feeds set in the file.
    - Using Word 2007 the carriage returns are recognized and used in a correct way to display the file content. But now mutated vowels (äüö) are not recognized. They are displayed as
    So I followed this thread:
    http://help.sap.com/saphelp_nw04/helpdata/en/96/f04142099eb76be10000000a155106/content.htm
    Nice....
    In the editors there is no change, but when opening the file in Word it asks now how to convert the file content
    (proposing UTF-8) and Word recognizes mutual vowels.
    But there seems to be a side effect....
    Following the second link,  PI recognizes an error.
    This is the error message.
    MP: exception caught with message Null as XI message received (PrincipalData in ModulData is null)
    Adapter Framework caught exception: Null as XI message received (PrincipalData in ModulData is null)
    Delivering the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.Exception: Null as XI message received (PrincipalData in ModulData is null).
    But the message is sent to the mail recipient which could be ok if PI would not repeat the mail sending now for several times.
    So we will receive not one but a number of mails.
    So we removed the modul recommended in this help link from the channel.
    Result: Behaviour in Word changed now to the described one. But the errors are no longer coming up in channel monitoring incl. message send repetition. So this is a first success. But the partner wants to process the files first with one of the named editors. So we are looking for another solution now to fix the last issue!
    Your ideas are really welcome!
    Best regards
    Dirk

    Hi,
    as I found this in wikipedia:
    Another common problem is the use of '\n' when communicating using an Internet protocol that mandates the use of ASCII CR+LF for ending lines. Writing '\n' to a text mode stream works correctly on Windows systems, but produces only LF on Unix, and something completely different on more exotic systems. Using "\r\n" in binary mode is slightly better, as it works on many ASCII-compatible systems, but still fails in the general case. One approach is to use binary mode and specify the numeric values of the control sequence directly, "\x0D\x0A".
    Back to my issue:
    In the UDF I am adding "\r\n" but only the "\n" seems to survive!
    In Mapping test line feeds are available and the lines are shown as expected.
    Using Notepad ++ to open the created txt file from the mail shows that LF is in the file at each end of line but CR is missing.
    CR is only at the end of the last line in the file and is not from the UDF that creates the mail or the UDF that creates the attachment lines. Seems that this is added somewhere else behind the mapping.
    This is what I found in galileo computing
    (http://www.galileocomputing.de/glossar/gp/anzeige-11241/FirstLetter-Z, SORRY, only available in german language!):
    In Parsing of XML-Documents the XML-Parser changes the end of line delimiter internally in general to a simple line feed (LF, #0A) as usual in UNIX. ..... In Windows this could result in problems with readability of  source texts (e.g. in Notepad) which can be solved by choosing the right editor.
    My target application is on Windows and not able to "choose" the right editor (PI system is on windoes OS too) !
    But Im wondering where the CR at the end of the text comes from when all the \r\n will be replaced with \n as described.
    Ideas are really welcome!
    Best regards
    Dirk
    Edited by: Meinhard Dirk on May 31, 2011 2:45 PM

  • UDF For Retrieving the Tax Code based on PO

    Hi all,
    Mine is a file to Idoc scenario.
    I wrote a FM to retrieve the Tax Code based on PO .
    Created the udf which directly gets the Taxcode from the r/3 with out importing in to the imported objects,is this correct i never tried this before.
    Find the UDF for the Same.
    final String    CHANNEL_NAME = "GeneratedReceiverChannel_RFC",
         VALNOTFOUND = "VALUE_NOT_FOUND",
         SAPRFCNS = "urn:sap-com:document:sap:rfc:functions",
         TAG_FM = "Z_P_INT012_RFC_LOOKUP",
         TAG_TAX_CODE = "T_TAX_CODE",
         TAG_TAX_CODE_P = "TAX_CODE";
    AbstractTrace trace = container.getTrace();
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = null;
              factory.setNamespaceAware(false);
              factory.setValidating(false);
              try {
                   builder = factory.newDocumentBuilder();
              } catch (Exception e) {
                   trace.addWarning("Error creating DocumentBuilder - " + e.getMessage());
              Document docReq = null;
              try {
                   // Building up RFC Request Document
                   docReq = builder.newDocument();
                   Node root = docReq.appendChild(docReq.createElementNS(SAPRFCNS, TAG_FM));
                   Node nodeTbOpt = root.appendChild(docReq.createElement(TAG_TAX_CODE));
                   for (int i = 0; i < pernr.length; i++) {
                        Node nodeTbOptItem = nodeTbOpt.appendChild(docReq.createElement("item"));
                        nodeTbOptItem.appendChild(docReq.createElement(TAG_TAX_CODE_P)).appendChild(docReq.createTextNode(TAX_CODE<i>));
              } catch (Exception e) {
                   trace.addWarning("Error while building RFC Request  - " + e);
              trace.addInfo("RFC Request XML: " + docReq.toString());
                                                    //trace.addWarning("RFC Request XML: " + docReq.toString());
              // Lookup
              Payload load = null;
              try {
                   Channel channel = LookupService.getChannel(receiver[0], CHANNEL_NAME);
                   RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   InputStream is = new ByteArrayInputStream(docReq.toString().getBytes());
                   XmlPayload payload = LookupService.getXmlPayload(is);
                   load = accessor.call(payload);
              } catch (LookupException e) {
                   trace.addWarning("Error during lookup - " + e);
              // Parsing RFC Response Document
              Document docRsp = null;
              try {
                   docRsp = builder.parse(load.getContent());
              } catch (Exception e) {
                   trace.addWarning("Error when parsing RFC Response - " + e.getMessage());
              trace.addInfo("RFC Response XML: " + docRsp.toString());
                                                    //trace.addWarning("RFC Response XML: " + docRsp.toString());
              try {
                   NodeList res = docRsp.getElementsByTagName("item");
                   for(int i=0;i<res.getLength();i++){
                        NodeList itemNodes = res.item(i).getChildNodes();
                        Map itemMap = new HashMap();
                        for(int j=0;j<itemNodes.getLength();j++){
                             itemMap.put(itemNodes.item(j).getNodeName(), itemNodes.item(j).getFirstChild().getNodeValue());
                        rows.add(itemMap);
                                                            catch (Exception e) {
                   trace.addWarning("Result value not found in DOM - " + e);
                   result.addValue("true");
    Error:
    16:24:08 Start of test
    Source code has syntax error:  /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:598: 'class' or 'interface' expected public void TaxValues$(String[] a,String[] b,ResultList result,Container container){ ^ /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:618: 'class' or 'interface' expected } ^ /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:619: 'class' or 'interface' expected ^ 3 errors  Source code has syntax error:  /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:598: 'class' or 'interface' expected public void TaxValues$(String[] a,String[] b,ResultList result,Container container){ ^ /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:618: 'class' or 'interface' expected } ^ /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:619: 'class' or 'interface' expected ^ 3 errors
    16:24:11 End of test.

    Hi Potharaju,
    Why don't you try this, that really works:
    If you are using PI 7.1:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/33/1ec6ced273493a993a80c2301c03da/frameset.htm
    If you are using XI 3.0, PI 7.0
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    Try with these.
    Regards,
    Juan

  • Automatic update of UDF Row field in a sales order

    I have recently added a UDF field to the rows of a sales order which I would like to display an items MOQ. I have written a query which I have embedded into this field by way of the User Defined Values Setup. When checking this I can see that the field can be populated with the  correct value by pressing shirt + F2 however, I would like this to happen automatically. I have tried setting the auto fresh on exiting altered column by Item Code and by Confirmed Del Date respectively but neither seem to work.
    Any ideas?

    Sorry i forget to remove OITM
    SELECT A.MinOrdrQty from OITM A INNER JOIN RDR1 B ON A.ItemCode=B.ItemCode WHERE A.ItemCode=$[RDR1.ITEMCODE]
    Now try
    --Manish

  • I'm trying to create a Windows partition using Boot Camp. An error comes up telling me that I need to reformat my current partition(s) into one single partition. However, it's already formatted in the correct format, and is already a single partition.

    As made clear in the title:
    I'm trying to create a Windows partition using Boot Camp. An error comes up telling me that I need to reformat my current partition(s) into one single partition. However, it's already formatted in the correct format, and is already a single partition.
    My computer recently had a kernel panic, which apparently the corruption was in the system and needed to be erased and re-installed. I have a complete back-up using an external hard drive, and I am definitely not willing to do another one of those to reformat a partition that is already singular. I restarted the computer after ejecting my back-up, and after turning off time machine (thinking that boot camp was recognizing it as a secondary partition), however the error still occurs.
    Is there any way to get around this?

    diskutil list:
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *750.2 GB   disk0
       1:                        EFI                         209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh HD            749.3 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                            Windows7               *2.9 GB     disk1
    diskutil cs list:
    No CoreStorage logical volume groups found
    mount:
    /dev/disk0s2 on / (hfs, local, journaled)
    devfs on /dev (devfs, local, nobrowse)
    map -hosts on /net (autofs, nosuid, automounted, nobrowse)
    map auto_home on /home (autofs, automounted, nobrowse)
    /dev/disk1 on /Volumes/Windows7 (udf, local, nodev, nosuid, read-only, noowners)
    From my very basic knowledge - it still looks as if there is only one partition (not including the windows 7 CD necessary to install the windows partition).

  • UDF to get the filename for File Sender Adapter

    Hi,
    I had an requirement to get the  the Filename and map to the  target payload.
    I had configured the File Sender Adapter settings in the ID
    This is the following UDF i got from SDN.
    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;
    But when iam using this UDF iam getting an error
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_ORDER_CRS_OB_SAP_PROXY_IB_ method Filename$[com.sap.aii.mappingtool.tf3.rt.Context@54e154e1]
    Please help me in correcting the error.
    Thanks
    Srinivas

    Hi Jayson,
    actually, in the interface mapping, it doesn't give exception.
    The DynamicConfiguration is a constant retrieved from the container object, so it will never be returned as null (given that the container object was instantiated).
    Just the retrieved value will be null (since it was not previously set), but no exception occurs.
    In the message mapping, the container object is never instantiated, and that's the reason for the NullPointerException.
    Regards,
    Henrique.

  • Error in mappingwith dynamic configuration using udf

    Hi All,
    Good Morning,
    i am working with ABAP proxy to file scenarion but here according my client requirement i am using udf for file dynamic configuration.
    In mapping, i mapped the field from "Filename" to message type tag(receiver file header)  "/ns0:MTxxxxxxDataFile". between there two fields i am using the following udf for dynamic configuration. but i got error after testing with test data in mapping that is also mentioned below.
    plz help me to solve the error. i will be wait for ur immediate response this sis very urgent.
    very thankfull to immediate response.
    UDF:
    i am not puting any packages here.
    public String putFileNameInHeader1(String a,Container container){
    //write your code here
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, a);
    return "";
    ERROR:
    12:21:30 Start of test
    Compilation of MMSAPLegacySalesDataToCOGNOS successful Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:83) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:59) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:37) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:252) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:75) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:59) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:37) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:252) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.NullPointerException at com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_.putFileNameInHeader1$(_MMSAPLegacySalesDataToCOGNOS_.java:853) ... 26 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30]
    12:21:35 End of test

    Hi Sai,
    First of all, this UDF is pretty well knaown so there is no error in this UDF or your configuration for this UDF. I can suggest you something that at the time of configuration in IR, give a context object for that particular field of that file and then use the contect object name everywhere to refer that field. and also check the message type config for correction for my sake.
    There is also a possibility that of the input data. i guess you are sending the input file from Cognos and you making the file and putting some where in XI directory and want these to process something and generate with some new desired filename. Check the input because i guess its finding NOTHINg as an Input. check once again.
    Hope this will help you.
    Regards
    Aashish Sinha
    PS : Reward points if helpful.

  • Mapping UDF

    Hey folks
    I have a mapping issue:
    It is IDOC to file scenario
    A segment in IDOC repeats multiple times. I want to take a field of the first repeating segment and map it to a target field.
    And i want to take afield of the last repeating segment and map to a target field.
    Eg : E1EDPL1  
                GSB     100
          E1EDPL1
               GSB      200
          E1EDPL1
               GSB     300
    Mapping logic 1 :
    Take the first GSB ( Value: 100) and map to a target field.
    Mapping logic 2 :
    Take the last GSB(Value : 300) and map to a target field.
    Guess we need to have a context java function which takes as an input an array of GSB and extract first and last GSB.
    Need help with the java udf.
    Thnx

    A small correction
    Here a is the GSB values.
    cache parameter - context
    1st udf
    public void add(String[] a,ResultList result,Container container)
       //write your code here
    result.addValue(a[0]);
    GSB ---> add -
    > tgt1
    2nd udf
    public void add1(String[] a,ResultList result,Container container)
    //write your code here
    int len = a.length -1;
    result.addValue(a[len]);
    GSB---> add1 -
    >tgt2

  • XLR old reports not working with UDF from Marketing docs

    Hi,
    We are using SAP Business One 2005 A (6.80.318)  SP: 01  PL: 16 and the following version of XLR.
    XLR Version 6.80.367 (under about XLR) or 6.80.01.26 (under Add-ons manager).
    We have just gone from 6.80.01.25 to 6.80.01.26 version of XLR and have had an issue with the reports that contain UDF's. 
    Previously when doing patches of SBO we have had issues with the UDF's renumbering eg.  SalesEmp_1 becoming SalesEmp_2.  Within the XLR reports we would simply update the identifier of the UDF and it would report correctly.
    The issue this time is that the identifier has disappeared.  ie. SalesEmp_1 has become SalesEmp.  When you create a new report the data can be retrieved correctly however when you change the existing report to reflect SalesEmp (rather than SalesEmp_1) it reports no data. 
    I am not keen on re-creating all of my reports with UDFs and was wondering if anyone else had encountered the same issue and come up with a solution. 
    It may have something to do with the UDF's being available as Dimensions now whereas previously they were only Light Dimensions?
    Let me know if I need to clarify further - although it will probably make perfect sense if you have been through the same issue - and if you haven't you may not be able to help.
    Kind regards
    Andrew

    Hi Andrew,
    Unfortunately I don't know the answer to your question...
    ...but anyway, this Forum is focussing on the SAP Business One SDK.
    In principle the Implementation Forum in the PartnerEdge P2P (http://p2p.sap.com/businessoneforum?type=join) area should more suitable for such questions.
    I suggest that you raise your issue there - and hope that you will get the right answer.
    ...or since the issue came up when you changed from one version of XLR to another - log a question to SAP Support on the XLR component.
    Sorry,
    Frank

Maybe you are looking for