Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Upload excel sheet

Former Member
0 Kudos

Hello Experts,

I need to upload excel sheet as below.

Excel Sheet

S910 table

Month

SPMON

Sales Organization

VKORG

Distribution Channel

VTWEG

Area

VKBUR

Territory

VKGRP

Customer Group

KDGRP

Route

PZONE

Product Group

PRODH1

Package Group

PRODH2

Size Group

PRODH3

From the excel sheet read Area, Territory, Product Group, Package Group, UOM and refer the respective tables for values based on the description and map it to  table.

Initially the upload should work on simulation mode where it should validate any mismatch in any of the data in excel with the data in their respective tables and should an error report with row and field details where there is mismatch.and also  program should not upload the file to  table. Program should check the excel sheet data with existing data in that period and should give an error report if the data already exists in  table for that period.

The program should not allow the data to be uploaded in the past periods and it should only take data in current and future periods.

How can be able to achieve this. it ll be help full if u can provide with some piece of code.

Moderator message:  We do not consider it good style to ask questions before trying to find the solution yourself.Please refer in your text also to what you have done already to solve the problem and what resources you have searched or used. Please try to avoid the impression of spec dumping.

Message was edited by: Kesavadas Thekkillath

2 REPLIES 2

Former Member
0 Kudos

Hi Lora,

Please be more specific on your question. You need to know which FM to be used to upload excel? Normally the flow of upload program for customized table is:

1. Read excel data into internal table.

2. Validate value of the fields. Like your example, check the period value.

3. Update table.

former_member491621
Contributor
0 Kudos

Hi Lora,

The data can be uploaded from excel file into internal tables using various FMs.

ALSM_EXCEL_TO_INTERNAL_TABLE

KCD_EXCEL_OLE_TO_INT_CONVERT

TEXT_CONVERT_XLS_TO_SAP etc.

Regarding validations : After you have the values in internal tables, i think it is quite simple process to check the data against standard tables. And based on these validations, you can decide whether or not you need to update data in tables(simple if-else conditions).

I didn't find any problem in that. Could you please me in getting to the problem??