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: 

How to determine line number on Table control in BDC

surya_gupta3
Explorer
0 Kudos

Hi,

I am uploading changes for CG02 using BDC. I have to change data to specification type which are listed in a table control having some of the fields as IDCAT, IDTYPE, LANG, ORD, IDENT etc.

For a particular substance number, there can be variable number of idtypes. Since there were 8 Idtypes already created for the substance number I was working with while recording and I created 9th Idtyep(Z_SARADOT#) while recording (Using SHBD), I am getting the code like ...'ESTRI-IDTYPE(09)....ESTRI-IDCAT(09).....'RCGRIIOT-IDENT(09)' which indicate that while recording, the values were added on 9th line of table control.

Now this line number can vary for other substance number. How can I know

(1) The last line of table control

(2) Line number based on Value of field

Example - here I want to know line number corresponding to IDTYPE Z_SARADOT# if it was created so that I can change the value of field IDENT of the table control.

The piece of code I got after recording is:

perform bdc_field using 'ESTRI-IDTYPE(09)'

'NUM'.

perform bdc_field using 'ESTRI-IDCAT(09)'

'Z_SARADOT#'.

perform bdc_field using 'RCGRIIOT-IDENT(09)'

'1175'.

Please help friends.

Thanks & Regards,

Surya

3 REPLIES 3

Former Member
0 Kudos

table control data will be stored in some table...u need to fetch the data to internal table based on conditions and check for the record...Take this record anumber and use in ur BDC so that while posting it posts to correct line entry.

0 Kudos

There are around 800 Substance numbers and for each substance number there are around 10 IDtype. So It would be a costly processing.

If there no other way doing it?

I think, I need to follow this way as We can not determine the line number untill BDC is running.

0 Kudos

DO anybody know about a system field which gets updated when BDC is running like the database count of table controll so that I can know the last line of the table controll?