Internal length ( dd03l-intlen ) of data element

Hi Experts,
I have created structure using data elements.
intlen  updated in table dd03l is double than Whatever length I defined for data elements.
e.g.
I defined custom data element ZDEPOT  of domain type WERKS of type char 4.
but it's length in table DD03L-INTLEN is 8 char.
Please let me know what is the connection of data element and DD03L-INTLEN
and how we can control it as per the length of domain.
Thanks,
Yogesh.

Hmm, everything I can find in table DD03L with the domain WERKS shows up with INTLEN of 4 and INTTYPE of C.  Our custom data elements and structures appear to all have INTLEN values that match our LENG values.  Have you saved and activated your custom data element and your structure?
- April King

Similar Messages

  • Table DD03L - Field Internal Length issue

    Our Basis team performed a system refresh from our Production ECC 6 server to our Sandbox server.
    Afterwards, we noticed an issue in table DD03L - this table holds the
    table & field definitions for the data dictionary objects.
    In DD03L, we found that the internal lengths (field INTLEN) of all of
    our fields in table PA0001 had doubled from their original lengths. It
    seems that this issue is affecting table PA00001 only - For example, Field ABKRS shows an INTLEN = 4 while in Production INTLEN = 2.
    However, when we view PA0001 in SE11, all of the field attributes look
    normal.
    Anyone run into anything similar to this? This may be more of a Basis
    question, though.
    Thanks alot,
    robert.

    i'm suspicious that it does have something to do with Unicode - but when we implemented last year, all of our boxes were converted to Unicode compliant.

  • Changing Field Label length for Data Element using ABAP code.

    Hi Experts,
    We have a scenario where we have to update the maximum length of the various Field Labels (Short, Medium, Long..) for a Data Element using ABAP code.
    Does anyone know how to do this ? Is there a Function Module available for this purpose ?
    Appreciate your valuable inputs.

    Hi ,
    Use the view
    DD03M
    Give
    TABNAME as table name,
    DDLANGUAGE = EN / sy-langu
    and order by position. (for correct sequencing)
    You will get description of the fields (short,medium, long etc). You will also get the length and other details.

  • Data element length modification

    Hi friends,
    We are working on a requirement that requires a change to an existing data element/field.
    This field has been used in various tables/structures/programs and FM's. Essentially, Change to this field requires us to modify lot of programs.
    I am just wondering if there are any alternative approaches. Need your help to evaluate.
    1. The change required is to increase a length of the field to accommodate higher numbers.
    2. Instead of modifying all programs, Are there any alternative approaches?
    Thank you
    Kris

    Make sure to take the following precautions before doing any change
    1. Apply the where use list of that table/ Field and check whether it has been used in some program and FM or not. If yes then check one more thing that check the TYPE of another variables on which system has populating data (move, write or in FM parameters). if you will not consider this then you can land you in big trouble. (Conversion dump)
    2. Ask the basis to take a dump of the production, quality and data for the safer side if something does not go right.
    Now, you can do the changes in your development system and then adjust the database and see the impact of it.
    Hopefully, you will not come across any difficult situation in this changes.

  • Data Element Sales Org in CRM and ECC differ in length...

    Hi Experts,
    The standard data element for Sales Org in ECC and CRM differ in Length.
    Similarly the Purchasing Org.
    I need to export the Sales Org from CRM to ECC. But there is an error due to the length mismatch.
    Why is there this difference? How can my requirement be met ?
    Any ideas/pointers would be of great help.
    Points Assured.
    Thanks in Advance.
    Arun.

    use offset like vbeln+0(5).

  • Data element-reward point guranteed

    Hi all,
             i am in a peculiar problem.I have to go through a hell lots (50+) of ztable and find the domian used and corresponding data element.
    going thorugh SE11 and finding the things are going to take lots of time.
    i have a report program , sending it to you, it displays details of info of listed table.
    just run the report.
    but the thing is , it rerieves the data type, instead of data element and domain.
    somehow if i get those two things(domian & data element instead of data type of each field) , my work will be easier.
    i will simply run this report and download the content of the priniting internal table int an excel ****.
    can you just do some modification in this report to print DATA ELEMENT AND DOMAINS OF RESPECTIVE.
    here it is ,
    REPORT ZANID_TEST message-id zz NO STANDARD PAGE HEADING
           LINE-SIZE 178 LINE-COUNT 65.
    TABLES: DD03L, DD04T, DD02T, DD02L.
    SELECT-OPTIONS: TABNAME FOR DD02L-TABNAME.
    *SELTEXT E  'SAP Table Name(s)'
    DATA: BEGIN OF TAB OCCURS 500,
         TABNAME LIKE DD03L-TABNAME,
         POSITION LIKE DD03L-POSITION,
         FIELDNAME LIKE DD03L-FIELDNAME,
         STXT LIKE DD04T-DDTEXT,
         KEYFLAG LIKE DD03L-KEYFLAG,
         DATATYPE LIKE DD03L-DATATYPE,
         LENG     LIKE DD03L-LENG,
         DECIMALS LIKE DD03L-DECIMALS,
         CHECKTABLE LIKE DD03L-CHECKTABLE,
         REFTABLE LIKE DD03L-REFTABLE,
         REFFIELD LIKE DD03L-REFFIELD,
         END OF TAB.
    DATA: LINE-COUNT TYPE I.
    SELECT * FROM DD03L WHERE TABNAME IN TABNAME.
      MOVE-CORRESPONDING DD03L TO TAB.
      IF TAB-FIELDNAME CS '.inc'.
      ELSE.
        SELECT * FROM DD04T WHERE ROLLNAME   = DD03L-ROLLNAME
                              AND DDLANGUAGE = SYST-LANGU
                              AND AS4LOCAL   = 'A'.
        ENDSELECT.
        IF SYST-SUBRC = 0.
          TAB-STXT = DD04T-DDTEXT.
        ENDIF.
        APPEND TAB.
      ENDIF.
    ENDSELECT.
    DESCRIBE TABLE TAB LINES LINE-COUNT.
    IF LINE-COUNT EQ 0.
      MESSAGE E009 WITH 'Table Not Found'.
    ENDIF.
    SORT TAB BY TABNAME POSITION.
    LOOP AT TAB.
      ON CHANGE OF TAB-TABNAME.
        NEW-PAGE.                          "Page Break for New Table
      ENDON.
      WRITE: /  TAB-FIELDNAME, 20 TAB-STXT,
               81 TAB-KEYFLAG,  85 TAB-DATATYPE,
               90 TAB-LENG, 100 TAB-DECIMALS,
               110 TAB-CHECKTABLE,
               121 TAB-REFTABLE,
               132 TAB-REFFIELD.
    ENDLOOP.
    TOP-OF-PAGE.
      FORMAT INTENSIFIED OFF.
      WRITE: /  SY-REPID,
               'Run by', SY-UNAME(8), 'on', SY-DATUM, SY-UZEIT,
               'System', SY-SYSID(4), 'Client', SY-MANDT.
      WRITE: / SY-TITLE CENTERED.
      FORMAT INTENSIFIED ON.
    *include zconinc3.
    FORMAT INTENSIFIED OFF.
    CLEAR DD02T.
    SELECT * FROM DD02T WHERE TABNAME EQ TAB-TABNAME
                          AND DDLANGUAGE EQ SYST-LANGU
                          AND AS4LOCAL   EQ 'A'.
    ENDSELECT.
    CLEAR DD02L.
    SELECT * FROM DD02L WHERE TABNAME EQ TAB-TABNAME
                          AND AS4LOCAL   EQ 'A'.
    ENDSELECT.
    WRITE: / 'Table Name   ', TAB-TABNAME,
             'Type=', DD02L-TABCLASS,
              DD02T-DDTEXT.
    WRITE: /  'Field',       20 'Description',
             81 'Key',        75 'Type',
             90 'Length', 100 'Decimals',
             110 'Check Table',
             121 'REF Table',
             132 'REF Field'.
    FORMAT INTENSIFIED ON.

    Here you go:
    REPORT ZANID_TEST message-id zz NO STANDARD PAGE HEADING
    LINE-SIZE 255 LINE-COUNT 65.
    TABLES: DD03L, DD04T, DD02T, DD02L.
    SELECT-OPTIONS: TABNAME FOR DD02L-TABNAME.
    *SELTEXT E 'SAP Table Name(s)'
    DATA: BEGIN OF TAB OCCURS 500,
      TABNAME LIKE DD03L-TABNAME,
      POSITION LIKE DD03L-POSITION,
      FIELDNAME LIKE DD03L-FIELDNAME,
      STXT LIKE DD04T-DDTEXT,
      KEYFLAG LIKE DD03L-KEYFLAG,
      DATATYPE LIKE DD03L-DATATYPE,
      LENG LIKE DD03L-LENG,
      DECIMALS LIKE DD03L-DECIMALS,
      CHECKTABLE LIKE DD03L-CHECKTABLE,
      REFTABLE LIKE DD03L-REFTABLE,
      REFFIELD LIKE DD03L-REFFIELD,
      rollname like dd03l-rollname,
      domname like dd04l-domname,
    END OF TAB.
    DATA: LINE-COUNT TYPE I.
    SELECT * FROM DD03L WHERE TABNAME IN TABNAME.
      MOVE-CORRESPONDING DD03L TO TAB.
      select single domname from dd04l into tab-domname
        where rollname = dd03l-rollname.
      IF TAB-FIELDNAME CS '.inc'.
      ELSE.
        SELECT * FROM DD04T WHERE ROLLNAME = DD03L-ROLLNAME
        AND DDLANGUAGE = SYST-LANGU
        AND AS4LOCAL = 'A'.
        ENDSELECT.
        IF SYST-SUBRC = 0.
          TAB-STXT = DD04T-DDTEXT.
        ENDIF.
        APPEND TAB.
      ENDIF.
    ENDSELECT.
    DESCRIBE TABLE TAB LINES LINE-COUNT.
    IF LINE-COUNT EQ 0.
      MESSAGE E009 WITH 'Table Not Found'.
    ENDIF.
    SORT TAB BY TABNAME POSITION.
    LOOP AT TAB.
      ON CHANGE OF TAB-TABNAME.
        NEW-PAGE. "Page Break for New Table
      ENDON.
      WRITE: / TAB-FIELDNAME, 20 TAB-STXT,
      81 TAB-KEYFLAG, 85 TAB-DATATYPE,
      90 TAB-LENG, 100 TAB-DECIMALS,
      110 TAB-CHECKTABLE,
      tab-rollname,
      tab-domname.
    ENDLOOP.
    TOP-OF-PAGE.
      FORMAT INTENSIFIED OFF.
      WRITE: / SY-REPID,
      'Run by', SY-UNAME(8), 'on', SY-DATUM, SY-UZEIT,
      'System', SY-SYSID(4), 'Client', SY-MANDT.
      WRITE: / SY-TITLE CENTERED.
      FORMAT INTENSIFIED ON.
    *include zconinc3.
      FORMAT INTENSIFIED OFF.
      CLEAR DD02T.
      SELECT * FROM DD02T WHERE TABNAME EQ TAB-TABNAME
      AND DDLANGUAGE EQ SYST-LANGU
      AND AS4LOCAL EQ 'A'.
      ENDSELECT.
      CLEAR DD02L.
      SELECT * FROM DD02L WHERE TABNAME EQ TAB-TABNAME
      AND AS4LOCAL EQ 'A'.
      ENDSELECT.
      WRITE: / 'Table Name ', TAB-TABNAME,
      'Type=', DD02L-TABCLASS,
      DD02T-DDTEXT.
      WRITE: / 'Field', 20 'Description',
      81 'Key', 75 'Type',
      90 'Length', 100 'Decimals',
      110 'Check Table',
      141 'Data Element',
      172 'Domain'.
      FORMAT INTENSIFIED ON.
    Message was edited by: Erik Verbeeck

  • Strange behaviour of data element  object

    Dear Gurus,
    I have incremented the field length of a z table's field from 5 (type DEC)  to 8 by increasing the corresponding domain length . But the internal tables that refer to this field still refer to the old value 5, though the table is accepting values for this field with 8 length through 'Create Entries' in SE11.
    The problem seems to be in the runtime object of the corresponding data element which shows
    database length = 5 
    abap length = 5
    BUT dictionary length = 8.
    Could anyone pls help diagnose this strange behaviour as even if I create new domains with new data elements for this table field ,it gives the SAME RUNTIME OBJECT STATUS as mentioned above.
    Rewards are awaiting the right answer.
    Thanks in advance.
    Shweta.

    Hi,
    For these kind of problems, you can use the Database utility tool (SE14), give the table name press enter, click Adjust and Activate Database table also select save data radiobutton. After this Re-Run the Program, it works fine, also cross-check in the Debugging screen.
    Cheers...
    Santosh.
    Mark Usefull Answers.

  • What is conversion routine which is found in data element

    Hi all,
    I was just trying to creating a data element assigned to a particular domain in se11. While i am creating i can see a conversion routine
    Can anyone tell me what is the use of that conversion routine with an example.
    thanxs in advance
    hari

    Hi,
    Depending on the data type of the field, there is a conversion when the contents of a screen field are converted from display format to SAP-internal format and vice versa. If this standard conversion is not suitable, it can be overridden by defining a conversion routine in the underlying domain.
    Conversion routines are identified by a five-place name and are stored as a group of two function modules. The function modules have a fixed naming convention. The following function modules are assigned to conversion routine xxxxx:
    CONVERSION_EXIT_xxxxx_INPUT
    CONVERSION_EXIT_xxxxx_OUTPUT
    The INPUT module converts from display format to internal format, and the OUTPUT module converts from internal format to display format.
    When is a Conversion Routine Executed?
    If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically when entries are saved in this screen field or when values are displayed in this screen field. The conversion routine of the domain is also triggered when the field contents are output with the WRITE statement.
    Table SPFLI in the  flight model contains information about the flights offered by the carriers. The time for each flight is recorded in field FLTIME. Enter and display the time of the flight in input templates in the form HHH:MM (hours:minutes). Store the flight time entered in the database as an integer number (number of minutes of the flight). An entry 3:27 is therefore stored in the database as 207 (3 hours, 27 minutes = 207 minutes).
    Field FLTIME refers to domain S_DURA, to which conversion routine SDURA is assigned. The value is thus converted by the two function modules <b>CONVERSION_EXIT_SDURA_INPUT</b> and <b>CONVERSION_EXIT_SDURA_OUTPUT</b>.
    A conversion routine can also be triggered by specifying its five-place name in the attributes of a field in the Screen Painter or with the addition <b>USING EDIT MASK <Name of conversion routine></b> in the WRITE command in the program. With the USING NO EDIT MASK addition in the WRITE statement, you can skip a conversion routine defined for a domain when outputting.
    Parameters
    The two function modules of a conversion routine must have precisely two parameters with the names INPUT and OUTPUT for the value to be converted and the converted value.
    The INPUT parameter in the INPUT conversion and the OUTPUT parameter in the OUTPUT conversion should not have any reference fields because the value passed in the call could have a different length than that expected.
    Programming Conversion Routines
    ABAP statements that result in an interruption of processing (such as CALL SCREEN, CALL DIALOG, CALL TRANSACTION, SUBMIT, COMMIT WORK, ROLLBACK WORK, MESSAGE I, MESSAGE W) are not allowed in conversion routines.
    Only A messages are meaningful in output conversion, but A, E and S messages can be triggered in input conversion (although S messages are not very meaningful here). E messages result in an error dialog. Exceptions are not intercepted in the call.
    The output conversion is also triggered with WRITE and WRITE TO. The conversion routine may therefore occur very frequently with lists. The output conversion should therefore be programmed as efficiently as possible.
    No external performs should be used in conversion routines. Programs that are called externally use the table work areas of the first calling main program. In conversion routines this can result in errors that cannot be easily analyzed since they are sometimes called at unpredictable times in the program flow.
    <b>Pls refer link which contains code as an example to conversion routine used in abap</b>.
    <a href="http://www.bwexpertonline.com/downloads/source_code.doc">http://www.bwexpertonline.com/downloads/source_code.doc</a>
    Pls reward points.
    Regards,
    Ameet

  • How to create Data Element TPLNR

    Hello
    I want to use TPLNR to create data element in Operating Concern but I am not able to because of length of TPLNR (30) in Operating Concern we can create data element only upto 18 char. If i want to create new data element YTPLNR.
    I did following steps
    1. SE11
    2. Data Element
    3. and settings of particular data element what ever is required.
    My question is how can I use YTPLNR as characteristic as same value of TPLNR. I want all data that is available in TPLNR. I am creating new element because of data length issue.
    Table: IFLOT has data element TPLNR. I want all information of TPLNR in YTPLNR how it is possible to use that info in that.
    I tried to create user defined characteristics for operating concern
    i want to use with reference to existing value option in user define
    How can I do that
    thank you

    Hi,
    just a small addition for the Binary Search: The table must be sorted by the field(s) you are looking for:
    Symbolic code:
    read table <itab> with key <field> = <value> binary search.
    will take a record in the middle of the internal table first. If <field> < <value> the next try will be in the middle of the first half and the same procedure is repeated until the searched record is found or not found.
    If the table is not sorted correctly, you will probably miss the matching records.
    The fastest way is to use HASHED tables with unique key. The binary search will take more time when the table grows; hashed table access is (nearly) stable.
    Regards,
    Clemens

  • Data element change

    Hi
    I have created a custom table and created a data elemnent of type NUMC.
    It has reached production . The table entries are created in production.
    Now the users want to change the data element to char.
    if the data element is changed from numc to char and released to production ,w ill the existing entries will be deleted ??
    reg
    Ramya

    Hi Ramya S  ,
    You have created a data element of type NUMC, which means some field in ur table has data type NUMC right? And now users want it to be CHAR right?
    Well definitely this field must be used in some program right?
    You have 2 ways :
    1)  You can change the data element, the entries won't get deleted. But yes slight change in format will take place, like preceding zeros will be seen in character format as per the length on the field defined...well thats because different data types have their own features.
    2)  Another way is keep the data element same as NUMC.
    and you can change the data type of the field which you are using, in the code itself.
    For Example : You have a field value a of type numc defined in table.
    when defining internal table to use this field...u will as usual define it and it wud be in NUMC datatype.
    then you can declare another variable b of type char of specific length and then assign a to b.
    E.g.:
    Table : EMPLOYEE
    Field  :EMPLOYEE_NO                
    Data Element  : ZEMP_NO
    Data Type : NUMC
    In Code :
    Declaring Internal Table ***
    Data : Begin of itab,
                 employee_no  TYPE employee-zemployee_no,
              End of itab.
    Variable of type CHAR ***
    Data : employee_no_new(10) TYPE c.
    Assigning old value to new variable ***
    employee_no_new  = itab-employee_no.
    now all the values will have properties of data type CHAR. You can even send it to production...won't give any problems...
    I have just given an example...you can try this for the feld you have created. Hope this helps you.
    If any more doubts, do revert
    Regards,
    Radhika
    Edited by: RadhikaS on Mar 25, 2009 6:18 PM

  • Change in data element

    dear all ,
    I have changed my data element of a field in a  table , previously that was N 5 length , now i have changed to P decimal 3 ..if i move this to qas server , this table already in qas with datas,, when i try to moving that to qas i cannot move the request to qas but i can see the changes in table i mean data element changed to P in qas , but when i try to see contents in se11 , i am getting TABLE IS NOT FOUND IN DATABASE , and i tried to adjust thro SE14 , ther was error log and i tried to  unlock the table but it showing 'data will be lost ' . what should i do to rectify that .
    Thanks

    Hi peter,
    what do you mean. Possible to upload stuff via excel? If so here is a link
    http://wiki.scn.sap.com/wiki/display/ABAP/ABAP+code+snippet+to+upload+Excel+file+into+an+internal+table+and+display+it+in+alv+format
    But I'm pretty sure you know that...I think I just do not got the question
    ~Florian

  • Data Element Doubt

    Generally we will specify three types of descriptions(Long,Meduim,Short) in the data element along with the data element description.
    1. In which cases those three types of texts are used ?
    2. I think the description of data element comes to the field description in the table .... Right ?

    hi manjunath,
    the reson for specifying 3 texts are that
    1) used in screen elements based on DATA element.
        there is something called program parameter OR
        Dictionary parameter
        when you take dictionary parameter based on the screen field size the appropriate text is shown on the screen - i.e either in push buttons or other elements
    2) in ALV you may build a field catalog manually where in the output columns should have a text.
    for this you can either doctionary texts(S,M,L) so then the Texts maintained against the Data element are shown in output.
    OR when you use the FIELDCATALOG MERGE Function Module to create your Field Catalog based a structure or Internal table then the Column Texts are displayed based on the user interaction on the output columns.
    Second Question - Yes the Description you write for a  Data Element will be Used as you Field Description as you know that whenver a FIELD in a table is created you can specify the length of the field either through Predefined Direct Types or Trhough Data Elements.
    When you define thorugh DATA elements the Data Elements Description is taken as Field Description
    ELSE
    When you take Direct Type then you need to also Manually Write the Field Description.
    Hope this clarifies what you have been looking for.
    Encuorage others to answer your queries by suitably rewarding them.
    Thanks
    Venugopal

  • What is domain and dataelement.....diff b/w domain and data element

    dear all
    what is domain?
    what is data element?
    In one domain how many data elements are possible to used?
    with out data element how can u create a table? explain briefly.

    To clarify it little further the Data element and Domains are used in combination where similiar type of data fields are to be used with some more additional characteristics to each Data element.
    For example consider creating a table which contains Employee details. The Columns Name1 and Name2 are to be of type char and length 40. There are 2 ways to do this,
    1. You can assign the fields Name1 and Name2 directly to CHAR40(as the data element) in SE11. But this will make both the fields to have same characteristics with no difference among them.
    2. The other way is to assign the columns Name1 and Name2 to seperate Data elements say DE_NAME1 and DE_NAME2. This method has tha advantage of adding further charectristics and labels to the data element. Hence in this case you can add a label "Name1" for the data element DE_NAME1 and "Name2" for data element DE_NAME2. And both these data element will point to the same domain CHAR40, hence length and type is same.
    Hope this helps.
    Thanks,
    Prasath N

  • How to populate internal table field with text data?

    Hello Experts,
    I was able to load text file to a internal table but data is not populating each field. Can someone help me how to populate each field of internal table from text file?
    Here is the text file:
    io_name, io_type, io_txsht, io_txlng, io_datatype, io_length
    ZEA_IO1, CHA, IO Test,     IO Test 1, CHAR,       20
    ZEA_IO2, CHA, IO Test,     IO Test 2, CHAR,       20
    Here is the Code:
    *& Report  ZAS_BAPI_TEST                                               *
    *& InfoObject Creation through BAPI.
    *& Read the Text file, call a BAPI to create InfoObjects.              *
    *& Text file will hold the Info Object Structure. Text file will be    *
    *& located either work station or local PC.
    *& Step 1. Create internal table to hold InfoObject structure          *
    *& Step 2. Retrieve/Load text file into Internal Table structure       *
    *& Step 3. Call BAPI Function to Create IO                             *
    *& Step 4. Call BAPI Function to Activate IO                           *
    REPORT  ZAS_BAPI_TEST                           .
    Make data separator a comma
    CONSTANTS: gc_tab TYPE c VALUE ','.
          Declaring Internal table for creating InfoObject
    DATA: p_file TYPE string.
    DATA: BEGIN OF itab-bapi OCCURS 0,
            io_name like BAPI6108-infoobject,
            io_type like BAPI6108-type,
            io_txsht like BAPI6108-textshort,
            io_txlng like BAPI6108-textlong,
            io_datatype like BAPI6108-datatp,
            io_length like BAPI6108-intlen,
          END OF itab-bapi.
    DATA ibapi LIKE STANDARD TABLE OF itab-bapi.
    PARAMETERS: sel_file(1500) TYPE c default ' ' OBLIGATORY LOWER CASE.
          PUT THE TEXT FILE PATH TO P_FILE
    p_file = sel_file.
         Copy the file from the workstation to the server        ****
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                = p_file
                   FILETYPE                = 'ASC'
                   HAS_FIELD_SEPARATOR     = SPACE
                   HEADER_LENGTH           = 0
                   DAT_MODE                = SPACE
                   CODEPAGE                = SPACE
                   IGNORE_CERR             = ABAP_TRUE
                   REPLACEMENT             = '#'
                   READ_BY_LINE            = 'X'
                 IMPORTING
                   FILELENGTH              =
                   HEADER                  =
      TABLES
        data_tab                = itab-bapi[]
      EXCEPTIONS
        file_open_error         = 1
        file_read_error         = 2
        no_batch                = 3
        gui_refuse_filetransfer = 4
        invalid_type            = 5
        no_authority            = 6
        unknown_error           = 7
        bad_data_format         = 8
        header_not_allowed      = 9
        separator_not_allowed   = 10
        header_too_long         = 11
        unknown_dp_error        = 12
        access_denied           = 13
        dp_out_of_memory        = 14
        disk_full               = 15
        dp_timeout              = 16
        not_supported_by_gui    = 17
        error_no_gui            = 18
        OTHERS                  = 19.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      MESSAGE e012(zea_spms) WITH 'Method' 'GUI_UPLOAD' sy-subrc.
      &1 &2 issued return code &3
       ELSE.
         pit_data[] = lit_data[].
       ENDIF.
    ENDIF.
    loop at itab-bapi.
      write: /5 itab-bapi-io_name,
               20 itab-bapi-io_type,
               30 itab-bapi-io_txsht,
               50 itab-bapi-io_txlng,
               75 itab-bapi-io_datatype,
               85 itab-bapi-io_length.
    endloop.
          SELECT THE LOCATION FOR TEXT FILE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_file.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_filename     = ''
          def_path         = 'C:\'
          mask             = ',Documentos de texto (*.txt), *.txt.'
          mode             = ''
        IMPORTING
          filename         = p_file
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
      find '.txt' IN p_file.
      if sy-subrc <> 0.
        concatenate p_file '.txt' into sel_file.
      else.
        sel_file = p_file.
      endif.
          Create InfoObject through BAPI Function
    *CALL FUNCTION 'BAPI_IOBJ_CREATE'.
    *IMPORTING
        VALUE(DETAILS) LIKE  BAPI6108 STRUCTURE  BAPI6108
    *EXPORTING
        VALUE(INFOOBJECT) LIKE  BAPI6108-INFOOBJECT
        VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
    TABLES
         COMPOUNDS STRUCTURE  BAPI6108CM OPTIONAL
         ATTRIBUTES STRUCTURE  BAPI6108AT OPTIONAL
         NAVIGATIONATTRIBUTES STRUCTURE  BAPI6108AN OPTIONAL
         ATRNAVINFOPROVIDER STRUCTURE  BAPI6108NP OPTIONAL
         HIERARCHYCHARACTERISTICS STRUCTURE  BAPI6108HC OPTIONAL
         ELIMINATION STRUCTURE  BAPI6108IE OPTIONAL
         RETURNTABLE STRUCTURE  BAPIRET2 OPTIONAL
          Activate InfoObject through BAPI Function
    CALL FUNCTION 'BAPI_IOBJ_ACTIVATE_MULTIPLE'
    *ENDFORM.                    " RETRIEVE_DATASET
    I appreciate your help.
    Regards,
    Mau

    I have used tab delimited file.
    Here are file contents
    io_name     io_type     io_txsht     io_txlng     io_datatype     io_length
    ZEA_IO1     CHA     IO Test     IO Test 1     CHAR     20
    ZEA_IO2     CHA     IO Test     IO Test 2     CHAR     20
    And here is program used
    *& Report ZAS_BAPI_TEST *
    *& InfoObject Creation through BAPI.
    *& Read the Text file, call a BAPI to create InfoObjects. *
    *& Text file will hold the Info Object Structure. Text file will be *
    *& located either work station or local PC.
    *& Step 1. Create internal table to hold InfoObject structure *
    *& Step 2. Retrieve/Load text file into Internal Table structure *
    *& Step 3. Call BAPI Function to Create IO *
    *& Step 4. Call BAPI Function to Activate IO *
    REPORT ZAS_BAPI_TEST .
    Make data separator a comma
    CONSTANTS: gc_tab TYPE c VALUE ','.
    Declaring Internal table for creating InfoObject
    DATA: p_file TYPE string.
    DATA: BEGIN OF itab-bapi OCCURS 0,
    io_name like BAPI6108-infoobject,
    io_type like BAPI6108-type,
    io_txsht like BAPI6108-textshort,
    io_txlng like BAPI6108-textlong,
    io_datatype like BAPI6108-datatp,
    io_length like BAPI6108-intlen,
    END OF itab-bapi.
    DATA ibapi LIKE STANDARD TABLE OF itab-bapi.
    PARAMETERS: sel_file(1500) TYPE c default ' ' OBLIGATORY LOWER CASE.
    PUT THE TEXT FILE PATH TO P_FILE
    p_file = sel_file.
    Copy the file from the workstation to the server ****
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = p_file
    <b>FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'</b>
    TABLES
    data_tab = itab-bapi[]
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    not_supported_by_gui = 17
    error_no_gui = 18
    OTHERS = 19.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    MESSAGE e012(zea_spms) WITH 'Method' 'GUI_UPLOAD' sy-subrc.
    &1 &2 issued return code &3
    ELSE.
    pit_data[] = lit_data[].
    ENDIF.
    ENDIF.
    loop at itab-bapi.
    write: /5 itab-bapi-io_name,
    20 itab-bapi-io_type,
    30 itab-bapi-io_txsht,
    50 itab-bapi-io_txlng,
    75 itab-bapi-io_datatype,
    85 itab-bapi-io_length.
    endloop.
    SELECT THE LOCATION FOR TEXT FILE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_file.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    def_filename = ''
    def_path = 'C:\'
    mask = ',Documentos de texto (*.txt), *.txt.'
    mode = ''
    IMPORTING
    filename = p_file
    EXCEPTIONS
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    OTHERS = 5.
    find '.txt' IN p_file.
    if sy-subrc <> 0.
    concatenate p_file '.txt' into sel_file.
    else.
    sel_file = p_file.
    endif.
    Create InfoObject through BAPI Function
    *CALL FUNCTION 'BAPI_IOBJ_CREATE'.
    *IMPORTING
    VALUE(DETAILS) LIKE BAPI6108 STRUCTURE BAPI6108
    *EXPORTING
    VALUE(INFOOBJECT) LIKE BAPI6108-INFOOBJECT
    VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
    TABLES
    COMPOUNDS STRUCTURE BAPI6108CM OPTIONAL
    ATTRIBUTES STRUCTURE BAPI6108AT OPTIONAL
    NAVIGATIONATTRIBUTES STRUCTURE BAPI6108AN OPTIONAL
    ATRNAVINFOPROVIDER STRUCTURE BAPI6108NP OPTIONAL
    HIERARCHYCHARACTERISTICS STRUCTURE BAPI6108HC OPTIONAL
    ELIMINATION STRUCTURE BAPI6108IE OPTIONAL
    RETURNTABLE STRUCTURE BAPIRET2 OPTIONAL
    Activate InfoObject through BAPI Function
    CALL FUNCTION 'BAPI_IOBJ_ACTIVATE_MULTIPLE'
    *ENDFORM. " RETRIEVE_DATASET
    This program is working fine. You can test it.
    Only problem is as the column headings are big for some columns, they are getting truncated which you can always change by changing the column width in declaration
    Please let me know if this helps.
    ashish

  • A problem when using a data element in BAPI

    Hi there,
    I build a function module, and want to use it as a BAPI. But when I add the function module as a method of a BAPI object, it gives me the following error: data type xxxxx cannot be used for methods.
    I guess the problem happens because of the type of data element I used for the input parameter of the function module. Thus I tried many other data elements, but I keep getting the same error. I am really out of the game. Could anyone tell me which data element I should use for the input parameter of the function module? The function module has only one input parameter, which should be a string with length less than 100.
    Thank you so much!!
    Sincerely,
    Bing

    The function module has only one input parameter, which should be a string with length less than 256. (I tried many predefined data element like RPLM_STRING, but when I tried to add the function module as a method of BAPI, the SAP always gave me the error: data type xxxxx cannot be used for methods)
    It only has one output parameter: RETURN (associated type: BAPIRETURN)
    I am really not familiar with ABAP program, let alone BAPIs. Any suggestions would be very helpful to me. I sincerely appreciate your help.
    Bing

Maybe you are looking for

  • SOLAR02 - User exit\customization for team members.

    Hi All, In transaction SOLAR02, I want to send mail to a team member every time the project status is changed and also when I add the team member itself. Is there any standard way to do it or do I need to implement a BADI\user exit? And if I need a u

  • How to analyze errors in GP?

    Hi All, I am working on getting a GP running. Unfortunately, I get the following error when executing the GP: "Cannot complete action: Activity could not be read" What is an 'Activity' and where can I view more information about the error? There must

  • My iPod crashed and now it won't download anything

    I left my 20G iPod to download all of my music when I went to bed, and when I woke up both it and my computer were frozen. Since then everytime I plug it in it only downloads about 100 to 200 songs and then freezes up again. I've restarted and restor

  • Why the flashback log'size smaller than the archived log ?

    hi, all . why the flashback log'size smaller than the archived log ?

  • 10.4.9 and hard drives - safe to update ?

    I have 2 external LaCie hard drives - is it considered safe to update to 10.4.9 at this time - I have seen threads concerning hard drives not mounting after updating