Structure with a string field as parameter in FM

Hi,
I have a requirement wherein based on some id which is the import paramter (table) i have to fetch some text of type string n pass as an export paramater. it has to be a table since for each id there wil a text associated with it.
For this i have declared a structure with two fields, one client and the other, the text type string.
While trying to activate my fm, it says that italicsthe structure should be a flat type. You cannot use internal tables. string, references etcitalics
Please provide a solution.
Regards,
herwin.

Hi Vikranth,
ya using char or lchar would be one option and the other would be the use of the table type in the the import/export parameters. That worked without giving me that warning message and was able to execute my code properly with the desired output.
Regards,
Herwin.
Edited by: Herwin Wilmet Dsouza on May 11, 2010 12:18 PM

Similar Messages

  • A record selection problem with a string field when UNICODE database

    We used report files made by Crystal Reports 9 which access string fields
    (char / varchar2 type) of NON-UNICODE database tables.
    Now, our new product needs to deal with UNICODE database, therefore,
    we created another database schema changing table definition as below.
    (The table name and column name are not changed.)
        char type -> nchar type
        varchar2 type -> nvarchar2 type
    When we tried to access the above table, and output a report,
    the SQL statement created from the report seemed to be wrong.
    We confirmed the SQL statement using Oracle trace function.
        SELECT (abbr.) WHERE "XXXVIEW"."YYY"='123'.
    We think the above '123' should be N'123' because UNICODE string
    is stored in nchar / nvarchar2 type field.
    Question:
    How can we obtain the correct SQL statement in this case?
    Is there any option setting?
    FYI:
    The environment are as follows.
        Oracle version: 11.2.0
        ODBC version: 11.2.0.1
        National character set: AL16UTF16

    With further investigating, we found patterns that worked well.
    Worked well patters:
        Oracle version: 11.2.0
        ODBC version: 11.2.0.1
        National character set: AL16UTF16
        Report file made by Crystal Reports 2011
        Crystal Reports XI
    Not worked patters:
        Oracle version: 11.2.0 (same above)
        ODBC version: 11.2.0.1 (same above)
        National character set: AL16UTF16 (same above)
        Report file made by Crystal Reports 2011 (same above)
        Crystal Reports 2008 / 2011
    We think this phenomenon is degraded behavior of Crystal Reports 2008 / 2011.
    But we have to use the not worked patters.
    Anything wrong with us? Pls help.
    -Nobuhiko

  • Updated to CR 2008 - now have new problem with truncated String fields.

    Hi there
    I'm hoping someone has a simple answer for this one...  notice there's a lot of it on forums but I haven't found an answer.
    Since updating to Crystal 2008 (Crystal 12), we have found that some reports are suddenly truncating string fields at 255 characters, despite the field value being much longer in the database.
    Does anyone know what to do to allow these fields to print in completion?
    Database connection is ODBC RDO.
    regards
    -Karen

    What is the database Oracle, SQL server etc.
    Can you query the database directly with another query tool, eg SQL Server Management Studion or SQL developer/Toad for Oracle.
    You can then run the Crystal query directly and see if its your ODBC connection that is truncating the datafield or Crystal.
    I have memo fields on SQL server with up to 2000 characters and these display in Crystal 2008 without any problem. We use ODBC (RDO) too.
    Ian

  • How to create a structure with my own fields

    Hi,
    can any body please explain me in creating a structure iwth my own field names

    hi friend.
      here is the code to create structure.
      data: begin of stru,
              ebeln type ekko-ebeln,
              bukrs type ekko-bukrs,
              lponr type ekko-lponr,
              ekogrp type ekko-ekogrp,
              end of stru.
    this will create the structure and i have defined the fields from ekko table. you can define the fields for your table in the same pasion. you can call any were in your program using the structre name with field name.
    Suppose you need to write the fields.The statement is
    write : /  stru-bukrs,stru-ekogrp.
    This is the way to write the structure.
    NOTE:
    begin of stru and end of stru is structure .
    if u write the state like this
    begin of itab occurs 0,
    end of itab.
    its a internal table.

  • Amend Structure with error, Reference field VBAP-KZWI1 for ZSMINI44_D4-PO_A

    Hi,
    i try to amend a structure but there is such an error that the Reference field VBAP-KZWI1 for ZSMINI44_D4-PO_AMT has incorrect type...
    but the data elements are the same.
    Please kindly advice.

    Dear Sally,
    Please use VBAP-WAERK  as your Reference Field instead od VBAP-KZWI1 for your structure field ZSMINI44_D4-PO_AMT.
    Hope this resolves your problem.
    Encourage others to answer your queries by suitably rewarding them
    Thanks
    Venugopal

  • Define structure with table type fields using keyword "TYPES"

    Hi Gurus,
    Using keyword "TYPES", I want to define a structure in which there is a field must be table type. It seems not allowed. For example:
        TYPES tt_items TYPE TABLE OF sflight.
        TYPES: BEGIN OF str,
          field1 TYPE i,
          field_tabl TYPE tt_items.
        TYPES:  END OF str.
    Then I got a syntax error:
    "TT_ITEMS" is a generic type. Use of this type is only possible for     typing field symbols and formal parameters. -     
    What should I do if I want to have a table type field in it?
    Thanks a lot.

    include type EKKO includes the whole strucutre of EKKO.
    if you see the structure in debug mode, it_ekko contains the fields of EKKO as well as the field CHK of type C.
    In your case you can do this
    TYPES: BEGIN OF str.
    INCLUDE TYPE sflight.  " includes whole structure of SFLIGHT
    TYPES : field1 TYPE i. " include the field1 of type I
    TYPES: END OF str.
    DATA : it_str TYPE TABLE OF str, " internal table
           is_str TYPE str.          " work area
    Regards
    Gopi

  • Can we create a structure with string type not char??

    Hi All
    Can we create a structure with type STRING not as a CHAR type??
    Please its urgent.
    Regards
    Deepanker

    HI,
    Yes, you can string instead of CHAR.
    Please follow the steps below :
    SE11 --> Table name --> Create Button --> And input the short description and necessary Delivery and Maintenance fields --> Select Fields tab --> Input some name on field --> And Click on Predefined button --> Press F4 on Data type column --> a Pop window will be displayed --> Select String from that.
    Thanks,
    Sriram Ponna.

  • Problem in using a structure with a field of  data type 'RAW STRING'

    Friends
    I have written a ZBAPI that imports a structure which has 5 fields. I have defined this in the IMPORT tab of Tr.Code <SE37>.  One of the field of this structure is of data type 'RAW STRING'.
    When I try to activate this BAPI, I get an error message as follows:
    Function Module ZBAPI_ADD_CONFIG_DNA
    "ZDAMPER_CON_DNA" Must be a flat structure. You cannot use internal table
    strings, references, or structures as components.
    Where ZDAMPER_CON_DNA is the table name that I am using.
    FOR TESTING PURPOSE, WHEN I CHANGE THE DATA TYPE FROM 'RAW STRING' TO JUST A CHAR OF LENGHT 5, IT WORKS FINE.
    Here is the source code of the simple BAPI that i am trying to activate.
    FUNCTION ZBAPI_ADD_CONFIG_DNA.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(CONFIG_DNA_DATA) TYPE  ZCONFIG_DNA_STRUCTURE
    *"  EXPORTING
    *"     VALUE(MESSAGE) TYPE  ZRETURNMESSAGE
    tables: ZDAMPER_CON_DNA.
        ZDAMPER_CON_DNA-CONFIG_ID       =     CONFIG_DNA_DATA-CONFIG_ID.
        ZDAMPER_CON_DNA-STRING_NAME     =     CONFIG_DNA_DATA-STRING_NAME.
        ZDAMPER_CON_DNA-STRING_FORMAT   =     CONFIG_DNA_DATA-STRING_FORMAT.
        ZDAMPER_CON_DNA-STRING_VALUE    =     CONFIG_DNA_DATA-STRING_VALUE.
        ZDAMPER_CON_DNA-OBJECT_NAME     =     CONFIG_DNA_DATA-OBJECT_NAME.
        INSERT ZDAMPER_CON_DNA.
        MESSAGE-SUBRC = sy-subrc.
        if sy-subrc = 0.
            MESSAGE-RETURNMESSAGE = 'SuccessfullyInserted'.
        else.
            MESSAGE-RETURNMESSAGE = 'Insert Failed'.
        endif.
    =============
    ANY KIND OF FEED BACK WILL BE HIGHLY APPRECIATED.
    THANKS
    RAM

    Hi ram,
    there is no data element exists with the name RAW STRING ,
    but check one of these names..
    Data element                   Short text
    C2S_RAWSTRING                  C2-Server: Data Element of Type Rawstring
    N2_RAWSTRING                   Byte String of Variable Length
    QISRDRAW_STRING                Data in Format RAW Character String
    RCF_RAWSTRING                  Rawstring
    RPAP_TEMPLATE_RAWSTRING        Blob of Template File
    RSRAWSTRING                    Raw String
    RSRD_RAWSTRING                 Binary Content in the Broadcasting Framework
    SWH_RAWSTRING                  Workflow: Data Type RAWSTRING
    WDR_RAWSTRING                  Byte Sequence of Variable Length
    <REMOVED BY MODERATOR>
    venkat.
    Edited by: Alvaro Tejada Galindo on Mar 7, 2008 5:15 PM

  • EBS with MT940 format field 86 structure - the details of remitter

    Dear Sap guru,
    I am starting configuration for EBS with MT940 format field 86 structured. I have got the format from Deutsche bank.
    My problem is how to configure a search string to search within field 86 for Bank code of remitter (?30) and account number of remitter (?31). The search string appears to search the details of payment information (?20Bis?29) only.
    Could any of you provide your expertise on this so that EBS will pick up the remitter information ?
    Kind regards
    taro

    The field ?30 is stored in FEBEP-PABLZ.
    When the field ?31 contains an IBAN, it is stored in FEBEP-PIBAN (and the corresponding BBAN is stored in FEBEP-PAKTO); in the other cases it is stored in FEBEP-PAKTO.
    You should use these fields in a user exit.
    (Source: program RFEKA400:)
          WHEN '30'.
    *       BLZ   Auftraggeber/Zahlungsempfänger
            MOVE HEAD_2 TO XFEBEP-PABLZ.
          WHEN '31'.
    *       Konto Auftraggeber/Zahlungsempfänger
            CALL FUNCTION 'FUNCTION_EXISTS'                   "start n969358
              EXPORTING
                funcname = 'SEARCH_FOR_IBAN'
              EXCEPTIONS
                others   = 1.
            IF sy-subrc = 0.
              CALL FUNCTION 'SEARCH_FOR_IBAN'
                EXPORTING
                  i_string = head_2
                IMPORTING
    *              e_tiban  = l_tiban
                  e_subrc  = l_subrc.
              IF l_subrc = 1. "not an IBAN
                MOVE HEAD_2 TO XFEBEP-PAKTO.
              ELSE.
                MOVE HEAD_2 TO XFEBEP-PIBAN.
              ENDIF.
            ELSE.
              MOVE HEAD_2 TO XFEBEP-PAKTO.
            ENDIF.                                              "end n969358

  • Concatenate structure with 63 fields

    Hi all,
    I have a structure with 63 fields. We have to send all this data in text file as an email attachment. What is the best way to concatenate all this field separated by tab?
    Thanks.

    Hello,
    Try using Filed Symbols . Let your structure be WA_TEST type ZTEST.
    Data string type X
    Field Symbol <fs> type any
    Do.
    ASSIGN COMPONENT sy-index OF STRUCTURE WA_TEST TO <fs>.
    If Sy-subrc NE 0.
    Exit.
    Conactenate STRING  <fs> into STRING  separated by co_tab.
    Endif.
    regards
    Saket Sharma
    EndDo.

  • Cannot assign an empty string to a parameter with JDBC type VARCHAR

    Hi,
    I am seeing the aforementioned error in the logs. I am guessing its happening whenever I am starting an agent instance in PCo. Can somebody explain whats going on?
    Regards,
    Chanti.
    Heres the complete detail from logs -
    Log Record Details   
    Message: Unable to retreive path for , com.sap.sql.log.OpenSQLException: Failed to set the parameter 1 of the statement >>SELECT ID, PARENTID, FULLPATH, CREATED, CREATEDBY, MODIFIED, MODIFIEDBY, REMOTEPATH, CHECKEDOUTBY FROM XMII_PATHS WHERE FULLPATH =  ?  <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.
    Date: 2010-03-12
    Time: 11:32:37:435
    Category: com.sap.xmii.system.FileManager
    Location: com.sap.xmii.system.FileManager
    Application: sap.com/xappsxmiiear

    Sounds like a UI browsing bug (when no path is selected from a catalog tree folder browser) - I would suggest logging a support ticket so that it can be addressed.

  • How to set a string field with people picker control group

    Hi Guys
    I have a problem with a form list, when I need to set a string field with de content of people picker control that have more than one "user".
    Is there any way to put in string a list of user like the people picker control shows in a form?
    The really problem is I don't know how to read an array of user in a formula rule.
    any example or idea should be appreciated.
    tnks.

    Hi ,
    Please try out in following way :
            /// <summary>
            /// Set value to people picket control
            /// </summary>
            /// <param name="key"></param>
            /// <param name="ppl"></param>
            /// <param name="item"></param>
            private void SetDatatoPeopleEditor(string key, PeopleEditor ppl, SPListItem item)
                try
                    if (item[key] != null)
                        string users = string.Empty;
                        SPFieldUserValueCollection userCol = new SPFieldUserValueCollection(web, item[item.Fields.GetField(key).Id].ToString());
                        foreach (SPFieldUserValue usrItm in userCol)
                            users += usrItm.User.ToString() + ",";
                        ppl.CommaSeparatedAccounts = users.Remove(users.LastIndexOf(","), 1);
                catch (Exception ex)
                    lblErrorMessage.Text = ex.Message;
    private SPUser GetAccountName(PeopleEditor accountPE)
                SPUser user = null;
                string strAccountName = String.Empty;
                try
                    for (int i = 0; i < accountPE.ResolvedEntities.Count; i++)
                        PickerEntity objEntity = (PickerEntity)accountPE.ResolvedEntities[i];
                        user = web.AllUsers[objEntity.Key];
                    return user;
                catch (Exception ex)
                return user;
    It works for me .

  • Need help with string field formula

    Post Author: dshallah
    CA Forum: Formula
    What I am trying to accomplish:
    The report has item numbers and each item number has the
    potential to be associated with up to three u2018binsu2019. So the fields are u2018item
    numberu2019, u2018bin1, u2018bin2u2019 and u2018bin3u2019.
    I tried to write a u2018if thenu2019 statement that would only show
    records that had a value of less than 1 in each u2018binu2019 field. When I try to
    write the statement I get a message that says u2018A string is required hereu2019 and
    it highlights the number 1 in my statement. I have a feeling itu2019s because the u2018binu2019
    fields are string fields and not number fieldsu2026? So I am not sure the proper
    procedure to correct this. Thus help is needed and appreciated.
    Here is what I wrote:
    if {IC_LOC_HIST.BIN_NAME_1} < 1 then
    {IC_LOC_HIST.BIN_NAME_1}
    What is correct way to write a statement that will show me
    the zero values in each column of bin fields?
    Thanks!

    Post Author: bettername
    CA Forum: Formula
    You must have a non-numeric value in there somewhere - up in the top left of the formula editor window, it'll show you the variables you've passed to the formula, which should help track down what's going on.
    You could try and check that the value is a number first by using something like:
    if isnull({IC_LOC_HIST.BIN_NAME_1}) = false and isnumeric({IC_LOC_HIST.BIN_NAME_1}) = false and then "Error - Should be a Number!"
    else
    if isnumeric({IC_LOC_HIST.BIN_NAME_1}) = true and tonumber({IC_LOC_HIST.BIN_NAME_1})<1 then {IC_LOC_HIST.BIN_NAME_1})

  • AutoPopulating a field with a string plus value from another field

    Hi: I have a table with two fields
    create table LINKREQUEST (
    requestid int primary key,
    INCIDENT_NUMBER varchar2(16),
    REQUESTID is auto populated using a sequence. I want to auto populate the INCIDENT field with the string "INC" plus the value from REQUESTID. Can someone help.
    TIA
    Ravi

    REQUESTID is auto populated using a sequence. I want to auto populate the INCIDENT field with the string "INC" plus the value from REQUESTIDSomething like this?:
    SQL> create table linkrequest (
    requestid int primary key,
    incident_number varchar2(16)
    Table created.
    SQL> create sequence linkrequest_seq
    Sequence created.
    SQL> create or replace trigger linkrequest_trg before insert on linkrequest
    for each row
    begin
    select linkrequest_seq.nextval,
            case when :new.incident_number = 'INC' then 'INC' || linkrequest_seq.nextval else :new.incident_number end
       into :new.requestid, :new.incident_number from dual;
    end;
    Trigger created.
    SQL> insert into  linkrequest (incident_number) values ('XY')
    1 row created.
    SQL> insert into  linkrequest (incident_number) values ('INC')
    1 row created.
    SQL> insert into  linkrequest (incident_number) values ('VW')
    1 row created.
    SQL> insert into  linkrequest (incident_number) values ('INC')
    1 row created.
    SQL> select * from linkrequest
    REQUESTID INCIDENT_NUMBER
             1 XY             
             2 INC2           
             3 VW             
             4 INC4           
    4 rows selected.

  • Can I enhance extract structure with standard field?

    Friends,
    Can I enhance the extract structure with standard field.
    Eg. If I want add(append) field PACKNO to Extraction structure MCVGIH. PACKNO is a field from standard table. So Can I do this and populate this without using abap code(customer exit) Should I give foreign key field also in the append stucture.
    Please help me
    Joe

    Hi Joe,
    mostly it works as A.H.P explained, because in the extractor they mostly do a move-corresponding of the fields. Sometimes they don't, specially for newer applications and extractors because the abap statement move-corresponding is on the list of obsolete statements. In that case you need to do some coding.
    So basically I would recommend to add the field, regenerate the datasource and check the result with rsa3.
    regards
    Siggi
    Message was edited by: Siegfried Szameitat

Maybe you are looking for

  • Radius and Internet sharing not compatible

    I have 2 MBPs connected to a Leopard Server via an AEBS. I want to connect a third ethernet device using internet sharing on one of the MBPs Couldn't get it to work unless I switched of RADIUS authentication and downgrade to WPA/WPA2 personal key. Wh

  • I am using my brothers computer i dont want to lose my ringtones how can i save them to this new library

    I am using my Brothers computer Mine is in Texas i am in Chicago when i synced my Iphone it eraesd my Ringtones Fortunately my Ipad still Has them how can i ad them to the Itunes library to restore my Phone i tried restore from Backup but that date d

  • Fast User Switching causing iMovie 09 to hang/freeze

    I recently purchased a new Unibody 2.4Ghz MacBook Pro 15.4" My wife uses it to process our home movies in iMovie '09. So I thought it would be swell to utilize Fast User Switching so she could do that with her account when the MacBook was free and wo

  • Manual Slideshow navigation question

    Hello illustrious experts! I couldn't find this addressed so her goes.. When add a slideshow, and set it to manual advance, & then when it's burned and played on a DVD player the navigation works fine. But if you play it on a computer you would autom

  • B/W video recording in N-93 with firmware version ...

    I have noticed the following after I upgraded to firware 20.0.058.in N-93 Do the following : Pick a low lighted area Start main camera Select Video mode Select Auto mode The display will show colours Now switch to night mode The display will turn to