Error while calling external library functions

Using visual studio I wrote the following code test javascript communication with external C/C++ libraries:
aabc.cpp :
extern "C" __declspec(dllexport) char* ESInitialize (TaggedData* argv, long argc);
extern "C" __declspec(dllexport) long ESGetVersion (void );
extern "C" __declspec(dllexport) void ESFreeMem (void* p);
extern "C" __declspec(dllexport) void ESTerminate (void );
extern "C" __declspec(dllexport) double AddNumbers(void);
double AddNumbers(double a, double b)
return a + b;
long ESGetVersion (void){
return 5;
And the code that I wrote in javascript is:
var obj = new ExternalObject("lib: aabc.dll");
alert(obj.version);
var aa = obj.AddNumbers(10, 20);
alert(aa);
It seems to me that it loaded successfully due to the output I am getting from the second statement. But I am getting error at the third statement where I called AddNumbers(10,20) function.
Somebody help me.
Thanks in advance,
sailu

I have the same problem. This is my code:
extern "C" __declspec(dllexport) char* ESInitialize (TaggedData* argv, long argc);
extern "C" __declspec(dllexport) long ESGetVersion (void );
extern "C" __declspec(dllexport) void ESFreeMem (void* p);
extern "C" __declspec(dllexport) void ESTerminate (void );
extern "C" __declspec(dllexport) int AddNumbers(int a, int b);
extern "C" __declspec(dllexport) char* ESInitialize (TaggedData* argv, long argc)
return "AddNumbers_dd";
int AddNumbers(int a, int b)
return a + b;
long ESGetVersion (void){
return 17;
And the code that I wrote in javascript is:
var obj = new ExternalObject("lib: mydll.dll");
var x = obj.AddNumbers(10, 20);
alert(x);
The version of the library is correct, but when I try to use the function "AddNumbers" I receive this error "AddNumbers is not function".
What would be the correct procedure to call a function inside a DLL?

Similar Messages

  • Error while calling the Mapping function module for BW Extraction

    Hi
    iam getting runtime error while calling the BW mapping function
    The error description is as shown below.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    <b>Short text</b>
        Type conflict during structure parameter transfer at CALL FUNCTION.
    <b>What happened?</b>
        Error in the ABAP Application Program
        The current ABAP program "GP466CV1Y7W2VML1PJ3VB80KDOP" had to be terminated
         because it has
        come across a statement that unfortunately cannot be executed.
    <b>Error analysis</b>   
    An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
         not caught in
        procedure "CALL_MAPPING_FUNCTION" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        In the function "CMS_CB_BW_MAP", the STRUCTURE parameter "EXTRACT_DATA" is
         typed in such a way
        that only actual parameters are allowed, which are compatible in Unicode
         with respect to the fragment view. However, the specified actual
        parameter " " has an incompatible fragment view.
    I am passing the EXTRACT_DATA  parameter as specification LIKE with the associated type  - corresponding structure
    Please let me know how can i resolve this issue
    Regards
    Leon

    Dear benarji ,
    I'm having the  same problem help me to correct . I have mentioned below as what error i got.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    Short text
         Type conflict during structure parameter transfer at CALL FUNCTION.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "ZDLROUTSTANDING_COPY" had to be terminated because it
          has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
          not caught in
         procedure "PDF" "(FORM)", nor was it propagated by a RAISING clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
         The reason for the exception is:
         In the function "/1BCDWB/SF00000080", the STRUCTURE parameter "IT_WORKS_SF" is
          typed in such a way
         that only actual parameters are allowed, which are compatible in Unicode
          with respect to the fragment view. However, the specified actual
         parameter "SFTWORKS" has an incompatible fragment view.
    Missing RAISING Clause in Interface
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     876
        Module type                             (FORM)
        Module Name                             PDF
    Trigger Location of Exception
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     894
        Module type                             (FORM)
        Module Name                             PDF
    Source Code Extract
    Line  SourceCde
      864 **            i_logo             = 'ENJOYSAP_LOGO'
      865 *            IT_LIST_COMMENTARY = I_LIST_COMMENTS1.
      866
      867 ENDFORM.                    "alv_top_of_page1
      868 *&---------------------------------------------------------------------*
      869 *&      Form  PDF
      870 *&---------------------------------------------------------------------*
      871 *       text
    872 *----------------------------------------------------------------------*
    873 *  -->  p1        text
    874 *  <--  p2        text
    875 *----------------------------------------------------------------------*
    876 FORM pdf .
    877
    878 *  *** Smartforms & PDF ***
    879
    880   ssfctrlop-no_dialog = 'X'.
    881   ssfctrlop-preview   = 'X'.
    882   ssfctrlop-getotf    = 'X'.
    883   ssfcompop-tddest = 'ERP7'.
    884   DATA : mcheck LIKE sy-subrc.
    885   CLEAR : fm_name.
    886
    887   "Get Function module name for given smartform
    888   CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    889     EXPORTING
    890       formname = 'ZSFDLOS1'
    891     IMPORTING
    892       fm_name  = fm_name.
    893
    >>>>   CALL FUNCTION fm_name
    895   EXPORTING
    896         control_parameters   = ssfctrlop
    897         output_options       = ssfcompop
    898         mrefno               = mrefno
    899 *       P_TITLE              = MTITLE
    900   IMPORTING
    901         document_output_info = st_document_output_info
    902         job_output_info      = st_job_output_info " IT_OTF_DATA
    903         job_output_options   = st_job_output_options
    904   TABLES
    905         it_works_sf          = sftworks
    906   EXCEPTIONS
    907         formatting_error     = 1
    908         internal_error       = 2
    909         send_error           = 3
    910         user_canceled        = 4
    911     OTHERS               = 5.
    912
    913   IF sy-subrc NE 0.
    Advance Thanks

  • Error when calling  external  DLL  function.

    When calling a function in Oracle, the error happens
    ORA-28575: '... error RPC connection to external procedures'
    code:
    create or replace library LibFunctions as 'c:\MyDLL.dll';
    grant all PRIVILEGES on LibFunctions to public;
    create or replace
    FUNCTION Max(num1 in number, num2 in number) RETURN number IS
    EXTERNAL LIBRARY LibFunctions
    NAME "Max"
    LANGUAGE C;
    grant all PRIVILEGES on Max to public;
    obs. Dll was created in Pascal.
    What can this error?
    tks,
    Mauricio
    Edited by: user13794390 on 19/01/2011 06:29

    It's been a while since I used extproc. Anyway, it listener.ora make sure extproc is added. I'll assume you are on Unix:
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ENVS = "EXTPROC_DLLS=ANY,LD_LIBRARY_PATH=proper-directory-list")
    (ORACLE_HOME = path-to-oracle-home)
    (PROGRAM = extproc)
    ) SY.

  • Type Mismatch error while calling a Java Function from Visual Basic 6.0...

    Hi,
    I'm having a problem in calling the Java Applet's Function from Visual Basic. First, I'm getting the handle of the Java Applet and components of it using "Document.Applets(n)" which is a HTML function. I'm calling this function from Visual Basic. My code is something like this...
    ' // Web1 is IE Browser in my Form.
    Dim Ap,Comp
    Dim Bol as Boolean
    Bol = true
    Ap = Web1.Document.Applets(0).getWindow() ' \\ Gets the Parent Window.
    Ap.setTitle("My Java Applet") ' \\ Sets the Title of the window.
    msgbox Ap.getVisibility() ' \\ This will return a Java boolean ( true or false )
    Ap.setVisibility(Bol) ' \\ Function Syntax is : void setVisibility(boolean b)
    Here in my code , i'm able to call any function that which accepts Integer or String but not boolean. So, i m facing problem with Ap.setVisibility() function. It gives me a "Type mismatch error" while executing it. Can you please tell me a way to do this from Visual Basic !
    I'm using Visual Basic 6.0, Windows 2000 , J2SDK 1.4.2_05.
    Please help me Friends.
    Thanks and Regards,
    Srinivas Annam.

    Hi
    I am not sure about this solution. try this
    Declare a variable as variant and store the boolean value in that variable and then use in ur method.
    Post ur reply in this forum.
    bye for now
    sat

  • FOTY0001 Error while calling ref:populateXRefRow function in BPEL

    I am getting folowing error while invoking populateXRefRow function in BPEL.
    Expression is : ref:populateXRefRow("CustomerTable","SAP","SAP001","EBS","EBS_001","ADD")
    TableName - CustomerTable
    Column Names- SAP,EBS
    Already ran xreftables.sql script and bounced the server too but still getting the error.
    Any solution?
    Thanks in Advance

    HI
    Usage of variables in populateXref statements in BPEL assign activities as follows :
    For example, the following is not supported:
    xref:populateXRefRow("apps_intg","common","common-12345",bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:appname'),bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:id'),"ADD")
    The following is supported:
    xref:populateXRefRow("apps_intg","common","common-12345",string(bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root
    -Element/ns3:appname')),string(bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:id')),"ADD")
    Please enclose the bpws:getVariableData() with string() function as populateXRefRow() expects strings as its arguments.
    Hope this resolves and answers your question.
    Cheers
    Anirudh Pucha

  • Error while calling external webservice.

    Hi
    I am trying to call an external web service but getting following error.
    exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 503 Service Unavailable
    I am using SOA Suite 10.1.3.4 and trying to call this service from BPEL.
    This service is not a secured service and we are able to call it using SoapUI tool and by simple java code also.
    We are able to ping this service from SOA server too.
    What might be the issue?Any settings required at soa server?
    Any thoughts
    Thanks
    Vibhor

    Hi
    Finally I got the issue fixed.
    Our soa server is using a proxy for outbound interactions, so just added external service Ip in exception and its working now.
    Thanks
    Vibhor

  • Getting error while calling external Jars in BPEL by using Java embedding activity in soa 12c

    Hi,
    I am trying to use an external Jars for the business logic implementation. Here I need to pass XML as input and
    and I expect the "Password " field has to be return.
    Following are the steps I have followed:
    1) Created a java project with sample class and added the external jars into the project "Libraries &Classpath".
    2) Created a jar file out of it.
    3) Created a BPEL project with Java Embedding.
    4)Wrote the java code in java embedding activity.
    4) Added the above created jar file to the BPEL project's lib/jar  and added in SCA-INF/lib project folder as well.
    5) Imported the package with the class as in the jar (e.g <bpelx:exec
    import="pkg.testInterface"/>)
    6) Deploy the BPEL project.
    while deploying the SOA build is sucessful but my depoyment is incomplete.
    error:
    advices will be great....
    Regards,
    Dilip

    Hi,
    Can you confirm if the BPEL Version is 1.1 or 2.0.
    If you are using BPEL 2.0 you need to import the required jar/class file as:
    <import importtype="http://schemas.oracle.com/bpel/extension/java" location="pkg.testInterface"/>
    For BPEL 1.1 the syntax to import other jar/class file is:
    <bpelx:exec import="pkg.testInterface"/>
    If you import the classes in the correct format you will not face any deployment error.

  • 401 Unauthorized:HTTP transport error while calling external WSDL from BPEL

    Hi,
    I have simple BPEL process whic calls siebel WSDL file through partner link.
    I have successfully compiled and deployed BPEL process, when i initiate the Process, instace got errored out at invoke activity.
    Error Goes like this
    "<remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>
    exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException:
    java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 401 Unauthorized</summary>
    </part></remoteFault>"
    Can anybody help on this issue, Could you please give me possible solution.
    Thank youl.

    we have not provided any authentication credentials to XMLSpy, we have just uploaded siebel WSDL file then sent the SOAP request with some customer Id then we have received proper response with all desired customer data.
    In the same way we tried to call same siebel WSDL file from BPEL process throgh partner link. errored instance has created with 401 unauthorised HTTP transport error..
    Do you think is this probem at siebel application side?
    We have deployed our BPEL process to SOA server which is having HTTP port 7777.
    as per my investigation,i found that we have to open port from siebel side (which WSDL file we are calling) which matches with above HTTP port number.
    Do you have any idea on this above clue? Please let us know more details on this.

  • "Invalid column type" error while calling pl/sql function in AM

    Code written in AM is ...
    String MISSING_TIME_SHEET_CALL = "begin ? = missing_time_sheet(?,?,?,?); end;";
    CallableStatement timeSheetStmt = txn.createCallableStatement(MISSING_TIME_SHEET_CALL, 1);
    timeSheetStmt.registerOutParameter(1,Types.BOOLEAN);
    timeSheetStmt.registerOutParameter(4,Types.DATE);
    timeSheetStmt.registerOutParameter(5,Types.DATE);
    timeSheetStmt.setString(2,personId);
    timeSheetStmt.setDate(3,resTermRow.getLastWorkingDate().dateValue());
    timeSheetStmt.execute();
    Body of Function is
    function missing_time_sheet (p_person_id varchar2, p_last_date date, p_start_date out date, p_end_date out date)
    -- Arvind
    return boolean

    refer this article and check your code.
    http://prasanna-adf.blogspot.com/2008/11/callable-statement.html
    --Prasanna                                                                                                                                                                                                                                                       

  • Error in calling External web service from soa suite 11.1.1.3

    Hi
    I am getting following error while calling external web service......
    ####<Jan 20, 2011 6:54:26 PM IST> <Warning> <oracle.integration.platform> <in-mum-adina05> <soa_server1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-490B9BABECE372A277DF> <24b9eca72eaaa6a3:-4bc6fb7c:12da206ca2c:-7ffd-0000000000006287> <1295529866047> <SOA-20136> <WS Binding: exception durign SOAP invocation: java.util.NoSuchElementException>
    ####<Jan 20, 2011 6:54:26 PM IST> <Warning> <oracle.soa.mediator.common> <in-mum-adina05> <soa_server1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-490B9BABECE372A277DF> <24b9eca72eaaa6a3:-4bc6fb7c:12da206ca2c:-7ffd-0000000000006287> <1295529866047> <BEA-000000> < Payload after BaseActionHander.requestMessage :{parameters=oracle.xml.parser.v2.XMLElement@bd2382}>
    ####<Jan 20, 2011 6:54:26 PM IST> <Warning> <oracle.soa.mediator.common> <in-mum-adina05> <soa_server1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-490B9BABECE372A277DF> <24b9eca72eaaa6a3:-4bc6fb7c:12da206ca2c:-7ffd-0000000000006287> <1295529866063> <BEA-000000> < Properties after BaseActionHander.requestMessage :{ReferenceInstance=[email protected]63ea5,
    ####<Jan 20, 2011 6:54:29 PM IST> <Error> <oracle.webservices.service> <in-mum-adina05> <soa_server1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <24b9eca72eaaa6a3:-4bc6fb7c:12da206ca2c:-7ffd-0000000000006287> <1295529869375> <OWS-04115> <An error occurred for port: FabricProvider: javax.xml.rpc.soap.SOAPFaultException: oracle.fabric.common.FabricInvocationException.>
    I am able to hit external ws from soap ui and getting response but while calling from soa suite getting this error.
    Any clues?
    Thanks
    Vibhor

    WS Binding: exception durign SOAP invocation: java.util.NoSuchElementException
    Looks like the error is in the data sent to or expected from the service in your composite. Check that audit logs and composite flow to make sure your soap message when using soapui matches what you are working with in soa suite.

  • Invalid column type error while calling db function.

    We are getting an exception while calling the database function which returns a Varray of objects. We are using jpub to generate the wrapper method, ran sqlj to generate the JDBC code. The environment is weblogic 5.1 EJB container with ORacle 8.1.6.0.0 database. The JDBC driver is 8.1.7 thin, sqlj version is 8.1.7. I am giving below the exception.
    When the sqlj option profile=false is not set, the error is Classcast exception. Appraently the weblogic connection object can not be used to do oracle specific calls. If somebody has done similar things(creating a bean which calls the stored function with weblogic which returns the oracle object types) or know what the issue is, please let me know.
    Thanks,
    Vijay.
    stackTrace:
    java.sql.SQLException: Invalid column type
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:4560)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:225)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:350)
    at weblogic.jdbcbase.pool.Statement.registerOutParameter(Statement.java:438)
    at sqlj.runtime.profile.ref.RTStatementJDBCCallable.registerOutParameter(RTStatementJDBCCallable.java:135)
    at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.registerParameters(Compiled Code)
    at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.getStatement(ParamRegProfile.java:101)
    at sqlj.runtime.profile.ref.CachedStatementProfileWrapper.getStatement(CachedStatementProfileWrapper.java:134)
    at sqlj.runtime.ExecutionContext$StatementStack.setStatement(ExecutionContext.java:995)
    at sqlj.runtime.ExecutionContext.registerStatement(ExecutionContext.java:523)
    at com.xpede.calculator.processor.jdbc.NewPrdGroupPkg.maincalculator(NewPrdGroupPkg.java:341)
    ----------------------

    Weblogic essentially wrappers the Oracle JDBC driver - as you can see from the stack trace, it does not just wrapper the connection object, but also the statement object.
    The SQLJ runtime does not recognize the JDBC layer anymore as an Oracle JDBC driver.
    What is happening at runtime may be the following:
    (1) The invalid column type likely results from SQLJ attempting to register the type as Types.OTHER (code 1111). This typecode is not supported by Oracle JDBC.
    (2) The class cast exception when using Oracle objects may result from a getObject() call which returns the value in default format (such as oracle.sql.ARRAY) rather than the JPublisher-generated wrapper object.
    Are you using JDK 1.2 / runtime12.zip?
    In that case you can try the standard (java.sql.)SQLData interface (in JPub: -usertypes=jdbc). However, this interface will not support wrappers for VARRAYs.

  • Type error while calling function module with in FOX formula

    Hi,
    I am getting following error while calling function module from FOX Formula:
    "Types of parameter DAY_IN () and variable J_CALDAY(D) are inconsistent"
    Following is the code:
    DATA    I_CALDAY       TYPE  0CALDAY.
    DATA    N_CALDAY       TYPE  0CALDAY.
    DATA    KYF              TYPE KEYFIGURE_NAME.
    FOREACH   I_CALDAY, KYF.
       CALL FUNCTION SLS_MISC_GET_LAST_DAY_OF_MONTH
          EXPORTING
             DAY_IN  =  I_CALDAY
          IMPORTING
             LAST_DAY_OF_MONTH = N_CALDAY.
        {KYF, N_CALDAY}  =  {KYF, L_CALDAY}.
    ENDFOR.
    Import parameter DAY_IN is of type sy-datum (that inturn is data element SYDATUM of data type DATS - same as 0CALDAY). Not sure why error is being thrown. Any idea? Thanks.
    Edited by: SAP_BOY on Dec 4, 2009 5:26 PM

    Hi,
    I think It will not identify ,though you have  (data element SYDATUM of data type DATS - same as 0CALDAY).Check it out by assigning it through a variable of type D.
    Data I_CALDAY TYPE D.
    Hope it may work out.
    Regards,
    Indu

  • Error while calling RFC when using BSP Web Interface

    Hi,
    we have a problem with the Authorization when we use an Web Interface for BSP. We have assigned all roles to the user which were mentioned in the SAP standard documentation:
    R_AREA   
    R_METHOD 
    R_PACKAGE
    R_PARAM  
    R_PLEVEL 
    R_PM_NAME
    R_PROFILE
    R_STS_PT 
    R_STS_SUP
    R_WEBITF 
    S_RS_ADMWB
    S_RS_AUTH
    S_RS_COMP
    S_RS_COMP1
    S_RS_DAS 
    S_RS_ICUBE
    but we still get the error message: "Error while calling RFC".
    When using a user with SAP_ALL, it works.
    What can we do?
    Thx for your time.
    Joerg

    Actually that's surprising - because BSP (Business Server Pages) and RFC (Remote Function Call) are not related; they use totally different transport protocols (http vs. RFC). Even if an BSP application is calling a function module remotely (acting as RFC client) no authorizations for S_RFC are required - in the calling system (but in the called system, i.e. the RFC server).
    Since assigning SAP_ALL seems to "cure" the problem, it seems to be an authorization issue, indeed. In that case it makes sense to use the authorization trace (ST01 - notice: that's specific to one single ABAP application server; you might have to activate the trace on multiple instances) to find out which authorizations are checked / demanded.

  • Error while calling up RFC

    Hi GuRuS,
               I am working on BI 7.0. When I open the BPS workbench using Transaction bps0 and select the planning area 4TPM9000, and click on either "Variables" tab or "Master Data" tab or when I click on "Adhoc Package", I get this error " You have selected a function, to execute this the system must set up an RFC connection to another SAP System. However, setting up this connection was not successful. The following internal error message was generated: Error while calling up RFC. " 
    FYI I have done RFC connections between my CRM 2007 system and BI 7.0 system using Tr.SM59 and checked the connections from both the ends and it is working fine. So, pls show me the way out.
    Thanks in advance,
    Raghu

    Hi...
         The roles SAP_ALL and SAP_NEW are assigned for the RFCUser.
    Regards,
    Raghu

  • Error while calling PERFORM in SAPSCRIPT

    Hi all,
    I am encoutering a error while calling a perform in sapscript.
    Does anyone know what is the main cause?
    The shortdump description is:
    Short text                            
        Missing parameter with PERFORM.   
    I do not know what is missing here.
    /: PERFORM GET_SPRAS IN PROGRAM ZPFI_F150_DUNN
    /: USING &MHNK-KUNNR&
    /: CHANGING &GV_SPRAS&
    /: CHANGING &GV_LAND1&
    /: ENDPERFORM
    *&      Form  GET_SPRAS
    FORM GET_SPRAS TABLES intable   STRUCTURE itcsy
                          outtable  STRUCTURE itcsy
                          outtable2 STRUCTURE itcsy.
      DATA: lv_kunnr LIKE kna1-kunnr.
      CLEAR: GV_SPRAS.
      lv_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = lv_kunnr
        IMPORTING
          output = lv_kunnr.
      SELECT SINGLE LAND1 SPRAS INTO (gv_land1, gv_spras) FROM KNA1
        WHERE KUNNR = lv_kunnr.
      IF sy-subrc = 0.
        READ TABLE outtable INDEX 1.
        outtable-value = gv_spras.
        MODIFY outtable INDEX 1.
        READ TABLE outtable2 INDEX 1.
        outtable2-value = gv_land1.
        MODIFY outtable INDEX 1.
      ENDIF.
      IF gv_land1 EQ 'DE'.
        CLEAR: GV_LAND1,
               GV_SPRAS.
      ENDIF.
    ENDFORM.

    Hi,
    Though there are a lot of importing parameters, you should give only one structure for outtable, and read as index 1 and index 2.
    FORM GET_SPRAS TABLES intable   STRUCTURE itcsy
                                              outtable  STRUCTURE itcsy.
      DATA: lv_kunnr LIKE kna1-kunnr.
      CLEAR: GV_SPRAS.
      lv_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = lv_kunnr
        IMPORTING
          output = lv_kunnr.
      SELECT SINGLE LAND1 SPRAS INTO (gv_land1, gv_spras) FROM KNA1
        WHERE KUNNR = lv_kunnr.
      IF sy-subrc = 0.
        READ TABLE outtable INDEX 1.
        outtable-value = gv_spras.
        MODIFY outtable INDEX 1.
        READ TABLE outtable INDEX 2.
        outtable-value = gv_land1.
        MODIFY outtable INDEX 2.
      ENDIF.
      IF gv_land1 EQ 'DE'.
        CLEAR: GV_LAND1,
               GV_SPRAS.
      ENDIF.
    ENDFORM.
    Edited by: Srinivas Kalluri on Mar 30, 2009 5:00 AM
    Edited by: Srinivas Kalluri on Mar 30, 2009 5:10 AM

Maybe you are looking for