Application Development 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: 

creation of a new wbs elements to an already existing project

Former Member
0 Kudos

1. i am using BAPI_BUS2054_CREATE_MULTI to create a new wbs element in an already existing project.When this is done then i am using BAPI_PS_PRECOMMIT and then bapi_transaction_commit

so this creates the wbs element which i guess but only the element.

2. Now i need to attach the networks to it which are there in BOM so i am taking all the network data from the table afko joining it with aufk.It is giving all the network data which was there attached prior to the project but the new one it is not showing.The query is

SELECT afkoaufnr afkopronr aufkpspel aufkktext aufk~loekz

INTO (afko-aufnr, afko-pronr, aufk-pspel, aufk-ktext, aufk-loekz)

FROM ( afko AS afko INNER JOIN aufk AS aufk ON aufkaufnr = afkoaufnr)

WHERE afko~pronr = w_wbs_cur-psphi.

3.Now i am comparing this data from above to the BOM data and take the difference of the networks which are to be created.

But as the above query is not returning the new wbs so it is getting failed.

2 REPLIES 2

Former Member
0 Kudos

Use conversions when you are using PSPHI

CONVERSION_EXIT_KONPD_INPUT

CONVERSION_EXIT_KONPD_OUTPUT

So convert your w_wbs_cur-psphi value using above conversion before passing to the select statement.

Regards,

Amey

0 Kudos

i am already using this

CALL FUNCTION 'CONVERSION_EXIT_KONPD_INPUT'

EXPORTING

input = g_znpsdata_old-project_definition

IMPORTING

output = w_wbs_cur-psphi

EXCEPTIONS

not_found = 1

OTHERS = 2.

do i need to use the other one also