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: 

Inputfile not getting populated into corresponding fields...

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Better u use different internal table according to your account group which is a parameter on your selection screen....

7 REPLIES 7

former_member181962
Active Contributor
0 Kudos

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

Former Member
0 Kudos

if there is a different structure for two files...HOw can u use same internal table...Can u elaborate on this...

Former Member
0 Kudos

Better u use different internal table according to your account group which is a parameter on your selection screen....

0 Kudos

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.

Former Member
0 Kudos

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 ...

0 Kudos

I will try to again work out the logic effectively and see how it goes.

0 Kudos

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.