Calling an external function???

Here's a coding question for the guru's
I've written a simple function that will clear a form.  I want to call this function from another function (4 of them to be exact).  I could copy and paste code multiple times and everything will work.  But where's the fun in that?  There's something to be said about clean code.
For sake of explanation, the tween are working 4 layers that are on top of each other (don't ask )
Code:
master_mc.GT_Web_mc.addEventListener(MouseEvent.CLICK, testLaptop4);
function testLaptop4(e:MouseEvent):void{
        ClearForm();  // I would like this to run first
// input text outline       
        if(master_mc.ContactForm2_mc.alpha !=0){
            master_mc.ContactForm2_mc.company_txt.border = false;
            master_mc.ContactForm2_mc.contact_txt.border = false;
            master_mc.ContactForm2_mc.speciality_txt.border = false;
            master_mc.ContactForm2_mc.email_txt.border = false;
            master_mc.ContactForm2_mc.comments_input_txt.border = false;
// clear form feilds in case the user doesn't clear/send
/*                  master_mc.ContactForm2_mc.company_txt.text = "";
                     master_mc.ContactForm2_mc.contact_txt.text = "";
                     master_mc.ContactForm2_mc.speciality_txt.text = "";
                     master_mc.ContactForm2_mc.email_txt.text = "";
            myTween = new Tween(master_mc.ContactForm2_mc,"alpha", Strong.easeOut, master_mc.ContactForm2_mc.alpha, 0, 1, true);
        }else if(master_mc.AboutUsForm_mc.alpha !=0){
            myTween = new Tween(master_mc.AboutUsForm_mc,"alpha", Strong.easeOut, master_mc.AboutUsForm_mc.alpha, 0, 1, true);
        }else if(master_mc.PortfolioForm_mc.alpha !=0){
            myTween = new Tween(master_mc.PortfolioForm_mc,"alpha", Strong.easeOut, master_mc.PortfolioForm_mc.alpha, 0, 1, true);
               myTween.addEventListener(TweenEvent.MOTION_FINISH, LaptopListener4);
function LaptopListener4(e:Event):void{
         if(master_mc.laptop_mc.alpha == 0){
            myTween = new Tween(master_mc.laptop_mc,"alpha", Strong.easeOut, master_mc.laptop_mc.alpha, 1, 1, true);
function ClearForm(e:Event){
    master_mc.ContactForm2_mc.company_txt.text = "";
    master_mc.ContactForm2_mc.contact_txt.text = "";
    master_mc.ContactForm2_mc.speciality_txt.text = "";
    master_mc.ContactForm2_mc.email_txt.text = "";

I don't think there's any problem with what you want to do, though all of the other code you show confuses me a bit.
For the call to the function you say you want to run first, you don't supply any arguments, and you don't need to based on what I see in that function, but the function you show is expecting an argument.  You might try removing the argument from the function.
function ClearForm(e:Event){
    master_mc.ContactForm2_mc.company_txt.text = "";
    master_mc.ContactForm2_mc.contact_txt.text = "";
    master_mc.ContactForm2_mc.speciality_txt.text = "";
    master_mc.ContactForm2_mc.email_txt.text = "";

Similar Messages

  • How to call external functions without a .DLL (just using a .H and .LIB file)?

    Hello everyone,
    actually I'm facing little difficulties on how to get an external function getting called from within CVI (Version 2009).
    I was supplied with a .H file and a .LIB file to call an external function from within my CVI project. The .H file looks like this:
    void exportedFunction(double *parameter);
    As far as I know, the external function was written with MS Visual C++ 6.
    So I tried to statically link to the extern al function like this:
    - Add the .H file and the .LIB file to the CVI project
    - #include the .H file where I needed to call the external function
    - do the external function call
    When building I get an unresolved external function call error from CVI so this seems not to be working.
    I made some searches around and got up with two possible issues. Maybe one of you can help me get a bit further and get things working.
    1) The "real" function code is located in the DLL file which was not delivered to me. Or is there a way to get things done (call external functions) just with a .H and a .LIB file (without any .DLL file included)?
    2) The external function does not export according to "C-Style" rules. The function signature in the .H file shows no things like
    extern "C" __declspec(dllexport) void __stdcall ...
     Or maybe it's a combination of both issues (missing .DLL + wrong export style of function)?
    I guess I could get around the wrong export style of the function when I manage to write a wrapper around the original function that actually uses C-Style exporting. But I guess I need the .DLL file for this try as well.
    Thank you for your answers.
    Best regards,
    Bernd
    Solved!
    Go to Solution.

    There is no need  for the dllexport stuff. There is also the option for a static library without any DLL.  But the 'extern "C"' is essential, because it forces the C++  compiler, which was probably used to compile the library , to use C calling convention.
    If you can't ask the provider of the library to provide a version which was compiled using C calling convention the way to go is to write a wrapper with VC++6 around that library which reexports the functions using C calling convertion. Something like
    extern "C" type0 myfunc1(type1 arg1, ...) {
           return func1( arg1,...);
    for every function , you need to use.
    BTW. "unresolved symbol" is the linker error message, you can expect if you try to link C code against a library build with C++ calling convention.

  • Calling an external C function from a C file in JNI

    Hello,
    I am trying to call an external C function, from a C file which is being called by a Java file. I am getting an unresolved symbol error. I have tried many things like, making the external C function in the format of JNI, etc, etc. It is still not working. I think it has something to do with linking the two C files. If anyone can please answer this, it would greatly help me. here is the code:
    HelloWorld.c:
    #include <jni.h>
    #include <stdio.h>
    #include "MyOldHello.h"
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL
    Java_HelloWorld_print(JNIEnv *env, jobject obj)
         helloPrint();
         return;
    HelloWorld.java:
    class HelloWorld
         private native void print();
         public static void main(String[] args)
              new HelloWorld().print();
         static
              System.loadLibrary("HelloWorld");
              System.loadLibrary("MyOldHello");
    MyOldHello.c:
    #include <jni.h>
    #include <stdio.h>
    #include "MyOldHello.h"
    void helloPrint()
         printf("\nHello World!\n");
    MyOldHello.h:
    void helloPrint();
    Now i use the Visual C++ command prompt to compile this by saying:
    javac HelloWorld.java
    javah -jni HelloWorld
    cl -Ic:\Java\jdk1.6.0_20\include -Ic:\Java\jdk1.6.0_20\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll
    and now it gives me the error saying that there is an unresolved external symbol, which is the call to helloPrint in the file HelloWorld.
    If anyone knows how to solve this, or how to call external C functions from a C file that is being called from a Java file using JNI, please respond.
    Thanks
    Nick

    Hi,
    In your post on velocity review, you did not compile MyOldHello.c. You compiled a C file that included the header file for it and called a method defined in the header. The linker is never going to be able to find the code for this if you do not include the object file for this.
    Try this. You will also have to add in any JNI libraries you need to link against but I am sure you could work that out.
    cl /c MyOldHello.c
    cl /c -Ic:\Java\jdk1.6.0_20\include -Ic:\Java\jdk1.6.0_20\include\win32 -MD HelloWorld.c
    cl /LD MyOldHello.obj HelloWorld.obj /FeHelloWorld.dll
    [http://msdn.microsoft.com/en-us/library/f35ctcxw(VS.80).aspx]
    Cheers,
    Shane

  • How to call a RFC function from ABAP to external C/C++ system

    Hi
    Can some one describe me what are the steps that needs to be done to call a RFC function in external C++ system and to handle errors.
    Any previous experience,please share

    Hi,
    i think this is the wrong Forum.
    Better use the SAP NetWeaver .NET Technologies Forum on this site.
    Henning

  • Call external function from SQL query

    Hi,
    I am new to PL/SQL programming.I don't think this is possible but please let me know if there is a way to achieve this. I have a function written in VB.net and I would want to call from the query.
    create table temp as select id, callvbfunction(note_text) from temp2
    Here callvbfunction is the vb.net function.I need to pass note_text field value to the function.
    Thanks..

    Yes it is possible.
    No idea how to specifically call a .Net function (from Oracle) as I do not do Windows (except for playing games ;-) ). But external procedures (extproc) and Java stored procs can be wrapped by PL/SQL wrapper functions and used in SQL statements.

  • FlvPlayback Skin Custom Button calling external function

    Hi,
    I have a custom movie clip in the flvplayback skin and I am looking for a way to call an external js function. This is what I got inside the skin
    my_object.addEventListener(MouseEvent.CLICK, externalFunction);
    function externalFunction(){
        ExternalInterface.call("ExternalFunction");
    Unfortunately, the ExternalFunction is not being called at all. What am I missing here?
    Any help is highly appreciated. Thanks

    Here you go.
    <div id="customEngine_Container" style="z-index: 10001; border: 0px none; width: 400px; height: 550px; position: fixed; bottom: 100px; right: 100px;">
    <object width="400px" height="550px" id="customEngine_Container_o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
    <param name="movie" value="customEngine.swf"><param name="quality" value="high">
    <param name="FlashVars" value="movieUrl=customEngine-demo-video.flv&amp;skinUrl=customSkin.swf&amp;width=400&amp;height=550&amp;">
    <param name="menu" value="false"><param name="wmode" value="transparent">
    <object width="400px" height="550px" id="customEngine_Container_o" type="application/x-shockwave-flash" data="customEngine.swf">
    <param name="movie" value="customEngine.swf">
    <param name="quality" value="high">
    <param name="FlashVars" value="movieUrl=customEngine-demo-video.flv&amp;skinUrl=customSkin.swf&amp;width=400&amp;height=550&amp;">
    <param name="menu" value="false"><param name="wmode" value="transparent">
    <a href="http://www.adobe.com/go/getflash">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player">
    </a>
    </object>
    </object>
    </div>
    May I ask, how is it relevant to AS skin calling JS?

  • Call ALV custom function externally

    Hi,
    I am wondering whether it is possible to call a custom function of an ALV from a method because I don't want to repeat coding.
    Best regards,
    ts

    Hi ts,
    Option 1:
    You can use class CL_SALV_WD_TABLE_FUNCTION to create object R_PARAM.
    Sample Code:
              data lo_r_param type ref to cl_salv_wd_table_function.
               data lo_event      type ref to cl_wd_custom_event.
                   "Create r_param object
                   create object lo_r_param.
                   "Create wdevent object & fill event parameters
                   create object lo_event
                   exporting
                        id = 'ADD' .
                   WD_THIS->ON_ADD_LINE(
                   exporting
                        wdevent = lo_event
                        r_param = lo_param ).             
    Note: here ON_ADD_LINE is the event handler method triggered for alv table function
    Option 2
    Also, you can make the parameter R_PARAM as optional in event handler method, so that you no need to pass r_param  while calling the event handler method explicitly.
    Hope this helps you.
    Regards,
    Rama

  • External call to DLL function

    Hi Experts,
    can anyone tell me the best way to call a dll function from within ABAP?
    Thanks,
    Jennifer

    Hi, I don't have any experience in calling DLLs, but you may want to give this a try.
    report zrich_0001.
    data: path type string.
    path = 'C:WINDOWS<the_file_Name>.dll'.
    call method cl_gui_frontend_services=>execute
       exporting
         application            = path
      exceptions
        cntl_error             = 1
        error_no_gui           = 2
        bad_parameter          = 3
        file_not_found         = 4
        path_not_found         = 5
        file_extension_unknown = 6
        error_execute_failed   = 7
        others                 = 8.
    Regards
    Rich Heilman

  • Problem while calling an RFC Function Module in Background

    Hello,
    I have created a RFC function module for reading data from an external DB system. The FM calls an external RFC program (coded in C++ using RFC SDK), which delivers the required data. This external program is maintainged as an TCP RFC Connection in SM59.
    Further I have created a report, that calls the RFC function module to get the data from the external RFC programm.
    My problem is, when I call the report in foreground, everything works OK, the RFC connection works and data can be read from the external program.
    However, when I schedule the report to run in background as a job, the report is stating in the protocoll that there was a problem calling the defined RFC connection (although the connection is working properly at that time).
    More funny is, this particular problem with running in background occurs only in the productive system, in test and development system the report works correctly also while running as a job in background.
    Can you suggest the solution to this problem? Could it be something with authorisations or server settings?
    I will be on holiday for the next 6 weeks, so take your time to answer .
    Regards,
    Dusan.
    Edited by: Julius Bussche on Jan 22, 2009 7:19 PM
    Please read the forum rules about u r g e n t ...

    This is an external RFC server program, not a remote enabled ABAP RFC function module as the others seem to be assuming, right?
    Is it possible that your DEV and QAS systems only have one application server, but the PROD has many and dedicated one(s) for processing low priority background jobs?
    It might be that the target server of your TCP connection is not this BTC instance, and your RFC server is returning the data "locally" - so, into nirvana...
    Just guessing, but might be worth checking.
    Cheers,
    Julius

  • User Defined External Function - How to work?

    I have defined some external functions in java by following the description in
    C:\OraBPELPM_3\integration\orabpel\samples\demos\XSLMapper\ExtensionFunctions
    I can use my functions in JDeveloper, but they do not work on the Oracle BPEL engine.
    Is it enough just to place the jar-file in <OC4J_HOME>\j2ee\home\applib and add the jar-file in class-path (as described)?
    What about the xml-file specifying the functions (called SampleExtentionFunctions.xml in the documentation)?
    Should this file be copied to <OC4J_HOME>\... ?
    Here is the error message I get by running my service:
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:processXSLT("TransformationInput.xsl", bpws:getVariableData("inputVariable", "request"))", the reason is java.lang.NoSuchMethodException: For extension function, could not find method org.apache.xpath.objects.XNodeSet.leadingZeros([ExpressionContext,] #NUMBER)..
    Please verify the xpath query.
    ______________ MY JAVA CODE EXAMPLE: _____________________________
    package extentionfunctions;
    This is a sample XSL Mapper User Defined Extension Functions implementation class.
    public class JavaExtensionFunctionsBpel
    * Inserts leading zeros to a text, if this starts with a digit.
    * Else the return value will be the same as the given text.
    * The return value will have the specified length.
    public static String leadingZeros(String text, int len)
    {  String retur = text;
    char c = (text == ""?'0':text.charAt(0));
    if ('0'<=c && c<='0'+9) { // Is first char a digit?
    retur = "";
    int n = len - (text == ""?0:text.length());
    for (int i=0; i<n; i++) { // Insert zeros:
    retur = '0' + retur;
    retur = retur + text;
    return retur;
    * Removes leading zeros from a text.
    public static String removeLeadingZeros(String text)
    {  String retur = text;
    int pos = 0;
    int len = (text == ""?0:text.length());
    for (int i=0; i<len; i++) {
    if (text.charAt(i)=='0') { // Is char a digit?
    pos++;
    return retur;
    public static void main(String[] args)
    { // Basic test of functions:
    int len = 5;
    String s = "1234";
    String r;
    System.out.println("leadingZeros("+s+","+len+")="+(r=leadingZeros(s,len)));
    System.out.println("removeLeadingZeros("+r+")="+removeLeadingZeros(s));
    Regards
    Flemming Als

    Flemming, it looks like somthing is wrong in the xsl that it still goes to org.apache.xpath.objects.XNodeSet package instead of yours ..
    I created a sample that illustrates the usage of this functions (even with 2 params, different types).
    Java class (com.otn.samples.xslt.CustomXSLTFunctions)
    package com.otn.samples.xslt;
    public class CustomXSLTFunctions
    <function name="extension:multiplyStringAndInt" as="number">
    <param name="base" as="String"/>
    <param name="multiplier" as="number"/>
    </function>
    public int multiplyStringAndInt (String pString, int pMultiplier)
    int base = Integer.parseInt(pString);
    return base * pMultiplier;
    XML descriptor:
    Note the types (in the java class and the xml descriptor)
    for java:base -> string and for xslt:base -> string
    for java:multiplier -> int and for xslt:multiplier -> number
    <?xml version="1.0" encoding="UTF-8"?>
    <extension-functions>
    <functions extension:multiplyStringAndInt="http://www.oracle.com/XSL/Transform/java/com.otn.samples.xslt.CustomXSLTFunctions">
    <function name="extension:multiplyStringAndInt" as="number">
    <param name="base" as="string"/>
    <param name="multiplier" as="number"/>
    </function>
    </functions>
    </extension-functions>
    Definition of variables in the process:
    (as you can see, the base is a string - I do the conversion in my method, and the return value
    is converted to a string by the engine)
    <!-- Input -->
    <element name="CustomXSLTFunctionProcessRequest">
    <complexType>
    <sequence>
    <element name="base" type="string"/>
    <element name="multiplier" type="int"/>
    </sequence>
    </complexType>
    </element>
    <!-- Output -->
    <element name="CustomXSLTFunctionProcessResponse">
    <complexType>
    <sequence>
    <element name="result" type="string"/>
    </sequence>
    </complexType>
    </element>
    Using the new function in the XSL transformation:
    - watch out for the namespace declaration (xmlns:sample="...")
    - and the usage (sample:multiplyStringAndInt)
    <xsl:stylesheet version="1.0"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:extension="http://www.oracle.com/XSL/Transform/java/com.otn.samples.xslt.CustomXSLTFunctions"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:ns0="http://www.w3.org/2001/XMLSchema"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:client="http://xmlns.oracle.com/CustomXSLTFunction"
    exclude-result-prefixes="xsl plnk ns0 client ldap xp20 bpws extension ora orcl">
    <xsl:template match="/">
    <client:CustomXSLTFunctionProcessResponse>
    <client:result>
    <xsl:value-of select="extension:multiplyStringAndInt(/client:CustomXSLTFunctionProcessRequest/client:base,/client:CustomXSLTFunctionProcessRequest/client:multiplier)"/>
    </client:result>
    </client:CustomXSLTFunctionProcessResponse>
    </xsl:template>
    </xsl:stylesheet>
    Then I created a jar file with the class (and for testing the xml descriptor in it)...
    and put it into j2ee/home/applib directory
    hth clemens

  • Calling an external program!

    Salut all, Im using unfortunately Oracle Forms 6i, and I need to call an external program that I have to develop in Java, compiled into .jar. I just wanna use something like java -jar myJar.jar <my params...> but I don´t know how to call external programs from Oracle Forms, in special from 6i.
    I have searched this thread passed (Re: Calling JAVA from PL/SQL but didn´t help me so much.
    Thanks all for patience!

    In version 9 and 10 we have a general way of calling out to java thru the Java Importer functionality.
    If you cannot upgrade to these later versions and you don't need to get data back from the jar file execution you can always use the Host command to call it directly the way you have outlined.

  • Debuggin a Call to Remote Function Module

    Hi
    I have a scenario where i have a Remote Function Module in r3 which is being called synchronously by an external java application. The FM has a lot of input and output parameters and many tables.  The output returned by the FM is not as expected.
    Can anyone tell me how debug a Remote Function Module when a call has been made from an external application.
    I am not able to get the test data sent by the external application . So when the external application gives a call to this Remote FM and if it is possibele to debug it would be great.
    regards
    Nilesh Taunk.

    Hi Nilesh,
    1) Login to SAP with the same ID with which you will calling the RFC function module from the outside system.
    2) Goto transaction - se37/se38
    3) Goto Utilities => Settings.
    4) Select the ABAP Editor Tab.
    5) Click on the Debugging tab.
    6) Tick the Actv. button and give the user name with which you will be debugging the code. In this case the logged in user id.
    7) Press Enter.
    8) Now put an external break point inside the Function Module.
    9) Load your external application (from where you want to debug the FM) once again.
    The execution will stop in the FM.
    Hope it helps..
    Lokesh
    PS: This was a simple question, but I guess the reason no one has answered your question is due to the fact that you havent rewarded points to members helping you. Also remember to close your post once it has been answered.

  • Before calling an external program, check if the program is allready open

    I need to call an external program to print some labels, so i will use function WS_EXECUTE or the new one DSVAS_DOC_WS_EXECUTE_50 to call my program, but the problem that i have is:
    when I call this function, the program open a small window, and if i have to call it again, it will open another window, and so on... obviously this is not a good solution.
    Is there any one how knows how can i close the program, of perhaps it is enough if there is some way to know if the program is already open.
    Many thanks in advance,
    Miriam

    Hi
    you can use the ABAP Coverage Analyzer.
    OR
    This is a function module we use to limit the execution of a program to one instance at a time.
    DATA: PRG LIKE INDX-SRTFD. PRG = SY-CPROG.
    CALL FUNCTION 'ENQUEUE_ESINDX'
    EXPORTING RELID = 'ZZ'
    SRTFD = PRG
    SRTF2 = 0
    EXCEPTIONS FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2.
    IF SY-SUBRC NE 0.
    FORMAT COLOR COL_NEGATIVE INVERSE ON.
    WRITE: / 'ERROR: Program Is Already Running'.
    WRITE: / 'Program', PRG, 'has been stopped. Rerun in 1 minute.'.
    STOP.
    ELSE.
    WRITE: / 'OK ',PRG.
    ENDIF.
    Regards,
    Raj

  • Calling a java function from xquery

    Hello,
    I'm pretty new to ODSI and xquery, so forgive me if what I'm asking is too trivial, but I need to find a way to call a java function from inside xquery. I know xquery can do this through external functions, but can't find any example on how the query prolog declaration should be, nor how the function should look like. Could someone enlighten me?
    Thanks,
    Pedro Ivo

    You can do this 2 ways that I know of (Mike probably has more ideas too)
    1. Register an inversion function:
    [How to use an inversion function|http://download.oracle.com/docs/cd/E13167_01/aldsp/docs32/dsp32wiki/Using%20Inverse%20Functions%20to%20Improve%20Query%20Performance.html]
    2. Create a physical data service based on a java function. I have used this approach for both custom JDBC database operations and straight Java processing, with pretty good results.
    Good luck,
    Jeff
    Edited by: jhoffmanme on Apr 14, 2010 9:57 AM

  • External Function memory leak

    The ExternalFunction.java sample code distributed with v.2.5.16 has a memory leak.
    You can see this by changing the loop to iterate a million times; eventually it runs out of memory and crashes.
    (I used jdk 1.7 u2 on Windows 7.)
    I tried adding explicit calls to delete() for every created Java object in the example, none of which helped.
    As far as I can tell, it is simply not possible to use external functions from Java without leaking memory.
    Any thoughts on this?

    thanks Silviu
    i create two bugs
    https://bugbase.adobe.com/index.cfm?event=bug&id=3341143
    https://bugbase.adobe.com/index.cfm?event=bug&id=3341146

Maybe you are looking for

  • Report Generation Toolkit missing VI

    LabVIEW version 8.6.1 Report Generation Toolkit 1.13 I have just started work on an ongoing project that others have been contributing to for some time.  (Hence the project being in older versions of LabVIEW)  On my PC, I am apparently missing the VI

  • ITunes not downloading

    Hey all, I hit the Download iTunes button on the website, it loads the iTunes Setup file and then I click Run. From there, the green bar fills up, and I get a window saying the following: Gathering required information... Status:     Performing insta

  • Changing Time Zone (stsadm tzmove) = Error: Adding a value to a 'datetime' column caused an overflow

    After updating timezone.xml и RGNLSTNG.xml files for my SharePoint 2010 (SP2 - 14.0.7015.1000) I have to run this command to Update time zone on calendar events: stsadm -o tzmove -name "russ2014" -update all But this cause an error: Adding a value to

  • Macbook Late 2011 freezing, problem with CPU power management.

    Hi everyone. I have Macbook Pro 15 Late 2011. And i have a problem with it. When laptop is cold, sometimes, it can freeze. Other then this there's no problems with it, no problems at all. I solved this problem by deleting AppleIntelCPUPowerManagement

  • Based on qulity the payment is need to be done to vendor ?

    Dear friends, i have a scenario to map, base on Quality parameter(eg, purity, GSM,etc) , after UD, The vendor payments need to be done . please tell me the apporach.