Filtering records in message mapping by field value

hi,
i have a source message:
record: 1..1
--row: 0..unbounded
type: 1..1
data: 1..1
i want to map to target message with the same structure only rows with type = x.
how do i do that in message mapping?
thanks
Tomer

if u mean that the target message shud be generated only when type = x use the below mapping.
type------------->
                    equalsS----->createif--->row(tgt root)
Constant[x]--->
Map
type--->type
data--->data

Similar Messages

  • Filtering of records in Message Mapping

    I am facing problem during filtering record in message mapping. My message comes from R3 and should be sent to one business service in entirety and should also be sent to another business service in part. To resolve this I created a message map for selecting record based on some conditions but this creates empty XML nodes wherever condition is not satisfied. Everything works fine but the scenario fails at the end while trying to convert XML to text using file adapter. The error is ‘Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)’

    Hi Rajesh,
    This scenario you are trying can be done using CONDITIONAL RECEIVER DETERMINATION and RB SPLIT, where you can basically have one sender and two receivers.
    To do this without using a BPM.
    1. Create your mapping program that will map the information from the source file
    into the destination idoc. This has to be a 1:N split. Just make sure that the destination message type and message interface are are of occurrence N.
    2. Also, you will have 2 destination interfaces and 2 interface mapping, one for the IDOC and one for the mail.
    Now, there are a few essential steps in your configuration,
    1. In the receiver determination, specify the 2 receiver systems, one for your IDOC and the other for your MAIL.
    2. Now, you will have a condition window. Just type the condition on the basis of which the receiver has to be determined for the mail and the idoc business system. Just remember that the condition can be specified only for the source message.
    3. In the Interface Determination, you have an option called RB CLASSIC and RB SPLIT. To do a 1:N split, you will have to do a RB_SPLIT.
    And since you wanted to covert the XML format to text format you require content conversion at the receiver adapter end, for that please go through these links below. It clearly explains your requirement.
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
    I hope I have answered your query.
    Regards,
    Abhy
    note: do reward points for the helpful answers.

  • When I try to access iTunes or safari, I get the following message:The procedure entry point QTCF_CFHTTP message set header field value could not be located in the dynamic link library QTCF.dll  I uninstalled and reinstalled.same result HELP!

    When I try to access iTunes or safari, I get the following message:The procedure entry point QTCF_CFHTTP message set header field value could not be located in the dynamic link library QTCF.dll  I uninstalled and reinstalled.same result HELP!

    Taken at face value, you're having trouble with a QuickTime program file there.
    Let's try something relatively simple first. Restart the PC. Now head into your Uninstall a program control panel, select "QuickTime" and then click "Repair".
    Does the repair go through okay? If so, are you able to launch iTunes and/or Safari now?

  • Multi-Message Mapping based on value of field - (Without BPM)

    Hi.
    I am having a bit of difficulty with multi-message mapping without BPM. I want to map to message1 & message2 based on a field in the rows of the source structure.
    e.g.
    row1-Source-Field1=> (if equal 0)   => <b>Message1</b>-field1.
    row2-Source-Field1=> (if equal 10) => <b>Message2</b>-field1.
    To attempt to do this, I use the conditions in the graphical mapper:
    if row-Source-Field1 = 0   => Map "Row to MessageType1".
    if row-Source-Field1 = 10 => Map "Row to MessageType2".
    However when I test this the mapping only seems to consider the first row value in row-Source-Field1 and ignores the fact that row two has a value of 10. I think this has something to do with contexts etc..
    I would appreciate any help please.
    Regards.
    Mick.

    in that case try this out
    row1-source-field1 (remove context) -- UDF -splitbyvalue-target
    UDF1(for message 1)
    for(int i=0;i<field1.length;i++)
    if(field1<i>.equals("0"))
    result.addValue(<field to be mapped><i>);
    UDF2(for message 2)
    for(int i=0;i<field1.length;i++)
    if(field1<i>.equals("10"))
    result.addValue(<field to be mapped><i>);

  • Message Mapping, filling field with 0 (zeros) on left

    I need to fill a field with values that has variable lenght adding 0 (zeros) on the left, how can I do it ?
    I'm using the LENGHT in message mapping, with value returned by LENGHT I use FIXVALUES to map the quantity of 0 (zeros) that I need to add in the field.
    Somebody can help me with this problem ?
    Thank's.

    Hi Regis,
    You can use the Arithmetic:FormatNum built-in function for this.
    If you want to left-pad the number with zeros so that the length is always 10, then specify 10 zeros for the format, 0000000000.
    This function takes formats based on java.text.DecimalFormat so you can see all of the possibilities at:
    java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
    Thanks,
    Jesse

  • Skip record in message mapping

    I have scenario where I am doing a RFC call in message mapping.Based on the result I need to create
    IDOC.If result does not meet the condition then I dont have to create IDOC for that record.
    Is any thing can be worked out that I can skip those
    records which does not meet condition in message mapping.
    Any help is appericiated.
    Rekha.

    Rekha,
    You need to use the BPM to check your RFC return data.
    Then you can have the logic to create / Not create the IDoc.
    Are you using XI 3.0?
    Regards,
    Simon

  • Message Mapping : Set Field Name at Runtime

    Hi All,
    Source structure of my message is :
    <recordset>
    <Query></Query>----
    0 to unbounded
    </recordset>
    Target Structure :
    <SQL>
    <key></key>----
    0 to unbounded
    </SQL>
    Now my requirement is such that....if the source message has 3 Query elements then XI should generate key node in target message 3 times but with names key1,key2,key3.
    I am not able to set the names of these target nodes at runtime based on the number of query elements in source message.
    Can anybody please help me?

    HI,,
    YOu can not change the names of your "Fields".
    Hi,
    If you want to change Value you can do that by writing UDF.
    Enter this code in UDF.
    for(int i=0;i<a.length();i++)
    result.addValue("");
    Regards,
    Akshay Jamgoankar.
    Reward points if find useful.>

  • Message Mapping delete Field

    Hello,
    i want to delete a field in the target structure.
    Like you do it with disable.
    for example
    when in the source field the value is empty i want to disable the target field.
    But when there is a value, i want to map this value into target field.
    how i have to handle that?
    regards,
    robin

    Hi,
    Use Create If in mapping. i have documented for my requirement. and apply the same logic in your case also.
    If the field CHARG is don’t have any value in the source means , we shouldn’t produce the Target Element . Then we used the Create If logic. If the Field have the value from the source means we have to produce it at target side , otherwise we have to collapse it.
    See this Screenshot
    http://img258.imageshack.us/img258/8830/createifjo4.jpg
    Regards
    Seshagiri

  • Using List of records in Message Mapping

    I am using SOAP - XI - RFC Structure.
    (SAP CRM - .Net Application).
    I need to get the list of Opportunity records.
    What can I do incase I don't find a proper BAPI for getting the list of Opportunity records.
    Means how can I send a request to get ListOfRecords of some entity to SAP System.
    Thanks,
    Narendra.

    Narendra,
    All the rows of the table will be returned in a tables parameter of this FM.  The data will be unformatted i.e the each of the table record will be put in a single row. So you need to parse the data to get the data for individual field in a tanle row.
    You can see this yourself if you have access to any SAP system or XI ABAP stack itself, it need not be CRM.
    Just go to SE37 and enter the name of the FM and press F8.
    Then enter the name of any existing database table with some rows in it, in the field TABLE_NAME and press F8 again.
    You will be able to see the results in table parameter ENTRIES.
    Anand

  • Parameterized Message Mapping (RFCLookup) test in ESB message behaviour

    Hi Gurus,
    I am using parameterized message mapping using RFCLookup function
    In the TEST tab of the mapping, I've provided my test xml instance message and inputted the Message Mapping Parameter (MMP) value with the RFC Receiver Communication Channel I am using,
    looking at the Trace level in the editor, the source field value was put to the RFC as the import parameter, but the mapping fails with error that the RFC returned my defined exception (no POnumber available for MaterialNumber) --> which is not the expected result because in the ERP backend there is an existing PO for the material.    I tested the RFC in the backend ERP itself and it is performing ok, with a PO number returned for the material (testing in SE37)
    I checked on the Comm Channel and my message is being passed to the RFC adapter, but up to this point only:
    RfcAdapter received a synchronous message. Trying to send sRFC for Z_RFC_NAME.
    RfcAdapter received a synchronous message. Trying to send sRFC for PIREPUSER.
    I have created the Binding for the Operation Mapping.
    Would any of you have an idea on what is missing or what is wrong?
    P.S.   my RFC has a defined exception in it, but currently I am not using it in the RFCLookup  mapping (unchecked "Use Exception" checkbox)

    Hi All,
    Solved the issue by passing the complete length of input parameter as defined in my RFC, e.g. input param in RFC is TYPE to a 12 char field, and the input parameter value being passed by the IDoc is only 6 chars.
    In this case i used formatNumber function to put leading zeroes to complete the input parameter length
    sourceField -->formatNumber --> RFCLookup --> targetField
    Weird behaviour though is that even if my message is successfully received in the receiving system, the RFC CommChannel that my RFCLookup is using is still only showing this:
    2010-12-01 23:14:32 Information RfcAdapter received a synchronous message. Trying to send sRFC for Z_FM_NAME.
    2010-12-01 23:14:32 Information RfcAdapter received a synchronous message. Trying to send sRFC for J2EE_GUEST.
    Why isn't the whole request response of the RFC captured by the RFC adapter?  (e.g. MDT has status DLVG, DLV...)

  • File to multiple idoc scenarios depending on finput field value

    Hi,
    i have a file to idoc scenario.
    depending on a particular field of the file i have to trigger a single idoc (with all the records in the file)or multiple idocs  (for each record in the file ).
    for example,
    the file has 5 records-
    2 records have field value A (create 1 idoc for all As)
    3 records have field value B (create 1 idoc for each B)
    so in this case 4 idocs (1 for all A, and 3x1 for B) are created
    What is the best solution ?-
    1. to have several outbound idoc interfaces and check each interface mapping for field value (A or B) ?
    this solution seems like overwork to me
    2. handle this in mapping ?
    in that case will UDF be better or ABAP mapping
    3. any other way ?
    Thanks in advance

    Hi,
    if you have one IDOC type you can use ABAP mapping
    this way you will handle everything in tables
    and you will be able to post one IDOC (bundled)
    with all IDOCs inside
    also if you use ABAP mapping you will be able to incorporate changes
    easily in the future I believe
    for idoc bundling:
    <a href="/people/michal.krawczyk2/blog/2006/10/11/xi-new-book-mastering-idoc-business-scenarios-with-sap-xi"><b>Mastering IDoc Business Scenarios with SAP XI</b></a>
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Using MISSING FIELD VALUES ARE NULL for external table

    I want to place a null for values missing in the sub_account field. Here is my external table:
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_log_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\log';
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_bad_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\bad';
    create table ext_INCOMING_ORDERS_table (
    Account varchar(5),
    Sub_Account varchar(1),
    Override_Code varchar(1),
    Nomenclature varchar(28),
    chg_nbr varchar(3),
    quantity integer,
    U_I varchar(5),
    zipcode varchar(5),
    type_reject varchar(2)
    organization external
    type oracle_loader
    default directory user_dir
    access parameters
    records delimited by newline
    missing field values are null
    badfile INCOMING_ORDERS_bad_dir:'INCOMING_ORDERS%a_%p.bad'
    logfile INCOMING_ORDERS_log_dir:'INCOMING_ORDERS%a_%p.log'
    fields
    Account(1:5) char(5),
    Sub_Account(7:7) char(1),
    Override_Code(10:10) char(1),
    Nomenclature(11:38) char(28),
    chg_nbr(40:42) char(3),
    quantity(44:48) integer external,
    U_I(50:54) char(5),
    zipcode(56:60) char(5),
    type_reject(61:62) char(2)
    location('PTCLICK.MANUAL.NOMEN.TXT','PTCLICK.ORDERS.TXT', 'EUR_RES.TXT', 'MQ.TXT', 'BPRO.TXT')
    reject limit unlimited;
    How can I place the MISSING FIELD VALUES ARE NULL for missing values for the sub_account?

    made the change I received this error:
    SQL> select * from ext_INCOMING_ORDERS_table;
    select * from ext_INCOMING_ORDERS_table
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "no": expecting one of: "comma, date_format,
    defaultif, enclosed, ltrim, lrtrim, ldrtrim, notrim, nullif, optionally, ),
    rtrim, terminated"
    KUP-01007: at line 7 column 26
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_log_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\log';
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_bad_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\bad';
    create table ext_INCOMING_ORDERS_table (
    Account varchar(5),
    Sub_Account varchar(1),
    Override_Code varchar(1),
    Nomenclature varchar(28),
    chg_nbr varchar(3),
    quantity integer,
    U_I varchar(5),
    zipcode varchar(5),
    type_reject varchar(2)
    organization external
    type oracle_loader
    default directory user_dir
    access parameters
    records delimited by newline
    badfile INCOMING_ORDERS_bad_dir:'INCOMING_ORDERS%a_%p.bad'
    logfile INCOMING_ORDERS_log_dir:'INCOMING_ORDERS%a_%p.log'
    fields
    Account(1:5) char(5),
    Sub_Account(7:7) char(1) NO PRESERVE BLANKS,
    Override_Code(10:10) char(1),
    Nomenclature(11:38) char(28),
    chg_nbr(40:42) char(3),
    quantity(44:48) integer external,
    U_I(50:54) char(5),
    zipcode(56:60) char(5),
    type_reject(61:62) char(2)
    location('PTCLICK.MANUAL.NOMEN.TXT','PTCLICK.ORDERS.TXT', 'EUR_RES.TXT', 'MQ.TXT', 'BPRO.TXT')
    reject limit unlimited;

  • Count-Function in Message Mapping

    Hey, trying to map following structures:
    message
    -m1
    --m11
    -m2
    --m22
    -m3
    --m33
    to
    message
    -m1
    --m11
    -m2
    --m22
    -m3
    --m33
    -f1
    --countItems
    The nodes m1,m2 and m3 can appear 1..unbounded. In target structure I would
    like to have the numbers of all nodes (m1,m2,m3).
    For example: In this source structure m1,m2,m3 appear only one time. In the
    field countItems I would like to have the number 3.
    I tried the count function, but it could only count the structure where I used it (in
    this case: f1).
    How can I count the above-mentioned nodes?
    thanks
    chris

    Hey,
    thanks for your answers.
    But I still couldn't understand how to do this. I open the message mapping for field f1, but the count function could only be set on an target-element, so where to set the counters for m1,m2,m3? Do I have to insert extra fields under m1..m3?
    If I do the counter would increment with every node, so if I have two times m1, in second tree of m1 a two will be insert. If I use the add function, only for these two tree the result would be three!
    @Gangisetty Vijaya Bhaskarudu
    Is this just one UDF? From where he knows, which nodes he have to count, if I have more than m1..m3, but only want to count this three?
    @ sasitharan
    same problem as mentioned above:
    this doesn't work:
    m1--count---\
    I can't use m1 as input for count! Or do I have a wrong count function?
    <b>....au damm, answered my own question. Of course. I use COUNTER and you use
    COUNT!!!!!!!!!!!! I will try this with COUNT!!</b>
    thanks
    chris

  • 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

  • Calling Message mapping Dynamically based on a field value

    Hi gurus,
    I have
    1 source inteface
    1 target interface
    3 Message mapping programs based on the 1 source and 1 Target Interfaces
    I need to decide Dynamically as which message mapping program should be called based on the Input provided by the source system.
    For example:
    If the souce side file sends a field value=1 then message mapping 1 should be called
    If the source side file sends a field value=2 then message mapping 2 should be used...
    Pls provide me help on this ASAP.

    As ur source and target structures are always same, u should have used same mapping with multiple conditions instead of using three different mappings.
    Right now for ur requirement, in ID -> standard Interface Determination, u can use multiple interface mappings based on condition.
    Check heading "Specifying Conditions (for Multiple Inbound Interfaces)" here
    http://help.sap.com/saphelp_nw04s/helpdata/en/42/ea20e737f33ee9e10000000a1553f7/content.htm
    Regards,
    Prateek

Maybe you are looking for