Issue with field separator in GUI_UPLOAD

Hello Gurus
I am facing issue with gui_upload. I have a text file in which the fields are eparated by single Pipe  i.e |. Now when I try to read the data from file in internal table even with using field separator it does not insert data in proper fields.
DATA: BEGIN OF IT_TAB OCCURS 0,
      OBJECT_ID type string,
      VERSION_SERIES_ID TYPE string,
      VERSION_NUMBER TYPE string,
      REVISION TYPE string,
      DOC_NUMBER TYPE string,
      DOCTITLE TYPE string,
      FILESIZE TYPE string,
      MIME_TYPE TYPE string,
      PLANTUNIT TYPE string,
      END OF IT_TAB.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = w_mpath
    FILETYPE                      = 'ASC'
    HAS_FIELD_SEPARATOR           = '|'
  HEADER_LENGTH                 = 0
   READ_BY_LINE                  = 'X'
  DAT_MODE                      = ' '
  CODEPAGE                      = ' '
  IGNORE_CERR                   = ABAP_TRUE
  REPLACEMENT                   = '#'
  CHECK_BOM                     = ' '
  VIRUS_SCAN_PROFILE            =
  NO_AUTH_CHECK                 = ' '
IMPORTING
  FILELENGTH                    =
  HEADER                        =
  TABLES
    DATA_TAB                      = it_tab[]
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
   OTHERS                        = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I want the data to get appended in internal table based on | separator.
Please help.
Regards,
Rajesh.

Hi,
I believe the field separator parameter will work for Excel files..You have to get the internal table in a string format..and then use split statement..
check this example..
DATA: BEGIN OF it_tab OCCURS 0,
       object_id TYPE string,
       version_series_id TYPE string,
       version_number TYPE string,
       revision TYPE string,
       doc_number TYPE string,
       doctitle TYPE string,
       filesize TYPE string,
       mime_type TYPE string,
       plantunit TYPE string,
     END OF it_tab.
DATA: t_tab   TYPE TABLE OF string,
      v_string TYPE string.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename                = 'C:\TEST.TXT'
*    has_field_separator     = '|'          "Actually not required.
  TABLES
    data_tab                = t_tab
  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
    OTHERS                  = 17.
IF sy-subrc <> 0.
ENDIF.
LOOP AT t_tab INTO v_string.
  SPLIT v_string AT ','
        INTO
        it_tab-object_id
        it_tab-version_series_id
        it_tab-version_number
        it_tab-revision
        it_tab-doc_number
        it_tab-doctitle
        it_tab-filesize
        it_tab-mime_type
        it_tab-plantunit.
  APPEND it_tab.
  CLEAR: it_tab.
ENDLOOP.
Thanks
Naren
Edited by: Narendran Muthukumaran on Oct 15, 2008 4:58 PM

Similar Messages

  • XML and binary with field separator stock quote

    Hi All,
    I'm doing a comparison of data transmission between XML and binary with field separator.
    Example of XML
    <nasdaq>
    <high>100.00</high>
    <low>90.00</low>
    </nasdaq>
    Example of binary with field separator
    100.00|90.00
    Of course, using XML will consume of much resources and processing power but with easier maintenance and development.
    I'm doing some data feed with high transaction like Nasdaq, NYSE, etc. How you think about it...?
    Any web site does the comparison of the above? I have googled but not much information found.
    Cheers,
    Wikey

    XML is, of course, more flexible. For B2B transactions you should >>consider using gzip compression (avaiable in java.util.zip) if there's a >>fair bit of data in the message. That will reduced the effect of all the >>repetative XML furniture.yah, agreed but still not to a comfort level to proceed this technology. File size still big if compared to compressed non-XML data.
    Btw, I'm seeking for some efficient data feed product able to handle XML effectively and did some comparison with all other standard data formating mechanism of data transmission. Therefore, i can see the whole picture of it. Still trying my R&D luck on google...
    Cheers,

  • Field Separator in GUI_UPLOAD

    Hi,
         I need to upload a tab delimited excel file . I am using FM GUI_DOWNLOAD.What are Filetype and Field Separator.
    Regards,
    Divyanshu

    Hi Divyanshu,
    It may be better to use the class method to future proof your development (which incidentally calls GUI_UPLOAD anyway). Consider the following code:
      data: i_file type standard table of t_file.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = w_file
          has_field_separator     = 'X'      "Tab-delimited ASCII upload.
        changing
          data_tab                = i_file
        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.
    *   Error handling
      endif.
    Hope this helps.
    JB

  • Sender File Adapter - Problem with field separator

    Hi,
    I want to upload a CSV file into XI.
    The file contains a text part which uses from time to time quotation marks like this:
    SD,575757,383838,N/A,XYZ,"This is a text part",7676
    But besides there are lines like this:
    SD,575757,777722,N/A,XDE,FREETEXT,7575
    Has anyone any idea how to configure the file adapter to get it recognize the quotation marks not as field separator?
    I've already tried the enclosureSign parameters but that leads to an total unconverted line.
    Is it maybe possible to customize two field separators like this:
    Structure.fieldSeparator - ,"
    Thanks for any answer,
    Christina

    No, it doesn't work.
    I've specified now:
    Structure.fieldSeparator        ,
    Structure.enclosureSign         "
    Structure.enclosureSignEscape   ""
    Every line without quotation marks is converted fine. Lines with quotation marks stay like in the original CSV file and the whole line is put into one XML tag (still comma separated).
    Also the parameter fieldContentFormatting - nothing doesn't make a difference.
    Other ideas?

  • Issue with field symbol not assigned in SMQ2

    We are facing an issue with an error in SMQ2.
    The error is "field symbol not assigned". There is also short dump in ST22.
    I have read the previous forum threads and it talks about going into the debugger mode.
    However, which is the program to be debugged ?
    How do I navigate from SMQ2 to the ABAP program.
    Kindly let me know.
    Regards,
    Sanjay

    Hi Sanjay,
    You need to debug program RSTRFCM3. This is the program which drives SMQ2.
    However just check if there are any support pack upgrades to the program recently since this is a standard program.
    Regards
    Abhii

  • Txt formatting issues with fields in text object

    Post Author: David Goldman
    CA Forum: General
    Hi, complete newbie here.  I'm working on my company's estimating form.  I was requested to combine fields FCITY FSTATE and FZIP into one line that auto flows any given data.  So I used a Text object with field calls to FCITY FSTATE and FZIP.  This works very well, however my text is always formated to the way it was entered into the database.  ie. if some salesman enters his info with the capslock key on, it shows up in my text object that way, and not in my regular fields.  The regular fields are somehow formatting the text to cap the first letter of each word.  How can I configure my text object to do this? Thanks 

    Post Author: SKodidine
    CA Forum: General
    Format the fields prior to placing them in the text box.
    For example,
    propercase({table.last_name}) & ', ' & propercase({table.first_name}) & ' ' & propercase({table.middle_name});
    Then place the formula in a text box and then right click and check the box next to 'Suppress Embeded Field Blanks'.

  • ODI-HFM issue with decimal separator

    Hi all,
    We are extracting data from an HFM application A and loading into an HFM application B.
    Example:
    Data extracted from applicaiton A = 21.742.139,55
    Data loaded to application B (verified from Explore Data and Smart View) = 2.174.213.955,00
    Is data loading with ODI-HFM taking the regional settings?
    Any suggestions?
    If we extract data with HFM Client (logged on with the same user configured in HFM Data server) from application A and load it into application B, data is correct in application B.
    Current configuration is:
    - User preferences for HFM Application A
         * Decimal separator = ","
         * Thousands separator = "."
    - User preferences for HFM Application B
         * Decimal separator = ","
         * Thousands separator = "."
    - Regional settings of the server where the agent is running (English US)
         * Decimal separator = "."
         * Thousands separator = ","
    This setting is the same for all HFM application servers
    - ODI Datastore HFMDatastore
         * Decimal separator set to "," (this setting was changed to see if solved the issue)
    - ODI Datastore for staging table
         * Decimal separator set to "," (this setting was changed to see if solved the issue)
    - Language Settings for DB (American English)
    Thanks in advance!

    Hi Pls Use This
        For Decimal Separator other than . we need to Code to Convert , See This Code Below and Do the Code
    Private Function ReturnQty(ByVal Qty As String) As String
    Dim strQty As String
    Dim strSQL As String
    Dim strSeprtr As String
    Dim objRS As SAPbobsCOM.Recordset
    strSQL = "SELECT ThousSep FROM OADM"
    Set objRS = oSBC.oDICompany.GetBusinessObject(BoRecordset)
    objRS.DoQuery (strSQL)
    If Not objRS.EOF Then
            strSeprtr = objRS.Fields.Item("ThousSep").Value
    End If
    If strSeprtr = "," Then
    ReturnQty = Qty
    ElseIf strSeprtr = "'" And Len(Qty) <= 6 Then
    Qty = Replace(Qty, ",", ".")
    'Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    Qty = Qty
    ElseIf strSeprtr = "'" Then
    Qty = Replace(Qty, "'", "")
    'Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    Qty = Qty
    ElseIf strSeprtr = "." And Len(Qty) <= 6 Then
    Qty = Replace(Qty, ".", ",")
    Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    ElseIf strSeprtr = "." Then
    Qty = Replace(Qty, ".", "")
    Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    End If
    End Function
    Mohamed Zubair

  • Issues with thousand separator

    Hi all. can anyone help me. In my PDF form i create a numeric field. I set numeric format with these parameters:
    Decimal places = 0
    Separator style = 1,234.56
    Currency symbol none.
    but for all that feild displayed value as "1234.00". to remove zeros i add javascript for this field: this.getField('1').value=0+this.getField('1').value; Now it show like "1234". but I'm still looking for solution to show thousand separator. Please help

    It doesn't help. I forgot to say 1 detail. field works fine when I change value manualy in Acrobat, but I use web service to fill data in pdf (when it done the file becomes read-only). and when pdf is filled I don't see separator

  • Issue with field data type NUMBER(22,5) while updating field data.

    Hi,
    I have a field with data type NUMBER(22,5).
    While inserting or updating field data it should take 17 digit and after decimal point 5 digit total 22 digit.
    I set 22 for maximumLength property of messageTextInput field.
    While updating field I am getting following problems,
    1) I provide the value as 1234567890123456789012 (22 digit) and click apply button.
    then I got error message as
    Error
    मैकेनाइजड दो पहिया/तीन पहिया वाहन - Value 1234567890123460000000 exceeds the maximum allowed value (NUMERIC (22, 5))
    2)then I insert 12345678901234567.1234 (17 digit before decimal point and 4 digit after decimal point and it didn't accept 5 digit after decimal point) and click apply button.
    It insert the value as 12345678901234600 (value changed after Apply)
    The I tried with simple SQL insert statement to insert data and it successfully insert 12345678901234567.12345 value.
    Any item property I missed here to set?
    Please suggest.
    Thanks & Regards,
    Sagarika

    hi
    according to
    " then I insert 12345678901234567.1234 (17 digit before decimal point and 4 digit after decimal point and it didn't accept 5 digit after decimal point) and click apply button.
    It insert the value as 12345678901234600 (value changed after Apply)"
    this statement ,it seems that it is definitely applying round or somthing like that function in the code before inserting value in the table("try with select round(12345678901234567.1234 ) from dual u will get the same result = 123456789012345600 ") ,
    bcz u r able to insert the same directely into the table using insert statement so kindely have look on the code if something like this is not happening there.try to check code in related EOimpl class
    try to to use debugging mode ,and the 23 char problem is related to maximum lenghth of text box make it 23 it will get resolved and u will be able to enter 17 digits with 5 digits after decimal point
    thanx pratap

  • Issue with field value defaulted

    Hi,
    I am working on forms (ver 6i). In enter query mode, whenever I click on a DFF field, its context field is being populated randomly with a valid context. There are no events on DFF field at all nor on the block to trigger such behaviour. Any pointers as to what I am missing.
    TIA,
    Neeraja

    convert the form to .fmt file ( i am working on 10g not 6i). Search that .fmt (which is readable) in textpad or notepad for the instance of the field in which you say is getting populated. I believe that it will tell you if it is getting populated on a trigger, if you cannot, check the properties of that field and see if it has an initial value being set.

  • Big issue with decimal separator

    regional settings of machine where client & server reside are for european country (decimal separator is ",")
    sap b1 decimal separator is set also for ",".
    exception occurs when I set in code, for a edittexts' datasource of type SUM a decimal value using ",". If I set the value using "." it works. how the $%#$% is this possible?

    Hi Pls Use This
        For Decimal Separator other than . we need to Code to Convert , See This Code Below and Do the Code
    Private Function ReturnQty(ByVal Qty As String) As String
    Dim strQty As String
    Dim strSQL As String
    Dim strSeprtr As String
    Dim objRS As SAPbobsCOM.Recordset
    strSQL = "SELECT ThousSep FROM OADM"
    Set objRS = oSBC.oDICompany.GetBusinessObject(BoRecordset)
    objRS.DoQuery (strSQL)
    If Not objRS.EOF Then
            strSeprtr = objRS.Fields.Item("ThousSep").Value
    End If
    If strSeprtr = "," Then
    ReturnQty = Qty
    ElseIf strSeprtr = "'" And Len(Qty) <= 6 Then
    Qty = Replace(Qty, ",", ".")
    'Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    Qty = Qty
    ElseIf strSeprtr = "'" Then
    Qty = Replace(Qty, "'", "")
    'Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    Qty = Qty
    ElseIf strSeprtr = "." And Len(Qty) <= 6 Then
    Qty = Replace(Qty, ".", ",")
    Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    ElseIf strSeprtr = "." Then
    Qty = Replace(Qty, ".", "")
    Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    End If
    End Function
    Mohamed Zubair

  • Issue with FIELD VALIDATION in modify status

    I have a problem with a validation of field of a service request.
    My problem is this:
    I created this type of validation for the field STATE:
    ([<Status>] = LookupValue ("SR_STATUS", "Open") AND
    [<AccountName>] = 'TO CHANGE') OR
    ([<Status>] = LookupValue ("SR_STATUS", "Open") AND
    [<AccountName>] = 'TO BE DEFINED') OR
    ([<AccountName>] = 'SPAM') OR ([<AccountName>] <> 'SPAM' AND
    [<AccountName>] <> 'TO CHANGE' AND [<AccountName>] <> 'TO BE DEFINED' AND
    [<plReason_of_the_contact_ITAG>] <> LookupValue ("OCC_CUST_LOV_
    SR_10 "," To be defined "))
    Now say that the field "Account Name" is set with 'TO CHANGE' and the field "Reason of the contact" is set with "To be defined" and I try to close the service request, the validation works correctly and blocks me to closed the SR ([<Status>] = LookupValue ("SR_STATUS", "Open") AND
    [<AccountName>] = 'TO CHANGE').
    Perfect!
    Now let's say I want to change the "Account Name" and "Reason of the contact" then set the ticket status to closed.
    Now the problems are:
    If I do NOT go into edit status of the ticket (edit button) and return on time then the "Account Name"=Jack first "Reason of the contact"=information and then was put Status as Closed, validation allows me to close the ticket. Perfect.
    But if I go into Edit state (with the Button Edit SR) of the ticket and change simultaneously "Account Name"=Jack and "Reason of the contact"=information and Status="Closed" and then do Save, validation is not working properly and gives me the message as if I had not changed the Account Name.
    She acts as if he hadn't interpreted the change of fields.
    Please Help me!
    Any suggestion??

    There is no limit in Adobe form, that means you need to check the backend service, where the field is truncated and change the ABAP data type from the mentioned char255 or something to string for example. Otto

  • Issue with fields of a database table

    Hi All,
    While browsing through database table T2515, i have observed that in 'fields' tab, there are only 2 fields visible ie MANDT and WWSSN.
    When we see the contents of table, there will be one more additional field called BEZTEK.
    Now my requirement is to retrieve data from both WWSSN and BEZTEK fields.
    How to define internal table and how to write select statement in such cases?
    Moreover, from where this BEZTEK will get populate, when we see the contents of table in se11?
    Regards
    Pavan

    Hi,
    BEZTEK may be coming from the Text table related to T2515.  See the text table of T2515 (SE11 -> Menu option Goto -> Text Table).
    Regards
    Vinod

  • Cfpdfform issue with field name

    We have a pdf that is filled out by ColdFusion using <cfpdfform>.  A field in the pdf was named incorrectly so there are 2 fields named the same thing (let's say "field1").  As the system has populated (many) copies of the pdf the same value has gone into both fields named "field1" when really two different values should have gone into a "field1" and "field2".
    I need to get the information correctly entered into "field2" so I had two ideas...
    I researched was renaming the field in all the pdfs using ColdFusion (so I could repopulate the new field) but that does not appear to be possible.  But to confirm... Can you rename a field in a pdf using ColdFusion?
    If I couldn't rename it I just wanted to change what was in the second occurrence of "field1".  I tried using the index attribute of <cfpdfformparam> but that only applies to forms created in LiveCycle.  Does anyone know how to populate only one occurrence of a field name in a pdf using <cfpdfform>?
    As an aside I have corrected the field name in the pdf for future use.

    No, it is why advance users do not use the wizard.
    Have a look at OpenOffice.org and its form creation. Once you add your fields in OpenOffice.org, just export to PDF and the form fields will be named just like you named in them in OpenOffice.org and the drop down values carry over.

  • Issue with input field in table control

    Hi,
    I have an issue with field acgl_item-rstgr in the table control.
    I have created a screen program with a table control.
    In the control i have added a dictionary field as acgl_item-rstgr.
    When i execute, do f4 on the input field, select a value and press enter, then it is showing me
    error as 'Entry 'val' does not exist in T053R (check entry). Its really weird to understand this. I have selected the value
    from f4 and even then it says this. Its working for all other columns, but not working only for RSTGR.
    Plz help me on this regard.
    Code is like this.
    TYPES : BEGIN OF ty_rstgr,
              rstgr TYPE RSTGR,
             END OF ty_rstgr.
    TABLES : ACGL_ITEM.
    DATA : it_rstgr TYPE TABLE OF ty_rstgr.
    DATA : wa_rstgr TYPE  ty_rstgr.
    CONTROLS : table TYPE TABLEVIEW USING SCREEN 100.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT it_rstgr INTO wa_rstgr WITH CONTROL TABLE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
      LOOP AT it_rstgr.
      ENDLOOP.
    Thanks,

    Hi Navitha,
    Its Check Table concepts for the error u stated. Please check wht the Search help ur using...Because for this field there is no search help at value table level...Use search help that hold all master data or create a custom search field in SE11 level or in program level.
    Cheers,
    Naveen

Maybe you are looking for

  • How to move events in iCal

    is there a way to drag events from one month to another without editing the event by hand?

  • One Java-Process over multiple CPUs on Solaris 8

    Hello, sorry if this question is trivial. I have a java server software (BEA Weblogic) and use it on a multiple CPU machine (e.g. 4 CPUs) with Solaris 8. This Server runs as one system process and creates some threads. Are these threads spread over m

  • Failed to sync with user provisioning. Check Planning log for details

    hey everyone, we just did a password update for our hyperion planning application owner account. and now when i try to login to hyperion planning, i get the following error message: Failed to sync with user provisioning. Check Planning log for detail

  • Where and how can I find the two files?

    I begin study j2me.but I cannot find files j2me_cldc-1_0-src-winsol.zip and j2ne_cldc-1_0-src-palm_overlay.zip in java.sun.com. If you have the two files ,do you send me one copy? My email is [email protected],thanks.

  • Lightroom 5 Colour Sliders

    I have Lightroom 5 & cannot get the actual colours on my tint & temperature sliders... how can I get them? Each time I use the brush I'm basically guessing colours... have I not set something up properly????