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: 

Asset 192776 0 not in company code 300

0 Kudos
384

Hi Experts,

I am updating the data from AS02 T-code by using BAPI:BAPI_FIXEDASSET_CHANGE

i am getting below error.

Asset 192776 0 not in company code 300.

Please check the  below code.

CMPCODE = '300'.

ASSET = '0000192776'.

SUBNUMBER = 0000.

GENERALDATA-SERIAL_NO = 'XYZ'.

GENERALDATAX-SERIAL_NO = 'X'.


CALL FUNCTION 'BAPI_FIXEDASSET_CHANGE'

   EXPORTING

     COMPANYCODE  = CMPCODE

     ASSET        = ASSET

     SUBNUMBER    = SUBNUMBER

*   GROUPASSET   =

     GENERALDATA  = GENERALDATA

     GENERALDATAX = GENERALDATAX

*   I

   IMPORTING

     RETURN       = RETURN

* TABLES

*   DEPRECIATIONAREAS  =

*   DEPRECIATIONAREASX =

*   INVESTMENT_SUPPORT =

*   EXTENSIONIN  =

   .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

   EXPORTING

     WAIT = 'X'

* IMPORTING

*   RETURN        = return


I am getting Following Error.

Asset 192776 0 not in company code 300



Regards,

Naresh.

6 REPLIES 6

Former Member
0 Kudos
108

Hi,

Can you check the asset exist for the company code in table ANLA?

This error message will only if the asset/company code/subnumber doesn't exist in table ANLA.

You can see that validation inside the BAPI in the FM BAPI_FIXEDASSET_GETDETAIL @ line 35. This is data issue.

Regards,

0 Kudos
108

Hi Athimoolam,

Thank You for your quick response, I am checking Table ANLA also asset/company code/subnumber data Is there.

please give me the solution, how i am solving this issue

Regards,

Naresh.

0 Kudos
108

Hi,

Can you put a break-point in that validation and confirm sy-subrc = 0? if possible can you paste the screenshot of the select query in debug mode along with the three values passed company/asset/subnumber.

Regards,

raymond_giuseppi
Active Contributor
0 Kudos
108

Well one more wrong format: ANLN1 is 12 characters wide with ALPHA conversion exit, not 10


Hint: '0000192776    ' (trailing spaces) different from '000000192776', I would never point too much to use FM like CONVERSION_EXIT_ALPHA_INPUT as soon as data don't come from a SAP database or a SAP correct screen dynpro.


Regards,

Raymond

0 Kudos
108

Hi Raymond,

Thank you for giving the response,  but even for 12 character's also i am getting same error.

Please check the below code.

CMPCODE = '300'.

ASSET = '000000192776'.

SUBNUMBER = 0000.

GENERALDATA-SERIAL_NO = 'XYZ'.

GENERALDATAX-SERIAL_NO = 'X'.

*TIMEDATA-PERSON_NO = '6536'.

*TIMEDATAX-PERSON_NO = 'X'.

*

*ALCT-EVALGROUP2 = '0050'.

*ALCT-EVALGROUP3 = '1006'.

*

*ALCTX-EVALGROUP2 = 'X'.

*ALCTX-EVALGROUP3 = 'X'.

CALL FUNCTION 'BAPI_FIXEDASSET_CHANGE'

   EXPORTING

     COMPANYCODE  = CMPCODE

     ASSET        = ASSET

     SUBNUMBER    = SUBNUMBER

*   GROUPASSET   =

     GENERALDATA  = GENERALDATA

     GENERALDATAX = GENERALDATAX

*   INVENTORY    =

*   INVENTORYX   =

*   POSTINGINFORMATION =

*   POSTINGINFORMATIONX        =

*   TIMEDEPENDENTDATA  = TIMEDATA

*   TIMEDEPENDENTDATAX = TIMEDATAX

*   ALLOCATIONS  = ALCT

*   ALLOCATIONSX = ALCTX

*   ORIGIN       =

*   ORIGINX      =

*   INVESTACCTASSIGNMNT        =

*   INVESTACCTASSIGNMNTX       =

*   NETWORTHVALUATION  =

*   NETWORTHVALUATIONX =

*   REALESTATE   =

*   REALESTATEX  =

*   INSURANCE    =

*   INSURANCEX   =

*   LEASING      =

*   LEASINGX     =

   IMPORTING

     RETURN       = RETURN

* TABLES

*   DEPRECIATIONAREAS  =

*   DEPRECIATIONAREASX =

*   INVESTMENT_SUPPORT =

*   EXTENSIONIN  =

   .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

   EXPORTING

     WAIT = 'X'

* IMPORTING

*   RETURN        = return

   .


And same data i am executing directly in se37 . F.M gives success message only but data was not changed.

I am running in PGM it will gives below error.

Asset 192776 0 not in company code 300


Regards,

Naresh.

0 Kudos
108

Hi,

Thank you for giving the response, Issue was resolved.

Regards,

Naresh