2012 Aug 31 5:05 AM
Hi,
I have used BDC call transaction for the transaction 9KE0.In one of the screens,the data is getting populated in the table control.
But the table has only 16 rows.To insert the records beyond 16 rows I have done a page down while recording the transaction.
While executing, the ok-code '=CP+' is appearing on screen.When I click enter, control is going to next page but data is not getting displayed.
Please find my code below.
LOOP AT it_record1 into w_record1 WHERE layout = w_record-layout.
IF NOT SY-TABIX GT 16.
perform bdc_field using 'BDC_OKCODE'
'=CP+'.
ENDIF.
CLEAR g_fnam.
CONCATENATE 'Z-BDC02' '(' g_idx ')' INTO g_fnam.
perform bdc_field using 'BDC_CURSOR'
g_fnam.
perform bdc_field using g_fnam
w_record1-acc_num.
CONCATENATE 'Z-BDC03' '(' g_idx ')' INTO g_fnam.
perform bdc_field using g_fnam
w_record1-fun_area.
CONCATENATE 'Z-BDC04' '(' g_idx ')' INTO g_fnam.
perform bdc_field using g_fnam
w_record1-pro_cen.
CONCATENATE 'Z-BDC05' '(' g_idx ')' INTO g_fnam.
perform bdc_field using g_fnam
w_record1-parpro_cen.
CONCATENATE 'Z-BDC06' '(' g_idx ')' INTO g_fnam.
perform bdc_field using g_fnam
w_record1-plant.
CONCATENATE 'Z-BDC07' '(' g_idx ')' INTO g_fnam.
perform bdc_field using 'Z-BDC07(02)'
w_record-rep_mat.
CONCATENATE 'Z-BDC08' '(' g_idx ')' INTO g_fnam.
perform bdc_field using g_fnam
w_record1-tra_par.
CONCATENATE 'Z-BDC09' '(' g_idx ')' INTO g_fnam.
perform bdc_field using g_fnam
w_record1-tran_type.
CONCATENATE 'Z-BDC10' '(' g_idx ')' INTO g_fnam.
perform bdc_field using g_fnam
w_record1-amt_trancurr.
CONDENSE w_record1-amt_trancurr.
g_idx = g_idx+1.
ENDLOOP.
Please let me know where I am wrong and help me to correct the error.
Regards,
Swapna
2012 Aug 31 6:13 AM
Hiii,
Try this ,
IF NOT SY-TABIX GT 16.
perform bdc_field using 'BDC_OKCODE'
'=CP+'.
PERFORM bdc_dynpro USING 'your program name' 'screen number'. " Eg. - PERFORM bdc_dynpro USING 'SAPLSZA6' '0200'.
ENDIF.
And you have to reset or manage value of g_idx because after one scrolling top row id again set to 1 so as per your screen reset or manage it .
2012 Aug 31 5:26 AM
2012 Aug 31 5:28 AM
Hi,
After executing the command page down, you have to reset the counter back to 01, in your case, you have to reset the variable g_idx to 01.
Thaks and regards,
Kartik
2012 Aug 31 6:13 AM
Hiii,
Try this ,
IF NOT SY-TABIX GT 16.
perform bdc_field using 'BDC_OKCODE'
'=CP+'.
PERFORM bdc_dynpro USING 'your program name' 'screen number'. " Eg. - PERFORM bdc_dynpro USING 'SAPLSZA6' '0200'.
ENDIF.
And you have to reset or manage value of g_idx because after one scrolling top row id again set to 1 so as per your screen reset or manage it .
2012 Aug 31 6:20 AM