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 update record in Table control

Former Member
0 Kudos

Dear Friends,

I have table control that has space for 10 records but i need to update 15 record from the flat file which is getting into the table how can i do this.

Regards,

MAHENDRA.

5 REPLIES 5

Former Member
0 Kudos

Mahendra,

Which method you r using to updatethe table control?

Pradeep

0 Kudos

HI Pradeep,

I am using session method to upload . help out if i can do in call transaction .

Regards,

Mahendra

0 Kudos

Hi,

Better way is record the bdc and when table control comes enter first line of data and press enter and then enter the second line and save it.

now make two internal tables or more depending on ur table control.

and keep the line items data in a loop and keep all the bdc table prepare data for the table control inside it.

and then call ur transaction and keep refreshing the bdcdata as the new data will be filled in the second time.

or use one of the following

In recording of BDC, it is always advisable NOT TO USE scroll functionality as it depends upon what screen size (800X600 or 1200X1024 or something else) user has selected.

What you need to do here is,

Use '+' button given below in the VL01N transaction. The F-Code for that is 'POAN_T'. So here, you need to add one item at a time and press this button and so that you will always need to add the new row at the second line as the previous all the lines will be scrolled above by SAP.

But still if you want to go with your scrolling. You need to take care about the screen resolution problem.

1. while recording ensure that it is in default size. Just ensure the check box is checked or not.

2. while processing means if call transaction use ctu_params structure and make defsize eq 'X'.

3. If it is session method just ensure that dynpro standard size check box is checked or not.

This way you can overcome screen resolution problem.

it depends on the transaction whichyou are suing.

But general way you cna follow the above tips

Regards,

sasi

0 Kudos

Thanku sasi,

you provided varu help full answer . could you clarify my doughty . if i have 1000 records in my table control it is not possible to enter one by one record and save .

can you help with any sample code for scrolling screen and updating .

regards,

Mahendra.

0 Kudos

Hi,

you record for an item and then click on page down and save it.use the loop on this bdc to populate the the bdc table no need to do manually.

LOOP AT l_i_dettab_item INTO l_wa_dettab_item..

l_cursor = l_cursor + 1.

IF l_cursor GT 1.

PERFORM bdc_field USING 'BDC_OKCODE'

'=P+'.

ENDIF.

PERFORM cursor_pos_notation USING 'V_EAN_DET001- GTIN_VARIANT_TYP'

l_cursor

CHANGING l_cursor_notation.

PERFORM cursor_pos_notation USING 'V_EAN_DET001-VTWEG'

l_cursor

CHANGING l_cursor_notation.

PERFORM bdc_field USING l_cursor_notation

l_wa_dettab_item-vtweg.

PERFORM cursor_pos_notation USING 'V_EAN_DET001-DATEFROM'

l_cursor

CHANGING l_cursor_notation.

PERFORM bdc_field USING l_cursor_notation

l_v_date.

PERFORM bdc_field USING 'BDC_CURSOR'

l_cursor_notation.

PERFORM bdc_field USING 'BDC_OKCODE'

'=SAVE'.

ENDLOOP.

Here my ok code for page down is =P+ so i am looping on the table control data and then populating the bdc table after this i will populate the remaing info required for the call transaction and refresh bdcdata.

thats it no need to do recording 1000 times.

now if u do like this it doesn't depend on the number of records on table control.

it will take all the records.

Reward if useful.

Regards,

sasi

Regards,

sasi