‎2016 Mar 29 5:40 AM
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 ?
‎2016 Mar 29 6:20 AM
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.
‎2016 Mar 29 7:48 AM
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
‎2016 Mar 29 8:31 AM
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..