How to pass dynamic values to value mapping? please help!

Hi Experts,
       I have requirement where I am using email adapter to send emails. Now the "To" email address is different for different environment. In other words:
DEV - [email protected]
TEST - [email protected]
PROD - [email protected]
When the XI code is migrated to TEST environment the email address will be [email protected] and in production it will be [email protected]
Similarly, there are many more environments.
Now to handle this I have decided to use value mapping where Agency refers to the type of environment.
Now my problem is how do I use it in message mapping.
I have wriiten a java function that returns me the type of environment. But now how to use this value for value mapping. I mean when using value mapping in message mapping we hardcode the agency (environment type).
Is it possibel to specify a variable in value mapping for agency. The variable will be populated by java function before connecting to value mapping?
Please help!
Thanks
Gopal

Hi Gopal,
why don't you use a "if" after your UDF. Depending on the return parameter of the UDF you call different value mappings?
Regards Mario

Similar Messages

  • How to pass dynamically generated string value as array name in TestStand?

    Hi All,
              I have a string variable which holds an array name as its value. The string value is a dynamically generated one. Now my problem is how to retrieve the values within the array where as the array name is stored in a string variable.
    for eg:
    fileglobals.InfoName = "Array_Name" --> fileglobals.InfoName is a string variable, Array_Name is the array name generated dynamically and it is known only at run-time.
    Array_Name[0] = "a";
    Array_Name[1] = "b";
    Array_Name[2] = "c";
    In the above case, I have to retrieve the values of a, b and c
    Any help is greatly appreciated
    Thanks
    Arun Prasath E G

    Hi,
    Looking at your sequencefile.
    You seem to be trying to save into FlieGlobals.InfoName a string with the values of "FileGlobals.Info_0".."FileGlobals.Info_n" where n is the value of Parameter.TestSocket.Index.
    Then you are setting the value into FileGlobals.TempName from "StationGlobals.FileGlobals.Info_0" assuming Parameter.TestSocket.Index is 0.
    Is this correct?
    I realise this is a cutdown sequence file but you must make sure These variable actually exist in either FileGlobals or StationGlobals. Also with FileGlobals each SequenceFile has its own FileGlobals unless you have set the properties of the SequencFile to use a common FileGlobals.
    What was the precise error you was seeing as it will properly telling you what variable of property it can't find.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to create dynamic ON CHANGE statement? Please help!

    Hi Experts,
       I have a requirement where my ON CHANGE criteria is dynamic. It is based on wa_charakeyfrmt-value which I am reading from a table. If it is 'DO' then ON CHANGE will have wa_errtabcopy-DO. Else if it is 'LI' then ON CHANGE will have wa_errtabcopy-LI. There will be many cases like this. So instead of writing so many IF/ELSE or SWITCH/CASE conditions is it possible to dynamically create ON CHANGE criteria for the last field. See the example code below:
       IF wa_charakeyfrmt-value = 'DO'. "On DO change
          LOOP AT i_errtabcopy into wa_errtabcopy
               WHERE sold_to = wa_errtab-sold_to.
                  ON CHANGE OF wa_errtabcopy-key_value
                            OR wa_errtabcopy-rep_created_date
                            OR wa_errtabcopy-rep_created_time
                            OR wa_errtabcopy-rep_counter
                            OR wa_errtabcopy-DO.
                  ENDON.
          ENDLOOP.
       ELSEIF wa_charakeyfrmt-value = 'LI'. "On LI change
          LOOP AT i_errtabcopy into wa_errtabcopy
               WHERE sold_to = wa_errtab-sold_to.
                  ON CHANGE OF wa_errtabcopy-key_value
                            OR wa_errtabcopy-rep_created_date
                            OR wa_errtabcopy-rep_created_time
                            OR wa_errtabcopy-rep_counter
                            OR wa_errtabcopy-LI.
                  ENDON.
          ENDLOOP.
         |
    Thanks
    Gopal

    DATA: BEGIN OF text,
            word1(4) TYPE c VALUE 'This',
            word2(4) TYPE c VALUE 'is',
            word3(4) TYPE c VALUE 'a',
            word4(4) TYPE c VALUE 'loop',
          END OF text.
    DATA: string1(4) TYPE c, string2(4) TYPE c.
    DO 4 TIMES VARYING string1 FROM text-word1 NEXT text-word2.
      WRITE string1.
      IF string1 = 'is'.
        string1 = 'was'.
      ENDIF.
    ENDDO.
    SKIP.
    DO 2 TIMES VARYING string1 FROM text-word1 NEXT text-word3
               VARYING string2 FROM text-word2 NEXT text-word4.
      WRITE: string1, string2.
    ENDDO.

  • How to build dynamic menus using JSP==Urgent==Please Help me

    Hello,
    I have exhausted searching on internet to find a book
    which tells how to build Dynmic menus in JSP.I dont want
    to use DHTML as this becomes complex as the menu categories
    are built using data from database.Is there any workaround in
    java to do this without DHTML or atleast sample code.
    can somebody help me in this regard.
    Thanks
    Jack

    Hello a.s.kumar,
    I would be greatful if you could send me the sample code.
    [email protected]
    we can't let MM Flash run away with the show can we. Javascript can do a decent job, but the underlying menu data is static.
    Cheers, Darren

  • How to pass more than one value for one column in procedure

    hi
    select id, name from col_tab where dept_name in ('ECE','CIVIL');
    when i was running this it is working well.
    CREATE OR REPLACE PACKAGE pack_str
    AS
    TYPE type_refcur IS REF CURSOR;
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
    IS
    BEGIN
    OPEN ans FOR
    select id,name from col_tab where dept_name in char_in ;
    END str;
    END pack_str;
    the package was created.
    my doubt is
    1.how to pass more than one value for char_in (e.g ('ECE','CIVIL'))
    2. when i was storing the value in string like val = 'ECE,CIVIL' ,
    how to get the id,name for ECE and CIVIL.
    plz help me

    Hi Rebekh ,
    I am recreating your packages for the desired output.
    CREATE OR REPLACE PACKAGE pack_str
    AS
         TYPE type_refcur IS REF CURSOR;
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
         IS
              lv_t varchar2(200);
         BEGIN
              lv_t := REPLACE(char_in,',',''',''');
              lv_t := 'select id,name from col_tab where dept_name in (''' || lv_t || ''')' ;
              OPEN ans FOR lv_t;
         END str;
    END pack_str;
    Note:-
    Input Parameter char_in is a comma seperated value for dept_name
    -Debamalya

  • Howto pass dynamic jsp:param value to applet

    Hi.
    I have a JSP page with 3 to 4 links... and an applet with jsp:plugin .
    So i want to pass the URL behind the link to the applet as a Request Param..
    My JSP code looks like
    <a link href="www.google.com">Google</a>
    <a link href="www.oracle.com">Oracle</a>
    <a link href="www.gmail.com">Gmail</a>
    <jsp:plugin type="applet"
                                code="MyApplet"
                                height="0" codebase="../../jars/" width="0"
                                name="MyApplet"
                                align="bottom">
                            <jsp:params>
                                    <jsp:param name="applicationURL"
                                               value="this should be the "/>
                            </jsp:params>
                            <jsp:fallback>
                                    <p>This feature should run on applet supported
                                       browser.</p>
                            </jsp:fallback>
                    </jsp:plugin>and my applet code looks like
    init()
              String appURL = getParameter("applicationURL");
                    System.out.println(appURL);
              }I have a similar thread in Java forums... Howto pass dynamic jsp:param value to applet
    Thanks,
    Murali.

    My JSP code looks like
    <jsp:plugin type="applet"
                                code="MyApplet"
                                height="0" codebase="../../jars/" width="0"
                                name="MyApplet"
                                align="bottom">
                            <jsp:params>
                                    <jsp:param name="applicationURL"
                                               value="applicationURL"/>
                            </jsp:params>
                            <jsp:fallback>
                                    <p>This feature should run on applet supported
                                       browser.</p>
                            </jsp:fallback>
                    </jsp:plugin>and my applet code looks like
    init()
              String appURL = getParameter("applicationURL");
                    System.out.println(appURL);
              }Now i want to have links on JSP pages clicking on which corresponsing url will be displayed in applet.
    Edited by: 635237 on Jan 24, 2011 10:44 AM
    Edited by: 635237 on Jan 24, 2011 10:45 AM

  • How to pass the FORM Fields value by Form Personalization

    Hi ALL,
    I want to pass form filds values in to procedure. I am calling this procedure through form personalization of that form..... But it's not accepting any form field's value there... when i am passing hardcoded vales procedure is executing fine...
    can any one suggest what to do???
    i tried with these syntax
    TEST_EMP_FP(:ADDR.ADDRESS_ID,'ABC')
    TEST_EMP_FP(${item.ADDR.ADDRESS_ID.value},'ABC')
    Regards
    Ravi

    Hi,
    Iam calling an SRS from forms personlization. Can any body tell me how to pass the Form field values as parameters to the Reports. (Example when they call this Concurrent request from Transact5ions screen, The invoice number should be defaulted in the report parameter).
    Regards,,
    Anil.

  • State machine custom task workflow how to pass one task field value to the next task field

    i am using ItemMetadata.xml to pass value from list to custom task first value its passing the but second value is showing as null
    plus how to pass one custom task value to the next custom task
    i.e one supervisor approver comments submitted field i want to see on department manager approval custom task which is the next approver from supervisor
    ows_firstfield=""
    ows_SecondField=""
    the above ows fields are from list
    in this i am unable to retrive the second value in the task form this is my first query?
    second query is that how can we pass one task field value to next approver task field value?
    any idea
    MCTS,ITIL

    What type of workflow is this?  IS this Visual Studio or SharePOint designer or third party (K2, Nintex, etc...)?  YOu should be able to get ahold of the task that was edited via the correlation token, and then grab any value you want from that
    task (wether it be a custom field or a standard worfklow task field). 
    It would help to know what you are using to build the workflow.
    Thanks!

  • How can pass any one column value

    hi all,
    i have table and i am quering that table like
    select d_type,d_number,d_date,draccount,craccount
    from d_table
    where d_date = :parameter.d_date
    and draccount or craccount = :parameter.code--here user may enter any code which may belongs to draccount or craccount how can check that in my query?Please help me..
    Thanks..

    Hi,
    A slight variation on Tubby's solution:
    select  d_type
    ,     d_number
    ,     d_date
    ,     draccount
    ,     craccount
    from      d_table
    where      d_date           = :parameter.d_date
    and      :parameter.code IN (draccount, craccount)
    user13329002 wrote:hi,
    even i was trying the same. what happen if the parameter value present in both the columns?
    both column's records will be displayed right..What happens when you try it?
    If that's what you want, what's the problem?
    If that's not what you want, what's the problem? Post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data.
    Do you want to use the condition :parameter_code = craccount only when the other condition, :parameter_code = draccount, produces no results? If so, use a CASE expression (or the DENSE_RANK function).

  • How to pass dynamic filename to Receiver JMS channel

    Hi experts,
    I want to pass the dynamic filename to receiver JMS message Properties.
    for example
    I am passing directory name via adapter module AF_Modules/DynamicConfigurationBean with key and value combination like below. How to pass dynamic filename value to a dynamic property ( say DCJMSMessageProperty1)
    eg.
    key.0 - >insert http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
    value.0 - >  testdirectory ( which is static value)
    Note: Im have not created any ESR object . i just have to bypass the file to a jms queue. I have used AAE integrated configuration scenario ( file to jms )
    Regards,
    Balaji
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:45 PM
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:46 PM

    Already given link for the dynamic configuration code snippet in the earlier reply... Below is the code snippet
    Note: Use Adapter Specific Message Attributes for the target Communication Channel(CC).Check the indicator for filename in the advanced tab of CC
    //UDF code
    String filename="";
    String NameSpace = "http:/"+"/sap.com/xi/XI/System/JMS";
    try{
          DynamicConfiguration conf = (DynamicConfiguration) param.get(
            StreamTransformationConstants.DYNAMIC_CONFIGURATION);
          DynamicConfigurationKey key  =  DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File",   "FileName");
           // read filename value
           filename = conf.get(key);     
          // So far we extracted filename value .. now do your logic  something like this...
          DynamicConfigurationKey key2 = DynamicConfigurationKey.create(NameSpace,"yourjmsvalue goes here");
           conf.put(key2,filename);
         } catch(Exception e){

  • FTP how to pass dynamic filename/directory location - reading a file in 11g

    Hi All,
    We r using FTP adapter(SOA 11g) for getting files in remote server, May i know how to pass dynamic filename and directory where the file exists for reading in server.
    Thanks,
    Rak

    Hey according to my understanding, the Dynamic partner links are set only for the Outbound invocations only. Is my understanding right? if so, how do we create the dynamic partnerlinks for the ftp get kind of stuff...??
    Thanks in advance

  • How to pass dynamic selection to logical databse using ldb_process function

    dear friends,
                         can anybode tell me how to pass dynamic selection to the logical database when i m using LDB_PROCESS function module.  however, in EXPRESSIONS paramter of the function module i m  passing the selecti-option, it is passing their also but when i used more than  two select-option or paramter it throw an exception FREE_SELECTIONS_ERROR.
    SO PLEASE GUIDE ME HOW TO PASS MORE THAN TWO SELECT-OPTION IN LOGICAL DATANSE DYNAMICALLY USING LDB_PROCESS.

    would be nice if you post the answer to all

  • Help in Mapping please help

    Hi,
    I have a requirement with the source structure looking as
    Sourece :
    ACCOUNTGL 0....1
    item 0...unbounded
    ITEMNO_ACC 0....1
    CURRENCYAMOUNT 0....1
    item 0...unbounded
    ITEMNO_ACC 0....1
    CURRENCY_TYPE 0....1
    CURRENCY 0.....1
    XXXXXX 0......1
    TARGET STRUCTURE
    E1BPACGL09 0...Unbounded
    ITEM_TEXT 0......1
    All the fields of target E1BPACGL09 is mapped from ACCOUNTGL node of souce and the field ITEMTEXT under node E1BPACGL09 should have the condition .if the CURRENCY_TYPE is 00 and if ITEMNO_ACC in the segments ACCOUNTGL and CURRENCY AMOUNT are equal then we need to create a E1BPACGL09 with ITEM_TEXT concatinating CURRENCY and other field XXXXXX and pass it to ITEM_TEXT at target.Please help me in this .
    Is it possible through graphical mapping If so how please help .
    Thanks
    Rajesh

    Hello,
    Were you able to check my response to your earlier thread GL ACCOUNT Mapping help ?
    Regards,
    Mark
    Edited by: Mark Dihiansan on Jan 17, 2011 3:48 AM

  • How to create authorisation object for save button please help in abap

    how to create authorisation object for save button please help in abap

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Regards
    ANJI

  • HT204053 I have two Apple ID's. How do I delete one of them? Please help. Thank you. Dru

    I have two Apple ID's. How do I delete one of them? Please help. Thank you. Dru

    To add to the above...
    From Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • While opening the iTune Store i receive the following error, "The procedure entry point ADAdPolicyEngine_DidEnterSation could not be located in the dynamic link library iAdCore.dll" Please help me to clear this error.

    While opening the iTune Store i receive the following error, "The procedure entry point ADAdPolicyEngine_DidEnterSation could not be located in the dynamic link library iAdCore.dll" Please help me to clear this error.

    I faced the same issue. This solved it for me: Troubleshooting issues with iTunes for Windows updates
    Hope this helps.

Maybe you are looking for