Skip to Content
0
Aug 09, 2010 at 09:24 AM

Number next creation in KS01

17 Views

Hi all,

I'm encountering difficulties dealing with following issues,

I've built a procedure on wich at some point by pushing a button it get to call the Cost Center creation transaction KS01, than user getting through KS01 interactively input data and complete the Cost Center generation,

by saving it, procedure returns control to my calling program, where I immediately need number of newly created Cost Center,

In order to get message of creation sudden back I call KS01 this way:

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLKMA1'.

bdcdata_wa-dynpro = '200'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

SET PARAMETER ID: 'KOS' FIELD p_equnr.

CALL TRANSACTION 'KS01' USING bdcdata_tab

MODE 'A'

MESSAGES INTO messtab.

This should allow the direct access to the KS01 first screen by the user, his working through, and response message with number of Cost Center carried back in messtab to my procedure,

This way is pretty working with other two transaction I'm dealing with: CR01 Work Center Creation and AS01 Asset creation,

I always get in messtab message of proper cration back, with relative number,

This is not happening with KS01, messtab is truly empty also if Cost Center was defintely good created after save,

So I get no info in messtab when control return to my program, and I can't use the Cost Center just created,

Is there a way to recover that number sharp next creation, it is extremely required in may calling program in order to proceed with other operation, any advice around this?

Many Thanks in advance,

Sergio,

Edited by: sergio atzori on Aug 9, 2010 11:25 AM

Edited by: sergio atzori on Aug 9, 2010 11:29 AM

Edited by: sergio atzori on Aug 9, 2010 11:32 AM