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

Error in BAPI_ASSET_ACQUISITION_POST

Former Member
0 Likes
1,768

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
Read only

RaymondGiuseppi
Active Contributor
0 Likes
851

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

Read only

0 Likes
851

Hello Raymond,

That was the problem! Thank you very much.

Regards

Sabrina.