2009 Oct 21 9:07 AM
Hi GURUS,
I am requested to create a batch job to automatically update master records with new asset coordinator when
changing a cost centre master record.
is there any bapi that i can use to fulfill the requirement above?
Thanks in advance,
Themba.
Hi GURUS,
I am requested to create a batch job to automatically update master records with new asset coordinator when
changing a cost centre master record.
is there any bapi that i can use to fulfill the requirement above?
Thanks in advance,
Themba.
2009 Oct 21 10:13 AM
2009 Oct 21 10:57 AM
Hi,
BUS1022-Business object for fixed asset and for changeBAPi is BAPI_FIXEDASSET_CHANGE.
2009 Oct 21 11:41 AM
Hi,
see the sample code below.
*---declarations for BAPI_FIXEDASSET_CREATE1
DATA: wa_key LIKE bapi1022_key,
wa_gen LIKE bapi1022_feglg001,
wa_genx LIKE bapi1022_feglg001x,
wa_tim LIKE bapi1022_feglg003,
wa_timx LIKE bapi1022_feglg003x
wa_assetno LIKE bapi1022_1-assetmaino,
it_ret LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
CLEAR: w_desc, wa_assetno, it_ret, wa_key, wa_gen,
wa_genx, wa_tim, wa_timx, wa_assetno .
*---passing COMPANYCODE
wa_key-companycode = c_s083.
*---passing general data wa_gen
wa_gen-assetclass = c_33000.
*---concatenate om_order_id & zname for description
CONCATENATE p_aufnr it_zmmomspickup-zname INTO w_desc.
wa_gen-descript = w_desc.
wa_gen-serial_no = p_ser_nr.
wa_gen-invent_no = p_matnr
*---passing 'X' to wa_genx for updating general data
WA_GEN-DESCRIPT = C_X.
wa_gen-serial_no = c_x.
wa_gen-invent_no = c_x.
*---passing INTERN_ORD, TAXJURCODE
wa_tim-intern_ord = it_zmmomspickup-aufnr.
*---passing 'X' to wa_genx for updating general data
WA_TIMX-INTERN_ORD = C_X.
*---bapi to create asset
CALL FUNCTION 'BAPI_FIXEDASSET_CREATE1'
EXPORTING
key = wa_key
generaldata = wa_gen
generaldatax = wa_genx
timedependentdata = wa_tim
timedependentdatax = wa_timx
IMPORTING
asset = wa_assetno
return = it_ret.Thanks,
Harini
2009 Nov 06 6:16 AM
Hi Gurus,
Sorry to reply this late, but the answers were very helpfull and successful. Thanks again for your time to help me.
Regards,
Themba.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |