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: 

Error in BAPI_ASSET_ACQUISITION_POST

Former Member
0 Kudos

Hello,

I have made mi own Z program and called BAPI_ASSET_ACQUISITION_POST with this parameters:

CALL FUNCTION 'BAPI_ASSET_ACQUISITION_POST'

       EXPORTING

         generalpostingdata = ls_gpdata

         acquisitiondata    = ls_acqdata

         furtherpostingdata = ls_furdata

       IMPORTING

         return             = ls_return

       EXCEPTIONS

         error_message      = 99.


Then, commit .

     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'


But ls_return give me a message type E saying that the asset is do not exits for the company code i am using....

The same parameters works fine in SE37.


Can anybody help me?


Regards!


Sabrina.

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos

Well, basically SE37 will execute some data conversion the BAPI are not BDC, simulation of screen input, so you must already use internal format (if not explicitly asked in BAPI parameter definition of course) so check your input data.

NB: ALNL1 and -2 use ALPHA conversion exit so if your input data is in exeternal format (e.g. Asset 123) use FM CONVERSION_EXIT_ALPHA_INPUT to convert to internal format (e.g. Asset 000000000123) - for testing add a SELECT FROM ANLH, ANLA you must be successful to use the BAPI.

Regards,

Raymond

0 Kudos

Hello Raymond,

That was the problem! Thank you very much.

Regards

Sabrina.