XI 3.0: Using global variables in mapping

Hi everybody
Since it seems that during mapping you have only access to messages fields, does anybody has got idea or a workaround to use global/external variables or constants during mapping??
Example: i would like to store the mail address where i send my error mails outside each mapping program (something like using a properties file or something like that).
Any idea???

Hi,
U can refer to the following links in help.sap.com
GlobalContainer Object
http://help.sap.com/saphelp_nw04/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/content.htm
Container Object
http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm
Also some of the RUN TIME CONSTANTS are available in your BPM. So if you are trying to retrieve those variables in your Mapping(that is used in BPM), also read the following thread.
Re: Message id in BPM
Cheers,
Siva Maranani.

Similar Messages

  • Using Global Variables in Data Quality Address Cleanse Transforms

    I am currently developing in Data Services 12.2.
    I am trying to dynamically populate the List Owner information in the option tabs of the USA Regulatory Address Cleanse by using global variables.  It populates the 3553 with the variable name instead of the value assigned.
    According to the Technical Manual, it is possible to use global variables in Data Quality Address Cleanse transforms:
    However, you can use substitution parameters in all places where global variables are supported, for example:
    Query transform WHERE clauses
    Mappings
    SQL transform SQL statement identifiers
    Flat-file options
    User-defined transforms
    Address cleanse transform options
    Matching thresholds
    Does anyone know if it is possible to use global variables in the option tab of the Address Cleanse; if so, can you describe how it is done?
    Thanks in advance,
    Rick

    Hi,
    U can refer to the following links in help.sap.com
    GlobalContainer Object
    http://help.sap.com/saphelp_nw04/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/content.htm
    Container Object
    http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm
    Also some of the RUN TIME CONSTANTS are available in your BPM. So if you are trying to retrieve those variables in your Mapping(that is used in BPM), also read the following thread.
    Re: Message id in BPM
    Cheers,
    Siva Maranani.

  • Using Global variable in Record Group

    Hi,
    I have a requirement where in I need to pull a column name from a table and then use that value in the select statement of a record group. I have tried using global variables but it is not working. Here is the record group I would like to use.
    RG_DOMAIN is based on LOV_DOMAIN
    SELECT :GLOBAL.DOMAIN_COLUMN_NAME, DESCRIPTION FROM
    DM_T_DOMAIN_VALUES
    WHERE DOMAIN_NAME := BLOCK.ATTRIBUTE;
    In the Key-Listval I have a select statement in which does this :
    SELECT DOMAIN_COLUMN
    INTO :GLOBAL.DOMAIN_COLUMN_NAME
    FROM DM_T_DOMAIN_RULES WHERE DOMAIN_NAME = :BLOCK.ATTRIBUTE;
    SHOW_LOV('LOV_DOMAIN');
    The problem is I am not getting the value I am just getting the Domain_column name. For example for Domain_name 'CALC_TYP' the Domain_column is COLUMN_10 and I just see COLUMN_10 my LOV when I want to see the value of COLUMN_10 from the DM_T_DOMAIN_VALUES table.
    I tried using Name_in and Copy but not working. Can anyone suggest a solution?
    Thanks

    Francois ,
    I tried this but I am getting error saying record group does not exist. Can you tell me what should I go in Populate_group... and show_lov..maybe I am doing something wrong?
    Declare
    LC$Req Varchar2(512) ;
    Begin
    LC$Req := 'SELECT ' || :GLOBAL.DOMAIN_COLUMN_NAME || ' FROM ....' ;
    Create_Group_From_Query( rg_group, LC$Req ) ;
    Populate_group(RG_DOMAIN); ?? --- is this correct?
    Show_Lov(LOV_DOMAIN) ; -- and is this correct?
    End;

  • Can i use global variable in web forms

    guys can any one tell me if i can use global variables when i am
    deplying the forms on the web,.....
    thank you
    vas
    null

    Global variables work in their perfection even when you deploy
    your forms on the WEB.
    null

  • VALUE USING GLOBAL VARIABLE

    Hello
    I made a Global Variable XX_DATE in Transaction Form Personalization with a value =:TACC_ACC_ASSGN.GL_POSTED_DATE.
    I'm planning to get the value from XX_DATE to one of the fields in Receipts thru Receipt Personalization.
    But a got the following error when I validate the value in Actions
    FRM-40815: Variable GLOBAL.XX_DATE does not exist.
    The String =:GLOBAL.XX_DATE could not be evaluated because of an errorAny help on this please?
    I just wanted to transfer data (GL_POSTED_DATE) from Transactions to Receipts using Global Variable.
    Any other ideas?
    Thanks a lot
    emgeee

    In WHEN_NEW_FORM_INSTANCE set the property INITIAL_VALUE for the global variable.

  • Global variable in Mapping

    Hi,
    Is there a way to declare a global variable in a mapping? e.g if I want to use a counter variable...
    Zahid

    Hi again,
    I've previously used the mapping input parameters successfully to bind a name (read-only) to the value of an expression, which is particularly effective when you want to filter an ODBC source with a non-trivial expression, which otherwise means the filtering is done on the target side (expensive).
    Unfortunately, Zahid wants to change the global variable within a transformation, and that is a side effect I believe is not allowed in SQL (set mode). Also, transformations live in a separate PL/SQL package, which means that the transformations have no access to the mapping input parameters. Hence my (untested) suggestion that using row mode and developing a separate "global variable" package might do the trick.
    Regards, Hans Henrik

  • What are the best practices to use GLOBAL Variables

    Hi,
    Please guide how Global Variables can be declared and how they can be initialized.
    Further please guide what are the impacts of Global Variables(if any) on the memory of CLIENT or SERVER, if they are not initialized or freed up after usage.
    Thanks.
    Regards.

    spilgrim wrote:
    My preference is not to use them and to use parameters or package variables. There is not real control on globals so you can end up with an applicatios that has lots of them that are only used once but persist for the user session.I second that. I don't know how often I searched for bugs caused by typos in the names of global variables. Plus the fact that they are only of datatype VARCHAR2. If you are using share_library_data you could also use Package globals in a forms library to share data between called and calling forms. Or you could use a database package...
    cheers

  • Using global variable in package

    Hi. I have created a function (Retrieve_SerialNo) which returns a variable, which I use throughout my package. I would like to assign this variable as a global variable to be used by all functions and procedures in the package. Can someone help me in the declaration of this variable as a global variable? Also, is it necessary for me to initialize this variable whenever the package executes. If yes, how would I do this?
    CREATE OR REPLACE PACKAGE BODY Supply_Item_Interface AS
    FUNCTION Retrieve_SerialNo RETURN VARCHAR2 IS
        v_serial_no VARCHAR2(20);
        CURSOR Serial_Code IS
          SELECT S.Serial_Code
            FROM Spare_Parts s, Orders r
           WHERE s.serial_code = r.serial_code;
      BEGIN
        OPEN Serial_Code;
        LOOP
          FETCH Serial_Code
            INTO v_serial_no;
          EXIT WHEN Serial_Code%NOTFOUND;
          v_serial_no := v_serial_no;
        END LOOP;
        CLOSE Serial_Code;
        RETURN v_serial_no;
      EXCEPTION
        WHEN OTHERS THEN
          RETURN NULL;
      END;

    user13415143 wrote:
    Hi. I have created a function (Retrieve_SerialNo) which returns a variable, which I use throughout my package. I would like to assign this variable as a global variable to be used by all functions and procedures in the package.All variables have scope or "visibility". A variable defined in a procedure is only visible within that procedure.
    A variable defines in a package body. is visible within that package body (i.e. procedures and functions in that package body can "see" that variable.
    A variable defined in the package definition? Well, who can see the definitions of procedures and function in a a package header/definition? Everyone else basically (other PL/SQL packages and procedures and functions). So this is also true for variables defined in the package interface. These are global variables that not only can be used by the code in that package's body, but also can be used by other packages and PL/SQL code.
    So when you create a global variable you need to decide on its scope:
    - define it in package header for global usage in all PL/SQL code
    - define it in package body for global usage within that package only
    CREATE OR REPLACE PACKAGE BODY Supply_Item_Interface AS
    ..snipped..Ugly code as there is no need to use an explicit cursor if returning a value from a single row. Also buggy code. If there are multiple rows returned by the cursor, the function returns the serial of the last random row. How does this make sense?
    This is what I would expect to see from a function like this. You pass it a unique identifier and it returns the applicable attribute (column) value for it.
    E.g.
    create or replace function GetSerialNo( orderNo number ) return number is
      serialNo number;
    begin
      select
        s.serial_code into serialNo
      from spare_parts s,
           orders o  
      where s.serial_code = o.serial_code
      and o.order_no = orderNo;
      return( serialNo );
    exception when NO_DATA_FOUND then
      return( null )
    end;Also note that there is no need to write ugly uppercase code. This is not a proper coding standard. Programming standards for all languages (ranging from C# to Java to Delphi to Visual Basic to C/C++) specify that camelcase should be used for variables and pascalcase for procedures/functions/methods. Uppercase is very seldom used and then only for constant names and compiler options/flags for example.
    Coding reserved words in uppercase? That is just plain silly - and not found in today's programming languages. Do yourself a favour and forget the idiotic standards used by some for PL/SQL and look at the standards for Java and .Net/C# - as the latter are the de facto standards for programming (and have been for the last 2 decades and more).

  • Use global variable in reports which is declared in forms

    Hi All,
    I have declared and used a global variable in Forms and after that I'm running a report and I want to use the same variable in reports.
    How can I use that.
    Regards
    Praveen Kr. Arora

    Hi Rizwan,
    Thanks for prompt reply.
    Can you explain in more detail with example.
    Though I'm calling report from menu item and I have created report file with three parameters.
    In menu item I have created a parameter list with same three parameters but whenever I tried to run then it gives Invalid ID error for all three parameters.
    Regards
    Praveen Kr. Arora

  • Using Global variables in business rules

    In EAS after expanding the Business Rules section there is a Global Variables section. I have created some global variables in this section and I am trying to use them in the Rule editor and not having much luck. Are they retrieved differently to local variables...Currently this is how I am calling them within a FIX....
    FIX([Global_Varaiable])
    calculation;
    EndFix
    Please correct me if I am wrong, also can any one provide some good documentation and some gd links for writing business rules. I'm just starting out to create some business rule which runs on save on some input forms I am creating and finding it rather difficult.... :-(..
    Many Thanks
    Stephen

    Hi,
    Global variables will work in the same way as local variables so you are using them correctly.
    Business rules are just really glorified calc scripts, if you want to know about calc script commands have a read of the tech ref :- http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/frameset.htm?launch.htm
    It will have all the calculation commands and functions and descriptions on how they work.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Select tables filed name by using global variables

    Hi
    I try to redesign a BODI jobs for monthly statistics. At the moment, I have a job for every month because in the source system (MS Axapta) the source table have the following design:
    YEAR     JAN      FEB    MARCH ...
    2010       100      231     233
    So, if I load the data for the January, I will load only this filed from the table:
    select YEAR, JAN from STATISTICS
    For the February, I will load only this filed:
    select YEAR, FEB from STATISTICS
    otherwise, I have a lot of dublicated BODI Jobs and a lot of work for maintenance.
    In this case, I try to use a variable in the mapping field in a Query transform, but doesn't working. Also in the SQL transform, but I was not able to do that.
    I know, that I can solve that with a Pivot-Transform, but I have to load some millions of data and I have no time to wait until the Pivot is finish.
    Do anybody have a other idee to solve my problem?
    Many thanks
    Christoph

    Thanks for your answer.
    How can I do that in the SQL Transform?
    If I try the with the following SQL Code, I become a ORA-00911 Error Message:
    SELECT Year, $Periode from STATISTIK
    Any idea
    Thanks
    Christoph

  • Is there a way to use Global variable in HANA

    Hi Developers,
    Is there anything like a Global variable in SAP HANA which can be used to pass data from one procedure to another (Visible to all the procedures in a session)?
    Thanks
    S.Srivatsan

    Hi Sundar,
    In best of my understanding, there is no context variable or global variable available under SQL SCRIPT scope . You may need to maintain the variable as a parameter in the procedure interface and pass it to the procedures where ever you need it to be available . Or,(DB table is in memory, so its just memory unit) you can create a DB table to store the variable(s) and access it anywhere .
    Sreehari

  • Use global variable to transfer user parameter in some Vi

    Hello,
    I have troubles when I use a global variable to transfer the parameter to a first Vi (user interface) to a second vi (acquisition interface).
    In the first Vi, the user paramater is wrote to my global variable.
    In the second Vi, the acquisition parameter is read to my global variable.
    This 2 Vis are include to a master Vi who synchronized by the error bus.
    The problem :
    For the first use, the user parameter is transfer to the global variable but the acquisition vi read the old parameter. In the second use, acquisition vi read the first use parameter.
    After I use the IN/OUT parameter subvi and i have too this problem.
    Thanks for help.
    VIEW THE PROBLEM : (I use event structure
    Attachments:
    Problem.zip ‏52 KB

    Labview uses the dataflow to chain the execution. That is, as soon as one item of data is ready is is presented to the next stage.
    Global (or local) variables do not easily fit in there. A variable is always present and ready to give away it's data. It does not matter that you write to it in one vi. Another vi, that is running concurrently is not aware that the content may have changed.
    Especially if you reference variables outside of loops, the value is taken just once and never updated. Be aware! If in doubt, use the tracing facilty (the light bulb) to follow the data flow.
    Gabi
    7.1 -- 2013
    CLA

  • Using global variable read status

    Hi Experts,
    I need to change the Note based o the Service Ticket status. I declared global variable as a string in ZL_ICCMP_BT_BTSHEADER_IMPL (Component: ICCMP_BTSHEAD; View: BTSHeader)
    And I am passing the Status to this global variable using the GET and SET methods of the STRUCT.ACT_STATUS attribute in BTSTATUSH node in same component and view.
    I referred this global variable in DO_PREPARE_OUTPUT of the component ICCMP_BTTEXT/TextView to set the Note as shown below.
    if ZL_ICCMP_BT_BTSHEADER_IMPL=>GC_STATUS = 'E0001'.
    I would like to know whether this approach is the best way to read status or any other optimistic  approach is there to follow for my this scenario. Please advise me.
    Thanks
    Chand

    Hi Basha,
    If you are using static variables, i wouldn't recommend using this approach.. there are better approach to get/set values in web client session which avoids setting/clearing static variables etc..
    you can follow below approach..
    1. To Get/set the variable in ic session to avoid the static variable.. for eg global cuco is available which you can use for this purpose.
    lr_bdc type ref to if_crm_ui_data_context.
    lr_bdc = cl_crm_ui_data_context_srv=>get_instance( me ).
    check lr_bdc is bound.
    Using SET_DATA_ATTRIBUTE set the attribute value and using GET_DATA_ATTRIBUTE get the attribute valueu2026get_attribute, set_attribute
    read current BuAg if exist
    lr_buag ?= lr_bdc->GET_DATA_ATTRIBUTE( 'CURRENTBUAG' ).
    Here "CURRENTBUAG" is the attribute name, you can give any attribute name while setting and get the same attribute value via get_data_attribute.
    Cheers,
    Sumit Mittal

  • Use global Variable for Formatstring

    Hello
    I wanna use a global variable for a format string. see picture. But I don't work.
    Can anybody give me an idea, why it won't work?
    Thanks a lot!!!
    Attachments:
    GlobalVariable.jpg ‏61 KB

    As others said, the problem is not the global.
    See attached a picture of how to do what you want. Since the Format String is unknown at edit time, you must provide the types to all inputs that are not DBL.
    From your example, the while loop has been coded exactly like a for loop. It can be replaced with a for loop with auto-indexing, unless you really want the local variable to be update at each iteration every 50 ms. This delay is not necessary unless the computed array is huge and you want to leave some CPU time to other code in your application. Even then you can enter a delay of 0ms to force to swap to other tasks.
    I don't know what your INT>BOOL VI does but using Scan from String you can read a number directly into a boolean. The number i
    s rounded to an unsigned integer and 0 is False and >0 is True.
    For example you scan a string for a boolean with format string %d.
    "0" --> False
    "24" --> True
    "-18" -- False (coerced to unsigned = 0)
    You scan a string for a boolean with format string %f:
    Negative number up to "0.5" --> False (coerced and rounded to 0)
    Number greater that 0.5 --> True
    LabVIEW, C'est LabVIEW
    Attachments:
    diag.jpg ‏15 KB

Maybe you are looking for