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: 

BDC in Table control

Former Member
0 Kudos

Hi geeks,

Can any body help , how sholud i go forward in a data uplaod, if the fields are in TABLE CONTROL.

Let me tell you scenario.

In general all table controls has the fields with their techincal field names same all through the screen.

for eg: assume field name is MATNR.

If screen can accomadate 9 records in the Table control.

after recording we get like

matnr_01, matnr_02, matnr_03.. so on till matnr_09.

after this =P+ (page down)..

and again

matnr_01, matnr_02, matnr_03.. so on till matnr_09.

i have the materails more than 1000.

during the upload , the screen should dynamically take page down and till all the materials filled inthis.

please help , if at all you have worked in this kind of upload anytime.

any kind of input is greatly appreciated.

Regards

satheesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Satheesh,

you should write something like this:


clear: l_tabix.
loop at itab.
  add 1 to l_tabix.
  perform dynpro using:   "here you fill the data
    ...
  if l_tabix >= 1000.
    clear: l_tabix.
    perform dynpro using
      ' ' 'BDC_OKCODE' '=P+',
      'X' (screen_name) (dynpro_number).
  endif.
endloop.

Please let me know if it worked. Best regards,

Alvaro

3 REPLIES 3

Former Member
0 Kudos

Hi Satheesh,

Your problem is everybodies problem.

It is just not possible to use BDC and more lines in a table control on your screen.

There are several ways around it:

1. If you use transaction <xxx>N use transaction <xxx> instead.

2. Find out if for your transaction a standard BAPI exists. If so use it. BDC is a somewhat old method.

3. Find out if in your transaction on the screen where table control resides, in the MENU, if there is a function like create new material (often these functions exist and they simply insert a new line in the table control always at the same position). If so, you must rewrite your BDC to accomodate that function.

Hope this will help you.

Regards,

Rob.

Former Member
0 Kudos

Hi Satheesh,

you should write something like this:


clear: l_tabix.
loop at itab.
  add 1 to l_tabix.
  perform dynpro using:   "here you fill the data
    ...
  if l_tabix >= 1000.
    clear: l_tabix.
    perform dynpro using
      ' ' 'BDC_OKCODE' '=P+',
      'X' (screen_name) (dynpro_number).
  endif.
endloop.

Please let me know if it worked. Best regards,

Alvaro

Former Member
0 Kudos

Hi Satheesh,

I would recommend to do a 'new page' every time you entered a material or, as Rob mentioned, to do a 'new entry' if this function is available in your transaction each time you entered a material.

regards

Siggi