09-04-2009 12:43 PM
Hi guys,
I am trying to use BAPI_FIXEDASSET_CHANGE bapi, but it is giving as error - that assetr does not exist for company code.
But asset actually present in system for that company code.
What can be the problem.
Kindly help.
CALL FUNCTION 'BAPI_FIXEDASSET_CHANGE'
EXPORTING
companycode = p_bukrs
asset = it_infile-anln1
subnumber = it_infile-anln2
generaldata = l_generaldata
generaldatax = l_generaldatax
inventory = l_inventory
inventoryx = l_inventoryx
postinginformation = l_postinginfo
postinginformationx = l_postinginfox
timedependentdata = l_timedependata
timedependentdatax = l_timedependatax
origin = l_origin
originx = l_originx
leasing = l_leasing
leasingx = l_leasingx
IMPORTING
return = l_return
Value of sy-subrc is 0 but it returns l_return-type = 'E'
Kindly help.
thx in advance.
09-04-2009 1:42 PM
Hi kiran,
the data element ANLN1 is connected with domain ANLN1. This is a CHAR field with 12 characters connected to conversion exit ALPHA. That means that numbers will get preceding leading zeroes for the internal storage and use. The BAPI expects the number to be in internal format.
You may call
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_infile-anln1
IMPORTING
OUTPUT = it_infile-anln1
.
(and also for ANLN2) before calling the BAPI.
Note: A BAPI will almost always return SY-SUBRC = 0 which means technically everything worked. Errors are always reported in RETURN parameter - for some BAPIs a table storing all errors that have been recorded.
Kind regards,
Clemens
09-04-2009 1:42 PM
Hi kiran,
the data element ANLN1 is connected with domain ANLN1. This is a CHAR field with 12 characters connected to conversion exit ALPHA. That means that numbers will get preceding leading zeroes for the internal storage and use. The BAPI expects the number to be in internal format.
You may call
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_infile-anln1
IMPORTING
OUTPUT = it_infile-anln1
.
(and also for ANLN2) before calling the BAPI.
Note: A BAPI will almost always return SY-SUBRC = 0 which means technically everything worked. Errors are always reported in RETURN parameter - for some BAPIs a table storing all errors that have been recorded.
Kind regards,
Clemens
09-08-2009 8:24 AM