Get year from user selected month in field name

Hi BExperts,
I would your help about this problem on BI 7 :
At the opening of the query, user selects a month (for example 03.2007).
From this month, i have to indicate key figures on the selected month (03.2007) and key figures on the corresponding year (here 2007).
I'm using a variable in order to get the selected month (0I_CMNTH).
I don't know how to get the corresponding year (with a variable) ?
For example : user selects "03.2007", in the query i would have :
Period  Key figure
03.2007     17
2007           38
Thanks for help.
Points will be assigned.
Cheers,
Vince.

Hello,
         I am not sure about the one you mentioned but this is another way which you can try by creating the customer exit variable V_YEAR under 0calyear characteristic and add the following code for gettting the previous year.
data: year(4) type n,
         year1(4) type n.
when 'V_YEAR '.
if i_step = 2. "after the popup
loop at i_t_var_range into loc_var_range
where vnam = '0I_CMNTH'.
year = loc_var_range-low (4).
year1 = year - 1.
clear l_s_range.
l_s_range-low = year1.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
exit.
endloop.
endif.

Similar Messages

  • Air Javascript - Get path from user selected directory

    Solution: The resulting variable is just an air.File, and
    nativePath is accessible, as I expected. It just did nothing the
    first few times I tried it.

    Try this:
    SPPlatformFileSpecification spec;
    // do sADMBasic->StandardGetDirectoryDialog()
    ai::FilePath path;
    sAIFilePath->SetFromSPFileSpec(spec, path);
    Then talk to path to get your location. Hopefully that does the job. I've never used StandardGetDirectoryDialog() though, so for all I know its broken.

  • I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. years each month.

    I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. year each month. I need to create a spreedsheet using the the Acutlas from the year-to-date and from last year-to-date, but need to report each month.

    Hi Tony,
    Answering your question would be easier given a screen shot of the source table and one of what you want the summary table to look like.
    Is the data you want for each month in a single cell o the source table, or does the summary table need to collect February's data (for example) from several cells and do some math with those numbers before presenting them on the summary table?
    Regards,
    Barry

  • How can i get input from user in Workflows

    Hello professionals,
    I'm new to SAP B1 Workflow, i have created some workflows and they all worked fine.
    But, I am wondering, How can i get input from user?. For example, i want to display list of options to choose between them and route the workflow based on the selected option. I don't want to use the exclusive gateway and check for some conditions, i want to get input from user.
    How can i do that?
    Thanks in advance,
    Kareem Naguib

    Hi,
    Please refer SAP help file:
    http://help.sap.com/saphelp_sbo900/helpdata/en/b8/1f9a1197214254b79bcf8f93f9fff9/content.htm?frameset=/en/44/c4c1cd7ca22…
    Thanks & Regards,
    Nagarajan

  • Variable used in FOx formula should get value from user

    Hi Gurus,
    In my fox formula I want to multiply a keyfigure (say quantity) with a factor. For example if the factor is 10 then all records should get multiplied by 10.
    But the requirement is user shpuld be able to give the factor that should be multiplied. That is the l_factor used in the fox function should be a variable which gets value from user. I know we can give variables in filter and planning functions in IP. But can we give values in Fox formula.
    I would really appreciate the time and effort.
    Thanking you,
    Jerry Jerome

    Hello,
    May be you can try this solution.
    I think you have create a dummy character info-object(Z_Number) of same data type interget number.Create variable for Z_Number and restrict in filter(ZV_NUM).
    DATA Z_MAT TYPE 0Material.
    DATA Z_NUM TYPE Z_NUMBER.
    DATA Z_NUM_READ TYPE I.(Declate same as data type for Z_Number)
    Z_NUM = VARV(ZV_NUM).
    FORACH Z_MAT.
    Z_NUM_READ = Z_NUM.
    {Z_KF1,Z_MAT} = Z_NUM_READ * {Z_KF1,Z_MAT}.
    ENDFOR.

  • Limiting rows displayed from user-selection on dashboard prompt

    Hi,
    I'm looking for a way to limit the number of rows displayed after a user has made a selection using a dashboard prompt. Here is my scenario:
    User selects 24 periods of data using an 'In Between' dashboard prompt (i.e. Jan05-Dec06). 24 rows are returned by the query but I only want to show the last 12 rows (Jan06-Dec06).
    Motivation is that I'm using the MSUM function to display a 12-month moving sum total and I don't want to display the first 12 rows as they do not contain a complete moving sum total.
    I've looked at using a variable to store the user selection at the dashboard prompt, but the 'In Between' dashboard prompt does not allow one to store a result in a variable.
    Any suggestions are welcome!
    Thanks!

    Hi Som,
    Thanks again for your feedback. I've thought about using dynamic repository variables, but found them not to be the answer. Although the moving sum would always be a 12 month total, the user needs to be able to vary the range of periods using the dashboard prompt. Today he might only want to look back 12 months, tomorrow he may need a 5 year overview. Using dynamic repository variables would mean I'd have to create variables for the entire history i.e. CM until CM - 240 (20 years * 12 months). If a user then would like to report on a specific period, he would need to pick the correct dynamic variables, which would not be user friendly/acceptable.
    I think I may need to resolve this problem in my datamart by calculating & storing a 12 month total (the only 'fixed' requirement of the report) in my fact table. This would also remove the need for the user to select 12 months more that he would see in his report (a drawback of my original scenario above).
    Thanks again for your input!
    Regards,
    Dutch

  • Getting Dump from a select query

    Dear All,
    Am selecting records from KEKO  and storing into  E1KEKO  internal table. But am getting dump error. I need to send those E1KEKO records as idoc. Kindly help me out how to fix this dump.
      SELECT * INTO CORRESPONDING FIELDS OF e1keko
        FROM keko
        WHERE keko~matnr = p_matnr
          AND keko~werks = p_werks
          AND keko~bwtar = 'Z06'
          AND keko~bwvar = 'Z06'.
        CLEAR t_idoc_data.
        t_idoc_data-segnam = c_segnam_e1keko.
        t_idoc_data-mandt = sy-mandt.
        t_idoc_data-sdata  = e1keko.
        APPEND t_idoc_data.
        CLEAR e1keph.
    endselect
    Thanks in advance.
    Anandhan

    Hi,
    If i use the below select query in a test program,  that time also am getting the same dump.
    DATA: e1keph TYPE e1keph,
          e1keko TYPE e1keko.
       SELECT * INTO CORRESPONDING FIELDS OF e1keko
        FROM keko
        WHERE keko~matnr = '000000000010801071'.
      endselect.
    (code}
    The dump showing the below message
      The reason for the exception is:
      In a SELECT access, the read file could not be placed in the target
      field provided.
      Either the conversion is not supported for the type of the target field
      the target field is too small to include the value, or the data does no
      have the format required for the target field.
    Thanks in advance
    Anandhan

  • Get input from user and create a file and run a script in command line.

    Hi all,
    i'm trying to get a input from user and write it into a file named alpe.jacl
    To get multiple userinputs like address and jobtitle etc etc in the same single window.
    and the code will save the inputs in alpe.jacl one by one in a new line like
    nameis name
    address russia
    jobtitle dev
    So i coded like below.
    Though GUI for user input looks dull Its working fine.
    Now I want this code to perform one more task which is the GUI will contain one more button INSTALL with OK and CALCEL .
    and when after putting all inputs and creating the alpe.jacl file if someone clicks INSTALL it should start ./install.sh script present at the same folder which contains some unix shell commands.
    Here am not able to figure out how to go further...
    One more thing after all the inputs given when I am clicking on the OK button its closing the window instantly which i dont want. I want it like it should wait till someone press CANCEL to exit.
    Please some one help me.
    import javax.swing.*;
    import java.io.*;
    public class file
    public static void main(String []args)throws IOException
    FileWriter ryt=new FileWriter("alpe.jacl");
    BufferedWriter out=new BufferedWriter(ryt);
    JTextField wsName = new JTextField();
    JTextField sName = new JTextField();
    JTextField cName = new JTextField();
    Object[] message = {    "Web Server Name:", wsName,"Server Name:", sName,"Cluster Name:", cName};
    int answer = JOptionPane.showConfirmDialog(    null, message, "Enter values", JOptionPane.OK_CANCEL_OPTION);
    if (answer == JOptionPane.OK_OPTION){    String webserver = wsName.getText();
    String server = sName.getText();
    String cluster = cName.getText();
    out.write("set webservername " +wsName.getText()+"\n");
    out.write("set ClusterName " +cName.getText()+"\n");
    out.write("set ServerName " +sName.getText()+"\n");
    out.close();
    }}Thanks,
    Ricky

    Thanks a lot.
    Is there any way through which i can assign a scroll bar to my panel.
    As when the number of user inputs grows the GUI becomes more bulky and some of the fields are not showing up.
    Cheers
    _Ricky                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • FM needed to get data from User

    Hi,
      I need popup FM name to get input from the user...
    can any body help me on this..
    rayudu

    Hi,
      Try using fm POPUP_GET_VALUES
      or POPUP_TO_GET_ONE_VALUE..
      In fact try searching for fms POPUPGET..
      Hope this helps..
      For example,
      DATA: l_rcode,
          t_fields LIKE sval OCCURS 0 WITH HEADER LINE.
    t_fields-tabname = 'VBAK'.
    t_fields-fieldname = 'VBELN'.
    APPEND t_fields.
    CALL FUNCTION 'POPUP_GET_VALUES'
      EXPORTING
      NO_VALUE_CHECK        = ' '
        popup_title           = 'Test'
      START_COLUMN          = '5'
      START_ROW             = '5'
    IMPORTING
       RETURNCODE            = l_rcode
      tables
        fields                = t_fields[]
    EXCEPTIONS
       ERROR_IN_FIELDS       = 1
       OTHERS                = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    OR
    DATA: l_answer,
          l_value(30).
    CALL FUNCTION 'POPUP_TO_GET_ONE_VALUE'
      EXPORTING
        textline1            = 'Line1'
        TEXTLINE2            = 'Line2'
        TEXTLINE3            = 'Line3'
        titel                = 'Test'
        valuelength          = 30
    IMPORTING
       ANSWER               = l_answer
       VALUE1               = l_value
    EXCEPTIONS
       TITEL_TOO_LONG       = 1
       OTHERS               = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Hope this helps..
    Sri
    Message was edited by: Srikanth Pinnamaneni
    Message was edited by: Srikanth Pinnamaneni

  • Get radius from map selection event

    How can I get the radius and the UOM from a MapSelectionEvent?
    Thank you,
    Monica

    Hi,
    what is the usecase. Do you want to know if the users selected a column, or do you know the table cell the user clicked into ? Note that the selectionEvent does not pass the column information of the mouse focus. Also, which release of JDeveloper do you use?
    Frank

  • How to  Get input from  User and Display it's Value

    Hi ,
    I need to get 2 inputs from user and to display it's Mutilple Value.
    The Below Code is working fine to get 2 Input's from user,but it display a Junk value as a Result .How to
    overcome this Problem. I need to display it's Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(char)br.read();
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

    Changed to Integer but still the problem persists.
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(int)br.read();
    Count++;
    b=(int)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

  • How to Get Input From User and Display Result

    Hi ,
    I need to get 2 inputs from user and to display it's Mutilple Value.
    The Below Code is working fine to get 2 Input's from user,but it display a Junk value as a Result .How to
    overcome this Problem. I need to display it's Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(char)br.read();
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

    Hi ,
    I need to get 2 inputs from user and to display it's
    Mutilple Value.
    The Below Code is working fine to get 2 Input's from
    user,but it display a Junk value as a Result .How
    to
    overcome this Problem. I need to display it's
    Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws
    IOException{
    BufferedReader br =new BufferedReader(new
    InputStreamReader(System.in));
    do{
    a=(char)br.read();This line will get you the ascii-value of the typed character.
    This line will not get you the value typed in.
    Try looking for Integer.parseInt()...
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);

  • How to deploy a VO Bind variable to get value from user session....

    Hello everbody...
    A JSF Page has a table based on VO with two parameters. One of this parameters I will pass by operation ExecuteWithParams.
    but the other parameter I need to pass a value from User session.
    Is that possible? How would I do that? I´m using jdev10.1.3
    Thankyou...

    When you created a binding for executeWithParams in your pageDef, the action binding should have had NamedData elements for each of the parameters. These would have been assigned values from a variableIterator up in the executables section. The parameter that gets its value from user input should be left alone. For the parameter that gets its value from the user session, change the EL expression that defines its NDValue attribute so that it references the session information that you want to use. This can be a sessionScope variable that you set earlier in the session, as Frank suggests, a property of a managed bean in session scope, or some other variable.

  • Get data from a specific month?

    I have this code:
    <h1><cfoutput>#self#</cfoutput></h1>
    <cfquery datasource="Intranet" name="month_data">
      select * from CSEReduxResponses where status=1 and execoffice_status=0
       AND MONTH([approveddate]) = MONTH(GETDATE())
       </cfquery>
    <cfquery datasource ="Intranet" name="GetDeptSubmissions">SELECT * FROM CSEReduxResponses</cfquery>
    <cfquery dbtype="query" name="GetApproved">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 1</cfquery>
    <cfquery dbtype="query" name="GetDenied">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 2</cfquery>
    <cfif month_data.RecordCount gt 0>
    <cfoutput>
              <h2>Comments / Ratings Administration</h2>
              <div>
                        <div class="display_count pending_outer">
                                  <div class="display_count_desc pending_inner">Pending</div>
                                  <cfif month_data.RecordCount gt 0><a href="cse_execoffice_pending.cfm"></cfif>
                                            <span class="display_count_number">#month_data.RecordCount#</span>
                                  <cfif month_data.RecordCount gt 0></a></cfif>
                        </div><!--- /div class="display_count" --->
                        <div class="display_count approved_outer">
                                  <div class="display_count_desc approved_inner">Approved *</div>
                                  <cfif GetApproved.RecordCount gt 0><a href="cse_execoffice.cfm?approved"></cfif>
                                            <span class="display_count_number">#GetApproved.RecordCount#</span><br>
                                  <cfif GetApproved.RecordCount gt 0></a></cfif>
                        </div><!--- /div class="display_count" --->
                        <div class="display_count denied_outer">
                                  <div class="display_count_desc denied_inner">Denied</div>
                                  <cfif GetDenied.RecordCount gt 0><a href="cse_execoffice.cfm?denied"></cfif>
                                            <span class="display_count_number">#GetDenied.RecordCount#</span><br>
                                  <cfif GetDenied.RecordCount gt 0></a></cfif>
                        </div><!--- /div class="display_count" --->
              </div>
    </cfoutput>
    </cfif>
    Right now it display the the output if the 'month_data.recordcount gt 0' , but this would be for all the
    data from the current month because of the query 'month_data'
    What I want to do display_count for each month.
    for example right now it display the data from April, but once its May I would like to display another
    'display_count' from the month of March, even if the other Pending from April still has not hit zero(0).
    any help/advice will help, not sure if there is a better way to do this.
    this is a example of what i have right now, this has 3 peding in the month of April

    Carl Von Stetten wrote:
    It looks like you've posted this same or related question twice on StackOverflow (http://stackoverflow.com/questions/22970021/how-can-i-show-a-output-fr om-a-specific-date and http://stackoverflow.com/questions/23092245/how-to-output-different-da ta-from-different-months).  If you're going to cross-post to multiple forums, then mention that and provide links to your posts on other forums so people can see what others are suggesting and not duplicate efforts.
    Plus http://forums.adobe.com/message/6295752#6295752
    @No_name_123
    As I suggested elsewhere, I hope you will spend more time doing the code than explaining your requirements for fellow developers to do the code for you. I would avoid saying things like these:
    ... What I want to do display_count for each month....
    ... I would like to display another 'display_count' from the month of March...
    Instead, I would write some code, or even pseudocode, and then ask for suggestions on it.
    Message was edited by: BKBK

  • Which is the best way to get data from user difine tables with condition

    Hi everyone,
    I would like using SBO DIAPI to get UDT data rows, there is a method of UserTable.getbykey can get one row information, but I like to get a list of rows from UDT, and the get list have its condition such as: field1="Type_A" ect.
    also I want to avoid using doquery get data from DB, because there is direct access DB potential Suspect.
    I am using SBO 2005 PL09 & visual studio(VB.net) 2005 and I only using DIAPI do not using UIAPI.
    Thanks for any advice.
    Kathy

    Hi Kathy,
    Unfortunately SBObob.GetObjectKeyBySingleValue only works for the B1 business objects as listed in the documentation.
    So, when you don't know the keys (= Code) of the records you want to get from your UDT - there's no way around using Recordset object's DoQuery method!
    Sorry,
    Frank

Maybe you are looking for

  • IPod in Recovery Mode Loop, Restore Does Not Work

    When I turn my iPod on it says "Connect to your computer. Use iTunes to restore." I connect it to iTunes, restore it and then it says that it is still in recovery mode and needs to be restored. Nothing I've tried has worked. I've put it in disk mode,

  • GLSL support for intel x3100 video cards?

    I recently purchased a Lenova Thinkpad T61. I opted for an Intel integrated graphics card (X3100) since I had heard Intel had good open source drivers. Recently, I tried to play with some GLSL (OpenGL Shading Language) programming, but was greeted wi

  • Stop video player

    Hello, i have a stop command on my actions layer at frame 20. There is a button on the stage that will go to frame 21 and contnue playing the timeline when pressed. I want my video which starts on frame 1 to stop once the go to frame 21 button has be

  • Convert Warning message to error message in counter updation(Not for CTM)

    Dear Experts When counter reaading is enterd as previous counter reading then system,gives message of counter overflow,i want to change this message as error message inly ctm login will punch the measuring reading incase there is counter overflow.Ple

  • Forget the  security question

    Hi how I can restart the security question?