2016 Sep 22 8:29 AM
Hi experts,
I have created AMDP procedure and ABAP class which calls the procedure. i kept the breakpoint in procedures (HANA development perspective) .
i have created debug configuration as well. but configuration name is not reflecting in left side window. also when i executed from ABAP class debugger is not starting.
i have gone through videos and some threads ( http://scn.sap.com/docs/DOC-51790 also How to debug an ABAP Managed Database Procedure (AMDP) - YouTube but couldnt find the exact problem. i am not getting any error while configuring but i am not sure what are the pre requisite to follow before debugging procedure. i have a abap developer id and HANA modeller ID . i am not sure about what are the previlages and authorization should be necessary for HANA user ID .
If any specific Authorization must be granted to HANA user please guide me how to check and proceed further.
Below screen left corner window configuration name is not coming.
Regards
Vinuta hegde
2016 Sep 23 8:49 AM
Alright !!
First problem is not reflecting config name at left side window...that will resolve the below screen shot...
Second problem.. regarding authorization that will help to solve below document link...
http://scn.sap.com/docs/DOC-51790
-Amol Samte
2016 Oct 03 10:16 AM
Hi Amol,
as you said first problem is resolved.
second problem is regarding authorization, i have checked with BASIS team , they confirmed that i have(HANA user) debugger access exist . but still issue is the same. debugger is not triggering. once configuration is set , i can see thread is runing as shown below.
2016 Sep 26 8:21 AM
Hello Vinuta Hegde,
in case you are already using NetWeaver 7.50 or higher you might also use the "AMDP Debugger" which is part of ABAP in Eclipse (). Note that this is a different debugger implementation and you can access it by creating the breakpoint within the ABAP class (not within the generated procedure). ABAP user and ABAP debug authorization is sufficient for that.
Regarding your initial question:
Since you were able to create breakpoints means that you have at least the authorization for breakpoints, although - as far as I know - starting a debug session is protected by a different authorization. Therefore checking the authorization part that Amol mentioned is probably a good idea.
Besides authorizations there also can be other reasons why your process is not stopped at the breakpoint:
- The procedure is not executed. Sounds unlikely but happens often -> Ensure that the code where you created your breakpoint is actually executed
- The procedure is called by another procedure and the calling procedure runs in optimized mode. This can cause that the procedure to be debugged is inlined during runtime and therefore cannot be debugged -> Open your debug configuration, choose tab "Advanced" and ensure that the setting "All procedures in the call stack" is active.
- Use the mentioned guides to ensure that you are using the right users for your debug configuration (I think "Application User" should contain your ABAP user, not your HANA user)
Best regards,
Armin
2016 Oct 03 10:10 AM
Hi Armin Beil,
Thanks for your input . i have ensured that the code where i kept break point is executed and "All procedures in the call stack " is active as well in debug configuration.
i am using NetWeaver 7.4 so no option of 'AMDP Debugger ".
still the issue is same.
Regards
Vinuta Hegde
2016 Oct 04 7:52 AM
I see. Did you also verify that you have chosen "Debug an External Session" within your debug configuration and that you entered the ABAP user that is triggering the call of the AMDP in the field Application User?
Are you able to debug the generated procedure directly? To try it you can open the context menu on the procedure in the objects tree, choose "Open SQL Console" and try to execute the call directly.
call "ZCL_SOEG_GET_LIST=>GET_DOK_LIST"( ?, ? );
You can actually use "?" here for output parameters. Not sure if you can use "?" also for input but I think for input parameter real values have to be provided.
One more thing you could try is to search for the stub procedure "ZCL_SOEG_GET_LIST=>GET_DOK_LIST#stb..." and try to create a breakpoint there. This should never be necessary but currently I have no more relevant ideas, so let's try this also.
Best regards,
Armin
2016 Oct 04 10:44 AM
Hi Armin ,
I tried to execute in SQL console by call "ZCL_SOEG_GET_LIST=>GET_DOK_LIST"( ?, ? );
i am getting the error as " SAP DBTech JDBC: [258]: insufficient privilege: Not authorized " .
so is it something not authorized to execute the procedure ? if i call this procedure in Normal custom Z class i am getting the result with some data . so how the authorization will not check when i consume the procedure in ABAP program/class ?
Regards
Vinuta hegde
2016 Oct 04 12:20 PM
Hello Vinuta,
calling from ABAP and calling from console are two rather different scenarios. I just asked you to try the console call because I wanted to know whether it's possible to get the procedure debugger started at all.
The difference in the scenarios is the following:
1) AMDP / Calling from ABAP: The goal of the AMDP concept is to enable ABAP developers to work with database procedures nearly like they would work with standard ABAP. This means an ABAP user with ABAP development authorization is sufficient for creating and calling db procedures (AMDPs). Since your ABAP user has developer authorization you are able to successful call the procedure from ABAP.
Basically in this scenario there should be no need for a own HANA user at all (only for debugging with NW < 7.5; for >=7.5 you can do this also with ABAP user only).
In the AMDP scenario the procedure is executed by the central SAP<SID> user (e.g. if system name is ABC -> central user name is SAPABC) during runtime on the DB layer.
Therefore your debug configuration should be configured as "Debug an External Session" with HANA User = SAP<SID> and Application User = <your ABAP User> in this scenario. Please double check this configuration for your initial case.
This is also the reason why your own HANA user (that you use to work with HANA Studio) also needs authorization to debug sessions of user SAP<SID>.
2) Calling a procedure directly within HANA Studio console
In this case you try to execute the procedure directly with your HANA user that you used to logon to HANA Studio. The procedure will not run under SAP<SID> like in scenario 1). Of course your own HANA user then needs authorization to execute the procedure. But as said before this is not your initial / actual case but just a try to see if the debugger would work locally in your studio at all.
You should first double check the configuration mentioned under 1) and if you want to try this local debugging your HANA user needs the authorization to execute the procedure and you have to adjust your debug configuration for such a local debugging.
Best regards,
Armin
PS: The number of "?" in the call does not need to be 2, it rather depends on the number of parameters of your procedure.