cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_FIXEDASSET_CHANGE - Create new time interval (ASSETS)

Former Member

Hi,

I'm trying to use the function module: BAPI_FIXEDASSET_CHANGE, to create a new time interval for assets, but

I've not been able to handle with it.

Could you please help me ?

This is how I'm filling the FM:

COMPANYCODE               PSTB

ASSET                             1461704

SUBNUMBER                    0

TIMEDEPENDENTDATA

     FROM_DATE                 01.01.201

     TO_DATE                      31.12.210

     COSTCENTER               31210100

     PLANT                          CE15

     TAXJURCODE                SP

TIMEDEPENDENTDATAX

     FROM_DATE                 X

     TO_DATE                      X

     COSTCENTER               X

     PLANT                           X

     TAXJURCODE                X

thank you,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You need to give inputs to two more fields.

DEPRECIATION AREAS-Your dep area

DEPRECIATIONAREASX-Your dep area.

Then see the message in BAPI after executing it.

If it is Asset xxxxx was changed. Now if you check in AS03 it might not be changed becuase you need to commit the BAPI, which the Abapper should commit in the program.

Regards,

GSR

Former Member
0 Kudos

Hi,

I've tried but have no success !!!

My code is like that:

DATA: TIMEDEPENDENTDATA TYPE BAPI1022_FEGLG003.

DATA: TIMEDEPENDENTDATAX TYPE BAPI1022_FEGLG003X.

DATA: RETURN TYPE BAPIRET2.

DATA: DEPRECIATIONAREAS TYPE STANDARD TABLE OF BAPI1022_DEP_AREAS WITH HEADER LINE.

DATA: DEPRECIATIONAREASX TYPE STANDARD TABLE OF BAPI1022_DEP_AREASX WITH HEADER LINE.

PARAMETERS: p_imob TYPE BF_ANLN1.

PARAMETERS: p_sub  TYPE BF_ANLN2.


TIMEDEPENDENTDATA-FROM_DATE    = '20140101'.

      TIMEDEPENDENTDATA-TO_DATE      = '20141231'.

      TIMEDEPENDENTDATA-COSTCENTER   = '0031210100'.

      TIMEDEPENDENTDATA-PLANT        = 'CE15'.

      TIMEDEPENDENTDATA-TAXJURCODE   = 'SP'.

       TIMEDEPENDENTDATAX-FROM_DATE  = 'X'.

       TIMEDEPENDENTDATAX-TO_DATE    = 'X'.

       TIMEDEPENDENTDATAX-COSTCENTER = 'X'.

       TIMEDEPENDENTDATAX-PLANT      = 'X'.

       TIMEDEPENDENTDATAX-TAXJURCODE = 'X'.

DEPRECIATIONAREAS-area = '01'.

DEPRECIATIONAREASX-area = '01'.

APPEND DEPRECIATIONAREAS.

APPEND DEPRECIATIONAREASX.

CALL FUNCTION 'BAPI_FIXEDASSET_CHANGE'

   EXPORTING

     companycode                = 'PSTB'

     asset                      = p_imob

     subnumber                  = p_sub

    TIMEDEPENDENTDATA          = TIMEDEPENDENTDATA

    TIMEDEPENDENTDATAX         = TIMEDEPENDENTDATAX

  IMPORTING

    RETURN                     = return

  TABLES

    DEPRECIATIONAREAS          = DEPRECIATIONAREAS

    DEPRECIATIONAREASX         = DEPRECIATIONAREASX

           .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

* EXPORTING

*   WAIT          =

* IMPORTING

*   RETURN        =

           .

MarkusBredel
Employee
Employee
0 Kudos

Hi Junior,

the change for TIMEDEPENDENTDATA looks ok on the first look.For testing purposes however I would remove the TO_DATE limitation for the moment.

What you don´t need in this simple example is the DEPRECIATIONAREAS table, because you don´t change depreciation parameters in certain areas. Change of cost center is independent of the depreciation areas. So I would for the moment remove this code for DEPRECIATIONAREAS and test again.


Do you get any info in the RETURN structure?

Regards,

Markus


Former Member
0 Kudos

I've tried use the depreciationareas, because Sethuraman Ganesamurthy, ask for a try.

Now launching as you ask me, I get the return message the teh asset was changed, but when i consult it in AS03, the time interval is the same, have no changes.

=/

MarkusBredel
Employee
Employee
0 Kudos

Hi,

ok, another try. Can you please let me know what the current content of Cost Center, Plant and Jurisdiction code is? Is it different to the values you would like to change it to? The reason for this question is that the asset master record has a logic to condense time-intervals which are identical.

Regards,

Markus

Former Member
0 Kudos

this is how looks like my Asset, time interval.

I'm trying include one more time interval here using that code!

MarkusBredel
Employee
Employee
0 Kudos

hHi,

but this is what I described, isn´t it? You have one time-interval with:

Cost Center = '31210100'

Plant           = 'CE15'.

Tax Code    = 'SP'.

And now you want to add one time-interval which contains the same paramters. The master record would now create the interval but subsequently condense both intervals again, because both next-to-next intervals contain the same information.

Please try to add an interval which contains a different attribute, so that both intervals after the change contain different information.


Regards,

Markus

Former Member
0 Kudos

Thanks,

Worked fine !

A new interval was included, but I have one question yet.

I already have a Time interval, just like in the PRINT above.

This time interval is "SHUTDOWN",  but, I want to include a new interval, for the same attributes,

but other dates, and not shutdown !!!

Can't I do this ??

MarkusBredel
Employee
Employee
0 Kudos

Hi,

you can do this, but then you have to change the shutdown indicator in structure TIMEDEPDENTDATA. Then this should work.


Regards,

Markus

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Junior,

I got similar kind of issue i.e. to add new interval for depreciation area.

Please help me if you have the solution.

Please find my thread for your reference.

http://scn.sap.com/thread/3723365

Thanks.

Siva

Former Member
0 Kudos

THANKS A LOT MARKUS !!!!

Now I'm able to do what I need !