10-22-2007 7:17 AM
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 **********
10-22-2007 7:44 AM
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.
10-22-2007 7:20 AM
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.
10-22-2007 7:44 AM
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.
12-03-2007 12:46 PM