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

Uploading multiple EXCEL Worksheets to SAP

hello everyone.

i am new to SAP, and i wanted to create a program that would read multiple excel worksheets and appened the values of the file to an internal table.

can somebody help me with this?

here's what i wanted to do exactly:

excel tab:

worksheet 1:

pernr | begda | endda |

worksheet 2:

pernr | begda | endda | address line 1 | address line 2 | phone number

worksheet 3:

pernr | begda | endda | Annual salary |

i wanted those data to be in the following internal tables:

for worksheet 1: >>>> i_pa0002.

for worksheet 2: >>>> i_pa0006.

for worksheet 3: >>>> i_pa0008.

thanks a lot for future replies.

Mark

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 08:22 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 07:00 AM

    hi you can use

    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'

    exporting

    filename = filename

    i_begin_col = 5

    i_begin_row = 2

    i_end_col = 6

    i_end_row = 4000

    tables

    intern = i_pa0002

    exceptions "Handle all exceptions(This is must).

    inconsistent_parameters = 1

    upload_ole = 2

    others = 3.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 06:57 AM

    Hi

    Please go through following link

    how-to-upload-several-sheet-with-function-alsmexce

    Regards

    Akshay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 06:58 AM

    hi,

    you can use fm

    ALSM_EXCEL_TO_INTERNAL_TABLE

    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'

    exporting

    filename = 'File Path\File name.xlsx'

    i_begin_col = 'A'

    i_begin_row = 1

    i_end_col = 'E'

    i_end_row = 3

    tables

    intern = itab

    • EXCEPTIONS

    • INCONSISTENT_PARAMETERS = 1

    • UPLOAD_OLE = 2

    • OTHERS = 3

    .

    if sy-subrc 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    endif.

    thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 08:07 AM

    Hi,

    You can use FM 'GUI_UPLOAD' with appending internal table.

    -Maharshi

    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.