How to clear the value of variable declared with STATICS keyword in FM?

Hi All,
I am using a standard CRM FM:CRM_CLA_RES_UPDATE_FM in that a STATICS variable is declared. In my code this STATICS varible value is populating. Iam to clear that Varible.
How to do that.
Thanks and Regards,
Shabeer Ahmed,

If you have 6.0 or up version then you will have a spiral button for your ABAP editor in you application toolbar. this is to find enhancements provided to you for standard programs. if you click on this you will get the enhancement points which you can identify and use accordingly to change/edit your STATICS variable content.
if not, then you'll probably have to write to OSS , if you can open the code and do the required correction.

Similar Messages

  • How to pass the value of variable to another java file?

    Hi. I have 2 java files (LogonAction.java and PCAction.java). The value of variable(String getrole) depends on the logon user. How can I use this value of variable in PCAction.java? I want to execute a sql statement in PCAction.java which is (String sql="Select * from PP where role"+"='" + getrole + "'") Thanks a lot.
    LogonAction.java is below:
    package test;
    import test.jdbc.util.ConnectionPool;
    import java.sql.*
    import java.util.*;
    import javax.servlet.http.*;
    import org.apache.commons.logging.*;
    import org.apache.struts.action.*;
    import org.apache.struts.util.*;
    import org.apache.commons.beanutils.PropertyUtils;
    public final class LogonAction extends Action {
    private Log log = LogFactory.getLog("org.apache.struts.webapp.Example");
    private ConnectionPool pool;
    public LogonAction() {
    pool = ConnectionPool.getInstance();
    public String getrole;
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    Locale locale = getLocale(request);
    MessageResources messages = getResources(request);
    ActionErrors errors = new ActionErrors();
    String username = (String)PropertyUtils.getSimpleProperty(form, "username");
    String password = (String)PropertyUtils.getSimpleProperty(form, "password");
    String getusername=CheckUser(username,password);
    getrole=getusername;
    java.lang.System.out.println(getrole);
    if ("".equals(getusername))
    errors.add(ActionErrors.GLOBAL_ERROR,
    new ActionError("error.password.mismatch"));
    getusername=username+getusername;
    // Report any errors we have discovered back to the original form
    if (!errors.isEmpty()) {
    saveErrors(request, errors);
    return (mapping.getInputForward());
    // Save our logged-in user in the session
    HttpSession session = request.getSession();
    session.setAttribute(Constants.USER_KEY, getusername);
    if (log.isDebugEnabled()) {
    log.debug("LogonAction: User '" + username +
    "' logged on in session " + session.getId());
    // Remove the obsolete form bean
    if (mapping.getAttribute() != null) {
    if ("request".equals(mapping.getScope()))
    request.removeAttribute(mapping.getAttribute());
    else
    session.removeAttribute(mapping.getAttribute());
    // Forward control to the specified success URI
    return (mapping.findForward("success"));
    * Look up the user, throwing an exception to simulate business logic
    * rule exceptions.
    * @param database Database in which to look up the user
    * @param username Username specified on the logon form
    * @exception ModuleException if a business logic rule is violated
    public String CheckUser(String username,String password){
    Connection con = null;
    try
    con = pool.getConnection();
    String sql = "SELECT * from user WHERE userid = ? AND password= ?";
    PreparedStatement ps = null;
    ResultSet rs = null;
    try {
    if (con.isClosed()) {
    throw new IllegalStateException("error.con.isClosed");
    ps = con.prepareStatement(sql);
    ps.setString(1,username);
    ps.setString(2,password);
    rs = ps.executeQuery();
    String returnstr="";
    while(rs.next())
    returnstr=rs.getString("role");
    java.lang.System.out.println(returnstr);
    return returnstr;
    } catch (SQLException e) {
    e.printStackTrace();
    throw new RuntimeException("error.ps.executeQuery");
    } finally {
    try {
    if (ps != null)
    ps.close();
    if (rs != null)
    rs.close();
    } catch (SQLException e) {
    e.printStackTrace();
    throw new RuntimeException("error.rs.close");
    catch (SQLException e)
    e.printStackTrace();
    throw new RuntimeException("Unable to get connection.");
    finally
    try
    if (con != null)
    con.close();
    catch (SQLException e)
    throw new RuntimeException(e.getMessage());
    }

    You can use PreparedStatement and
    String cmd = "select * from PP where role=?";
    PreparedStatement stmt = conn.prepareStatement(cmd);
    stmt.setString(1,theRole);

  • How to change the value of variable in .bpel file

    Hi,
    How can i change the value of variable in .bpel file at time of deployment.
    Can it be possible with configplan.xml or deployment descriptor?
    Thanks
    Richa

    You cannot change the value of variable in .bpel file using config plan. If you want to change value at runtime , you can use Preference variable. Below is the blog to help you understand more.
    http://eelzinga.wordpress.com/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
    Cheers,
    Durga
    Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

  • How to clear the values present in SAP memory.

    Hi,
    i am building a module pool program in that  im using subscreen which is designed as 'selection-screen 0500 as subscreen.'
      when we validate the selection screen elements, if it come acrosses any error condition it disables every field in theselection-screen enabling the error field(error value is still present). this works fine here.
      but i  need to clear the values present in that field.to retain the values im using memory ids.
    solution required immediately.
    Thanks,
    Nagaraju.

    Hi,
    Use FREE MEMORY.
    FREE MEMORY deletes the entire ABAP memory including all the data that was exported with EXPORT TO MEMORY ID key.
    If helpful pl reward.
    Cheers...

  • How to clear the value of a variable in a managed bean after AM method...

    I have two inputText fields on a page - user inputs a value in FieldA and performs a search (execute w/ params)... FieldB shows up under Results table with an 'Add' button. User can enter a value in FieldB and click 'Add' to insert a new row in the Results table.
    I got the insert to work by making FieldB binding = #{userState.newVisitorId} where userState is a session scoped bean.
    When the page reloads after the insert, the value entered in FieldB is still there - I want to clear it out. I know 'marrying' the AM code for the insert to the View code for the bean is bad practice; what is a better way to do this?
    Thanks!

    For anyone who might also be looking for this solution... I simply added a SetActionListener to the 'Add' button that was set as From: #{null} To: #{userState.newVisitorId} and it works like a charm.

  • How to store the value to variable?

    hi
    plz c the below code...
    my prblm is i want to store the value of wa_final-preis into new_xeipa-preis if there is only one ebeln...
    if there are more procss orders then i want to save the first value to new_xeipa-preis wn second record comes then new_xeipa-preis should be replaced by new value and old_xeipa-preis replaced by old value....
    how to do this?
    LOOP AT xeipa INTO wa_xeipa.
      idx = sy-tabix.
      CLEAR: wa_xeina.
        READ TABLE xeina INTO wa_xeina WITH KEY infnr = wa_xeipa-infnr.
        IF sy-subrc is INITIAL.
        wa_final-infnr = wa_xeipa-infnr.
        wa_final-ebeln = wa_xeipa-ebeln.
        wa_final-bedat = wa_xeipa-bedat.
        wa_final-matnr = wa_xeina-matnr.
        wa_final-lifnr = wa_xeina-lifnr.
        wa_final-peinh = wa_xeipa-peinh.
        wa_final-preis = wa_xeipa-preis.        "net price
        wa_final-bprme = wa_xeipa-bprme.
        wa_final-bwaer = wa_xeipa-bwaer.
        IF ( wa_final-infnr is NOT INITIAL ) AND ( wa_final-ebeln is NOT INITIAL ) .
        ABWEICHUNG = ( new_xeipa-preis / old_xeipa-preis ) * 100 .
        ENDIF.
        append wa_final to it_final.
        ENDIF.

    Hi Smitha,
    Check the below given code.
    LOOP AT xeipa INTO wa_xeipa.
      idx = sy-tabix.
      CLEAR: wa_xeina.
        READ TABLE xeina INTO wa_xeina WITH KEY infnr = wa_xeipa-infnr.
        IF sy-subrc is INITIAL.
        wa_final-infnr = wa_xeipa-infnr.
        wa_final-ebeln = wa_xeipa-ebeln.
        wa_final-bedat = wa_xeipa-bedat.
        wa_final-matnr = wa_xeina-matnr.
        wa_final-lifnr = wa_xeina-lifnr.
        wa_final-peinh = wa_xeipa-peinh.
        wa_final-preis = wa_xeipa-preis.        "net price
        wa_final-bprme = wa_xeipa-bprme.
        wa_final-bwaer = wa_xeipa-bwaer.
    " First time this value is not populated. When the second value comes in,
    " New value gets populated in OLD variable and New value is replaced with the latest.
        *IF idx NE 1.*
          *old_xeipa-preis = new_xeipa-preis.*
        *ENDIF.*
        *new_xeipa-preis = wa_xeipa-preis.*
      IF ( wa_final-infnr is NOT INITIAL ) AND ( wa_final-ebeln is NOT INITIAL ) .
        ABWEICHUNG = ( new_xeipa-preis / old_xeipa-preis ) * 100 .
        ENDIF.
        append wa_final to it_final.
        ENDIF.
    ENDLOOP.
    I hope this is what you were looking for.
    Thanks & Regards,
    Ram.
    Edited by: ram Kumar on Jun 12, 2009 5:16 PM

  • How to store the value into variable and access it in RMAN script

    I want to create a variable and dynamically assign a numeric value to it (may get the value may be from SQL )and access the value in RMAN script.
    Thanks...Raj

    Raj,
    We have been getting this type of request and it is not possible via RMAN to do that.
    BUT--You could write a sql/plus script to query your variable and produce the RMAN script with the new value.
    Just a suggestion.
    Tammy

  • How to clear the values from a Tab Screen.

    Hi,
    I have created Two Tab in my report by using the below mentioned code.
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK BR_ACB WITH FRAME TITLE TEXT-502.
    PARAMETERS: P_VATNUM   TYPE T001-STCEG,
                 P_NAME     TYPE T001-BUTXT,
                 P_STREET   TYPE rfpdo-KQSUSTRAS,
                 P_CITY     TYPE rfpdo-KQSUPADD02,
                 P_CNTRY    TYPE rfpdo-ALLGINLD.
    SELECTION-SCREEN END OF   BLOCK BR_ACB.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK br4 WITH FRAME TITLE text-503.
    PARAMETERS: P_IDLU    TYPE LU_IDCODE,
                 P_VATNU   TYPE LU_VATNUM,
                 P_DESIG   TYPE LU_DESIGNATION,
                 p_telf  LIKE rfpdo-asldtelf.       "Telefonnummer
    SELECTION-SCREEN END OF BLOCK br4.
    SELECTION-SCREEN END OF SCREEN 201.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 8 LINES.
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1 DEFAULT SCREEN 200.
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2 DEFAULT SCREEN 201.
    SELECTION-SCREEN END OF BLOCK tabb1.
    INITIALIZATION.
      tabs1 = text-500.
      tabs2 = text-501.
    Problem I am facing here is when report loads the screen once and I am filling all the valuse in the Tab Screen 200 and 201 and executing the report and when I am reloading any other variant then it is not clearing the valuse present in the Tab Screen 200 and 201.
    Can any buddy help me regarding this to clear the Tab Screen 200 and 201.
    Thanks and best regards,
    Niteesh Rai

    Hi Niteesh,
    I have tested the scenario which you have mentioned above,  Its working fine for me.
    I have filled all the values in screen 200 and 201 as well and saved it as variant Test1, and again
    I have filled all the values in screen 200 and 201 as well and saved it as variant Test2.
    When I am changing the variants from Test1 to Test2 and vice versa.  I displaying their respective data as well.
    Regards,
    Md Ziauddin.

  • How to replace the values in variable selection Screen urgent plz

    Hi all,
    I am having a requirement. where the user need pass the value in the variable, Here v r having option like '1' and '2' which represent 'month' and 'ytd'.
    While selecting user view as 1,2 .Now my requirement is to replace the value 1=monthly and 2=ytd while the user passing the value to avoid the confusion.
    Is it possible if so plz let me know
    Regards

    Dear Venkat.
    You please try the following steps:
    1. Say the InfoObject is 0EMPLOYEE against which you have created the variable, which user is trying to select value against, when they execute the report.
    2. Goto RSA1-> InfoObject tab-> Select InfoObject 0EMPLOYEE.
    3. Selcet the following options:
       Query Execution Filter Val. Selectn  -  'Only Posted Value for Navigation'
       Filter Value Repr. At Query Exec. -      'Selector Box Without Values'
    Please let me know if there is any more issue. Feel free to raise further concern
    Thnx,
    Sukdev K

  • How To display the value of outer loop with inner loop fields

    Hi All
    I have a issue that i have to display the values flexfield wise ,like i have 3 DFF values in xmlp layout ,each will have some list of records which will be displayed under the DFF values,so it means
    DFF values will be in outer loop with its group
    while related records of DFF will comes in inner loop with its group
    my problem is that i have to display the DFF values also with respective inner records ,
    Would somebody please suggest how can we achieve this ,please let me know if my question is not clear.
    Thanks
    Pratap

    I think you will be having xml structure like this:
    <G_HEADER>
    <LIST_G_LINES>
    <G_LINES>
    </G_LINES>
    </LIST_G_LINES>
    </G_HEADER>
    So in this case, if you want to refer G_HEADER details in G_LINES then, you should navigate 2 levels above.
    It will be <?../../element_name?>

  • How to get the value in a hashmap with a key of expression "123-456"?

    Hi all,
    I new to java and having a problem with getting values from a hashmap.here is the code which i wrote
    Map map = new HashMap();
    int m = 123;
    int n = 456;
    String key = String.valueOf(m) + "-" + String.valueOf(n);
        map.put(key, true);
        Now i am trying to get the value and i get an exception
    boolean b = map.get(String.valueOf(m) + "-" + String.valueOf(n));Can someone help me how to pass this expression as key in the hashamp

    Hi corlettk,
    Thanks for your reply. I have defined my map as Map<String, Boolean> selectedIds = new HashMap<String, Boolean>();
                selectedIds.put("123-456", true);           
                int m=123; int n=456;
                                     selectedIds.put(String.valueOf(m) + "-" + String.valueOf(n),true);
                boolean viv = selectedIds.get("String.valueOf(m)-String.valueOf(n)");
                System.out.println(viv);
                My problem is the hashmap key must be set dynamically ("123-456" is just an example) and when i get the value i should be able to pass those varibales in an expression correctly. Please let me know how can i pass an expression like the one above as a hashmap key. Please advise.

  • Help. How to link the value on other spreadsheet with different path

    The data is in the spreadsheet on path: Macintosh HD/Users/fridayge/work/list.xls
    I want to link the value to Numbers sheet.
    If in ecxel, I can express ='Macintosh HD:Users:fridayge:work:[list.xls]list'!A1, then get value of A1
    In numbers, how can I get this?

    Friday,
    If you can't combine documents for some reason, there are ways to mitigate the effects of having them separate.
    I would give the Source and Receiving documents similar names such that reside next to each other in the Finder window when organized by FileName. Also, position the data you need to retrieve at the top of the Sheet that the Source document will display when opened - you could have a small summary table there.
    Now when you are going to do edits, Select both files in Finder, Right-Click ond Select Open, opening both at once. Copy the source data from the convenient cells in the source document then close the Source document and Paste into the Receiving document. Now continue as though the data had transferred by formula.
    Jerry

  • How to concatenate the values in single row with images or colours

    hi all,
    i am apex 4.2,
    i tried to execute a plsql query for the values concatenate two values into same column
    example in my table
    i am having teachers list one can teach two or three subjects
    in table i am saving like
    teacher_id               teacher_name      salary           subjects
    1 ram 5000 science,maths
    2 gang 4000 maths,science,english
    but my report should come like
    teacher_id  teacher_name     salary       subjects
    1 ram 5000 science maths i have to highlighting these subjects  with images or with different colors
    2 gang 4000 maths english science
    can any one help me please
    thanks & regards
    pavan
    Edited by: Pavan on Apr 9, 2012 4:15 AM
    Edited by: Pavan on Apr 9, 2012 4:22 AM

    First of all, i would split the subjects column.
    If you for sure only need up to 3 subjects, you could make three columns subject1, subject2, subject3.
    If you may have an indefinite number of subjects for each teacher, you might create a detail-table with the subjects for each teacher.
    I also would create a list of values for the subjects, either based on static values or based on another table with the subjects allowed.
    Now that the subject-names are fixed you could create a subject-image for each subject, named as the subject itself. Then you "construct" the image for each subject as
    <img src="#APP_IMAGES##SUBJECT_NAME#.png"/>

  • How to default the values in BP screen with BDT?

    Hi all,
             I am working in BDT enhancement for BP for Grants mangement. Therefore there are some screen fields in BP transaction should directly get saved in GMSPONSOR table.  I mean to say user would give some values in BP screen(One can get it at the runtime by calling the FM BUP_BUPA_BUT000_GET) and the relevant values will autometically goes to GMSPONSOR table if the BP is saved.
    As per my knowlwdge there are many events under BUPT transaction and there also I found the entry of GMSPONSOR table. Can anyone tell me in which event I have to default these screen values and redirect these to GMSPONSOR table?
    Thnaks & Regards
    Dibyendu.

    Dear Smita,
                    Thanks for your reply. The fact is that if I could default it in the screen text box then it would autometically goes to the corresponding table at save event.
    So could you help me to identify the event by which one can keep default values in screen.
    May be ISDAT or ISSTA event  to default the valuesfor BP.
    I have done to some extent for the fields belonging to BUT000 with the help of FM BUP_BUPA_FIELDVALUES_SET. I have placed a Z FM in ISDAT event. But the problem lies with the fields belonging to other tables.
    Waiting for your update.

  • How to disply the value of variable in the Web template

    Imagine I have a query TOP-N customers. I want to diplay N value in the web template. I used web item for this purpose in NW2004. Which item should I use for the same purpose in NW2004s?
    Thanks

    Does anyone have another suggestion? The information field does not render pretty. I am trying to do this via an HTML path edit and a text box. The view source looks like this for a variable
    <BICS_VIEW>
      <VARIABLES>
        <VARIABLE name="RDSHW_PCY_YOVERY" type="DOUBLE" text="% Goal Year over Year" value="10.0"/>
      </VARIABLES>
    I tried various versions of the path=... but cannot get it to work. Anyone got an idea ???
    I tried
    path="DATA_PROVIDER:DP_1?/BICS_VIEW/VARIABLES/VARIABLE/@value" />

Maybe you are looking for

  • Do ePub books sync bw iPad and iPhone?

    I transferred some ePub books into ibooks from my iPad mini to my iPhone but they r not syncing...Will they sync?  Is there something I need to do in order o get them to sync?  I mostly read on the iPad mini but if I don't have it w me, I'll read on

  • ACR calibrate tab and Vuescan DNG

    Having ordered a Nikon Coolscan V ED scanner to digitize ektachrome slides, I am now busy reading and thinking about how to best to include scanned pics in my workflow. Note that one key element of my workflow is to do as much as possible in ACR per

  • Help. Cannot open safari after installing OSx Lion on macbook.

    Help. I installed OS X lion on my macbook.  Since installing, I can no longer open up safari.  I keep getting the message "safari closed unexpectedly". Any suggestions?

  • Why does print function in Preview with Lion OS not work?

    Since upgrading to Lion, the print functionality on Preview does not work.  When you select Print, the rainbow wheel of misfortune appears and I have to force quit Preview after a while. The print window does not even appear to select a printer (I ha

  • Problems Emptying REJECTED Smart Album

    My REJECTED smart album has 700+ images in it and I want to delete all of them - versions and masters. I have done this plenty of times by highlighting all of the images and then using the Delete Masters And All Versions selection from the File menu.