‎2016 Jan 29 11:25 AM
Hi guys,
Does anybody know if is possible to make save test data from function module without debug?
Saving test data with New ABAP Debugger - CRM - SCN Wiki
Let me explain why I need it. In the company where I work there are some legacy systems (.net, java) that uses SAP Connector to consume RFCs. It works very well, but sometimes when something wrong happens, it's very annoying to debug it. Those systems uses dialog user, and I tried in a lot of ways debug it but the only way that's possible is when I insert a infinite loop in that function module.
To avoid do that everytime I need, I did a table and a class to check if RFC is "enabled" to debug in this table. (inserting that loop and allowing me to debug via SM50).
This idea could be better if I could save test data without need to enter in debug.
Thanks!
‎2016 Jan 29 11:33 AM
In SE37 enter function name -> Test/execute -> fill input data -> SAVE test data
Or you are searching for something else?
‎2016 Jan 29 11:57 AM
Thanks for your answer, but I need something a bit different.
Is there any function module that I could use to save these data? I want to do that to avoid debug and get these data.
This is the method code that I mentioned before:
METHOD verificar_debug.
DATA:
t_stack TYPE abap_callstack.
DATA:
w_stack TYPE abap_callstack_line,
w_rfc_debug TYPE yrfc_debug .
DATA:
v_nome_rfc TYPE tfdir-funcname.
CALL FUNCTION 'SYSTEM_CALLSTACK'
EXPORTING
max_level = 0
IMPORTING
callstack = t_stack.
READ TABLE t_stack
INTO w_stack
WITH KEY blocktype = 'FUNCTION'.
IF sy-subrc = 0.
v_nome_rfc = w_stack-blockname.
ELSE.
RETURN.
ENDIF.
* Tabela de parametrização para loop infinito em RFCs
SELECT SINGLE * FROM yrfc_debug
INTO w_rfc_debug
WHERE rfc = v_nome_rfc.
WHILE w_rfc_debug-debug IS NOT INITIAL.
IF w_rfc_debug-debug IS INITIAL.
EXIT.
ENDIF.
ENDWHILE.
ENDMETHOD.
‎2016 Jan 29 12:23 PM
‎2016 Jan 29 12:04 PM
Hi,
If you use a dialog user you can set an external break-point for another user.
In se38 Utilities-->Settings
Then tab Abap editor, subtab Debugging
Change User to the RFc user.
When you place an external break-point, it will debug that user for an hour.
Kind regards, Rob Dielemans
‎2016 Jan 29 12:12 PM
Thansk Rob, I've tried it several times and doesn't work in this case with system and communication user
‎2016 Jan 29 12:53 PM
Hi Thiago,
You can make use of ASSERT statement in your program. Please follow the below wiki
Checkgroups - ABAP Development - SCN Wiki
The checkpoint group can be activated or de-activated on the fly using SAAB transaction. The inputs to the RFC function module can be saved as a log using assert statement. The log can be viewed later in SAAB.
For more information
Activatable Checkpoints - ABAP - Analysis Tools - SAP Library
Thanks,
Karthikeyan