Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Function Module to pull in variables based on a source variable


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.


Former Member
Not what you were looking for? View more on this topic or Ask a question