cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the error while using bapi 'BAPI_PROJECTDEF_UPDATE'.

Former Member
0 Kudos

Hi,

All

To fulfill a requirement of project definition update in PS module, I have been trying with bapi 'BAPI_PROJECTDEF_UPDATE' , but I am getting the error like 'The external key is not compatible with the internal key'.

Following are the details of my source code:



CALL FUNCTION 'BAPI_PS_INITIALIZATION'

           .

   data: ls_def_strucure LIKE BAPI_PROJECT_DEFINITION,

       ls_def_update LIKE BAPI_PROJECT_DEFINITION_UP,

       ls_error like bapireturn1.

ls_def_strucure-PROJECT_DEFINITION = '11011'.

ls_def_strucure-DESCRIPTION = 'Indian Metro Updated by BAPI'.

ls_def_update-DESCRIPTION = 'X'.

CALL FUNCTION 'BAPI_PROJECTDEF_UPDATE'

   EXPORTING

     currentexternalproje          = '11011'       " Project Definition

     currentinternalproje          = '11011'

     project_definition_stru       = ls_def_strucure

     project_definition_up         = ls_def_update

  IMPORTING

    RETURN                        = ls_error

* TABLES

*   E_MESSAGE_TABLE               =

           .

CALL FUNCTION 'BAPI_PS_PRECOMMIT'.


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

           .


I have tried with 'BAPI_PROJECT_MAINTAIN' ,but there I am not getting any idea to usage of this bapi.

please help me if you have any solution for this problem.

Thanks in advanced.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member195427
Active Contributor
0 Kudos

Hi Deepak,

I think if you can discuss about this error with your ABAPer than you will get valuable help for sure. You can also post the same in ABAP forum.


Thanks

Former Member
0 Kudos

Hi,

All thanks for your help.

By the changing some parameter values in 'BAPI_PROJECT_MAINTAIN' problem got resolved.

Thanks.

former_member195427
Active Contributor
0 Kudos

Thanks for updating it Deepak.

Regards

Saurabh

Former Member
0 Kudos

Thanks for your quick reply

Actually i have a requirement to update the Project definition and other Project elements like WBS, Network , Activities and Milestone. I referred several documents and came to know that 'BAPI_PROJECT_MAINTAIN' can perform these all update tasks. But tried with that bapi but got the error. First help me please if you have any idea about this BAPI .

Coming to BAPI_PROJECTDEF_UPDATE I got the error like Internal and exrternal keys  are not type compatible with each other.

So , do you have any idea what would be the exact value of these two parameters.

Former Member
0 Kudos

Hi Deepak,

I have got few useful threads for you. Request you to go through the same.

Regards,

Amit

Former Member
0 Kudos

Hi Deepak,

Could you please elaborate your problem rather functionally. I want to know what changes exactly you are trying to do in project definition update.

But I think Abaper can help you out to debug the error that you are getting. Please discuss with your Abaper regarding the same.

Not sure, if following link can help you in this case. But have a look once.

Converting from External to Internal Keys - Processes - SAP Library

Regards,

Amit Rajoria

Former Member
0 Kudos

Hi Amit,

Thanks for your quick reply

Actually i have a requirement to update the Project definition and other Project elements like WBS, Network , Activities and Milestone. I referred several documents and came to know that 'BAPI_PROJECT_MAINTAIN' can perform these all update tasks. But tried with that bapi but got the error. First help me please if you have any idea about this BAPI .

Coming to BAPI_PROJECTDEF_UPDATE I got the error like Internal and exrternal keys  are not type compatible with each other.

So , do you have any idea what would be the exact value of these two parameters.