Skip to Content

GUI_UPLOAD is NOT behaving Correctly

Hi Friends,

GUI_UPLOAD is NOTbehaving correctly.

Please help me if you have any idea.

Using GUI_UPLOAD, second record 1114 is not populating to internal table.

Really it is STRANGE..

Code

Using internal table :

TYPES : BEGIN OF ty_filedata,

anln1 TYPE anla-anln1, "Asset No

ch_typ TYPE char1, "Change type

statecd TYPE sta_rsyid,

pstlz TYPE pstlz,

e_date(8) TYPE c, "Effective Date

amount TYPE nafap, "Sale Amount

currency TYPE waers, "Currency

sernr TYPE am_sernr,

END OF ty_filedata.

data : i_filedata type standard table of ty_filedata.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = l_file

filetype = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = i_filedata

File data :Tab delimited data text file.

My file is having below data.

2800008 2 GA 30097 20110423 100.00 USD 1112

2800008 3 sp sp sp sp sp 1114

Please help me if you have any idea.

When you are checking , Please observe that 2nd record last value: 1114 shoud be below 1112(1st Record) . 'sp' means space.

Thanks,

Balaji.T.

Edited by: balajit on Apr 16, 2011 2:18 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 16, 2011 at 09:53 AM

    Hi balaji,

    First enter all your input values in Excel and save it as tab delimted txt file. then u upload that txt file.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 16, 2011 at 03:57 AM

    Hi Balaji,

    Check your file weather after each record tab space is existed or not.

    After For each record press tab button and try to upload again.

    Regards,

    Hari priya

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 16, 2011 at 04:04 AM

    Hi Balaji,

    Whats is filename = l_file .Where is the declaration for that.Pass the body also. If you feel there is any issue with that fm use calss DATA:

    lf_file TYPE string,

    lf_filelength TYPE i,

    lt_datatab TYPE STANDARD TABLE OF ty_xline.

    lf_file = file.

    CALL METHOD cl_gui_frontend_services=>gui_upload

    EXPORTING

    filename = lf_file

    filetype = 'BIN'

    IMPORTING

    filelength = lf_filelength

    CHANGING

    data_tab = lt_datatab

    EXCEPTIONS

    OTHERS = 1.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno

    DISPLAY LIKE 'E'

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    EXIT. " =================== EXIT =====================

    ENDIF.

    Regards,

    Madhu.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.