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: 

Internal table, BDC

Former Member
0 Kudos

Hello Friends,

i have to upload data into MD61. for that i will upload 'N' number of months. number of months will be given on the selection screen. so i dont have information regarding num of quantity fields. depending on the selection screen i may upload 10 quantitites or 20 quantites.......

what i need is i have to increase the number of columns of same type in an internal table .

Ex: my internal table has fields

1. Plant

2. Material

3.Version

4. quantity1

5 Quantity2

6 Quantity3

here i have 3 quantity fields , but i may upload 10 quantities. how to increase the number of quantity columns dynamically ???

Please let me know how to do this ?

Thanks in Advance

Regards,

Ajay

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ajay,

Do the recording as of your fields dynamicaally means anyhow the recording has to be present otherwise how can you upload your records. even i am also waiting for more answers on your query.

Cheers!!

Balu

11 REPLIES 11

Former Member
0 Kudos

Any idea friends ?

Former Member
0 Kudos

Hi Ajay,

Do the recording as of your fields dynamicaally means anyhow the recording has to be present otherwise how can you upload your records. even i am also waiting for more answers on your query.

Cheers!!

Balu

0 Kudos

hi balu,

there is no problem with the rcording . That can be done. we can have number of columns and increase the field number while populating.

Only problem is increasing the num of columns of internal table.

Regards,

Ajay

0 Kudos

Hi Ajay..,

Dont try to increase the internal table here.

Just pass the Quantity depending on the given input, by N number of times with looping.

So here your internal table wil have :

1. Plant

2. Material

3.Version

4. quantity.

And while looping the internal table.,Iam giving some sample idea on my logic:

loop at itab.

pass plant,

pass Material,

pass Version.

do N times.

pass quantity.

enddo.

endloop.

I think now you can modify this logic as per your reuirement...

All the best.

Thanks,

Naveen.I

0 Kudos

hi naveen,

before looping that we have to take data into internal table. i have no fixed columns for the internal table.

How can i pass ????

Thanks ,

Ajay

0 Kudos

Hi Ajay.,

What is the probelm if you take those values into another table, which is having structure with only quantiy field?

Let me know.

Thanks,

Naveen.I

0 Kudos

How you are populating your upload internal table?

Through flat file or from database tables?

0 Kudos

i m taking data from excel and uploading into SAP. There is no fixed size for my excel. Column numbers may vary. i may upload 10 quantities or 20 quantities depending on the requirement.

Thanks,

Ajay

0 Kudos

Then you should have maximum number of quantity fields in you rinternal table to accept all the inputs from file.

If there is no input your field should be filled with space or zero.

And anyway you will check the condition like quanity is not initial while passing this variable to screen element.

Thanks,

Naveen.I

0 Kudos

ya that logic will work. i m looking for this way to increase the size of internal table, if not i will go for manual size for 100 columns like that.

Thanks,

Ajay

0 Kudos

Hi Ajay.,

I Dont think it is possible to fill internal table directly from XLS file as we are using function module for this.

So you have try this after populating the internal table once.

i.e. you have to pass this internal table into one dynamic table..

Link: [Dynamic table creation|;

But this procedure is make some meaning less development is n't it?

So approach your work assigner once, becoz you have to take decision at XLS file level.

Otherwise go ahead with your same logic, It has no alternate as of my knowledge on data transfers.

All the best

Thanks,

Naveen.I

Hey dont remember to get back hear after solving the problem.