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_FIXEDASSET_CHANGE - EXTENSIONIN Parameter

Former Member
0 Likes
3,341

Dear Experts,

I was trying to use BAPI_FIXEDASSET_CHANGE to update one of the user defined fields in the AS02 transaction. For this purpose I have used the EXTENSION IN table and I passed it in th following way.

ls_BAPI_TE_ANLU-COMP_CODE = gs_final-bukrs.

ls_BAPI_TE_ANLU-ASSETMAINO = gs_final-anln1.

ls_BAPI_TE_ANLU-ASSETSUBNO = gs_final-ANLN2.

ls_BAPI_TE_ANLU-ZZSERIAL_EXT = gs_final-sernr.

ls_BAPI_TE_ANLU-ZZROOM_EXT = gs_final-raumn.

MOVE 'BAPI_TE_ANLU' TO l_extensionin-structure.

MOVE ls_BAPI_TE_ANLU TO l_extensionin-valuepart1.

APPEND l_extensionin.

CALL FUNCTION 'BAPI_FIXEDASSET_CHANGE'

EXPORTING

companycode = gs_final-bukrs

asset = gs_final-anln1

subnumber = gs_final-ANLN2

IMPORTING

RETURN = RETURN

TABLES

EXTENSIONIN = l_EXTENSIONIN.

But this way it is not populating the newly added field, please let me know whether this is the right way or not.

Many Thanks,

Farook.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,917

Hi Farook,

concatenate client(mandt ) with extensionin.

try this code...

MOVE 'BAPI_TE_ANLU' TO l_extensionin-structure.

MOVE ls_BAPI_TE_ANLU TO l_extensionin-valuepart1.

concatenate sy-mandt l_extensionin-valuepart1 into l_extensionin-valuepart1.

APPEND l_extensionin.

Thanks,

Joson

Dear Experts,

I was trying to use BAPI_FIXEDASSET_CHANGE to update one of the user defined fields in the AS02 transaction. For this purpose I have used the EXTENSION IN table and I passed it in th following way.

ls_BAPI_TE_ANLU-COMP_CODE = gs_final-bukrs.

ls_BAPI_TE_ANLU-ASSETMAINO = gs_final-anln1.

ls_BAPI_TE_ANLU-ASSETSUBNO = gs_final-ANLN2.

ls_BAPI_TE_ANLU-ZZSERIAL_EXT = gs_final-sernr.

ls_BAPI_TE_ANLU-ZZROOM_EXT = gs_final-raumn.

MOVE 'BAPI_TE_ANLU' TO l_extensionin-structure.

MOVE ls_BAPI_TE_ANLU TO l_extensionin-valuepart1.

APPEND l_extensionin.

CALL FUNCTION 'BAPI_FIXEDASSET_CHANGE'

EXPORTING

companycode = gs_final-bukrs

asset = gs_final-anln1

subnumber = gs_final-ANLN2

IMPORTING

RETURN = RETURN

TABLES

EXTENSIONIN = l_EXTENSIONIN.

But this way it is not populating the newly added field, please let me know whether this is the right way or not.

Many Thanks,

Farook.

4 REPLIES 4
Read only

nirajgadre
Active Contributor
0 Likes
1,917

Hi,

I guess for this you need to append the new structure in the BAPI_TE_ANLU with the new field which are added.

while passing the data to bapi you need to pass the newly created structure name along with the value.

also see the documentation for the table EXTENSIONINi in the BAPI.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,917

Hello Farook,

I just checked a similar structure BAPI_TE_MARA & this is how SAP has code for the Extensionin param.


FORM extension  tables p_extensionout structure bapiparex.  

data c_laenge type i.

  move 'BAPI_TE_MARA' to p_extensionout-structure.

  describe field p_extensionout-structure length c_laenge
                                          in character mode.

  move wa_bapi_te_mara to p_extensionout+c_laenge.

  append p_extensionout.
ENDFORM.

Hope this is of some help.

BR,

Suhas

Read only

Former Member
0 Likes
1,918

Hi Farook,

concatenate client(mandt ) with extensionin.

try this code...

MOVE 'BAPI_TE_ANLU' TO l_extensionin-structure.

MOVE ls_BAPI_TE_ANLU TO l_extensionin-valuepart1.

concatenate sy-mandt l_extensionin-valuepart1 into l_extensionin-valuepart1.

APPEND l_extensionin.

Thanks,

Joson

Read only

0 Likes
1,917

Hi Joson,

Thanks for your Reply,Issue is Solved.

Farook.