Method parameter & variable in program - "is not type compatible"

Hi All,
Sorry for my dummy question but by checking a few threads I couldn't find answer.
I have a method with a paramter and calling it I get error message:
"variable" is not type-compatible with formal parameter "parameter"
'variable' --> data element: 'zchar2' (CHAR 2)
'parameter' --> data element: 'zchar10' (CHAR 10)
It's clear that 'zchar2' and 'zchar10' are different.
What is not clear to me why cannot I import a 2 character string into a parameter of 10 characters.
There's no error if I change the parameter's type from 'zchar10' to 'c' in the method. However I don't want this since the parameter must have 10 characters or less (and no more).
How can I define the parameter in the method properly (I don't want to manipulate 'variable')? What is the solution?
Thanks,
Csaba
Additionally:
Tried char10, string10 - it didn't help...
Edited by: Csaba Szommer on Mar 19, 2011 7:17 PM

Naveen,
Thanks for your answer.
I want to import char2 from program (from where the method is called) into the method via a char10 parameter (export / import depends on from which point we see it).
CALL METHOD dummy=>dummy
  EXPORTING parameter (remark: char10) = variable (remark: char2).
Thanks,
Csaba
Edited by: Csaba Szommer on Mar 19, 2011 7:25 PM

Similar Messages

  • STMS: Return Code 8: The program is not Unicode-compatible

    Dear SAP Friends,
    I am currently importing some TRs on our DEV system. However, I am getting some error messages. The log says "The program (name of program) is not Unicode-compatible, according to its attributes."
    Is there a fix for this?
    Your prompt response is highly appreciated. Thank you very much in advance.
    Best Regards,
    Albert

    Dear,
    Use the transaction 'UCCHECK' to set the unicode flag.
    Please check the below link as mentioned.
    http://www.sap-img.com/abap/how-to-delete-an-editor-lock.htm
    Re: The program "Z...." is not Unicode-compatible, according to its program att
    Regards,
    R.Brahmankar

  • Parameter Variable Handling in own Function Types

    Hi experts,
    I've implemented a customer function type using a separate ABAP class. The function type has got several parameters that should be filled in a command that is defined on a WebTemplate button group. Planning functions that use this type are working fine by setting the parameter in the WebTemplate statical (using a string). But if the parameter is bind to a BEx variable or are DataProvider selection nothing will be given to the function type. Investigation in the SAP ABAP code gave me the information, that in case of variables the SAP code will return only empty values, although the code itself has got the technical id of the corresponding variable.
    So my question is, how to give own function types implementation the current navigation state of WebTemplates, e.g. using the DataProvider selection or the state of BEx variables?
    Anyone here with interesting and helpful hints?

    Timo,
    When you stated that parameter readings in your function returns nothing when using variables i assumed that binding is not happening because in the case of binding with variables not only the definition of the binding is important but also the settings of the variables in the metadata (input ready, mandatory etc.),also i assumed that your button is not showing the variable screen and in this case with mandatory variables when no value is bound to the variable then the popup screen appears any way and the function is stopped .
    Hope this helps.
    Regards,
    Eitan.

  • Current date parameter in concurrent program is not not taking current date

    Hi All,
    I have scheduled one concurrent request running very day @21:30 ,one of the parameter passed is current date ,which defined as default value at the time of defining concurrent program.Surprisingly its taking next day date as parameter.Can someone help me resolving this issue.
    From where this current date is taken.
    When I am logged in unix as oracle user and executing following query I am getting follwoing results
    SQL> alter session set nls_date_format='MM/DD/YYYY HH24:MI:SS';
    Session altered.
    SQL> select current_date from dual;
    CURRENT_DATE
    05/25/2010 07:40:11
    SQL> select sysdate from dual;
    SYSDATE
    05/25/2010 07:40:20
    date
    Tue May 25 07:40:35 SAUST 2010
    When I logged in unix as applmgr user:
    SQL> select current_date from dual;
    CURRENT_DATE
    05/25/2010 04:41:17
    SQL> select sysdate from dual;
    SYSDATE
    05/25/2010 07:41:19
    date
    Tue May 25 07:41:04 SAUST 2010
    Unix level date is correct and sysdate is also correct in both cases.
    But current_date when logged in s applmgr user is wrong,is this reason for the issue.
    If so how can I change it
    Version : 11.5.10.2
    Database : 10.2.0.4
    OS : AIX 5.3
    Thanks in advance

    Hi;
    Please check below and see its helpful:
    Scheduled Request Set Using 'Current Date' In Parameters Will Set Parameters One Day Out [ID 242654.1]
    The parameter Argument 2 (GL DATE) does not select the Current Date when schedule [ID 250431.1]
    Regard
    Helios

  • Type compatible problem

    Hi,
    When i try to bound drop down box by index with context element it shows as not type compatible . I am trying to bound text property of dropdown by index with my context element VTEXT ( distribution channel name ) . I tried with changing the type to string but it shows the same error . Please help.
    Ratheesh

    Hi Ratheesh,
    I tried replicating the problem that you had mentioned but am not able to do so. I have an context attribute of type VTEXT and I manage to bind it to the Texts property of an DropDownByIndex without any issues. Have you typed the context attribute as VTEXT itself? Just try to re-check your component coz there isn't issue with what you have pointed out.
    Regards,
    Uday

  • C# compiling error: 'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

    Hello experts,
    I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
            string tempFileName = fileName;
            int count = 1;
            while (allFiles.Contains(tempFileName ))
                tempFileName = String.Format("{0} ({1})", fileName, count++); 
            output = Path.Combine(folderPath, tempFileName );
            string fullPath=output + ".xml";
    However, it gives the following compilation errors
    for the Select and Contain methods respectively.:
    'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
    (are you missing a using directive or an assembly reference?)
    'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
    found (are you missing a using directive or an assembly reference?)
    I googled on these errors, and people suggested to add using System.Linq;
    I did, but the errors persist. 
    Any help and information is greatly appreciated.
    P. S. Here are the using clauses I have:
    using System;
    using System.Data;
    using System.Windows.Forms;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Linq;

    Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace consAppFileManipulation
    class Program
    static void Main(string[] args)
    string fullPath = @"c:\temp\trace.log";
    string folderPath = @"c:\temp\";
    string fileName = "trace.log";
    string output = "";
    string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
    string extension = Path.GetExtension(fullPath);
    string path = Path.GetDirectoryName(fullPath);
    string newFullPath = fullPath;
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
    string tempFileName = fileName;
    int count = 1;
    //THIS IS AN INFINITE LOOP
    while (allFiles.Contains(fileNameOnly))
    tempFileName = String.Format("{0} ({1})", fileName, count++);
    //THIS CODE IS NEVER REACHED
    output = Path.Combine(folderPath, tempFileName);
    fullPath = output + ".xml";
    //string fullPath = output + ".xml";
    UML, then code

  • Member variable verses method parameter to pass information

    Hi all,
    Is the a performance penalty in using method parameter, such as a String, to pass information into multiple methods( method1(String X), method2(String X), etc ) in a class verses using a class member variable to pass the information to the methods?
    Thanks.

    Never, ever, ever make a decision as to what should be parameter and what should be field based on this kind issue. If the value is reasoably part of the state of the object it should stored (or referenced by) a field. Otherwise it should not and so your left with it being a parameter or an atribute of some other object.
    There is little if any performance cost in passing a parameter (on the order of 10's to 100's of nanoseconds on modern computers and JVM's. Optimizing in this area will only noticeably impact performance of such calls if it needs to get performed 100's of thousands or millions of times per second. That generally excludes everything any of us is likely to write.
    Chuck

  • Why business component does not support generics method parameter

    Hi Folks,
    I have created a business component and in this business component I have added a public method which takes a parameter - List of map (Like List<Map<String, String>> inputListOfMap). Now when I try to run the artifacts for this business component it gives an error
    ERROR
    com.splwg.shared.common.LoggedException: No method declaration for createListElements found matching argument types [List, Element, String, String] with pattern public\s+(final\s+)?(<[^>]*>\s+)?([\w\.]+)\s*(<[\w<>,\s\.]+>)?\s+createListElements\s*\(\s*((\w*\.)+)?(List)(\<[^\>]*\>)?\s+\w+,\s*((\w*\.)+)?(Element)(\<[^\>]*\>)?\s+\w+,\s*((\w*\.)+)?(String)(\<[^\>]*\>)?\s+\w+,\s*((\w*\.)+)?(String)(\<[^\>]*\>)?\s+\w+\s*\)\s*(throws [^\{]+\s*)?[;\{]
    After checking the spl-tool2.2.0 jar class JavaSourceFile.java i am guessing that such method parameters are not supported. It compiles well if its a simple Map or List. Also works fine if I make the method as private. But in this case I cannot use this method from any other class... which I don't want.
    it would be great help if anyone can suggest what needs to be done to overcome this issue
    Following is the method of Business Component
    public void createListElements(List<Map<String, String>> inputListOfMap, Element sourceElement, String groupName, String listElementName) {
              logger.info("createListElements ");
              Element groupElement = null;
              Element listElement = null;
              if(!isBlankOrNull(groupName)){
                   groupElement = sourceElement.addElement(groupName);
              if(notNull(inputListOfMap) && inputListOfMap.size()>0){
                   for (Map<String, String> inputMap : inputListOfMap) {
                        //If group name is provided then put the list element will be within the group element else within the bill element
                        if(notNull(groupElement))
                             listElement = groupElement.addElement(listElementName);
                        else
                             listElement = sourceElement.addElement(listElementName);     
                        for (Map.Entry<String, String> mapEntry : inputMap.entrySet()) {
                             String elementName = mapEntry.getKey();
                             String elementValue = mapEntry.getValue();
                             if(notBlank(elementName) && notBlank(elementValue)){
                                  listElement.addElement(elementName).addText(elementValue);
         }

    Hi Victor,
    the issue is that the archive pool in your NWDS is not set up properly. Could you check the configuration of the development configuration? I guess you are developing in Local Development, right? Please check in the "Component Browser" that the two Software Components "NWMCLIENT" and "XOCA" are present and contain some DCs inside them. If this is not true, than something went wrong with your setup of the IDE. The modifications of the default.confdef are most likely not right.
    Please come back to me if you don´t know how to proceed.
    Regards,
    Stefan

  • Cannot send complex type as method parameter

    Cannot send complex type as method parameter
    Hi!
    I'm using a kSOAP 1.2 client and i'm having trouble executing a method that takes an object
    of complex type as parameter:
    method:
    public void addSquareDetail(SquareDetail sd){/stuff}
    -SquareDetail is a java bean class that implements KvmSerializable
    - a mapping was added to classmap
    -legacy namespace is not an issue (i AM able to execute the following methods successfully
    over kSOAP):
    -getting one SquareDetail object
    -getting a vector of squareDetail objects
    Here's how i'm trying to call the 'send' method:
         ClassMap classMap = new ClassMap();
    classMap.addMapping("urn:SquareWebService/types", "SquareDetail", (new
    SquareDetail()).getClass());
    System.out.println("add one SquareDetail");
    request = new SoapObject(serviceURN, "addSquareDetail");
    sd = new SquareDetail();
    request.addProperty("SquareDetail_1", sd);
    tx = new HttpTransport(this.endPointURL, "addSquareDetail");
    tx.debug = true;
    tx.setClassMap(classMap);
    tx.call(request); //exception here
    (above:)
    private String endPointURL = "http://localhost:8080/SquareWebService/SquareWebService";
    protected static final String serviceURN = "urn:SquareWebService/wsdl";
    Error(from server, Sun ONE App Server7):
    SoapFault - faultcode: 'env:Server' faultstring: 'Internal Server Error (deserialization
    error: unexpected XML reader state. expected: END but found: START: someInt)' faultactor:
    'null' detail: null
    Here are request/response dumps:
    -request---------
    <SOAP-ENV:Envelope xmlns:n0="urn:SquareWebService/types"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <addSquareDetail xmlns="urn:SquareWebService/wsdl" id="o0" SOAP-ENC:root="1">
    <SquareDetail_1 xmlns="" xsi:type="n0:SquareDetail">
    <someFloat xsi:type="SOAP-ENC:float">1.5</someFloat>
    <someInt xsi:type="xsd:int">-1</someInt>
    <someString xsi:type="xsd:string">someString from SquareDetail</someString>
    <propertyCount xsi:type="xsd:int">4</propertyCount>
    </SquareDetail_1>
    </addSquareDetail>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    response------------
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:SquareWebService/types"
    xmlns:ns1="http://java.sun.com/jax-rpc-ri/internal"
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><env:Fault><faultcod
    e>env:Server</faultcode><faultstring>Internal Server Error (deserialization error:
    unexpected XML reader state. expected: END but found: START:
    someInt)</faultstring></env:Fault></env:Body></env:Envelope>
    So, apparently, the request message is not understood by the server. what exactly is it
    missing, and how can i add/correct that? (my guess in SquareDetail_1 xmlns="" should be
    "urn:SquareWebService/types", although it's just a guess AND i don't know how to make kSOAP
    get it in there)
    I'm not sure what kind of SOAP parser my app server utilizes, but i'm guessing it's an
    apache product (how can i tell?). I also have a WSDL file available, should anyone be
    willing to look at it, please let me know
    thanks
    -nikita

    Don't know if it will help but Can you check if the serializable object has a public empty no args constructor with an empty call to super()
    Also make sure that a type mapping registry is added with a reference to the serializable object in it.
    Please paste The WSDL as well

  • HT1918 I have a new visa debit card, I have tryed several times to put in this new information into my IPad. The program keeps telling me. There's a billing problem with a previous purchase. Please update your payment method. The program will not let me u

    I have a new visa debit card, I have tryed several times to put in this new information into my IPad. The program keeps telling me.
    There's a billing problem with a previous purchase. Please update your payment method.
    The program will not let me update, what am I doing wrong. rose165

    I would love to have a phone number to call someone with apple on this issue.

  • The types of the parameter field and parameter field current values are not compatible.----

    HI,
    I am attempting to set report parameters in my .jsp code via URL parameters.
    I am able to set the report name, server connection dynamically however when attempting to set the Parameters I receive:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: The types of the parameter field and parameter field current values are not compatible.---- Error code:-2147213303 Error code name:invalidParameterField
    The parameter on the report is a String Type, named for this example p1.
    The value that p1 represents is LERAD
    My code:
    String stringValue = request.getParameter("p1");
    CRJavaHelper.addDiscreteParameterValue( clientDoc, "","p1", stringvalue);
    returns the above mentioned error.
    I have tried:
    String stringValue = (String)request.getParameter("p1");
    which returns the above error
    And;
    String stringValue = new String(request.getParameter("p1")).toString();
    which returns
    java.lang.NullPointerException
    java.lang.String.<init>(Unknown Source)
    org.apache.jsp.callReport_jsp._jspService(callReport_jsp.java:105)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    I notice that the CRjavaHelper.java declares this addDiscreteParameterValue as accepting an Object type for the newValue.
    Any ideas???

    Hi,
    nevermind.
    case sensitivty strikes again.
    my URL param was P1 ( case sensitive)

  • ERROR OGG-01148 programming error, data type not supported for column

    I am getting following error when I put null in insert statement
    2011-03-31 18:30:45 ERROR OGG-01148 programming error, data type not supported for column TXID in table advoss.tblaudittrail.
    I am replicating MySQL 5.5.9 to Oracle 11g rel2 via goldengate 11

    I am able to diagnose what is cuasing the problem
    unsigned flag was the culprit of this error
    I am able to insert null after removing unsigned flag.
    thank you very much for your kind support

  • Mac user OS 10.6.8 Firefox 6.0.2. Click the Firefox icon in dock, program does not open new window. Type cmd+N to open new window, cmd+T to open new tab or cmd+L to enter URL, nothing happens. What causes this, and what can be done?

    Mac user OS 10.6.8 Firefox 6.0.2. Click the Firefox icon in dock, program does not open new window. Type cmd+N to open new window, cmd+T to open new tab or cmd+L to enter URL, nothing happens. What causes this, and what can be done?

    It's strange. The problem apparently resolved itself after I ran TechTool on it. When I clicked on Firefox last night, I had no problem opening a window. Thanks for your help. (As to your previous post, the focus was on Firefox and neither the speed keys nor the menu bar would open a window or tab of allow me to enter a URL to open a window. Strange!)

  • Auto Invoice Import Program is not grouping by Transaction Type

    Hi All,
    The Auto Invoice Master program which inturn spwans Auto invoice Import program is not grouping by Transaction type. It is printing for each transaction individually.
    What could be the reason for this to happen?
    Please let me know.
    Thanks,
    Prathima

    Dear,
    You must define "Auto-Invoice Grouping Rules". Define Group by column of the interface table where u are moving transaction type.
    Hope it will helps u
    Regards

  • Can not type in the body of email program & reply button does not work.

    I installed 10.4 (Family Pack) on my G4 400 and after a few days the email program does not work as it originally did. The reply button no longer works. (It did for a few days.) Additionally on a new mail or mail forward. I can not type in the body of the email after the first word. It just beebs at me. (It did work as normal for a few days.) I can still receive and can send mail. I have also installed this Family pack on my iMac flat panel G4 and have no mail problems. That mac is about 200 mile from this location. Before I installed 10.4 I was using 10.3.9 and mail was ok. I use high speed internet with the iMac and use dialup with the G4.

    I've lost track of what computer you have where, and I don't understand why you keep installing buggy OS X 10.4.0 on systems that worked fine under OS X 10.3.9, without being able to update to install system updates afterwards.
    That said, you may want to look at this web site for general Mac OS X troubleshooting tips:
    http://www.thexlab.com/faqs/faqs.html
    In particular, since I know of other people with the same problem as you that fixed it deleting caches, you may want lo look these two pages:
    Resolving Disk, Permission, and Cache Corruption
    Side effects of System cache cleaning
    In addition to some utilities mentioned there for cache cleaning, you may also consider OnyX, if for no other reason, because it's free:
    http://www.titanium.free.fr/
    Although utilities such as OnyX allow you to clean many caches with just a click of the mouse, I'd recommend to be as selective as possible and clean them up one at a time, to try to identify which exactly is causing your problems, if any. This information, in turn, could be useful for other users. I'm pretty sure some Mail problems are related to cache issues, but I don't yet know which cache exactly is the culprit here (since it was not the Mail cache, I would say that the fonts cache should be next in the list).

Maybe you are looking for