‎2013 Aug 20 3:06 PM
Hi Gurus,
for creating a function module we have to create it under function group.
we can have lot of function modules under a funtion group. and we can have global variables here. it partly acts as class.
doubt here is how can we find how the global variables are getting filled.
i have a scenario, PM_PARTNER_CHECK_COMPLETE in this FM i have a global internal table XIHPA. i need to know how or when this global variable is getting filled.
‎2013 Aug 21 7:52 AM
Hi Dinesh,
Double click on XIHPA it will take you to the top include.
Click on where used list in toolbar and click enter.
This will give you where all this table is used.
n/ow press Control + F and type APPEND.
There are some 10 locations where it is getting filled.
Another best solution will be finding it in debug mode.
Keep a WATCHPOINT on this table it will stop exactly where it is changed.
Regards
‎2013 Aug 21 7:52 AM
Hi Dinesh,
Double click on XIHPA it will take you to the top include.
Click on where used list in toolbar and click enter.
This will give you where all this table is used.
n/ow press Control + F and type APPEND.
There are some 10 locations where it is getting filled.
Another best solution will be finding it in debug mode.
Keep a WATCHPOINT on this table it will stop exactly where it is changed.
Regards
‎2013 Aug 21 8:06 AM
Hi,
use
1) where used list
2) create breakpoint, watch point.
3) Debug the code
you will understand the functionality .
‎2013 Aug 21 12:31 PM
Hi
you can use the debugger for this .In debugger we can set extended debugger to debug the Function module
‎2013 Aug 21 1:26 PM
hi,
since the internal table is global ,any function module under the function group can fill the internal table (on the same program).
Use extended debugger and check whether calling function module is fiilling the internal table ,(similarly check all the function module ).
Other probablity is that code inside the function group will be filling the internal table ,if this is the case when execution reaches your funtion call ,it will load the entire function group (internal table get filled during that time ) .
‎2013 Aug 21 1:40 PM
can you please tell me about the watch point for internal table.
as of i know we can find any value change inside a internal table through watch point.
EX. if table has 10 entries,
loop at itab.
.
.
.
end loop.
we can keep watch point to find when it reaches itab-matnr = 5. we can acheive that by watch point.
but, take my above ex. how can we have watchpoint for that scenario.
‎2013 Aug 21 3:00 PM
Hi,
You are partially correct.
The function of the watch point is to stop at the point when there is a change in the value of the variable defined in it.
You can just define the name of the variable whose value change needs to be spotted, by only specifying the name. Eg; itab[].
Also as you mentioned you can keep a check on the step where the value of the variable changes to a appropriate value, by specifying the condition in it . Eg . when itab-matnr = 0.
‎2013 Aug 21 3:17 PM
Hi Priyan,
in the FM "PM_PARTNER_CHECK_COMPLETE" the global variable that is my internal table XIHPA is global. when i entered in to my function module in debugging mode i try to check when this table gets filled the first value.
i tried to put watch point but it shows "Variable XIHPA[] does not exist" as it is not defined in this FM. can you please tell me the steps to use the watch point in this scenario.
‎2013 Aug 21 4:07 PM
Hi Dinesh,
While trying to create the watchpoint make sure that the status of the variable defined is active because the watchpoint checks for variable in the current driver program.
The issue you are facing is because you are trying to create a watchpoint with a variable which is not defined in the current driver program while debugging.
Please note that you can't create a watchpoint if the status of the variable is as follows.
‎2013 Aug 22 6:44 AM
You create a watchpoint on table without any condition in that case it will stop at each change in the table...
The first change will be insert only .... so you will get where it is getting filled.
‎2013 Aug 21 1:58 PM
Hi,
Double click on the table in the program and get to know where it is being used. Create Breakpoints at places where the table is getting modified like MODIFY, APPEND statements and debug. Or you could use the WATCHPOINT option while debugging through the FM.
‎2013 Aug 21 2:11 PM
Hi Dinesh,
Simply put a watch point for that variable.
Thanks,
Abyson Joseph
Applexus Technologies