How to use Variable in message mapping

Hi Experts,
I have some problem using variable in message mapping.
In one message mapping, since a block of logic is repeated for several fields, then i tried to use a variable instead.
the repeated logic is: first if condition, then use a udf to form a queue which will be suppressed by its father node.
i tried to assign the result queue to a variable after the UDF execution. (this variable is created after the father node)
I am wondering is there any restriction of using variable?
Can we assign the whole queue to a variable?
Can we use UDF during the process of assigning value to variable?
thanks in advance.

I dont think you can assign a queue to a variable,I am not 100% sure, . and there is no restriction to useing a Zvariable, only u can use it after you declare at some parent level.
Yes you can use a UDF in the process of assigning to a Zvariable.
Check out this link and read the comments of the blog.
SAP PI 7.1 Mapping Enhancements Series: Using Graphical Variable
/people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable
Edited by: Saiyog Gonsalves on Nov 6, 2010 6:40 PM

Similar Messages

  • How to use functions in Message Mapping

    Hi All,
           I am new to SAP XI. I don't know how to use functions in message mapping.     Can any body tell me how to use IF condition in message mapping.
         Please provide me a good link where I can get the details how to use those functions.
    Thanks,
    Srinivas.

    HI Srinivas
    Please take a look at these links,
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    This will help you
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/190eb190-0201-0010-0ab3-e69f70b6c257
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a8/bfc6373c8fea43bdb3541535bcbd43/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8a57d190-0201-0010-9e87-d8f327e1dba7
    This will give you a detailed Idea about Context
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db95f835c111d1829f0000e829fbfe/frameset.htm
    This will give more explanation on Queue
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/51a39490-0201-0010-5b9f-ae21e8b78195
    For understanding node functions this blog will help you
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Not sure you can find a collection of all...
    Cheers..
    Vasu
    <i>** REward Points if found useful **</i>

  • How to use result of message mapping as source to another message mapping

    Hi.
    I need to map iDoc to MT_A (MessageType) using MessageMapping.
    And then using the result of the above mapping, map MT_A to MT_B using JavaMapping.
    Can I do this all at once in my scenario or what is the best way to do this?
    Regards,
    Hjortur

    Hi,
    chk this:
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Ur flow will be something like this under operation mapping :
    1) Graphical mapping(  iDoc to MT_A)
    2) Java mappinmg.(MT_A to MT_B)
    Thanks
    Amit

  • How to use variables with

    I need to get the number of lines in internal table, which would
    be easy, using DESCRIBE TABLE itab LINES lines. But the problem
    is, that I get the name of this internal table in the field of
    another internal table, so I have to use the name of internal
    table as variable, but I don't know how to use variables with
    DESCRIBE TABLE (or if this is possible).

    Hi,
    REPORT ZPRUEBA782 .
    define two tables with diferent structures.
    data: begin of table1 occurs 0,
    registro type i,
    end of table1.
    data: begin of table2 occurs 0,
    registro type i,
    repid like sy-repid,
    end of table2.
    data: rows type i.
    start-of-selection.
    fill them with data
    do 1000 times.
    table1-registro = sy-tabix.
    append table1.
    enddo.
    do 1757 times.
    table2-registro = sy-tabix.
    table2-repid = sy-repid.
    append table2.
    enddo.
    call a form that receives as input the table and returns the number
    of rows as output.
    perform howmanyrows tables table2 changing rows.
    break-point. "evaluate the number of rows
    perform howmanyrows tables table1 changing rows.
    break-point. "evaluate the number of rows
    end-of-selection.
    form howmanyrows tables itable changing rows.
    rows = 0.
    loop at itable.
    add 1 to rows.
    endloop.
    endform.
    You can try it if you don't find a better solution.
    Cheers,
    Chaitanya.

  • How to use error table in mapping level?

    Hi all
    Any one please tell me how to use error table in mapping level or how to handle the errors in mapping.
    I am creating one error table in oracle but i dont know how to use it in mapping.
    Thanks in advance.
    Kumar

    Hi Kumar,
    You need to use Error Table along with the Data Rule .
    Error tables are used with Logical error handlers (Data Rules). Detailed description on using data rules is explained in the following document
    http://www.oracle.com/technology/products/warehouse/pdf/OWB10gR2_ETLandBusinessRules.pdf
    In a nut shell usage of error tables is as follows.
    1. Create a data rule associate it with a table (Target table or table in which you load data).
    2. Use the table in a mapping as target table.
    3. Deploy the table and mapping.
    Now in the target schema one more table will be created with the name <target table name>_ERR. When a mapping is executed the data which violates the data rule gets into this error table.
    The following has to be done to have error table name of customers choice.
    1. Right click on the table and click configure.
    2. Give the table name in "shadow table name" section.
    3. Deploy the table.
    4. Use this table in a mapping. Now in the mapping on this table properties in "Error Table Name" section the name of the table specified in "shadow table name" will be populated.
    Thanks,
    Sutirtha

  • How to do this with message mapping in PI  ?

    Hi All,
    Field 1 = 100 characters having values in  first fifty characters and last 50 characters blank . I need to remove all the first 50 characters with blank and pass 100 blank characters .How to do this with message mapping
    Thanks

    Adding to that, since usually a tab = 8 spaces. What you can do is to open notepad, press tab 4 times. Copy it and paste 3 times, afterwards press space 4 more times and you get 100 spaces.
    Regards,
    Mark

  • How to use GPS with google maps in ios 6.01

    How to use GPS with google maps in ios 6.01

    Settings > Privacy > Location Services.
    Make sure Safari is On.

  • How to use @variable(bouser) in Universe to get BOE userid in Xcelsius

    Dear Expert,
    I have request that need to display BOE userid to displayed in Dashboard using Xcelsius,
    after searching in Internet, i found that it can be done by using @variable(bouser) in an object in the Universe, and use the object in Qaaws, but i don't how to use it.
    already tried insert /* @variable('BOUSER') */ in END_SQL universe parameter, but still no luck.
    my question is :
    how to use @variable(bouser) in universe? and then my Xcelsius can display the BOE userid?
    thanks in advance for any answer.
    I Using SAP Integration KIT to create universe from Query BEX
    Luqman
    Edited by: luqman hakim on Jun 29, 2010 4:03 PM

    >
    Didier Mazoue wrote:
    > Hi,
    >
    > You are mentioning that you are using SAP Integration Kit.
    > Does it mean that the source you are targeting is SAP BW?
    >
    > If it is the case, this is unfortunately not supported.
    > SAP BW MDX does not support calculated expressions that return string or date: this is a limitation of SAP BW engine.
    > This is one of the reason why a lot of user exit are used to address these needs.
    >
    > Regards
    > Didier
    Didier Mazoue 
    yes, my Data source is SAP BW, and connected to BOE via SAP INT KIT.
    It's too bad that SAP doesn't support so simple requirement.
    you said : user exit 
    are used to address these needs.
    so there are possibility to solve my problem.
    would you give me the logic of user exit?  which part I should create the user exit
    I'm quiet familiar with user exit in BW
    thanks

  • How to use variable in source path of an image  in flex

    hello
    i just want to know that how to use variable in source path
    of an image in flex

    I am doing exactly that with data binding at the moment. This
    is my Image element
    <mx:Image width="50" minHeight="50" height="76"
    source="{Application.application.parameters.api}/rest/entity/{data.Slug}/Image"
    />
    Note the curly brackets
    HTH
    Pat

  • How to use variable in topology

    Hi every one..
    how to use variable in topology

    The normal way you use in interface or procedure. But the package you are executing should have the variable in 1st step with set or refresh mode.

  • Could Mapping Template  be used in Multi Message mapping

    I had a 1:1 message mapping: MM_A
    but later i foudd that the mapping should be 1:n
    Multi message mapping
    so firstly i created mapping template of MM_A
    but the template doesn't work when i am doing the multi mapping.
    Could Mapping Template  be used in Multi Message mapping?
    Thank you very much

    Hi leo,
    <i>
    Could Mapping Template be used in Multi Message mapping?</i>
    Yes it can be used......
    Regards,
    Abhy

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • Virtual directory mapping: how to use variable in local-path element

    Hi all
    We are using a virtual-directory-mapping declaration in the deployment descriptor
    for our web application to load jsp'a and other files from the file system.
    This declaration looks like this:
    <virtual-directory-mapping>
    <local-path>c:/views/jsp</local-path>
    <url-pattern>*.jsp</url-pattern>
    </virtual-directory-mapping>
    Here is my question:
    Is there a possibility to use a variable in the local-path element? Something
    like:
    <virtual-directory-mapping>
    <local-path>%PATH_TO_JSP%</local-path>
    <url-pattern>*.jsp</url-pattern>
    </virtual-directory-mapping>
    If yes, how does it look like? My example above didn't work.
    If no, is there another way to do that?
    Thanks in advance
    Regards
    Iwan

    posting to servlets newsgroup
    "Iwan Bussmann" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hi all
    We are using a virtual-directory-mapping declaration in the deploymentdescriptor
    for our web application to load jsp'a and other files from the filesystem.
    This declaration looks like this:
    <virtual-directory-mapping>
    <local-path>c:/views/jsp</local-path>
    <url-pattern>*.jsp</url-pattern>
    </virtual-directory-mapping>
    Here is my question:
    Is there a possibility to use a variable in the local-path element?Something
    like:
    <virtual-directory-mapping>
    <local-path>%PATH_TO_JSP%</local-path>
    <url-pattern>*.jsp</url-pattern>
    </virtual-directory-mapping>
    If yes, how does it look like? My example above didn't work.
    If no, is there another way to do that?
    Thanks in advance
    Regards
    Iwan

  • How to use Variable in interface for Mapping in ODI 11g

    Hi,
    I want to use Variable 'Year' in interface mapping. how i can do that? I define a variable YEAR1 = '2001' and in interface i put #YEAR1 but it didn't work for me. is there any other way?
    Example.
    I m using 'Year' column in mapping and it is having different 3 constant values so i was think to define 3 variable Year1= '2001' & Year2= '2005' & Year3= '2010'.
    In interface i just want to put variable name insted giving fix value.
    regards
    Sher

    Thank u
    I m trying with all the options & when i create Variable i and set Default value to ''2001'
    '#YEAR'
    #YEAR
    '#PROJECT_NAME.YEAR'
    #PROJECT_NAM.YEAR
    #PROJECT_NAME.'YEAR'
    and setting to Stagging Area
    But still it is not working out.
    I m suing ODI11.1.1.3
    is it any issue?

  • Difference in using java,xslt,message mapping

    hi friends,
              Can i know what difference does it make in using JAVA Mapping ,XSLT and Message Mapping?
              Where and when it is used?
              Which one is advantageous?
    thanks and regards,
    Prashanth

    Hi Prashant,
    Please go through the following links:
    Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/b78d406b305537e10000000a1550b0/frameset.htm
    For Java Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    For XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    Error handling in XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/8a/7672f7d7e444439fd7024f806221a4/frameset.htm
    You can also refer some How to guides:
    XI New Mapping Features article,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi 3.0 new mapping features article.evn
    Generic XSLT Mapping and Sample Code,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi code samples/generic xslt mapping and sample code.pdf
    How to use ABAP-MApping in XI3.0,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how to use abap-mapping in xi 3.0.pdf
    I hope it helps,
    Thanks & Regards,
    Varun Joshi

Maybe you are looking for

  • Text Insets and Cross Reference Links

    When I use text insets to produce a host file from my source file, I have cross reference links that update OK. However, once I produce a PDF of the host file (text inset), my links do not work. I do not even get the little hand icon to indicate they

  • MDM Data Manager Masks, field Shared

    Hi experts, while creating a mask in the MDM Data Manager I noticed the field Shared. It can be set to Yes and No. Can anyone tell me what this field does? I couldn't find any reference to it in the documentation of the MDM Data Manager, current vers

  • Function Module for reading PCL2 - B2 FEHLER table

    Hi,    Is there any function module can use to read the FEHLER table messages? There is a standard program called RPTERL00 that used to read the FEHLER messages. However, I wish to simplified and use FM to get all the FEHLER table data in my customis

  • How do I re-download on my new computer with no CD but i have my serial number...

    After my last lap top broke I havejust manadged to buy a new computer but have lost my Photoshop CS5 CD luckily I found my serial nummber on an email from adobe. How do I re download it All help would be great thank you, Abbie

  • Status Flag not appearing if branching

    I have a CP project with branching after a question slide (slide 14).  If the user gets the question wrong, they follow an alternate path to slide 15 to review the correct answer.  Then they hit slide 16.  If they get the question right, they skip sl