cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module to pull in variables based on a source variable

Former Member
0 Kudos

Hi,

I am new to user exits and function modules and don't know any ABAP, but I need to make use of a user exit to pull in 4 cost center values (0COSTCENTER) based on a single profit center (0PROFIT_CTR) value. For example, in the planning layout users will select a profit center from the variable screen. Based on that profit center selection, I want to populate 4 cost centers values that correspond to the following:

- a "Pproduction" cost center value

- a "Level 2 R&D" cost center value

- a "Level 2 Selling" cost center value

- a "Level 2 Admin" cost center value

I know I need to create a mapper table that shows what production and level 2 cost centers are to be associated with what profit centers, but I'm not sure how, or where to do that (obviously I have the mapper data already, I just don't know how to set it up in a table that can be read by a function module). And then I think I need to make use of a user exit (function module) to look up the values in that table so the correct cost center values are pulled in based on the profit center selection.

Can anyone offer any advice, and/or provide sample code where I could easily replace the values that are relevant to my situation. Again, I don't know any ABAP, but clearly I need to learn, so I'm not sure if this is even feasible for me to do.

Any advice is appreciated.

//HC

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Closed for now.

Former Member
0 Kudos

Hi,

You need to create BPS variable of type exit. You can learn it easily. See the following document and you can also search this forum for relevant threads.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/650ee690-0201-0010-4bb7-83c3e2a7...