Creating function description: "inconsistence in description detected ..."

In my own NW RFC-SDK based application, I am trying to create a RFC module description the hard way, which is to not download such a description from a SAP system, but to craft the description on-the-fly using API functions RfcCreateFunctionDesc, RfcCreateTypeDesc, RfcAddTypeField, RfcAddParameter and  RfcCreateFunction. When calling RfcCreateFunction the system responds with the message
"inconsistence in description detected: non-unicode length is too small".
As far as I can tell all values I provided in the API arguments are correct, including the unicode and non-unicode lengths in the type description of a structure that is underlying the only RFC parameter in the module.
Here is what the module isi supposed to look like:
module has only one Export parameter
the parameter is structured
the structure has a single field only, which is a character array of length 64 (i.e 128 bytes).
My application is unicode based. I added some code to the application to trace the API calls along with the argument values. Here is the output:
API RfcCreateFunctionDesc
Created function description object; returned handle: 024A1880
API RfcCreateTypeDesc
Created type description object; returned handle:     024A1A00
API RfcAddTypeField
Added Field to type description 024A1A00:
  name                DEST
  type                0
  nucLength           64
  nucOffset           0
  ucLength            128
  ucOffset            0
  decimals            0
  typeDescHandle      00000000
  extendedDescription 00000000
API RfcAddParameter
Added parameter to funtion description 024A1880:
  name                ATTRIBUTES
  type                17
  nucLength           64
  ucLength            128
  decimals            0
  typeDescHandle      024A1A00
  optional            0
  direction           2
  parameterText
  defaultValue
  extendedDescription 00000000
API RfcCreateFunction
Created function object from description 024A1880; returned handle:     00000000
RFC_INVALID_PARAMETER inconsistence in description detected: non-unicode length
is too small
Thanks so much for any help!

Case closed. There was an API call missing in my code, RfcSetTypeLength, which sets the total lengths (unicode and non-unicode) of the structure after adding the structure components.Without that call the system assumes those lengths to be zero, thus the error ...

Similar Messages

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • Function module for detailes description of Order and long text in task

    Hello gurus,
                       please help me with Function module for detaile description of Order and long text in task list(operation Tab)?
    regards,
    YK

    Hi, 
    You should be able to read the Order short text directly from table AUFK. The Order long text or task list long text can be read by using FM "Read_text". Use Goto> Header on every long text screen to identify the parameters that need to be passed hen using this FM.
    Regards
    Narasimhan

  • Create function with a cursor in it

    I need help to create a function called f_Getfeedesc. I want to use a cursor for Loop. The function will return fees description for any folder.
    If a folder has more than one fee description, it will concatenate the fees description.
    The select statement I have here returns the following fees description:
    CO Residential 3+ Units No Entry Penalty Fee
    C of O Initial Fee
    CO Residential 3+ Units Initial Fee
    However when the function is done if you run it using the folderrsn 99999 the result should look like this:
    CO Residential 3+ Units No Entry Penalty Fee / C of O Initial Fee / CO Residential 3+ Units Initial Fee
    If the folderrsn has only one fee description the result should just return that one fee description. e.g CO Residential 3+ Units No Entry Penalty Fee
    I am using the following tables:
    folder table with FOLDERRSN......... NOT NULL  NUMBER(10,0) column.
    accountbillfee table with FEECODE..........NOT NULL  NUMBER(10,0) column.
    validaccountfee table with FEECODE........NOT NULL  NUMBER(10,0) and FEEDESC............NOT NULL  VARCHAR2(80) columns.
    SELECT DISTINCT vaf.feedesc
    FROM folder f, accountbillfee abf, validaccountfee vaf
    WHERE f.folderrsn = abf.folderrsn
    AND vaf.feecode = abf.feecode
    --And f.folderrsn = argfolderrsn
    AND f.folderrsn = 99999 --for a specific folderrsn
    Edited by: user4653174 on Sep 12, 2008 1:31 PM

    Hi,
    What you're trying to do is called "string aggregation".
    There's an excellent page on AskTom with several general solutions.
    I recommend the first one, STRAGG.
    Once you have STRAGG installed, you can get the output you want as simply as this:
    SELECT    feecode
    ,         STRAGG (feedesc)
    FROM      validaccountfee
    GROUP BY  feecode;Edited by: Frank Kulash on Sep 13, 2008 2:56 AM

  • Creating function modules with step by step

    Hi,
       plz provide me the material for creating function modules with step by step.

    Hi Nagaraju,
    Step 1.
    GO to transaction SE80.In the drop box list select function group enter your Z Function group name.Press enter it will ask for creating the function group.Create your function group.
    OR
    In SE37 transaction,in the menu bar Goto - > Function Group - > Create Group.Your Function Group will be created.
    Step 2.
    Go to transaction SE37.Enter your Z Function module name,your recently created function group name and the description.Press Enter.Now your FM is created.
    Step 3.
    Enter Export,Import parameters.In the source code tab write the code what you want to write.If any exception write in the exception tab.
    Method 2)
    First u have to create Function Group.
    1.se37->Goto->Function Group--->Create.
    2.Create FM.
    3.maintain import /export parameters and tables , exceptions.
    4.based on the ur requirement u have to bulid ur logic in Source Code by using there Import parameters and u can pass the results by using Export or table.
    5.u can raise error by using exception.
    Reward if useful.
    Thanks
    Aneesh.

  • Multi Language Description and Long description update.

    Hi Guru,
    I would like to know the possible ways to upload the description and long description in multiple languages for the existing items in mass.  For newly created items, we can enter the data in language form tied to the description.
    Is it possible to do with APC WebADI.?  or any other suggestion would be highly appreciable.
    Venkatesh

    I solved the problem by myself. It's a customizing with OBVU.
    Hope it can help others.
    Andy

  • Create Functional Area via Job Architecture in Non-English language

    Dear Experts,
    We're running following environment.
    - Windows Server 2003 Std SP2 64bit (32bit conversion completed)
    - SAP ERP 6.0 EhP 4 Unicode system as back-end system for STVN
    - STVN 2.1 SP1 with Japanese Language pack
    - Language = Japanese and English
    - TREX setting is not ready (will be ready soon)
    The problem is we cannot create Functional Area via Job Architecture
    if we log on Job Architecture module with JAPANESE.
    (We can create Functional Area if we log on with ENGLISH)
    [Procedure]
    1. Launch Job Architecture module with Japanese
    2. Job Architecture => Create Functional Area (under Tasks)
    3. Key in [Title] and [Abbreviation], and then click [Add]
    4. Error message "Not able to load DLL or CLASS" appears
    I have already confirmed that if I do same thing with English,
    Functional Area was created in ECC environment.
    What settings am I missing?
    Best Regards,
    Masaya Iizumi

    Dear Luke and Eugene
    Thank you very much for the reply.
    I have understood that it is known issue for .NET platform for 2.1 SP1.
    I will communicate with Nakisa Support.
    Again, thank you very much for your kind cooperation.
    Best Regards,
    Masaya

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • Creating function to calculate average value

    Hi,
    The below query was successfully return an average value. It returned 1 row.
    SELECT AVG(Volume)
    FROM security
    WHERE
    Type = 'Future' AND
    Rating = 'AAA' AND
    Code = 1 AND
    (Day = ''14-mar-09' OR
    Day = '16-mar-09' OR
    Day = '');
    I tried to use that function on my created function below.
    CREATE OR REPLACE FUNCTION fn_Vol_Average
    ( v_DayLast_1_Week IN DATE,
    v_DayLast_2_Week IN DATE,
    v_DayLast_3_Week IN DATE )
    RETURN NUMBER IS
    v_Vol_Average NUMBER;
    BEGIN
    SELECT AVG(Volume) INTO v_Vol_Average
    FROM security
    WHERE
    Type = 'Future' AND
    Rating = 'AAA' AND
    Code = 1 AND
    (Day = v_DayLast_1_Week OR
    Day = v_DayLast_2_Week OR
    Day = v_DayLast_3_Week);
    RETURN NVL(v_Vol_Average, NULL);
    END;
    I called that function by the following query. it was work, however it return the whole rows. It looks like the function perform the average calculation of each rows on the table.
    Can anyone help me what is going on with the logic?
    select fn_Vol_average('14-mar-09','16-mar-09','')
    from security
    --

    But since your function calculates the average over the whole security table, you wouldn't call this from a select statement which also reads the security table.
    You just want to execute it once.
    declare
       l_vol_average number;
    begin
       l_vol_average := fn_Vol_average('14-mar-09','16-mar-09','');
       dbms_output.put_line(l_vol_average);
    end;By the way, be careful with your date parameters. You should use TO_DATE with a proper format mask to prevent conversion errors.

  • How to create function module for getting customer name

    Hi Experts,
                   How to create function module?  when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
    how to write the logic in source code....
    Regards,
    Thiru. R

    1. First of all create function group.
    2. Create function module using this function group.
    3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
    4. Fetch name1 for each kunnr from KNA1 table.
    "->> if many kunnr
    if not t_kunnr[] is initial.
    select kunnr as kunnr name1 as name1
    into table t_kunnr_name1
    from kna1
    for all entried in table t_kunnr
    where kunnr = t_kunnr-kunnr.
    endif.       
    sort t_kunnr_name1 by kunnr name1.
    delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
    table t_kunnr_name1 will contain kunnr and its name1.
    I hope logic is clear for you now.
    Regards,
    Aparna

  • Create function as "/ as sysdba" not shipped/applied to logical standby

    As the subject states, I was creating a password verify function and profile that used the function as sys "/ as sysdba" .
    The function was not created on the logical standby and thus the profile create statement failed. The function was not even listed in the standby's alertlog, although the create profile statement was.
    I created the function manually on the standby by connecting / as sysdba and creating the function and then restarted logical standby apply. The standby then created the profile and continued without error.
    Is this a bug?
    Should the SYS 'create function' be shipped and applied or not?
    When the function create statement was run on the primary as a non-sys user with DBA privs, it created ok and was shipped and appeared on logical standby ok.
    Any ideas DataGuard Gurus?
    (9.2.0.7 on Solaris 8)

    I logged a Tar. Oracle says:
    "Ideally any object created on sys schema should get skipped automatically. sys is consider as internal schema and objects created in sys schema should get
    skipped"
    "But because of the internal Bug.3576307 "LOGICAL STANDBY IS NOT SKIPPING DDL IT SHOULD." it is not skipping the DDL executed on sys schema. This bug
    is fixed in 10.2.
    You can issue following statement to enable the DDL skip on sys schema.
    SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
    SQL> EXECUTE DBMS_LOGSTDBY.SKIP_ERROR(‘SCHEMA_DDL’, ‘SYS’, null, null)
    SQL> ALTER DATABASE START LOGICAL STANDBY APPLY;
    After which all DDL errors encountered on any object in the SYS schema would be ignored and processing continued. This can render the TEST schema objects unusable and, if necessary, you can later recreate the tables
    using the INSTANTIATE_TABLE procedure."
    Makes sense now.

  • I have got two photos by mail from iPhoto. My friend has put descriptions in the description field. The I got the mail I saw the description below each photo. If I check the photos with Preview they have Exif and JFIF fields but no IPTC field.

    I have got two photos by mail from iPhoto. My friend has put descriptions in the description field. The I got the mail I saw the description below each photo. If I check the photos with Preview they have Exif and JFIF fields but no IPTC field.

    Does you friend use any accented letters in the descriptions?  That might cause it but I don't know for sure.
    Has he run any repair operations on his library, i.e. repairing the database file? Another possible fixe that's easy to apply is the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
        Home/Library/ Preferences folder.
    2 - delete iPhoto's cache folder(s):
    Home/Library/Containers/com.apple.iPhoto
    and, if there is one, the
    Home/Library/Caches/com.apple.iPhoto folder
    3 - reboot, launch iPhoto and try again.
    NOTE: In Lion and Mountain Lion the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and press the Return key - 10.7: Un-hide the User Library folder.
    For  Mavericks, 10.9,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    The demo version of GraphicConverter can be used to view/check/edit the ITPC fields in an image file after exporting.

  • Creating Functions in SQL server

    HI
    i creating functions for specific purpose in the test database...
    is it against SAP Support policy?
    suggest me...

    if you are just going to start entries then you can .
    But i have posted then Use replace function in SQL
    SQL Syntax:
          REPLACE( string1, string2, string3 ) 
    Parameters:
        string1
    Any character string or binary expression that can contain the string from string2.
    string2
    Any character string or binary expression. This string is searching in string1.
    string3
    Any character string or binary expression. This string replace all occurrence of string2.
    May it will work
    Thanks
    Manvendra Singh Niranjan

  • How to create function panels for my own C functions?

    I've been searching for a way to create my own function panels. CVI documentation seems to suggest that this can be done but the explanation inevitably turns to instrument drivers, not C functions.
    I don't yet know what an instrument driver is. So far I've never needed one. I just want to know how to put plain old C functions that I've created into the library tree for coworkers to use. Is that practically possible?

    The facility is couched in terms of "instrument driver" but it can be used for an arbitrary CVI function you've created.
    First make a function tree from File pull down menu   new ... Function Tree
    Then right click in blank function tree panel and create instrument or use Create pulldown menu, enter name as prompted, use help button.  You need to choose a "prefix" for your function names.
    The tricky part is when you want to add a function to your "instrument" you right click on the <create class or function panel window> token the first time, thereafter when adding a function you right click on one of the functions you've already added.  In either case you want to "create function panel window" which brings up the function panel window editor whcih allows you to place input controls that match the function signature.
    There's a learning curve but keep at it.  The help is good, use it.
    Menchar

  • How to create function module in real time

    hi experts,
    can somebody explain a real time requiremwnt , to create a function module.
    its very urgent.
    i want elaborately.
    regards,
    subhasis.

    hi,
    In real time
    1. as per my knowledge we create function modules to Inbound IDOC /outbound processing..
    2.Interface between a program..
      Example we need to take some data from a report say materials and plant and process some bapi and return logfiles to the report we can use FM here too.
    To create a function module
    First you need to create a function group (function group holds a number of function modules relevant)
    SE37>goto>function groups-->create group ..click this create group..
    Now in the pop up enter the function groupname Eg: ZW_FG1 plus short text and saveit
    Now again goto SE37--> enter new Function module name eg:ZW_FM1
    and press F5.
    Now again a popup you need to enter
    function group name : ZW_FG1
    and short test and save it..
    Now the Function module is created under the Function group ZW_FG1.
    write your export import table parameters and you source code.
    rewards if useful
    regards,
    nazeer
    Message was edited by:
            nazeer shaik

Maybe you are looking for

  • I don't have a clue why my Mac shuts down.

    I have been having some difficulty with my iMac. It seems that it has a time delay and the wheel tends to spin for a long time. 1-For instance if I have set "to put the my Mac sleep after 3 hours", and never to put the display to sleep after being in

  • Regarding STATUS FIELD INFORMATION OF T.CODE CO03(Display Production Order)

    Hello Friends, I want to know, how could i get the Status field information from T.CodeCO03(Display Production Order). Any F.M or Table Name. I have production order Number as input field and output will be Status. Regards Amit

  • IPhone 4 & iPod Touch can connect to Time Capsule, but not Internet

    My family and I have an iPhone 4, iPhone 3G & iPod Touch. Our WiFi comes from a Time Capsule. My Macbook Pro can connect to the WiFi and get online, but the iPod & iPhones can only connect to the Wifi, not actually get online. We some issues with our

  • Aperture 3.0.1 - Adjustments missing in Adjustment Tab

    Under my Adjustment tab I have a histogram, Presets, Adjustments (brushes) and thats it. No white balance, no exposure ..... everything is missing. Anyone have a clue what could be going on? Tried rebooting but no change. Everything was fine until I

  • Organizing a library on new computer

    Hey I just got a new computer (pc) and am planning on importing all my old music. I'm good with doing all that, BUT, I was wondering if anyone has a way to get all the music in one organized iTunes folder. I have an iTunes folder on my old computer a