Application Development and Automation 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: 
Read only

Table control bdc page wise

Former Member
0 Likes
515

Hi expert,

i am working for MEK1 tcode this bdc working fine when i am using single page

but is data is more than one page then how to deal with it..

I haver recorded Next page button also.

perform bdc_field using 'BDC_OKCODE' '=P+'.

<b>Code is ok but ... how to evoke next page whan first page is full-fill.</b>send hint...

thanks..

**********Point is assured **********

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
468

hi jim,

u first manually count how many records u can upload on the first page.

and then set a counter. when the counter exceeds the number of records u can upload on the single page then use the ok-code =P+

IF counter GT 22. " here 22 is wat i have calculated manually

counter = 2.

flag = 1.

PERFORM bdc_dynpro USING 'SAPLCPDI' '0140'.

PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

ENDIF.

now also since ur records exceeds first page u have to run this code for every record after the first page,i dont think it will be usefull jst running above code once.

and thts y i have used one variable called flag.

so u need to add this code also jst after the above code.

if flag = 1.

PERFORM bdc_dynpro USING 'SAPLCPDI' '0140'.

PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

endif.

also dont forget to set flag back to zero after all the records of the corresponding data r uploaded.

3 REPLIES 3
Read only

Former Member
0 Likes
468

Hi Jim,

Add this code for next page :

bdc_data-program = 'pgmname'.

bdc_data-dynpro = 'screen no'.

bdc_data-dynbegin = 'X'.

APPEND bdc_data.

CLEAR bdc_data.

bdc_data-fnam = 'BDC_OKCODE'.

bdc_data-fval = '=NP'.

APPEND bdc_data.

CLEAR bdc_data.

Read only

Former Member
0 Likes
469

hi jim,

u first manually count how many records u can upload on the first page.

and then set a counter. when the counter exceeds the number of records u can upload on the single page then use the ok-code =P+

IF counter GT 22. " here 22 is wat i have calculated manually

counter = 2.

flag = 1.

PERFORM bdc_dynpro USING 'SAPLCPDI' '0140'.

PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

ENDIF.

now also since ur records exceeds first page u have to run this code for every record after the first page,i dont think it will be usefull jst running above code once.

and thts y i have used one variable called flag.

so u need to add this code also jst after the above code.

if flag = 1.

PERFORM bdc_dynpro USING 'SAPLCPDI' '0140'.

PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

endif.

also dont forget to set flag back to zero after all the records of the corresponding data r uploaded.

Read only

Former Member
0 Likes
468

thanks to all