Delete with variable name

I need to run a SQL command in one of the step in my procedure where I need to run command like >>>> Delete from TableA where Column1 LIKE 'MY_VAR' but while running its not substituting the value of MY_VAR.....Any clue how can I run command like this where I have refresh the variable before executing the procedure in the package so variable is declared before procedure execution.I dont wanna refresh the variable with Quotes around because I am using this variable in different places. Any clue how can I put quotes around MY_VAR in Like stament.
I have also tried this>> Delete from TableA where Column1 LIKE '''MY_VAR''' but still variable value is not substituting.

The substituted variable will never appear in the log, how are you figuring out it does not get substituted?
In the syntax, you should use something like the following:
Delete from TableA where Column1 LIKE '#MY_VAR'If you use the expression editor to do select the variable name, it should ensure that it is put in correctly. To see if it is actually recognised, in the log, you should see
Delete from TableA where Column1 LIKE '#MyProject.MY_VAR'Craig

Similar Messages

  • How to declare internal table in BADI with variable name beginning with 0..

    Gurus,
    How to declare an internal table within a BADI. I have to implement a BADI UC_TASK_CUSTOM for BCS to BW load and there i have to  declare an internal table like:
    TYPES:          BEGIN OF t_cube_data,
                    0cs_version       TYPE /bi0/oics_version,
                    0sem_cgcomp       TYPE /bi0/oisem_cgcomp,
                    bcs_vers          TYPE /bic/oibcs_vers,
                    bcs_lcus          TYPE /bic/oibcs_lcus,
                    bcs_ldch          TYPE /bic/oibcs_ldch,
                    bcs_invcom       TYPE /bi0/oibcs_invcom,
                    bcs_litem         TYPE /bic/oibcs_litem,
                    bcs_llob          TYPE /bic/oibcs_llob,
                    bcs_lmay          TYPE /bic/oibcs_lmay,
                    0move_type        TYPE /bi0/oimove_type,
                    pcompany         TYPE /bi0/oipcompany,
                    bcs_lprg          TYPE /bic/oibcs_lprg,
                    figlxref3         TYPE /bic/oifiglxref3,
                    fiscyear         TYPE /bi0/oifiscyear,
                    fiscper3         TYPE /bi0/oifiscper3,
                    fiscvarnt        TYPE /bi0/oifiscvarnt,
                    curkey_gc        TYPE /bi0/oicurkey_gc,
                    unit             TYPE /bi0/oiunit,
                    cs_trn_gc        TYPE /bi0/oics_trn_gc,
                    cs_trn_qty       TYPE /bi0/oics_trn_qty,
              END OF t_cube_data
    But with this declaration it gives a error saying that u cannot have a variable beginning with 0...like 0cs_version....
    but i have to do it for my functionality to wrk...
    Please help me do it....
    how can i declare a internal table that allows me to have variable names that start with 0....
    Please help....Its URGENT....
    Thanks
    Sam

    Murali,
    I need to have 0 before the variable name in the declaration of the internal table....how can i attain that....
    Please suggest...
    Thanks
    Sam

  • Problem with variable name in ZXRSRTOP include (virtual KF)

    Hi all,
    I am coding a routine to use a virtual key figure in the BEx.
    I have just a little problem with the name of a variable:
    as explained in the documentation, I created the variable with the prefix G_POS_, the name of the infocube and the name of the infoobject all together:
    DATA: G_POS_BC_ST_003_C_DIV__C_COMPAR   type i.
    The problem is that this variable name is longer than 30 characters, so the system doesn't accept it.
    Is there a workaround, other than changing the name of the infoobject (which is a navigational attribute)?
    Any help would be appreciated.
    Loï

    Hello Marc,
    I understand that I have to use a concatenate function and a dynamic call of the variable with (variable) instruction, but i do not understand how to implement it.
    the infocube name is BC_ST_003
    the characterisdtic name is C_DIV__COMPAR
    So, in the include ZXRSRTOP the statement
    DATA : G_POS_BC_ST_003_C_DIV__COMPAR
    does not work due a length problem (see first post)
    But in the same include the statement
    +DATA: l_global_name type c.
    concatenate 'GPOS' 'BC_ST_003' 'C_DIV__C_COMPAR' into l_global_name separated by '_'.+
    drives to the following error : statement is not accessible.
    Could u please provide me with an example of the code in the include ZXRSRTOP, and in the include ZXRSRZZZ for the use of this variable.
    Thanks in advance.
    Loï

  • Querying, then generating ArrayLists with variable names

    Hi, all:
    I have two problems: first, I want to run through an array list called nodeList containing Nodes, each of which possesses a 5-digit value called culture. I want each Node to try to find out whether or not there are any other Nodes that have the same culture value that it does, i.e. if Node i has culture value 74936 and there are 4 other Nodes with the same culture value, I need to find 5 total Nodes with culture value 74936.
      public void statistics(){
           for (int i = 0; i < nodeList.size (); i++) {
                Node node = (Node) nodeList.get (i);
                int cultSame = node.getCulture();
                boolean same = cultSame == next.cultSame;
                if (same == true){
                     arrayListCreator();
                     //generated Arraylist add.node;
      }I'm going astray at next.cultSame. I'm not sure how to structure the query to the ArrayList nodeList to find all the other Nodes with the same culture value.
    Second: I want to create a little method to generate ArrayLists with names based on the integers that will be stored in them. Here's the method so far:
      public void arrayListCreator () {
           String name = String.valueOf(cultSame);
           name = new Arraylist();
      }cultSame is a 5-digit integer. The ArrayLists will be used to store all the nodes with the same cultSame value, like 74936, or whatever. If the ArrayList is storing nodes with the cultSame value of 74936, I want the name of the ArrayList to be the string 74936. I want to call on this method (like you can see in the first method) to generate the ArrayList with its given name and then use it to store the nodes in it. Once I've done that, I can figure out the statistics stuff on my own, I think. I'm just not sure how to create the ArrayLists with a name that's a variable, i.e. "name" should be the string variable containing a 5-digit number.

    Nquirer101 wrote:
    I probably should have separated this out into two threads. First, I'd like to know what I'm doing wrong when I'm building that boolean query to find out in the nodeList if any of the other nodes have the same culture value as the node doing the querying.Then by all means do so, from the looks of it, the scope of the thngs that need to be discussed/addressed is too broad for one thread. First there's the issue of your erroneous understanding of variable, then there's the concept of the Map data structure, then the implementation of it in Java, along with the idea of interface

  • Servicegen - Issue with Variable Names - WLS 8.1

    Hi Experts
    I am trying to expose an EJB as a Webservice.. I assembled the ear using SERVICEGEN exposed by Weblogic 8.1
    To my dismay the generated WSDL (even the web-services.xml) are not having the variable names which I gave in my webservice method. Instead I get String, String0, String1 and so on...
    Kindly help me get over this problem.
    Thanks and Regards,
    Gopal.

    your application miight not be using this libraries but there are many shared libraries which are configured could be using. please check whether config.xml file of your domain contains the entries for this library.Problem running simple portal tutorial question

  • BaOpenfile with variable name

    Hi I was wondering if it's possible to use baOpenFile() to
    open a file using a variable name. Like selectImg = coco.jpg
    getURL('lingo: baOpenFile(_movie.path & selectImg ,
    "Normal")');
    this is the command in the flash file. If I use a specific
    name like GA-VE4-IMG1.jpg instead of the variable name it's work.
    the file browser of xp open and display the file. What's
    weird is when I use the variable without the " " instead of a file
    name it open windows explorer ..... wooh! any clue on how to solve
    my problem.

    it does'nt work, nothing happend. Don't forget that I'm in
    flash so if my variable is
    selectImg = _movie.path & "GA-VE4-IMG1.jpg" the result is
    0. And I cannot use the specific name cause it come to the point
    before. If I use direclty
    getURL('lingo: baOpenFile(_movie.path &
    "GA-VE4-IMG1.jpg", "Normal")'); it's working but it has to be
    dynamic cause if I have 50 images, i don't want to use 50 line of
    script. Right now
    _global.selectImg = etage + "-" + systeme + "-IMG1.jpg";
    it use the floor (etage) variable and system (systeme)
    variable to define the name of the file to open. ex:
    GA-VE1-IMG1.jpg = (garage)-(VE1 system)-Image1.jpg. When I go to an
    other system i use the same code and the file change dynamicly to
    GA-A2-IMG2.jpg etc.. like that If i have 10-25 systems, i dont have
    to touche the code again. All i want to do is to lauch the jpg. I
    was using the getURL within flash but bacause it's in director
    getURL does'nt work anymore. BuddyAPI is a good xtra but if I can't
    use variable it's not that good.

  • Reading flat files with variable names in SSIS

    I have a ssis package that reads a flat file from a network drive (using a flat file connection manager) and loads the data into sql server tables. I have this working on a fixed file name, however in reality the file name will not be the
    same from run to run.      Essentially, I need to check a folder each day and if there is a file there with a certain prefix (for example, 'datafile'), I need to process this file(s). In other words, if there is a file in the folder
    called datafilexyz, my process needs to read it in and process it.    If there are files named datafileabc, datafiledef, and testfile123, I need to read in and process the datafileabc and datafiledef flat files.    
    I'm not sure how to make this work.     I haven't had any SSIS training, just what I can find on the internet and looking at existing SSIS packages (I haven't found any that do what I'm trying to do here) so I'm kind of lost.   
    Any help is appreciated.  

    this is working well.    How can I, after loading each flat file, move the flat file to an archive folder?    I'm trying to use a file system task, but doing something wrong.    I created and reference
    an archive folder connection manager in the destination connection, and reference the original folder connection manager for the source connection, but get 'sourcepath is not valid on operation movefile'.    I think a file system task is what
    is needed (within the foreach loop after the data load for each flat file), but I'm not doing something correctly.
    Sounds fine except for one thing. Did you assign the filename variable to connection string property of the source file connection manager used by file system task?
    Also it should be existing file option you should choose for
    source connection and existing folder for destination.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Help! please with variable name problems

    I have a program that administers a quiz but the no. of questions in the quiz is variable, qarray holds the questions. I am using card layout and i need to set up a new card for each questions. The number of answer choices to multiple choice questions are also variable and i'm going to have the same sort of problem when i'm creating checkboxes. Is there any way around this. I'm getting an error message variable required but value found.
    noOfQuestions = qarray.length;
    for(int i=1; i<noOfQuestions; i++)
    Card = "Card"+i;
    String cardname;
    JPanel (Card) = new JPanel();
    Card.add(new JLabel("Question "+i));
    if(qarray.oftypemc())
    Card.add(new JLabel(""+qarray[i].getQuestion()));

    Look, some guy invented ARRAYs.
    So, do
    noOfQuestions = qarray.length;
    JPanel[] cards = new JPanel[noOfQuestions];
    for(int k=0; k<noOfQuestions; k++) // note: index must start at 0
        cards[k] = new JPanel();
        cards[k].add(new JLabel("Question " + k));
    }or better yet
    CardLayout cardLayout = new CardLayout(); // cardLayout should be global
    JPanel allCards = new JPanel();           // allCards should be global
    allCards.setLayout(cardLayout);
    JPanel card;
    String cardName;
    noOfQuestions = qarray.length;
    for(int k=0; k<noOfQuestions; k++) // note: index must start at 0
        cardName = "Question " + k;
        card = new JPanel();
        card.add(new JLabel(cardName));
        allCards.add(card, cardName);
    }Now, I leave it to you to figure out why cardLayout and allCards should be global fields.

  • I have a iPad 2. My husband set it up with his name and account. I want to delete him from my iPad. I can't download anything with out it asking for his password. I have my own account now. But it still reverts back to him when I want to update my stuff.

    I have an iPad 2 which my husband set up. He set it all up in his name and passwords. I have since gotten my own user I'd and password, however, it i need to update,or anything else, it still comes up with his name. I don't have a clue how to get rid of all his stuff. Please help me to delete him completely. ????thanks you

    Restore the device and set it up as new.
    Either plug it into itunes and select restore under the summary tab, or (post ios5) go into settings, general, reset, erase all content and data. When either asks to save a backup, you dont have to....hit No etc..
    This will bring the ipad to the start screen like you just bought it and erase everything.

  • A phantom folder with the name of a folder that held photos has appeared in my finders places list.  I can't choose it to delete it.  it won't move.  It can't be found in a search.  How can I choose it and delete it?

    a phantom folder with the name of a folder that held photos has appeared in my finders>places list.  I can't choose it to delete it.  it won't move.  It can't be found in a search.  How can I choose it and delete it?

    Can you drag it off holding down the CMD key?
    Do a search for it with EasyFind  (try different settings in "Operator")
    http://www.devontechnologies.com/products/freeware/

  • How to create a PDF with a variable name

    I am a new user and i need a suggestion.
    I need to create a PDF file with a name that is a variable.
    I extract some data from SAP and i want use the "Offer number" to call my file.
    Wher i have to past my "variable" to the OutputFileName?
    Thanks
    Jeix

    This isn't an Output Designer question but an Output Server question. Anyway, see the subject titled "Dynamic pdf filename creation from form data content", currently about 13 subjects before yours.
    http://www.adobeforums.com/webx/.59b585c2/0

  • How to delete one existing file before uploading a file with same name?

    Hello everybody.
    I am uploading a file to Tomcat server. But, the problem is:
    i want to delete an existing file in the server, if i upload a fresh file with same name. In other words, "First check for the file with the same name in the server. If it exists, then delete existing file in the server and upload fresh one". If such file doesnot exist, then upload the file to server.
    I have given deleteonExit()
    but, for the first time when user is uploading, i want to check for the file with same name in the server.
    i am pasting the code here. please help:
    <!-- uploading the file -->
    <%
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength)
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    String contextRootPath = this.getServletContext().getRealPath("/");
    contextRootPath=contextRootPath.concat("uploaded");
    String file = new String(dataBytes);
    String saveFile = file.substring(file.indexOf("filename=\"") + 10);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
    // Create a directory; all ancestor directories must exist
    File outputFile = new File(contextRootPath, saveFile);
    var=outputFile.getPath();
    outputFile.createNewFile();
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex + 1,contentType.length());
    int pos;
    pos = file.indexOf("filename=\"");
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    FileOutputStream fileOut = new FileOutputStream(outputFile);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush();
    fileOut.close();
    outputFile.deleteOnExit();
    %>Please help. Thanks for taking time.
    Regards,
    Ashvini

    Thank you MartinHilpert,
    I have one more doubt,
    I am uploading the file to one folder called "uploaded". Before uploading a fresh file, i want to delete all existing files in that folder. IS that possible ?? If yes, can you please tell me how to do that ??
    Regards, Thanks for your time.
    Ashlvini

  • Import and Export variables with same name

    The nco3 throws and exception when a function has Import and Export variables with the same name.
    An example is BAPI_BATCH_CREATE.
    At the moment my solution is create a ZBAPI_BATCH_CREATE that wraps the original BAPI but  has diferent names for import and export variables (IBATCH and OBATCH for BATCH variable).
    Anyone has another more clean solution?
    VB.NET CODE:
    pFunct = foRFCDest.Repository.CreateFunction(fsFunctionName)
    This is the error message:
    SAP.Middleware.Connector.RfcInvalidStateException was unhandled
      Message=Lookup of function BAPI_BATCH_CREATE metadata failed for destination SAPTST
      Source=sapnco
      StackTrace:
           en SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataClassic(String name)
           en SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadata(String name)
           en SAP.Middleware.Connector.RfcRepository.GetFunctionMetadata(String name)
           en SAP.Middleware.Connector.RfcRepository.CreateFunction(String name)
           en SapNetConnectorWrapper.FunctionBase..ctor(RfcDestination foDest, String fsFunctionName) en C:00_Compac201101_LibreriasSapNetConnectorWrapperFunctionBase.vb:línea 11
           en SapNetConnectorWrapper.BAPIS.Bapi_Batch_Create..ctor(RfcDestination foDest) en C:00_Compac201101_LibreriasSapNetConnectorWrapperBAPISBapi_Batch_Create.vb:línea 16
           en clsEtiquetadoTNPCommon.BLLEtiquetadoTNP.CrearLote(DynamicSqlEntity& foRegCabecera, DynamicSqlEntity& foRegNotificacion) en C:00_Compac201100_EtiquetadoTNP_PTEtiquetadoTNP_PTclsEtiquetadoTNPCommonBLLEtiquetadoTNP.vb:línea 515
           en clsEtiquetadoTNPCommon.BLLEtiquetadoTNP.CrearLotesPendientes() en C:00_Compac201100_EtiquetadoTNP_PTEtiquetadoTNP_PTclsEtiquetadoTNPCommonBLLEtiquetadoTNP.vb:línea 602
           en WAEtiquetadoTNP.Form1.Timer1_Tick(Object sender, EventArgs e) en C:00_Compac201100_EtiquetadoTNP_PTEtiquetadoTNP_PTWAEtiquetadoTNPForm1.vb:línea 25
           en System.Windows.Forms.Timer.OnTick(EventArgs e)
           en System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
           en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
           en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           en System.Windows.Forms.Application.Run(ApplicationContext context)
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
           en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
           en WAEtiquetadoTNP.My.MyApplication.Main(String[] Args) en 17d14f5c-a337-4978-8281-53493378c1071.vb:línea 81
           en System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           en System.Threading.ThreadHelper.ThreadStart()
      InnerException: SAP.Middleware.Connector.RfcInvalidParameterException
           Message=Cannot add BATCH to FUNCTION BAPI_BATCH_CREATE: an element with that name already exists
    Source=sapnco
           StackTrace:
                en SAP.Middleware.Connector.RfcContainerMetadata`1.AddElement(T element)
                en SAP.Middleware.Connector.RfcFunctionMetadata.AddParameter(RfcParameterMetadata parameterMetadata)
                en SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataClassic(String name)
           InnerException:

    Hi Raul
    Even I am getting the same error for below BAPI
    Lookup of function BAPI_FAMILY_CREATE metadata failed for destination
    Inner Exception: Message     "Cannot add EMPLOYEENUMBER to FUNCTION BAPI_FAMILY_CREATE: an element with that name already exists"     string
    I am using the new NCO 3.0.2.0 x64 version.
    Is there any other solution other than creation of Z BAPI.

  • How to create an instance of myClass with a name that is in a variable?

    Hey Guys,
    How can I create an instance of myClass with a name that is in a variable?
    Normally a new instance is defined something like:
    myClass myName = new myClass ();
    I want to make a method which creates instances of a certain class (ie myClass) with names that are given to the method within its arguments.
    So something like:
    public void myMethod(String className) {
    myClass value of className = new myClass();
    So if className = "FirstName" then an instance of myClass should be created with the name "Firstname", like:
    myClass Firstname = new Firstname;
    Thanks.
    Jasper

    Thanx for your reply's
    If I understand the tutorial correctly I should do
    something like this to start the map:
    Map<String, myClass> myMAP = new HashMap<String,
    MyClass>();
    and something like this to add a new instance of the
    class every time:
    myMAP.put(myString, new myClass());
    So this would result a link between the Strings and
    the instance of the Class?
    Thanks
    Message was edited by:
    JasperLevinkyep. the String is the key, and the MyClass instance is the value. to get the value out of the map, use map.get(key)

  • Creating folder names with variables in applescript?

    im trying to make folders and name them with structured names but im getting an error and im not sure what im doing wrong.
    the error i get is:
    Finder got an error: Can’t make "/Users/USERNAME/Desktop/Fake Server/Project Name" into type item.
    ----------------------these variables are just used for my example, the actual script asks for input and makes that into the variables -------------------
    set the_folder to "Macintosh HD:Users:USERNAME:Desktop:Fake Server"
    set theChosenOne to "Selected"
    set Code to "ABCD"
    set Number1 to "12345"
    set projLocation to (POSIX path of the_folder & "/" & theChosenOne)
    set folderTags to Code & " " & Number1
    tell application "Finder"
    make new folder at projLocation with properties {name:folderTags & " artfile"}
    end tell

    The following should work:
    set the_folder to "/Users/USERNAME/Desktop/Fake Server"
    set theChosenOne to "Selected"
    set Code to "ABCD"
    set Number1 to "12345"
    set projLocation to POSIX file (the_folder & "/" & theChosenOne)
    set folderTags to Code & " " & Number1
    tell application "Finder"
        make new folder at projLocation with properties {name:folderTags & " artfile"}
    end tell
    Message was edited by: Pierre L.

Maybe you are looking for