05-11-2006 6:36 PM
hello everyone,
I have data coming in from different depts. Almost all the fields are same except a couple of them. The difference is due to the different account groups.
I was asked to make one common inputfile structure so that whichever file is passed, data gets populated according to whatever information is available. The final posting will be done through BDC. So I made two recordings and based on account group I am calling it accordingly. Is this the right way to do it?
Also, i made the inputfile internal table, but when i debug and see the records, the fields are not corresponding to the appropriate records. I have my account group set as a parameter.
How can I resolve this issue?
Thanks in advance.
Regards,
Fred.
05-11-2006 6:48 PM
Better u use different internal table according to your account group which is a parameter on your selection screen....
05-11-2006 6:44 PM
Hi Fred,
If you are using GUI_UPLOAD Function module, then you have to define your internal table as per the structure of the file you are uploading.
or alternatively, create a flat type internal table which has only one field of sufficiently long length.
After uploading into the internal table, you need to split the itab record into a internal table structure.
The function doesn't dynamically crteate a itab based on the sturucture of the uploaded file.
Regards,
Ravi
05-11-2006 6:46 PM
if there is a different structure for two files...HOw can u use same internal table...Can u elaborate on this...
05-11-2006 6:48 PM
Better u use different internal table according to your account group which is a parameter on your selection screen....
05-11-2006 7:04 PM
Well I'll explain it a bit more. There are 3 different files for customers. 1 file belongs to internal customers and 2 others is for external customers. The general data, company code data, and sales area data is available so this way the structure would be same for all three.
Difference is that the file with internal customers has kunnr with it. So my internal table is something like kunnr, name1, name2, sortl..etc
But obviously, when i'm uploading the external customer file, it does not need kunnr since numbers will be internally assigned for it. So its first record is name1. But when i upload it, name1 is getting populated in kunnr, and so on...the other fields are also not falling in their corresponding fields.
I hope I am able to give a clearer picture of the situation.
Thanks.
05-11-2006 7:21 PM
U have differnt Structure for the files....so u better use different internal tables for corresponding departments u put a radio button on selection screen so that u can have a selction of the departmrnt from which it is getting ...
05-11-2006 7:29 PM
I will try to again work out the logic effectively and see how it goes.
05-12-2006 4:38 PM
I just requested one format for all the inputfiles. The fields that each file does not have will be left blank. It will be fixed length file, and this all data will correspond to the fields.
Regards,
Fred.