04-03-2013 1:04 PM
Hi,
I am working on BDC to change equipment cat for some equipment's...
I have only two fields in file...and i have recorded IE02 tcode...in the first screen i have given equipment number and clicked on enter...in the next screen i have to follow edit->change equipment cat to change equipment category...
I have written program for the same..but the program has stopped at second screen...could you please let me know what need s to be done to go to edit->change equipment ....thanks in advance.
If you need any further info please let me know...
Regards..
04-03-2013 2:12 PM
Hi Abhis,
Instead of using BDC, try to use BAPI 'BAPI_EQUI_CHANGE'.
Pass the Equipment category value in structure DATA_SPECIFIC-EQUICATGRY field.After this call the 'BAPI_TRANSACTION_COMMIT'.
Regards,
Amit
04-03-2013 2:46 PM
Hello Abhis,
Amit is correct. Use the BAPI 'BAPI_EQUI_CHANGE' because it is much easier than the BDC. Below is an example:
DATA: ls_data_general TYPE bapi_itob,
ls_data_generalx TYPE bapi_itobx,
ls_data_specific TYPE bapi_itob_eq_only,
ls_data_specificx TYPE bapi_itob_eq_onlyx,
ls_return TYPE bapiret2.
ls_data_specific-equicatgry = 'M'. "New Category Value
ls_data_specificx-equicatgry = 'X'. "Indicates which field is changing
* BAPI changes the database
CALL FUNCTION 'BAPI_EQUI_CHANGE'
EXPORTING
equipment = '000000000000000001' "Equipment to be changed
data_general = ls_data_general
data_generalx = ls_data_generalx
data_specific = ls_data_specific
data_specificx = ls_data_specificx
IMPORTING
return = ls_return.
IF ls_return-type <> 'E'. "Error
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = ls_return.
ENDIF.
04-03-2013 2:58 PM
The issue is that the recording is not proper.In manual running the recording you may not find any issue.Trey to run with call transaction with Error screen mode or in background in session method u will find the error .