Message Mapping (Substring)

Hi All,
I am using a standard substring in my message mapping to get the first 4 characters of the incoming text. This work fine except when the incoming text is less than 4. I get an error.
Is there a way that i can accomplish the above despite the length of the word?
Thank you in Advance,
Danny

Swarup,
I think it won't work. If his string length is 3 or more than 3, then ur solution is good. What happens if the input string length is 1 or 2? do u think will it work? Please correct me if I misunderstood ur code..
Danny,
I would say as suggested as Prateek, write a simple UDF and check for the length and return if it's less than length <=4 or substring if length is >4 . If you don't want to write UDF then
Use Stadard functions
Input -
>length--->greater & Constant(4) ->and ->If then else-->Output
In if then else then part do substring, else part pass input directlty.
And function Accepts two input, first parameter is output of greater, second parameter is Constant(4).
Hope it helps!
raj.

Similar Messages

  • Message mapping

    We are using Graphical/Message mapping here.....
    Problem is: I need to truncate the LAST 10 digits of a string.  The source can vary in length.
    e.g.
    Source: 3245678567945
    Target would look like:  5678567945
    Analysis:
    We looked all the functions available in message mapping, but nothing seems to be in this use.  I thought of using the "Substring" function available in Message Mapping, but it is going to give me first 10 digits (Left to Right).
    Any expert can help please?

    write simple udf
    function truncateLast( String s )
       if ( s != null && s.length() >= 10 )
          s  = s.substring ( s.length() - 10, s.length() );
    return s;
    i though to truncate last 10.. so changed the params for substring.

  • Regarding Message Mapping in JDBC Scenario

    Hello Experts,
            I got struct up in message mapping. In message mapping we can able to see different types of Functions. So I need some clarifications on it. Functions are available like...
    Conversions
    Boolean
    Node Functions
    Constants
    Date
    Text
    Static
    Arithmetic
    So please explain in simple for each functions.
    Points will be rewarded.
    Thank you

    Hi
    *Boolean*:-
    And -- checks for 2condition, return a true value if both condition are satisfied
    Or --checks for 2condition, return a true value if one condition is true.
    Not - checks if the condition is not equal to.
    Equals - Check whether 2 Boolean values are equal
    NotEquals
    If u2013 Returns second value if the first argument is true. otherwise returns third argument
    If WithoutElse u2013 Returns value of second argument, if first argument is true.
    Node Functions:-
    createIf - Produces empty value if argument is true; Resultlist.SUPPRESS otherwise
    removeContexts u2013 Produces plain stream of values with No context changes
    replaceValue u2013 replaces value of source field to value specified in Function Properties.
    Exists u2013 Returns true, if Node exists otherwise false
    SplitByValue u2013 inserts context changes after event specified
    collapseContexts u2013 Produces one empty string value out of each arguments context. All arguments are in one context
    useOneAsMany u2013 Use First Argument as IS on same level as third argument. second argument defines when next value of first argument is used
    sort u2013 sorts values in each context
    sortByKey u2013 Sorts values in second queue by keys from first queue
    mapwithDefault u2013 Inserts default values specified in the function properties into empty contexts
    formatByExample u2013 Takes values from the first queue and inserts them in the structure of second queue.
    Constants:-
    Constant u2013 Generates constant value
    CopyValue u2013 Takes specified value in argument stream and copies it an infinite number of times
    Sender u2013 Sender System
    Receiver u2013 Receiver System
    Date:-
    CurrentDate u2013 Return current date in specified format
    DateTrans u2013 Transforms date from input format to output format
    Dateafter u2013 Returns True if first date is after second otherwise false
    DAteBefore - Returns True if first date is before second otherwise false
    CompareDates u2013 Compares two dates
    Text:-
    Substring u2013 Returns substring depending upon the given parameters
    Concat u2013 concatenates 2 strings inserting delimiter string parameter between them
    Equals u2013 Check whether Strings are equal
    indexOf2 u2013 returns the index where the second string is found for the first time in the first string
    indexOf3 u2013 As with indexOf with 2 parameters, But starting search at the specified position
    lastindexOf2 u2013 Returns the index where the second string is found for the last time in the first string
    lastIndexOf3 u2013 As with lastIndexOf with 2 parameters starting search at the specified position
    compare u2013 compares 2 strings lexicographically
    replaceString u2013 Replaces each occurrence of pattern(2nd argument ) of source string(1st arg). By third string
    length u2013 returns length of string
    endsWith u2013 Tests whether string ends with specified suffix
    startsWith2 u2013 Tests whether string starts with specified prefix
    startsWith3 u2013 Tests whether string starts with specified prefix beginning at specified location
    toUpperCase u2013 Converts all characters in string to upper case
    trim u2013 Removes white space from both ends of string
    toLowerCase u2013 Converts all characters in String to Lower case
    Statistic:-
    sum u2013 calculates sum of all numbers in each context
    average u2013 calculates the average of all numbers in each context
    count u2013 Counts number of values in each context
    Index u2013 For each incoming value, this Function returns the index number of the incoming value in the context, String from the initial index and increasing by the increment defined in the parameters.
    Arithmetic:-
    Add u2013 add two values
    Subtract u2013 subtracts second value from the first value
    equalsA u2013 Returns true; If float numbers represented by argument strings are equal otherwise returns false
    abs u2013 returns Absolute value of argument
    sqrt u2013 Returns square root of the number
    sqr u2013 Returns square of the number
    sign u2013 Returns -1 if number is negative, +1 if positive, 0 if 0
    neg u2013 Multiplies number to -1
    1/x u2013 calculates 1/x
    Power u2013 Returns value of the first argument to the power of the second argument
    Less u2013 Returns true if the first number is less than the second number otherwise false
    Greater - Returns true if the first number is greater than the second number otherwise false
    Multiply u2013 Multiplies 2 values
    Divide u2013 Divides first value by the second value
    Max u2013 Returns maximum of 2 numbers
    Min u2013 Returns Minimum of the 2 numbers
    Ceil u2013 Returns the smallest (closest to the negative infinity) initial value that is not less than the argument and it is equal to the mathematical integer.
    Floor - Returns the largest (closest to the negative infinity) initial value that is not Greater than the argument and it is equal to the mathematical integer.
    Round u2013 Returns closest initial value to the argument
    Counter u2013 Counts number of invocations. Initial value and increment defined by Parameters.
    FormatNum u2013 Formats Number with given pattern.
    Conversions:-
    FixValues u2013 Creates a Local Table to perform a value Mapping
    ValueMapping u2013 Define jump to Value Mapping table of Integration Directory.
    Message Mapping(Node Function) Part-1
    Message Mapping Simplified - Part I
    Sravaya Talanki- Message Mapping(Node Function) Part-2
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Standard Functions
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
    Advanced mapping function(mapwithdefault,formatbyexample,sort,sortbykey)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    Hope this is useful
    Saiyog
    Edited by: Saiyog Gonsalves on Jul 11, 2008 1:14 PM

  • Require a Message mapping for this Logic.

    Hi Experts,
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note  is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
               So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B  then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field  in the Target Side.  ike wise the process goes on upto 3.Kindly do the needy..
    Thanq very much in advance..
    Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PM

    Hi Prashanth,
    Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
    formatByExample>collapseContext>SplitByEachValue-->Recv_Date
    FormatByExample:
    input1:resulrOfSortByKey
    input2:concatination>removecontext>sort-->SplitByValuChange
    sortByKey:
    input1:concatination-->removecontext
    input2:date-->removecontext
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
    formatByExample>sum>Recv_Quantity
    FormatByExample:
    input1:sortByKey
    input2:concatination>removecontext>sort-->SplitByValueChange
    SortByKey:
    input1:concatination-->removecontext
    input2:Quantity-->removeContext
    Regards,
    Priyanka.

  • How to handle the source text length exceed more than target text length size in Message mapping  PI 7.31

    I have a File to IDOC Message Mapping Scenario:
    Source Field                         Targefield
    Communiication Address-(Email ID)                                    E1EDK2 - TDLINE
    Source Field length: 1/80                                                                               target Field length: Char\70
    Mapping Condition:
    Note: TDFORMAT =  ‘=’ (Long Line), may need to create 2 TDLINE fields depending on length of text
    So give the Solution for handling text Length exceed than target field lenght Using TDLNE and TDFORMAT......
    Guide me  and give Suggestions to achive this.

    Hi ,
    Below is the generic sol for your problem .Graphical mappings wont workout for your problem while using sub string .
    Input -->Input string
    Length -->length of TDLINE
    MESSAGE_V1,V2,V3,V4....depends on how many TDLINES you expect .Here I have taken 4 .
    public void SplitbyLength(String[] Input, String[] Length, ResultList MESSAGE_V1, ResultList MESSAGE_V2, ResultList MESSAGE_V3, ResultList MESSAGE_V4, Container container) throws StreamTransformationException{
    int lengthVal = Integer.parseInt(Length[0]);
    int InpLenVal ;
    for(int i=0;i<Input.length;i++)
    InpLenVal  =Input[i].length() ;
    if (InpLenVal<=lengthVal)
    MESSAGE_V1.addValue(Input[i].substring(0));
    MESSAGE_V2.addValue(ResultList.SUPPRESS);  
    MESSAGE_V3.addValue(ResultList.SUPPRESS);  
    MESSAGE_V4.addValue(ResultList.SUPPRESS);  
    else if ((InpLenVal>lengthVal) && (InpLenVal <= (lengthVal*2)))
    MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
    MESSAGE_V2.addValue(Input[i].substring(lengthVal,InpLenVal));
    MESSAGE_V3.addValue(ResultList.SUPPRESS);  
    MESSAGE_V4.addValue(ResultList.SUPPRESS);  
    else if ((InpLenVal>(lengthVal*2)) && (InpLenVal <= (lengthVal*3)))
    MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
    MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
    MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),InpLenVal));
    MESSAGE_V4.addValue(ResultList.SUPPRESS);  
    else if (Input[i].length()>(lengthVal*3)  && (InpLenVal <= (lengthVal*4)))
    MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
    MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
    MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),(lengthVal*3)));
    MESSAGE_V4.addValue(Input[i].substring((lengthVal*3),InpLenVal));
    else if (Input[i].length()>(lengthVal*4) )
    MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
    MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
    MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),(lengthVal*3)));
    MESSAGE_V4.addValue(Input[i].substring((lengthVal*3),(lengthVal*4)));
    Regards
    Venkat

  • How can we pick Message ID at runtime in message mapping?

    Hi Experts,
    I am working on a file to file Scenario.
    Lets say I have a Field called SEQ_NO at target.
    I want to populate it this with Message ID (MONI one) at runtime.
    Is it possible? If Yes, How can we do this?

    Hi,
    No It is not working fine.
    Inside TEST----
    > Parameter Tab< I had input MESSAGE_ID Against MessageId.
    After that I run It, Got the error as Below:
    17:48:17 Start of test
    Runtime exception during processing target field mapping /ns0:MT_BANK_CUST_DET/File_Out/Header/SEQNO. The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@6ec66ec6] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MT_BANK_CUST_DET/File_Out/Header/SEQNO. The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@6ec66ec6].
    It is possible to get MESSAGE ID which we get in MONI for every message pass throught XI in message mapping itself?
    Regards
    Pradeep

  • Justification in Message Mapping

    Hi
    I am getting a string from SAP of field length '10'. Now I have to write it to the <b>fixed length file</b>. Now if I am getting the value for this as "ABC" then in the fixed length file it should be "ABC       " ie., ABC 3 characters and rest 7 should be spaces. For this to achieve I think we have to make left justification in message mapping. Can you guys help me out in achieving this requirement?
    ---Satish

    Hi Satish...
    you do not need to write a user defined function for this ...this can be achieved using standard fucntions itself....supposing you want the string to be 10 characters long with spaces at the end...you achieve by doing the following...
    input_str --  trim
                        concat -- substring(0,10)---output
    Constant(10 spaces)
    output is what you want....
    Thanks,
    Renjith

  • Message mapping tab works fine ,runtime exception

    Hi ,
    Need some advice... I get a runtime messge mapping error ( system error) failing the substring logic although when i download the same payload and run in test tab it works fine. Has anyone encountered similar issue ?
    Thank you.

    objects are active.Your second point is good ,but this error only happens when a load test is done , partciular messages throw runtime exception and fail in mapping on substring logic but when the same payload is downloaded and run via message mapping tabl it runs through. i will try disabling the substring logic nodes.
    Secondly when i get a runtime exception ,i try to restart the same message and it goes thorugh successfully. So restarting in moni helps.... but does not explain why....
    Thanks
    Edited by: xi project on May 18, 2010 12:28 AM

  • File to IDOC Senario (Message Mapping)

    Hi Experts,
    I am a fresher.
    This is "  File to IDOC Senario  ".
    I have Doubt on  this: ( In Message Mapping)
    Source field : MSG
    Length : 1/264
    Taget field : E1EDKT2 - TDLINE
    Legth : CHAR/70
    Mapping Condition :
    Note: TDFORMAT =  ‘=’ (Long Line), until next line of MSG. When new line occurs in MSG, then use TDFORMAT = ‘/’
    How to Make the Mapping for this?
    Anyone Can help me to get it Quickly.
    give your Suggestions and Show some Example Mappings......

    Hi ,
    Below is the generic sol for your problem .Graphical mappings wont workout for your problem while using sub string .
    Input -->Input string
    Length -->length of TDLINE
    MESSAGE_V1,V2,V3,V4....depends on how many TDLINES you expect .Here I have taken 4 .
    public void SplitbyLength(String[] Input, String[] Length, ResultList MESSAGE_V1, ResultList MESSAGE_V2, ResultList MESSAGE_V3, ResultList MESSAGE_V4, Container container) throws StreamTransformationException{
    int lengthVal = Integer.parseInt(Length[0]);
    int InpLenVal ;
    for(int i=0;i<Input.length;i++)
    InpLenVal  =Input[i].length() ;
    if (InpLenVal<=lengthVal)
    MESSAGE_V1.addValue(Input[i].substring(0));
    MESSAGE_V2.addValue(ResultList.SUPPRESS); 
    MESSAGE_V3.addValue(ResultList.SUPPRESS); 
    MESSAGE_V4.addValue(ResultList.SUPPRESS); 
    else if ((InpLenVal>lengthVal) && (InpLenVal <= (lengthVal*2)))
    MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
    MESSAGE_V2.addValue(Input[i].substring(lengthVal,InpLenVal));
    MESSAGE_V3.addValue(ResultList.SUPPRESS); 
    MESSAGE_V4.addValue(ResultList.SUPPRESS); 
    else if ((InpLenVal>(lengthVal*2)) && (InpLenVal <= (lengthVal*3)))
    MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
    MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
    MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),InpLenVal));
    MESSAGE_V4.addValue(ResultList.SUPPRESS); 
    else if (Input[i].length()>(lengthVal*3)  && (InpLenVal <= (lengthVal*4)))
    MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
    MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
    MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),(lengthVal*3)));
    MESSAGE_V4.addValue(Input[i].substring((lengthVal*3),InpLenVal));
    else if (Input[i].length()>(lengthVal*4) )
    MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
    MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
    MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),(lengthVal*3)));
    MESSAGE_V4.addValue(Input[i].substring((lengthVal*3),(lengthVal*4)));
    Regards
    Venkat

  • Message Mapping  - concatenate issue

    Dear all,
    I am making a message mapping with two structures:
    Source:                
    UF
    CNF
    I am creating a target message that will have a initial tag (  at the end of line if I don´t have this field ?
    Thanks,
    Regards,
    Fernando

    Hi,
    <i>How can I concatenate the fields to only one line without lost the tag control?</i>
    You could use the 'constant' function(from the available list of functions in the mapping editor) to generate the tags.
    <item><cUF>43</cUF><cNF>137530928</cNF></item>.
    1st function concatenate:
    1st input: <item> field
    2nd input: const <cUF>
    2nd function concatenate:
    1st input: output of '1st function concatenate'
    2nd input: substring(0,2)
    3rd function concatenate:
    1st input: output of '2nd function concatenate'
    2nd input: const </cUF>
    4th function concatenate:
    1st input: output of '3rd function concatenate'
    2nd input: const <cNF>
    5th function concatenate:
    1st input: output of '4th function concatenate'
    2nd input: substring(2,10)
    6th function concatenate:
    1st input: output of '5th function concatenate'
    2nd input: const </cNF>
    7th functon concatenate:
    1st input: output of '6th function concatenate'
    2nd input:constant </item>
    Hope this helps.
    Regards,
    Smitha.
    Message was edited by:
            Smitha Rao

  • Message mapping crashes only in INterface Mapping

    hi guys,
    i have an issue with one of my interface mapping. the message mapping crashes when i run the interface mapping. however when i run the message mapping separately it works fine.
    any hints?
    thanks,
    ali.

    Hi Ali,
    If you are using try catch then in case of catch condition if you pass null to substring it will fail.. Either you call the substring inside your udf (so that you can make sure that the filename is available then only substring is called) else handle the null condition in message mapping before calling substring...
    Also you can try looking into the display queue entry for substring in Message Mapping for further analysis. Here also you will not get any filename by dynamic configuration, but i am not sure why it was not failing there.. May be display queue will help you.
    Regards
    Suraj

  • Error while activating any message mapping in IR: very strange

    hi forum i m getting an error in IR while activating any messageMapping.
    the error is too long to be posted....i m posting a few lines of that:
    •     Internal error while checking object Message Mapping MM_sdptestFileToFile | http://sdzpoc.com.test/sdptest (ZPOC_TEST, 1.0 of zpoctest); see details (CHECK_EXCEPTION)
    •     Internal error while checking object Message Mapping MM_sdptestFileToFile | http://sdzpoc.com.test/sdptest (ZPOC_TEST, 1.0 of zpoctest); see details (CHECK_EXCEPTION)
    •     /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapdddd0cb0100311dca6090012799eddc6/source/com/sap/xi/tf/_MM_sdptestFileToFile_.java (No such file or directory (errno:2))
    •     /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapdddd0cb0100311dca6090012799eddc6/source/com/sap/xi/tf/_MM_sdptestFileToFile_.java (No such file or directory (errno:2))

    Sudeep,
    Let we try this way. I'm sure you might have some existing mapping objects in IR.
    Try to change that object(Description give some name) and activate again the object.
    Reply your results whether you are getting the same error.
    One sec before changing the object just test the mapping and change the object.
    Best regards,
    raj.

  • Error while activating message mapping

    Hi,
    We are trying to activate message mappings and getting error as CHECK_EXCEPTION and in error details its showing that usr/sap/server.........................../classpath_resolver/Map.......................no such file or directory.........
    What can be the issue?We can activate all other objects(DT,MT,IM,etc)
    Best Regards,
    Harleen Kaur Chadha

    Hi
    Check this thread you can find the reason for this error CHECK_EXCEPTION solved here
    Activating Object in IR - Getting Null Pointer Exception
    Re: mapping test error
    Internal error while checking object Message Mapping...
    Problem Activating Mappings in the IR
    Message Mapping activation Error
    Regards
    Abhishek

  • Error while opening Message Mapping

    Hi All,
    I have one MM in ESR, IDoc to EDI, it has been developed before, and the interface is working successfully.But when I open this MM in ESR, it given a STOP error with desc as 'For input string: ""'.
    and then there is nothing displayed on Screen under Definition,Test and Functions tab of MM.The Signature tab content is visible properly.
    I am working on PI 7.1.
    Is this issue is because of version comapatibilty or missing object. Please provide your inputs to resolve this issue,
    Thanks,
    Ruchi

    Hi All,
    I have checked with my basis team, but they suggested that the patches can not be installed as this problem is happening with single message mapping.
    When I open this MM, it gives the same STOP error :For input string: "". and when I click on Message Mapping -> Check button, it prompts a message 'Parameter #ParamName# has the invalid value null'.
    Please help me to resolve this.As the mapping itself is not getting loaded, so not getting how to set this parameter value(if it is used in MM).

  • PI 7.11: IDoc Message mapping

    Hi there,
    I'm currently working on a graphical message mapping using IDoc HRMD_A06 as source structure (HR master data transferred via PFAL).
    In my result structure I have to fill a field CostCenter with the following logic:
    If field KOSTL (cost center) is filled in node E1P0315, map this field to CostCenter in result structure, otherwise take KOSTL of node E1P0001.
    The end date (ENDDA) has to be '99991231' in each case.
    This is how the result structure looks like:
    <e>                       [1...1]
      <CostCenter>            [1...1]
    </e>
    This is the simplified source structure:
    <E1PLOGI SEGMENT="1">
      <E1PITYP SEGMENT="1">                        [0...n]
         <E1P0001 SEGMENT="1">                     [0...n]
           <INFTY>0001</INFTY>                     [0...1]
           <ENDDA>99991231</ENDDA>                 [0...1]
           <KOSTL>0000012345</KOSTL>               [0...1]
        </E1P0001>
      </E1PITYP>
      <E1PITYP SEGMENT="1">                        [0...n]
        <E1P0315 SEGMENT="1">                      [0...n]
          <INFTY>0315</INFTY>                      [0...1]
          <ENDDA>99991231</ENDDA>                  [0...1]
          <KOSTL>0000024001</KOSTL>                [0...1]
        </E1P0315>
      </E1PITYP>
    </E1PLOGI>
    How can I do the check if field KOSTL of node E1P0315 is null?
    I've tried an existence check for the whole node (E1P0315->exists), but then it fails, because all E1PITYP nodes are processed.
    I hope my problem is clear to you.
    Would it be better to use another mapping type?
    As I'm an ABAP developer, I would of course prefer some lines of code to this graphical drag&drop thing.
    Thanks in advance!

    Cheers, guys!
    I did it now like that:
    http://www.abload.de/image.php?img=mappingflknz.jpg
    Click on the image to enlarge it!
    The logic is as following (ABAP Pseudo-code ):
    IF 0315_KOSTL and 0315_ENDDA are populated.
      IF 0315_ENDDA equals '99991231'.
        map 0315_KOSTL to Cost_Center.
      ENDIF.
    ELSE.
      IF 0001_KOSTL and 0001_ENDDA are populated.
        IF 0001_ENDDA equals '99991231'.
          map 0001_KOSTL to Cost_Center.
        ENDIF.
      ENDIF.
    ENDIF.
    Is that a good way to do that mapping?
    Do I also have to use the removeContexts function or is it ok like that?
    Could I also do that with an ABAP mapping program?
    Thanks in advance!

Maybe you are looking for

  • Invalid File Path Names in Mac OS X

    Hello, I am trying to create a Javascript in Mac OS X 10.4.11, however I am having some trouble with what characters are valid in file path names in Mac OS X. Does anybody know where I can get a list of invalid characters that cannot be used in a fil

  • Why is my MB Pro trying to do setup - security issue?

    My MB Pro with OSX Lion was working fine after the most recent software update.   I have it set to require a login at startup but I don't get a login screen.  Instead, I get a setup prompt.  It's as if it's been reset to factory default. I was out of

  • All my emails prior to 10/1/2011 have disappeared.

    All my emails prior to 11/1/2011 have disappeared from icloud.  They were backed up on timemachine but they have also disappeared. I am trying to move them off the icloud servers but need them restored so as to do so.  Apple customer service it seems

  • Deleting and deploying the applications

    We are using wls 10.3.2 in Beta environment. We have 6 applications deployed in one of the managed server. We deleted one of the old ear file and deployed a new version ear file using default stage mode. But while trying the access the application ou

  • Identity of Backup has changed..umm, no it hasn't

    I've been backing up for more than a year on my trusty Time Machine, sometimes there are hiccups but mostly it is seamless. This morning, "The identity of the backup disk has changed since the previous backup." Sorry, nothing has changed on my end. N