Skip to Content
author's profile photo Former Member
Former Member

urgent help need

hi friends,

could u please help me how to do this

my problem is they have given one excel file

in this two spred sheets is ther one for header information and another for item information


header data

MAPPING DocumentDate PostingDate CompanyCode

1 01.07.2006 01.07.2006 1061

2 01.07.2006 01.07.2006 1061

3 01.07.2006 01.07.2006 1061


Assignment ValueDate DueDate Paymentterms


adc 01.07.2006 01.07.2006 01.07.2006

cdf 01.07.2006 01.07.2006 01.07.2006

zfed 01.07.2006 01.07.2006 01.07.2006

but here my problem i need to upload from excel

and store the header data and item data in one internal table.

Could u please suggest me how to segrigate and how to upload the data .



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2006 at 12:00 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2006 at 12:03 PM


    chk this sample,

    put the data into an excel file.then download.

    suppose data base name is


    fields inside it are name and age.


    sample excel sheet.

    coloumn 1 is name and column 2 is age

    name age

    A 8

    C 13

    D 55


    DATA : int_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.

    data : record like db_name_age occurs 0 with header line.

    DATA : v_start_col TYPE i VALUE '1', "starting col

    v_start_row TYPE i VALUE '1', " starting row

    v_end_col TYPE i VALUE '2', " total columns

    v_end_row TYPE i VALUE '10'. "total no of record

    FORM f_upload .

    CLEAR : int_excel, int_excel[].



    filename = wf_filename

    i_begin_col = v_start_col

    i_begin_row = v_start_row

    i_end_col = v_end_col

    i_end_row = v_end_row


    intern = int_excel


    inconsistent_parameters = 1

    upload_ole = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    *Message is 'Unable to upload data from ' wf_filename.

    MESSAGE e169(zm050) WITH wf_filename.


    SORT int_excel BY row col.

    REFRESH : record.

    CLEAR : record.

    LOOP AT int_excel.

    CASE int_excel-col. "go thru each column.

    WHEN 1.

    record-name = int_excel-value.

    WHEN 2.

    record-age = int_excel-value.


    AT END OF row.

    APPEND record.

    CLEAR record.



    *inserting into table

    modfiy db_name_age from table record.


    if this helped pld rewrd points,



    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.