cancel
Showing results for 
Search instead for 
Did you mean: 

Variant Function - Debugging?

Former Member
0 Kudos

Hi gurus,

I have written a simple variant function to take some parameters from my VC and use them as input to fetch a single record from a Z-table then return its result to the VC. I've activated my function module and written a procedure within a test config profile for a test material. When I test things, it seems like nothing is firing. I am trying to catch the function by setting a breakpoint in the code (SE37) then going through the VC to force it to fire, but nothing is happening. Again, everything appears to be activated (function module saved, activated + procedure saved, released) yet I am getting no result from my variant function.

Can somebody help me in determining how I may be able to debug the function module?

Accepted Solutions (1)

Accepted Solutions (1)

johannes_klein
Explorer
0 Kudos

Hi Kelby,

did you make make sure that all input characteristics of the variant function are "specified" when you try to call it?

Kind Regards,
Johannes

Former Member
0 Kudos

Hi Johannes,

Sorry for the late reply! A fellow guru contacted me and provided this same answer which solved my problem. I did not realize all input parameters were required. Once I passed them, the debugger caught as expected through SE37 of the function module. :]

Answers (3)

Answers (3)

Former Member
0 Kudos

Did you assign the object dependecy to the configuration profile of the related material?

BR

Adil.

Flavio
Active Contributor
0 Kudos

Hi Kelby,

a very useful tool to debug is the configuration trace: just activate it from CU50 (Extras - Trace - Activate), run the configuration simulation for the test material and then display it (Extras - Trace - Display).

Maybe, check the trace settings before, in order to display a more detailed trace level and set trace areas (Procedures, for instance).

When displaying the trace result, search for the procedure and check the input characteristics; if they are not properly valuated, the procedure doesn't trigger the function.

If you need any further hit, feel free to come back here.

Hope this could help.

Thanks and ciao,

Flavio

Rachel_Tang
Advisor
Advisor
0 Kudos

some hints in debugging:

FUNCTION CE_I_CONFIGURE

...
*-------------------------
PERFORM setup_master_data
USING
only_cfg_engine
cuco
rctms-spras
rctms-neutr
gc_r3vc "scenario
lt_charact "characteristics
CHANGING
lv_md_subrc.
...
mi[ ] is filled here, this internal table holds all the characteristic values in the configuration.

FM VC_I_GET_CONFIGURATION is used to fetch the configuration information from database table directly.