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

Former Member
0 Likes
949

hello,

can anyboby tell me the BAPI for creating WBS element in CJ20n trnasaction

cheers

11 REPLIES 11
Read only

Former Member
0 Likes
913

BAPI_BUS2054_CREATE_MULTI

BAPI_PROJECT_SAVEREPLICA

Cheers.

Read only

0 Likes
913

hai,

i am using this BAPI_BUS2054_CREATE_MULTI bapi for cretaion of wbs elemnet can one tell me which are the mandatory fields for the creation of WBS element

cheers

Read only

0 Likes
913

Hi,

I used: WBS_ELEMENT, DESCRIPTION,PROFIT_CTR, RESPONSIBLE_NO, CSTG_SHEET and it was enough in my case. But you may need additional data - it depends on your system configuration.

Krzys

Read only

0 Likes
913

hai konitz,

iam getting the error has Entry Costing sheet = AKAA00000 does not exist - check your entry ,<b></b>,actually in this case i am not giving any input for CSTG_SHEET. actually my senario is to create a WBS element under the already existing project.

cheers

Read only

0 Likes
913

Hi,

Field Costing sheet should have maximum 6 chars. I quess that in your case:

Usage of the condition table: "A"

Application: "KA"

Procedure: "A00000"

So you should pass only "A00000" as costing sheet.

I used BAPI_PROJECT_MAINTAIN to create WBS element without problems...

Krzys

Read only

0 Likes
913

hi konitz,

thanks for quick reply , can you tell me what are the mandatory fields for this BAPI_PROJECT_MAINTAIN to create a WBS element under any existing project.

cherrs.

Read only

0 Likes
913

Hi,

I mentioned them in post above. You will also need to fill PROJECT_DEFINITION fiels in table I_WBS_ELEMENT_TABLE.

And you also must fill table I_METHOD_PROJECT which contains instructions what to do. For example:

LOOP AT WBS_ELEMENT_TABLE.

METHOD_PROJECT-OBJECTTYPE = 'WBS-Element'.

METHOD_PROJECT-METHOD = 'Create'.

METHOD_PROJECT-OBJECTKEY = '...'.

METHOD_PROJECT-REFNUMBER = SY-TABIX.

APPEND METHOD_PROJECT.

ENDLOOP.

METHOD_PROJECT-OBJECTTYPE = ''.

METHOD_PROJECT-METHOD = 'Save'.

METHOD_PROJECT-OBJECTKEY = ''.

METHOD_PROJECT-REFNUMBER = ''.

APPEND METHOD_PROJECT.

Krzys

Read only

0 Likes
913

hai konitz,

hi i used the bapi with the parameters that you said but still i am getting this errors

Error-ID CNIF_PI

Error-NUMBER 007

Desription Object WBS Element R&D05114 could not be created

Error-ID 00

Error-NUMBER 058

Desription Entry Costing sheet = AKAA00000 does not exist - check your entry

<b></b>

one more question in what parametres should i pass the Project name.

cheers.

Read only

0 Likes
913

Hi

First try to activate error log for BAPI_PROJECT_MAINTAIN using:

METHOD_PROJECT-OBJECTTYPE = 'Trace'.

METHOD_PROJECT-METHOD = 'Create'.

METHOD_PROJECT-OBJECTKEY = FILENAME.

APPEND METHOD_PROJECT.

I filled at least

tables:

<u>I_WBS_ELEMENT_TABLE</u>

WBS_ELEMENT

PROJECT_DEFINITION

DESCRIPTION

PROFIT_CTR

RESPONSIBLE_NO

COSTING_SHEET

<u>I_METHOD_PROJECT</u>

OBJECTTYPE = 'WBS-Element'.

METHOD = 'Create'.

OBJECTKEY = [internal representation of WBS id, you can use FM CONVERSION_EXIT_ABPSN_INPUT]

REFNUMBER = [it should be index from table I_WBS_ELEMENT_TABLE which corresponds to WBS el. which must be actualy created]

parameters:

<u>I_PROJECT_DEFINITION</u>

Krzys

Read only

krzysztof_konitz4
Contributor
0 Likes
913

Hi,

Have a look at BAPI_PROJECT_MAINTAIN.

Krzys

Read only

Former Member
0 Likes
913

Hi,

You need to provide the following information (minimum).

<u><b>EXPORTING</b></u>

<b>1.I_PROJECT_DEFINITION</b> = gs_PROJECT_DEFINITION

gs_project_definition-PROJECT_DEFINITION = gv_stPSPID.

gs_project_definition-RESPONSIBLE_NO = gs_proj-VERNR.

gs_project_definition-COMP_CODE = gs_proj-VBUKR.

gs_project_definition-PROFIT_CTR = gv_stPRCTR.

gs_project_definition-PROJECT_PROFILE = gs_proj-PROFL.

<b>2.I_PROJECT_DEFINITION_UPD</b> = gs_PROJECT_DEFINITION_UPD

gs_project_definition_upd-PROJECT_DEFINITION = space.

<u><b>IMPORTING</b></u>

<b>1. RETURN</b> = gt_RETURN

<u><b>TABLES</b></u>

<b>1. I_METHOD_PROJECT</b> = gt_METHOD_PROJECT

gt_METHOD_PROJECT-refnumber = lv_seqno.

gt_METHOD_PROJECT-OBJECTTYPE = gc_projdef.

gt_METHOD_PROJECT-METHOD = gc_CREATE.

gt_METHOD_PROJECT-OBJECTKEY = GV_STPSPID.

<b>2. I_WBS_ELEMENT_TABLE_UPDATE</b> = gt_WBS_ELEMENT_TABLE_UPDATE

gt_WBS_ELEMENT_TABLE_UPDATE-WBS_ELEMENT = 'I'.

(This should have as many entries as the WBS Elements you have + 1)

<b>3. I_WBS_ELEMENT_TABLE</b> = gt_WBS_ELEMENT_TABLE

gt_WBS_ELEMENT_TABLE-WBS_ELEMENT = gv_WBS1.

gt_WBS_ELEMENT_TABLE-PROJECT_DEFINITION = GV_STPSPID.

gt_WBS_ELEMENT_TABLE-RESPONSIBLE_NO = gs_proj-vernr.

gt_WBS_ELEMENT_TABLE-COMP_CODE = gs_proj-VBUKR.

gt_WBS_ELEMENT_TABLE-PROFIT_CTR = gv_stprctr.

gt_WBS_ELEMENT_TABLE-PROJ_TYPE = 'L1'.

gt_WBS_ELEMENT_TABLE-OBJECTCLASS = 'PA'.

<b>4. I_WBS_HIERARCHIE_TABLE</b> = gt_WBS_HIERARCHIE_TABLE

(This table needs to have the hierarchy information. If the BAPI fails, I will start the check from here).

gt_WBS_HIERARCHIE_TABLE-WBS_ELEMENT = gv_wbs1.

gt_WBS_HIERARCHIE_TABLE-PROJECT_DEFINITION = GV_STPSPID.

gt_WBS_HIERARCHIE_TABLE-UP = ''.

gt_WBS_HIERARCHIE_TABLE-DOWN = gv_wbs2.

gt_WBS_HIERARCHIE_TABLE-LEFT = ''.

gt_WBS_HIERARCHIE_TABLE-RIGHT = ''.

<b>5. E_MESSAGE_TABLE</b> = gt_MESSAGE_TABLE