‎2007 Feb 26 10:27 AM
I
Good day!
Im uploading data for xk01 using table controls,but unable to upload more than
5 records in table controls data means im unabel to c!
how to scrolldown the verical bar programatically?or if there any other solution pls letm know?
how to handle views in MM01,while uolaodind data?
Thanks in advance!
Mr.reddy
‎2007 Feb 26 10:31 AM
hi,
ru doing it using BDC.
if so please record NET page button in recordinga nd try executing the program.
here wats happening in ur program is the default size the table is only 5 so it is allowing only 5 records so include more records we have to do the above said.
‎2007 Feb 26 10:31 AM
hi,
ru doing it using BDC.
if so please record NET page button in recordinga nd try executing the program.
here wats happening in ur program is the default size the table is only 5 so it is allowing only 5 records so include more records we have to do the above said.
‎2007 Feb 26 10:42 AM
no im using more than 5 table control records,
is it screenresolution probelm?
if so what should i do?
‎2007 Feb 26 10:46 AM
hi,
i am telling abt the same problem of u r facing .
now take a new recording and plz do recording with pressing next page button
and start replacing ur code.
for help see the following code
----
Form UPDATE_STD_PRICE *
----
Run the BDC recording for MR21 for updating the Std Price *
----
FORM update_std_price.
clear the flag value and loop the cost blending table
CLEAR: gv_bdc_open_flag.
Filling the BDCDATA
PERFORM prepare_bdc_tab.
Close the SESSION
IF gv_bdc_open_flag = gc_x.
PERFORM bdc_close_group.
ENDIF.
ENDFORM. "UPDATE_STD_PRICE
----
Form prepare_bdc_tab *
----
Prepare BDC Table for updating Copack Purchase Prices *
----
FORM prepare_bdc_tab .
Local variable.
DATA: lv_date(10) TYPE c,
ls_stprs TYPE ty_s_cbht,
ls_plant TYPE ty_s_plant,
lv_fnmatnr TYPE bdcdata-fnam,
lv_fnbwkey TYPE bdcdata-fnam,
lv_fnnewvalpr TYPE bdcdata-fnam,
lv_counter(2) TYPE n,
lv_num TYPE i.
CONSTANTS: lc_8 VALUE '8'.
CLEAR: lv_date.
SORT gt_cbht BY matnr.
LOOP AT gt_marc INTO gs_marc.
ls_plant = gs_marc.
AT NEW matnr.
CLEAR lv_counter.
Capture the date as per the user setting
WRITE p_budat TO lv_date.
Initial Screen of MR21 transaction
PERFORM bdc_dynpro USING 'SAPRCKM_MR21' '0201'.
PERFORM bdc_field USING: 'BDC_OKCODE' '=ENTR',
'MR21HEAD-BUDAT' lv_date,
'MR21HEAD-BUKRS' p_bukrs,
'MR21HEAD-WERKS' space.
READ TABLE gt_cbht INTO ls_stprs
WITH KEY matnr = ls_plant-matnr BINARY SEARCH.
ENDAT.
CLEAR : lv_fnmatnr,
lv_fnbwkey,
lv_fnnewvalpr.
lv_counter = lv_counter + 1.
lv_num = lv_num + 1.
CONCATENATE:
'CKI_MR21_0250-MATNR(' lv_counter ')' INTO lv_fnmatnr,
'CKI_MR21_0250-BWKEY(' lv_counter ')' INTO lv_fnbwkey,
'CKI_MR21_0250-NEWVALPR(' lv_counter ')' INTO lv_fnnewvalpr.
Second screen of MR21 transaction
PERFORM bdc_dynpro USING 'SAPRCKM_MR21' '0201'.
PERFORM bdc_field USING: 'BDC_OKCODE' '=ENTR',
lv_fnmatnr ls_plant-matnr,
lv_fnbwkey ls_plant-werks,
lv_fnnewvalpr ls_stprs-stprs.
IF lv_num EQ lc_8.
PERFORM bdc_dynpro USING 'SAPRCKM_MR21' '0201'.
PERFORM bdc_field USING: 'BDC_OKCODE' '=DOWN'.
CLEAR lv_num.
CLEAR lv_counter.
ENDIF.
AT END OF matnr.
PERFORM bdc_field USING: 'BDC_OKCODE' '=SAVE'.
Run MR21 using CALL TRANSACTION, if errors found create a SESSION
PERFORM call_transaction_mr21 USING ls_plant.
CLEAR : ls_stprs.
REFRESH gt_bdc_tab.
ENDAT.
CLEAR : gs_marc,
ls_plant.
ENDLOOP.
ENDFORM. " prepare_bdc_tab
----
Form call_transaction_mr21 *
----
Call Transaction for updating CoPack Price entries *
----
FORM call_transaction_mr21 USING p_ls_plant TYPE ty_s_plant.
Local Data Declaration
CONSTANTS:lc_e TYPE c VALUE 'E',
lc_mr21(4) TYPE c VALUE 'MR21',
lc_mode(1) TYPE c VALUE 'N',
lc_update(1) TYPE c VALUE 'U'.
DATA: ls_msgs TYPE ty_s_msgs.
REFRESH: gt_bdc_msg.
Call MR21 Transaction
CALL TRANSACTION lc_mr21
USING gt_bdc_tab
MODE lc_mode
UPDATE lc_update
MESSAGES INTO gt_bdc_msg.
If the Call Transaction Fails
IF sy-subrc NE 0.
IF gv_bdc_open_flag IS INITIAL.
PERFORM bdc_open_group.
gv_bdc_open_flag = gc_x.
ENDIF.
PERFORM bdc_insert_group.
DELETE gt_bdc_msg WHERE msgtyp NE lc_e.
get the error message
PERFORM read_error_message USING gt_bdc_msg
CHANGING gt_msgs.
If the message table is having error mesasges
IF gt_bdc_msg IS NOT INITIAL.
LOOP AT gt_msgs INTO ls_msgs.
gs_error-matnr = p_ls_plant-matnr.
gs_error-msg = ls_msgs-msg.
APPEND gs_error TO gt_error.
CLEAR gs_error.
ENDLOOP.
ENDIF.
REFRESH:gt_bdc_msg,
gt_bdc_tab,
gt_msgs.
ELSE.
Update the status as 'Y' for ZKT_CBHT-TRCOM for success records
PERFORM update_transaction_complete USING p_ls_plant.
Record all materials that updated Successfully with Standard Price
gs_success-matnr = p_ls_plant-matnr.
APPEND gs_success TO gt_success.
CLEAR: gs_success.
ENDIF.
CLEAR p_ls_plant.
ENDFORM. " call_transaction_mr21
‎2007 Feb 26 3:43 PM
i have done the table control part for the Xk02 transaction. i guess to have the problem while uploading the bank details. Just look at my recording for that part n do as i have done. I have put the recording for only the bank details part.
if u need more info do contact me
c_tabctrl TYPE i VALUE '6', "For holding
**perform bdc_field using 'BDC_CURSOR'
'LFBK-BKREF(01)'.
*CONCATENATE 'LFBK-BKREF(' w_count ')'
INTO w_fld1.
*
PERFORM bdc_field USING 'BDC_CURSOR'
w_fld1.
CONCATENATE 'LFBK-BANKS(' w_count ')'
INTO w_fld1.
PERFORM bdc_field USING 'BDC_CURSOR'
w_fld1.
CLEAR w_fld1.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
**perform bdc_field using 'LFBK-BANKS(01)'
'US'.
CONCATENATE 'LFBK-BANKS(' w_count ')'
INTO w_fld1.
PERFORM bdc_field USING w_fld1
tbl_final-banks.
CLEAR w_fld1.
**perform bdc_field using 'LFBK-BANKL(01)'
'021000021'.
CONCATENATE 'LFBK-BANKL(' w_count ')'
INTO w_fld1.
PERFORM bdc_field USING w_fld1
tbl_final-bankl.
CLEAR w_fld1.
**perform bdc_field using 'LFBK-BANKN(01)'
'123445'.
CONCATENATE 'LFBK-BANKN(' w_count ')'
INTO w_fld1.
PERFORM bdc_field USING w_fld1
tbl_final-bankn.
**perform bdc_field using 'LFBK-KOINH(01)'
'dd'.
CONCATENATE 'LFBK-KOINH(' w_count ')'
INTO w_fld1.
PERFORM bdc_field USING w_fld1
tbl_final-koinh.
**perform bdc_field using 'LFBK-BKONT(01)'
'c'.
CONCATENATE 'LFBK-BKONT(' w_count ')'
INTO w_fld1.
PERFORM bdc_field USING w_fld1
tbl_final-bkont.
**perform bdc_field using 'LFBK-BVTYP(01)'
'eff'.
CONCATENATE 'LFBK-BVTYP(' w_count ')'
INTO w_fld1.
PERFORM bdc_field USING w_fld1
tbl_final-bvtyp.
**perform bdc_field using 'LFBK-BKREF(01)'
'edddd'.
CONCATENATE 'LFBK-BKREF(' w_count ')'
INTO w_fld1.
PERFORM bdc_field USING w_fld1
tbl_final-bkref.
CLEAR w_fld1.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
**perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
concatenate 'LFBK-BANKS(' w_count ')'
INTO w_fld1.
*
*perform bdc_field using 'BDC_CURSOR'
w_fld1.
w_count = w_count + 1.
IF w_count EQ c_tabctrl.
w_count = 1.
PERFORM page_down.
ENDIF.
****************************************************************
FORM page_down.
PERFORM bdc_dynpro USING 'SAPMF02K'
'0130'.
**
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_dynpro USING 'SAPMF02K'
'0130'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
ENDFORM. " page_down
‎2007 Feb 27 10:56 AM
Hi ,
I hope u Didn't recorded page down , so then only it can add next set of five records.....
With Regards
Bhaskar Rao.M
‎2007 Feb 27 5:25 AM