Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Extensionin parameter in BAPI_COSTCENTER_CREATEMULTIPLE

Hi,

I have created a BAPI "BAPI_COSTCENTER_CREATEMULTIPLE" and cost centers are created successfully but Custom fields are not updated. the below is the codePlease, help me.

DATA: t_cclist TYPE STANDARD TABLE OF bapi0012_ccinputlist,

wa_cclist TYPE bapi0012_ccinputlist,

t_extin TYPE STANDARD TABLE OF bapiparex,

wa_extin TYPE bapiparex,

t_ret TYPE STANDARD TABLE OF bapiret2,

wa_ret TYPE bapiret2.

wa_cclist-costcenter = 'TST413'.

wa_cclist-valid_from = sy-datum.

wa_cclist-valid_to = '99991231'.

wa_cclist-person_in_charge = 'DEVON'.

wa_cclist-department = '000000032328'.

wa_cclist-costcenter_type = 'O'.

wa_cclist-costctr_hier_grp = 'FLD0000006'.

wa_cclist-comp_code ='0132'.

wa_cclist-profit_ctr = 'P0000016'.

wa_cclist-addr_title = 'TITLE'.

wa_cclist-addr_name1 = 'NAME 1'.

wa_cclist-addr_city = 'NAME 2'.

wa_cclist-addr_district = ' '.

wa_cclist-addr_country = 'CA'.

wa_cclist-addr_region = 'BC'.

wa_cclist-jv_venture = '100000'.

wa_cclist-jv_rec_ind = 'BI'.

wa_cclist-jv_equity_typ = 'E01'.

wa_cclist-jv_otype = 'C001'.

wa_cclist-name = 'MANATOKAN HOL 100/06'.

wa_cclist-descript = 'MANATOKAN HOL 100/06C-14-62-6W4M SL5-14'.

APPEND wa_cclist TO t_cclist.

CLEAR wa_cclist.

  • Move custom fields to BAPI strcture

CLEAR wa_extin.

wa_extin-structure = 'BAPI_TE_CSKS'.

wa_extin-valuepart1+0(10) = 'TST413'. "Cost Center

wa_extin-valuepart1+10(4) = '100'. "Acquisition

wa_extin-valuepart1+14(4) = ''. "Divestiture

wa_extin-valuepart1+16(4) = ''. "Company Prior to Rollup

wa_extin-valuepart1+20(20) = ''. "Cost Center Groupings

wa_extin-valuepart1+40(2) = ''. "Business Segment

wa_extin-valuepart1+42(6) = ''. "Exploratory Play

wa_extin-valuepart1+48(38) = ''. "Peep GUID

wa_extin-valuepart1+86(3) = ''. "Surface Location Unique Well Identifier Survey System

wa_extin-valuepart1+89(16) = ''. "Surface Location Unique Well Identifier UWI

wa_extin-valuepart1+105(25) = 'DEVON ENERGY CORPORATION'. "Acquisition Description

wa_extin-valuepart1+135(25) = ''. "Divestiture Description

wa_extin-valuepart1+160(30) = ''. "Cost Center Groupings Description

wa_extin-valuepart1+190(15) = ''. "Business Segment Description

wa_extin-valuepart1+205(25) = ''. "Company Prior to Rollup Description

wa_extin-valuepart2+0(30) = ''. "Exploratory Play Description

wa_extin-valuepart2+30(10) = '20110607'. "Effective Date of Sale

wa_extin-valuepart2+40(10) = '20110607'. "Closing Date

wa_extin-valuepart2+50(10) = '20110607'. "Post Close/Binding Date

wa_extin-valuepart2+60(8) = '25'. "Location :Latitude

wa_extin-valuepart2+68(1) = 'N'. "Location:Latitude Direction

wa_extin-valuepart2+69(9) = '36'. "Location:Longitude

wa_extin-valuepart2+77(1) = 'S'. "Location:Longitude Direction

wa_extin-valuepart2+78(3) = 'DLS'. "Unique Well Identifier: Survey System

wa_extin-valuepart2+81(16) = '100052006908600'. "Unique Well Identifier: UWI

wa_extin-valuepart2+97(10) = ''. "Service Provider

wa_extin-valuepart2+107(6) = 'PROD'. "Status

wa_extin-valuepart2+113(10) = 'ARL SUCC'. "Tax Successor Code

wa_extin-valuepart2+123(10) = 'DEV01OCT14'. "Tax Stream Pool

wa_extin-valuepart2+133(14) = '100'. "Percent

wa_extin-valuepart2+147(35) = ''. "Service Provider Description

wa_extin-valuepart2+182(20) = 'PRODUCING'. "Status Description

wa_extin-valuepart2+202(15) = 'ARL SUCCESOR'. "Tax Successor Description

wa_extin-valuepart3+0(40) ='DEVON ACQD AFTER 2001-10-14'. "Tax Stream Pool Description

APPEND wa_extin TO t_extin.

CLEAR wa_extin.

CALL FUNCTION 'BAPI_COSTCENTER_CREATEMULTIPLE'

EXPORTING

controllingarea = 'D001'

  • TESTRUN = ' '

  • MASTER_DATA_INACTIVE = ' '

  • LANGUAGE =

TABLES

costcenterlist = t_cclist

return = t_ret

extensionin = t_extin.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Thanks,

Deepthi.

Former Member
Not what you were looking for? View more on this topic or Ask a question