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

BAPI for CJ20N transaction

Former Member
0 Likes
7,797

Hi all!

Please, does anybody know a BAPI for create Project in CJ20N transaction?

I've already done some tests with BAPI_PROJECTDEF_CREATE but it didn't work.

Thanks a lot,

Daniela Machado

Hi all!

Please, does anybody know a BAPI for create Project in CJ20N transaction?

I've already done some tests with BAPI_PROJECTDEF_CREATE but it didn't work.

Thanks a lot,

Daniela Machado

14 REPLIES 14
Read only

Former Member
0 Likes
4,311

I Think BAPI_BUS2001_CREATE will work.

Read only

Former Member
0 Likes
4,311

Hi,

Whatz the error you encountered when you used FM BAPI_PROJECTDEF_CREATE?

Regards,

Raj

Read only

0 Likes
4,311

it can be because of the format, have you tried from se37, it is the easiest way for it,

regards

Read only

Former Member
0 Likes
4,311

Hi,

try with BAPI <b>BAPI_BUS2001_CREATE</b>, check the FM documentation also.

Regards

vijay

Read only

Former Member
0 Likes
4,311

Hi,

Use following BAPIs in given order.

<u><b>1.</b></u>BAPI_PS_INITIALIZATION

<u><b>2.</b></u>BAPI_BUS2001_CREATE

<u><b>3.</b></u>BAPI_BUS2054_CREATE_MULTI

<u>4.</u>BAPI_BUS2001_SET_STATUS (To set the status at project level)

OR

BAPI_BUS2054_SET_STATUS (To set the status at WBS element level)

<u><b>5.</b></u>BAPI_PS_PRECOMMIT

You don't have to code again for this. Whatever structures and internal tables you had used in BAPI_PROJECT_MAINTAIN can be used to populate the above BAPIs.

We are working in 4.6C and we have successfully implemented this solution.

If you only want to create project just use BAPI's in given order.

Also, if you have custom field at WBS element level, these BAPI will create a project but wan't update custom field. There is an OSS note which you need to apply for this.

Let me know if you need further information.

Thanks,

Pal

Read only

0 Likes
4,311

Hi,

I ' ve been trying to change the proyect status, so the only bapi i found is the one you mentioned BAPI_BUS2001_SET_STATUS... but when i run it from se37 trx and complete the parameters in the result it says "Imposible treatment because of incorrect initialization. The function wasn`t executed"

Do you have any solution?

Thanks!

Read only

0 Likes
4,311

Hi Pal,

I have to upload the Project definition, WBS Element and Network activities. In that we have customer fields in Project definition and WBS Element. Pls suggest me best way to implement by using BAPIs ?? If u have sample code pls let me know. We are working on ECC 6.0 version.

Can we upload in a single program ??? This is urgent.

Thanks in advance.

KUR

Read only

0 Likes
4,311

Hi i am also having same requirement....if ur problem solved plz give me solution...thanks

Read only

0 Likes
4,311

Hi Kur Kur,

Did your problem get solved..since I have the exact requirement were, I have to create projects from a flat file based on a template and also have to update custom fields of the project.

Cheers,

Vidya

Read only

0 Likes
4,311

Hi All,

I am also having the same Functionaity to upload Projects using an Excel File and also upload the WBS elements for it.

I know that I need to use BAPI_PROJECTDEF_CREATE to create the Proj Defination & BAPI_PROJECT_MAINTAIN to create

the WBS Elements.

Can someone send me the Sample Code for the above said BAPI's.

Thanks in advance.

Regards,

Asish Dash

Read only

Former Member
0 Likes
4,311

Hi,

The BAPI BAPI_PROJECT_MAINTAIN can be used to create/update Projects/WBS Elements/Networks and activities as well.

Let me know,if you need more info.

Venkat

Read only

0 Likes
4,311

Hi Venkat,

In my case PRNu2019s will be created manually . WBS have to be uploaded attached with a SAP cost centre(default for all company codes) to top level PRN's. I am doing this with LSMW using BAPI. Can you please explain how do I proceed.

Also can you send the me the sample data if you have used for the same consisting of leve1 and level2 upload.

Thanks.

Read only

0 Likes
4,311

Hi Kusuma,

I m also trying to upload CJ20N t-code.

Can you send me Code and Falt file.

id: chandra.gbabuatgmail.com

Regards,

chandu

Read only

Former Member
0 Likes
4,311

Hi,

You should use the following 4 BAPI's in the same sequence to create a project:

1. BAPI_PS_INITIALIZATION

2. BAPI_BUS2001_CREATE

3. BAPI_PS_PRECOMMIT

4. BAPI_TRANSACTION_COMMIT/BAPI_TRANSACTION_ROLLBACK

This is the seuqence SAP recommends in the documentation. And make sure the return value of PRECOMIT is good before doing the actual COMMIT/ROLLBACK. Otherwise it will end with a short-dump.

Regards,

Sumant.