Application Development 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: 

How to use BAPI_FIXEDASSET_CREATE ?

Former Member
0 Kudos
3,031

Hi Expert,

    we are using the BAPI_FIXEDASSET_CREATE to create the Assets in SAP. But recently we have enhanced the SAP Standard field transaction AS01 to include some customizing fields. This enhancement is working fine. but i am not able to pass thses customised field thru the BAPI.

My specific question is How to pass the values for EXTENSIONIN table of BAPI for our customizing fields.?

Regards,

Umesh

4 REPLIES 4

jitendra_it
Active Contributor
0 Kudos
924

HI Umesh,

See the documentation of BAPI .

Customer Enhancements

Description

Using this parameter you can transfer user fields from the asset master record. However, it is not possible to transfer fields that are updated in user-defined tables. Only user fields that were defined using SAP enhancement AIST0002 and are automatically updated in table ANLU can be udpated in this way. This means you have to use table extension BAPI_TE_ANLU.

Enhancement AIST0002 contains function module EXIT_SAPL1022_001 as a component in which user fields can be implemented.

The documentation ( BAPIPAREX) of the structure that forms the basis for this parameter contains additional information about using this parameter.

0 Kudos
924

Hi Jitendra,

   we have used the same Exit as mentioned in the BAPI documentation & Enhanced the standard Screen. Now my question is how to use this fileds in BAPI to populate the value & in turn create the ASSETS thru this BAPI.

kindly explain with example.

Umesh

924

Hi Umesh ,


Please check below code snippet.

data: lt_EXTENSIONIN type table of BAPIPAREX,
         wa_EXTENSIONIN type BAPIPAREX,
         wa_bapi type BAPI_TE_ANLU.

**** fill the custom fields
      wa_bapi-COMP_CODE  = <com code>
      wa_bapi-ASSETMAINO = <if asset number u r passing externally then pass else leave blank>
      wa_bapi-ASSETSUBNO   = <if passing externally then pass else leave blank>

   wa_bapi-Zfields = .....

wa_EXTENSIONIN-STRUCTURE = 'BAPI_TE_ANLU'.
wa_EXTENSIONIN+30 =  wa_bapi.

append wa_EXTENSIONIN to lt_EXTENSIONIN.


then pass the lt_EXTENSIONIN to BAPI

PS :  Use BAPI_FIXEDASSET_CREATE1  as BAPI_FIXEDASSET_CREATE is old. Please check documentation.

Many Thanks,

Jitendra

0 Kudos
924

Hi,

   My problem got solved after activating the user Exit. EXIT_SAPL1022_001 & added the followinf code in include  zxaisu05 as

  e_anlu = i_anlu.

But now i am facing one more problem that some of the fields are not getting populated like.Inventory number(INVENT_NO) from General TAB. I even tried using the BAPI_FIXEDASSET_CREATE1

still inventory filed is not getting populated in transaction.

P.S. : I have even marked the 'X' in structure GENERALDATAX for inventory No.