Application Development and Automation 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: 
Read only

Dynamic internal table with xls upload

former_member211992
Active Participant
0 Likes
911

Dear all,

I have a requirement , i have a excel file for PO upload it has more than 200 columns , .im using CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP' to convert xls to internal table , , now this xls file will be user specific means some user may have all the columns and some users wants only mandatory columns . .how to achieve this ?  

3 REPLIES 3
Read only

Former Member
0 Likes
719

Create 2 structures/2 internal tables for each users.

After looping the converted internal table, segragate the data based on each user i think you already knew the logic, just a simple segragation/manipulation will solve your issue.

Read only

Former Member
0 Likes
719

Hi,

On the selection screen ,provide a radio button for the users to select the file format

Ex :

All fields           -->Create a structure with all fields in the program

Mandatory fields.-->Create a structure with only mandatory fields in the program

As per the selection, while calling the  FM TEXT_CONVERT_XLS_TO_SAP,you upload the data into respecting internal tables.(either all fields or mandatory fields)

This is just a work around, as per my knowledge, to ensure a consistency, try to avoid multiple file formats for a single upload. You can ask both kinds of users to have same file format but in case of users(mandatory fields) can only fill in mandatory fields. Considering the fact that there are 200 fields and if users are not  accepting then you can go ahead with the above approach.

Regards

Pallavi

Read only

0 Likes
719

Never tried it myself, but I'd start by hiding the not mandatory columns in the xls and try to upload with the empty hidden columns. If that works, you don't really need a second structure..