How to read a variable within a VC code.  I am using BADI based VC code.

How to read a variable within a VC code.  I am using BADI based VC code.
Lets say I have a variable for a fiscal period that holds cumulative month.
If user enters 03/2014 in that variable, it will have month starting from Jan till March.
Within VC code I would like to read the last month which is
03/2014 and based on this month I would like to do some calculation on all the records using the last month.
Since VC code runs for one record at a time and there is no way I can store this value.
Is there a way to go about it....any suggestions would be of great help.
Thanks.

Any suggestions would be highly appreciated.
Thanks!

Similar Messages

  • How to read url variable javascript problem

    How to read the variable of latitude 1.22 and longitude 103.56.
    This is my website: 127.0.0.1/1/map2.htm?latitude=1.22&longitude=103.56
    function getUrl_Map()
              //Get the variables in the URL
         var vars = [], hash;
              var latitude = getUrlVars()["latitude"];
              //To get the second parameter
              var longitude= getUrlVars()["longitude"];
         var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
         alert('DEBUG: hashes= ' + hashes);
              // read the file http://127.0.0.1/1/map2.htm
              // read the file http://127.0.0.1/1/map2.htm? -->hashes
         for(var i = 0; i < hashes.length; i++)
         hash = hashes.split('=');
                   //alert('DEBUG: i= ' + i);
                   //i=0
                   alert('DEBUG: i= ' + i + 'hash = ' + hash );
         vars.push(hash [0]);
         vars[hash [0]] = hash [1];

    by the way you know that 127.0.0.1 is the address you use to get to your own computer right? It's the loopback address. so posting it doesn't really help anybody see the page, if that was what you were hoping.

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • How to specify different horizontal restore & collapse icon for af|panelSplitter using Skinning based on Style class or position?

    Hello,
    I am trying to provide different horizontal restore & collapse icon for af|panelSplitter using Skinning based on Style class or position. I have 2 af:panelSplitter with orientation="horizontal" - One with positionedFromEnd="true" one with positionedFromEnd="false". I want to specify the horizontal collapse and restore icon using Skinning. I want specify different icons based on positionedFromEnd. When I specify icons they are appearing for both splitters. I gave 2 different styleClass to these splitter but it is not taking them in account,
    JSPX Page -
    <af:panelSplitter orientation="horizontal" splitterPosition="196" positionedFromEnd="false" id="pnlSplitterLeft" collapsed="false" styleClass="panelSplitterLeftClass">
      <f:facet name="first">
      <!-- Content of First Facets -->
      </f:facet>
      <f:facet name="second">
      <af:panelSplitter orientation="horizontal" splitterPosition="196" positionedFromEnd="true" id="pnlSplitterRight" collapsed="false" styleClass="panelSplitterRighClass">
      <f:facet name="first">
      <!-- Content of First Facets -->
      </f:facet>
      <f:facet name="second">
      <!-- Content of First Facets -->
      </f:facet>
      </af:panelSplitter>
      </f:facet>
    </af:panelSplitter>
    CSS Skinn
    af|panelSplitter::horizontal-restore-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Left_Open.gif");
    af|panelSplitter::horizontal-collapse-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Left_Close.gif");
    af|panelSplitter.panelSplitterLeftClass::horizontal-restore-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Left_Open.gif");
    af|panelSplitter.panelSplitterLeftClass::horizontal-collapse-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Left_Close.gif");
    af|panelSplitter.panelSplitterRighClass::horizontal-restore-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Right_Open.gif");
    af|panelSplitter.panelSplitterRighClass::horizontal-collapse-icon {
        width: 10px;
        height: 55px ;
        content : url("/skins/AppSkin/Right_Close.gif");
    It is always showing Left_Open.gif and Left_Close.gif for both splitters. But I want different image.
    How to specify different horizontal restore & collapse icon for af|panelSplitter using Skinning based on Style class or position?
    - Sujay

    CSS attribute selectors are what you are talking about, but binding the selector with EL is a more-common approach. Using selectors like this require you to ensure browser support.
    af|panelSplitter.panelSplitterRighClass::horizontal-collapse-icon [positionedFromEnd=true]

  • How to read environment variable

    How do I read an environment variable within TS?
    I was thinking of calling getenv("VARIABLE_NAME") except it returns a char * and TS only allows Boolean or Numeric return type.
    I wonder if LV has any function for doing the same thing. 

    With the new ability in TestStand 4.2 to get the standard output from a command line, you can do this with a call executable step.
    Simply call cmd.exe as the executable, and pass it the following expression.  Then all you have to do is set Locals.EnvironmentVariableName to the name of the environment variable you want the value of and define where you want the standard output to be stored.
    "/C \"echo %"+Locals.EnvironmentVariableName+"%\""
    I'm attaching a sequence file that shows this.  The attachment is necessarily saved in TestStand 4.2, since it uses a feature introduced in that version.
    Josh W.
    Certified TestStand Architect
    Formerly blue
    Attachments:
    get env var.seq ‏6 KB

  • How to read Environment Variable in Java.

    Hi,
    I am trying to read a environment variable $TMP which has a value of /apps/bea/pt847/psoft5/tmp in UNIX.
    I have written the following code and getting Null pointer exception when calling the method logmessage. Any help with reading environment variable is appreciated.
    public static void logMessage(String message) {
           SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
           Date now = new Date();
           Properties p = null;   
           try
              p = getEnvVars("$TMP");
              System.out.println("the current value of TEMP is : " + p.getProperty("$TMP"));
           catch (Throwable e) {
              e.printStackTrace();
           try
           BufferedWriter os = new BufferedWriter(new FileWriter("/tmp/pscas_signon_log.txt", true));
           os.write(formatter.format(now));
           os.write(message);
           os.write("\n");
           os.write("tmp_env = " + p.getProperty("$TMP"));
           os.write("\n");
           os.close();
           catch(IOException _ex) { }
        public static Properties getEnvVars(String env_var) throws Throwable {
           Properties envVars = new Properties();
           Process p = Runtime.getRuntime().exec(env_var);
           BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) );
           String line = null;
           while( (line = br.readLine()) != null ) {
              int idx = line.indexOf( '=' );
              String key = line.substring( 0, idx );
              String value = line.substring( idx+1 );
              envVars.setProperty( key, value );
              // System.out.println( key + " = " + value );
           return envVars;
        }

    Updated code:
    public static void logMessage(String message) {
           SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
           Date now = new Date();
           Properties p = null;   
           try
              p = getEnvVars("$TMP");
              System.out.println("the current value of TEMP is : " + System.getProperty("$TMP"));
           catch (Throwable e) {
              e.printStackTrace();
           try
           BufferedWriter os = new BufferedWriter(new FileWriter("/tmp/pscas_signon_log.txt", true));
           os.write(formatter.format(now));
           os.write(message);
           os.write("\n");
           os.write("tmp_env = " + System.getProperty("$TMP"));
           os.write("\n");
           os.close();
           catch(IOException _ex) { }
        public static Properties getEnvVars(String env_var) throws Throwable {
           Properties envVars = new Properties();
           Process p = Runtime.getRuntime().exec(env_var);
           BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) );
           String line = null;
           while( (line = br.readLine()) != null ) {
              int idx = line.indexOf( '=' );
              String key = line.substring( 0, idx );
              String value = line.substring( idx+1 );
              envVars.setProperty( key, value );
              // System.out.println( key + " = " + value );
           return envVars;
        }and this is the error message..
    java.io.IOException: $TMP: not found
            at java.lang.UNIXProcess.forkAndExec(Native Method)
            at java.lang.UNIXProcess.<init>(UNIXProcess.java:72)
            at java.lang.Runtime.execInternal(Native Method)
            at java.lang.Runtime.exec(Runtime.java:602)
            at java.lang.Runtime.exec(Runtime.java:461)
            at java.lang.Runtime.exec(Runtime.java:397)
            at java.lang.Runtime.exec(Runtime.java:359)
            at SimpleCasValidator.getEnvVars(SimpleCasValidator.java:108)
            at SimpleCasValidator.logMessage(SimpleCasValidator.java:81)

  • How to read a binary file written in LabVIEW 6.1 using VB ?

    How to read a file saved in binay forrmat in LabVIEW 6.1 platform through VB.
    Is there any code ?
    Thanks

    Hello,
    LabVIEW files stored in binary can take on just about any format that
    you choose, so there will not be a single piece of code that will give
    you what you are looking for.  You can use VB's standard file
    operation functions to read in a binary file created by LabVIEW, just
    as you would read in any other binary file.  See this page
    on Microsoft's web site for more information on the binary file read
    operation.  How you stored the data in the binary file will
    determine how you need to extract it from the byte array.  So, if
    the first element stored in the file was a 32-bit integer, you could
    extract an int from the byte stream to recover that piece of your
    data.  You would need to know in advance how the file was
    formatted in order to successfully retrieve the information.  If
    you need a reference for the VB functions, the microsoft link above
    will get you to some good information.
    Cheers,
    Matt Pollock
    National Instruments

  • How to read a Characterist declared as ASCI on A2L file using NI ECU Measurement and Calibration Toolkit?

    I have a characteristic declared as seen below in a A2L File:
    /begin CHARACTERISTIC Sw_Id "Identification string for software build"
    ASCII 0xCF45 __UBYTE_Z 0 NO_FORMULA 0 255
    ECU_ADDRESS_EXTENSION 0x0
    EXTENDED_LIMITS 0 255
    NUMBER 32
    /begin IF_DATA ASAP1B_CCP
    DP_BLOB 0x0 0xCF46 32
    /end IF_DATA
    /begin IF_DATA CANAPE_EXT
    100
    LINK_MAP "Sw_Id" 0xCF45 0x0 0 0x0 0 0x0 0x0
    DISPLAY 0 0 255
    /end IF_DATA
    /end CHARACTERISTIC
    I tried every kind of MCcharacteristicRead with no success. Anyone know how to do it?
    Thanks

    Why can’t you try to use basic LabVIEW I/O functions?
    Read your text and do string manipulations get your required data.
    Munna

  • How to read shared variables inside event structure ?

    Hi,
    I have a problem that my shared variables do not update inside event structure. The program(s) I am trying to get working is seen in the attached screenshot. It works as follows:
    0. I start the vi that is unsquared.
    1. I write a string to a shared variable using vi in red square. I make sure that its updated using write-wait-read.
    2. I run the other vi (blue square), this changes the boolean shared variable.
    The unsquared vi has been running the whole time, it has event structure bind to boolean shared variable change (the one in blue vi). After I have runned the blue vi, the unsquared vi should change the indicator values to match the ones in red vi. However I have to start the blue vi multiple times to get it to change, sometimes even 6 times.
    Also, when I change the value in red vi to a third value and start blue vi multiple times, the unsquared vi shows all the variables. I.e. I put "cat" to red then start red, put "mouse" to red then start red,... and then start clicking blue... Unsqured shows cat, mouse,..., dog (dog is the default).
    How can I force the shared variable to update inside event sructure. I want the current value of the variable, not some historical values.
    Attachments:
    Screenshot-5.png ‏108 KB

    Found the buffering... disabling it solved the problem... thanks.
    FYI, there is another solution that I just found out... attached. Adding timeout to the event structure and the variable read outside the event structure... This makes the shared variable strings (one that is read outside and the otherone that is read inside) different.
    Could someone explain why the variables are in different state even if they are used in the same place and looped with 10ms intervals?
    Juha
    Attachments:
    Screenshot-6.png ‏110 KB

  • How to read container variable in UDF

    Hello expert,
    I have created a container variable(var_callerId) in an integrationprocess.
    In a mapping I want to read the container variable with an UDF.
    Can anyone send me the code for the UDF please ?
    I can't find the solution in any post message / blog.
    Thx for your help!
    Best regards,
    Juergen

    Hi navneet,
    thanks for your fast reply.
    Let me explain why I wanted to use container variables:
    (Perhaps there is a better way to fix the requirement)
    I've following IP
    Message Interface (input)
    <getData>
    <callerInfo>
    <callerID>SYSA</callerID>
    <SessionID>43545455545355</SessionID>
    <number>3434344334</number>
    </callerInfo>
    </getData>
    Then I have a mapping (<number>) to call a webservice.
    I get the data from the webservice.
    At last I will send the data back to the business System.
    But I need the both tags from the input interface (SessionID, callerID) again, to send it back.
    I tried a mapping  to map sessionID and callerID from the input interface  to the output interface, but it doesn't work.
    So I thought I can store the sessionID and callerID in a container variable and in a mapping I will get it back with an UDF.
    I think there should be a possiblility to get the stored value from the container variable inside the IP. But I don't find any solution.
    I don't understand your solution with the global container. How can I access to the container variable(IP).
    Thx for your help
    Best regards
    Juergen

  • How to read a variable from a java program?

    Hey guys
    I don't actually have a single clue about java itself. I usually use other languages. But i need to get the value of a variable/label from a java program.
    After googling a bit i installed Java Access Bridge to get some more info how to find that value. Using JavaMonkey i got following accessibility info:
    AccessibleContext information at mouse point [0, 0]:
    Name: Spin:
    Description:
    Role: label
    Role in en_US locale: label
    States: enabled,focusable,visible,showing
    States in en_US locale: enabled,focusable,visible,showing
    Index in parent: 0
    Children count: 0
    Bounding rectangle: [421, 152, 598, 169]
    Top-level window name: WEedit
    Top-level window role: frame
    Parent name:
    Parent role: panel
    Visible descendents count: 0
    This label contains a value that i need. I'd like to write it to a textfile periodically or put it into the clipboard. Shouldn't be more than some lines of code.
    Would appriciate any help.
    Thank you and merry christmas

    Nachtschicht wrote:
    Well, i play google for you: http://java.sun.com/javase/technologies/accessibility/accessbridge/
    So you tell me you can't extract any information out of this?
    AccessibleContext information at mouse point [0, 0]:
    Name: Spin:
    Description:
    Role: label
    Role in en_US locale: label
    States: enabled,focusable,visible,showing
    States in en_US locale: enabled,focusable,visible,showing
    Index in parent: 0
    Children count: 0
    Bounding rectangle: [421, 152, 598, 169]
    Top-level window name: WEedit
    Top-level window role: frame
    Parent name:
    Parent role: panel
    Visible descendents count: 0
    You don't have any hint, how i as a non-java programmer can access data out of a simple java program?No. That's a horrible way to interact with a program. A better way would be if it exposed some API. Or there was a web service you could call, for example.

  • How to access APEX variables within compiled pl/sql function.

    Hi,
    My initial problem is to create pl/sql code returning column names for my custom calendar report.
    There are 7 columns for each day of the week and I want it to be on two rows - first the day of the week, such as 'Monday' and below it (with BR tag) the date, such as '18-08-2008'.
    What I want is to set additional tags for underline, italics, etc. on the column heading which date is currently selected for viewing (I have DATE item for this purpose).
    But as the code is getting quite complex, I decided to write a function in my schema that would return the column delimited values for the headings.
    What I can't do is the following.
    1) How do I reference an APEX item value, such as my DATE item? using v('P4_DATE') results in unknown function 'v'.
    2) How do I use char-date and vice versa conversion using the already set application format mask, available in APEX 3.1? So that when I change the date format mask within the application, it would still work.
    10x and I hope I'm not repeating s.o. else's question.

    Hi,
    I won't try to create the entire function here, just enough to point you in the right direction.
    Create a function something like:
    create or replace FUNCTION "GETHEADINGS" (inDATE IN VARCHAR2, inFORMAT IN VARCHAR2)
    RETURN VARCHAR2
    IS
    BEGIN
      DECLARE
        vTHISDATE DATE;
        vSTRING VARCHAR2(1000);
      BEGIN
        vTHISDATE := TO_DATE(inDATE, inFORMAT);
        vSTRING := TO_CHAR(vTHISDATE, inFORMAT);
        RETURN vSTRING;
      END;
    ENDinDate would receive the item's date value and inFORMAT receives the date format. vTHISDATE converts the date supplied into a date using the date format and vSTRING turns that into a string, again using the date format. Obviously, this example will just return the original date.
    To add styling to any column, just surround the column text with the appropriate tags whilst building up your string. For example:
    '&lt;i&gt;' || columnheading || '&lt;/i&gt;'Now, in your report's Report Attributes, change the Headings Type to PL/SQL and enter in something like:
    DECLARE
    vHEADINGS VARCHAR2(1000);
    BEGIN
    SELECT GETHEADINGS(:P1_DATE_FIELD, :PICK_DATE_FORMAT_MASK) INTO vHEADINGS FROM DUAL;
    RETURN vHEADINGS;
    END;When you've created the function you need, the string returned should be in the column headings delimited with colons.
    Andy

  • How to read static variable defined java class from flex?

    This is a beginner question. If I use remoteClass to map a java class and a flex class, how can I access a static variable defined in java class from the flex code?
    Thanks!

    Static propeties are by default ignored in the blazeds for serialization. You can try using another global property in the java bean which maps to the value stored in the static property( Hopefully it should work)
    eg,
    public String instanceValue = ClassName.staticValue;
    Ref: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=serialize_data_3.ht ml

  • How to read data from select Options in another view without using context

    I have 2 views, one for selection screen and another for displaying result.
    In selection screen view I have define a select options with the help of webdynpro component.
    Now my object is display result in result view based on entry of selection screen.
    I don't want to do binding in context node, without that how I can read data of select option
    in result view?
    Regards,
    Rasmi Ranjan Mishra

    Solve by own.
    If I define the Select options in component controller, then it will be global in nature. so i can get the value of select options
    in another view also.
    Regards,
    Rasmi Ranjan Mishra

  • How to read a specific value or a portion of text using utl_file.

    hi,
    I have a small requirement which goes as follows. I have a text file which is a resultof the sql query and it contains 16 columns as PIPE delimited text . I am using the UTL_FILE package concept to read the data. In general when we use the UTL_FILE.GET_LINE we read the entire line of text. But i need to read the 10th column of the query or the PIPE delimited text .
    Please advice.
    My query goes something like this:
    declare
    f utl_file.file_type;
    s long;
    c number := 0;
    begin
    f := utl_file.fopen('ABC_EXTRACTS','sample1.txt','R');
    loop
    utl_file.get_line(f,s);
    insert into s values (s);
    c := c + 1;
    end loop;
    exception
    when NO_DATA_FOUND then
    utl_file.fclose(f);
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;

    Why don't you use varchar2 instead of long data type. I doubt you can read a portion from a file using utl_file but after doing the fetch you can do substring over the varchar2 variable and retrieve just the 10th column.
    sample sql:
    If your DB is 10g or higher, you can use the below regular expression to retrieve value based on your need.
    PRAZY@11gR1> select regexp_substr('111|222|333|444|555|666|777|888|999|000|aaa|bbb|','[^|]+',1,10) from dual;
    REG
    000
    Elapsed: 00:00:00.00Btwn, if the text file has fixed number of columns at all time, why don't you use a external table instead?
    Regards,
    Prazy
    Edited by: Prazy on Mar 22, 2010 4:11 PM

Maybe you are looking for