Skip to Content
avatar image
Former Member

uploading data from excel file to sap

Hello friends i have urgent requirement.

i have one excel file having two columns num and name of company.

123 abc.

256 cdf.

568 gh.

123 abc.

123 abc.

123 abc.

123 abc.

568 gh.

568 gh.

568 gh.

568 gh.

568 gh.

568 gh.

568 gh.

568 gh.

568 gh.

568 gh.

568 gh.

the columns are going like that i should saparate this by name of company, i have 10000 rows in excel.

now i have to sort the 123 should go under abc record .

and 256 should go under cdf record .

So ooonnnnnn.

can any one give code please. (we should take from excel and do it).

thanks in adv.

Praneeth.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Jun 04, 2015 at 04:16 AM

    Praneeth,

    First, your requirement is unclear. When you upload the excel file into internal table, SAP will separate the value based on parameters you specified. Supposed it's a tab delimited file, it will be separated in 2 columns.

    What are you trying to achieve here?

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 04, 2015 at 04:23 AM

    Hi Praneeth,

    You can use GUI_UPLOAD function module to load the data from excel sheet to an internal table. Once the data is available in the internal table you can process the data inside a loop. There are many threads in the forum discussing about using GUI_UPLOAD.

    Can you be more elaborate on the requirement where company 123 should come under abc record and so on. What actually are you trying to achieve here?

    Regards,

    ~Athreya

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 04, 2015 at 09:16 AM

    Hi,

    Try,

    DATA: text TYPE string,

    company type string,

    name type string.

    text = `123 abc`.

    SPLIT text AT space INTO: company name.

    Append values to Internal table.

    Sort the internal table.


    Hope it helpful,


    Regards,

    Venkat

    Add comment
    10|10000 characters needed characters exceeded