2009 Dec 02 10:16 AM
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.
2009 Dec 02 11:44 AM
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.
2009 Dec 02 10:31 AM
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.
2009 Dec 02 10:46 AM
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
2009 Dec 02 11:44 AM
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
2009 Dec 02 11:46 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |