Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI to update asset master

Former Member
0 Likes
3,311

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.

4 REPLIES 4
Read only

rvinod1982
Contributor
0 Likes
1,670

Hi,

Try this BAPI BAPI_FIXEDASSET_CHANGE.

Regards,

Vinod

Read only

Former Member
0 Likes
1,670

Hi,

BUS1022-Business object for fixed asset and for changeBAPi is BAPI_FIXEDASSET_CHANGE.

Read only

Former Member
0 Likes
1,670

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

Read only

Former Member
0 Likes
1,670

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.