Hello Matthias,
thank you for your fast reply and the solution.
Cheers
Stefan
Hello Matthias,
thank you for your fast reply and the solution.
Cheers
Stefan
Hello Peter,
you can find the answer here.
Cheers
Stefan
P.S. The text search is really fast and a very good feature.
Hello community,
I have a strange behaviour of the GUI_DOWNLOAD method from the cl_gui_frontend_services class.
GUI_DOWNLOAD delivers always FILE_WRITE_ERROR in a test class but in a report it works as expected. So I check the behaviour in the TAC SE80 and start there the unit test and here all works well and as expected. It seems that the same unit test with GUI_DOWNLOAD method works different in ABAP in Eclipse as in SE80. It is a problem of the detection routines in the data provider functions, the error raises on DP_SEND_STREAM_TO_URL (DP_ERROR_CREATE)> DP_CREATE > CONTROL_INIT (CONTROL_INIT_ERROR), CL_GUI_OBJECT=>IS_INIT is initial.
Thanks for tips and hints.
Cheers
Stefan
Message was edited by: Stefan Schnell
Hello community,
here a tiny addition.
I code a test report to analyze the behaviour.
"-Begin-----------------------------------------------------------------
REPORT z_guitest.
"-Classes Definitions---------------------------------------------------
CLASS lcl_guitest DEFINITION.
PUBLIC SECTION.
METHODS isgui RETURNING VALUE(e_answer) TYPE answer.
ENDCLASS.
"-Variables-------------------------------------------------------------
DATA:
lo_guitest TYPE REF TO lcl_guitest,
lv_answer TYPE answer
.
"-Main------------------------------------------------------------------
CREATE OBJECT lo_guitest.
lv_answer = lo_guitest->isgui( ).
BREAK-POINT.
"-Class Implementations-------------------------------------------------
CLASS lcl_guitest IMPLEMENTATION.
METHOD isgui."--------------------------------------------------------
"-Main--------------------------------------------------------------
CALL FUNCTION 'RFC_IS_GUI_ON'
EXPORTING
login_check = abap_false
IMPORTING
on = e_answer.
ENDMETHOD.
ENDCLASS.
"-End-------------------------------------------------------------------
As expected delivers isgui Y.
So I implement this code in a test class.
CLASS ltcl_isgui DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PUBLIC SECTION.
PROTECTED SECTION.
PRIVATE SECTION.
METHODS:
isgui FOR TESTING.
ENDCLASS.
CLASS ltcl_isgui IMPLEMENTATION.
METHOD isgui.
DATA:
lv_answer TYPE answer.
CALL FUNCTION 'RFC_IS_GUI_ON'
EXPORTING
login_check = abap_false
IMPORTING
on = lv_answer.
BREAK-POINT.
ENDMETHOD.
ENDCLASS.
If I execute the module test in the SE80 it delivers also Y.
But if I execute the unit test in AiE it delivers N.
Thanks for tips and hints.
Cheers
Stefan
Hi Stefan,
this is correct, as Eclipse is not running in SAP GUI, but SE80 is...
What are you exactly testing? GUI_DOWNLOAD is only valid for foreground processes run in SAP GUI.
Best regards,
Kay
Hello Kay,
thanks for your reply.
I have only noticed that difference, it is not critical. I test at the moment the generating of Excel worksheets in the backend via abap2xlsx and in this context I add to a test class the GuiDownload method.
I think it is good to know that test classes, which uses frontend functionalities, have different behaviour between SE80 and AiE.
Cheers
Stefan
Yes, IMHO you should never test frontend functionalities, unless you want to do UI testing.
Better split your logic to verify that your model is working with proper unit tests and implement UI tests where necessary.
Hello community,
i'm getting some minor issues during refactoring.
First, if i extract paramerers, the parameter type is not recognized correctly, even if it can be fully determined from the context (see picture for extracted parameters typed with any ). Extracted parameters are just extracted with type any (see picture below).
Extracted from here:
NEW zcl_prs_fwd_customizing( form_id = form_id )
but form_id is fully defined in a signature:
constructor | |||
importing | customizing | type zif_prs_fwd_customizing=>tt_customizing | |
form_id | type zdav_form | ||
raising | zcx_prs_fwd_customizing |
I expect the definition with the correct type.
Second, if i extract a reference parameter (type ref to), i'm getting the parameter referenced just with type instead of type ref to.
Could one please check and, possibly, correct it?
Regards
Gena
Hi Jeremy,
We are looking into these issues we will get back to you in few weeks.
Also few of the issues mentioned looks specific to your system, we need to have access to your system setup.
Please create one incident in the OSS system for the below issue :
"The format function (CTRL-SHIFT-F) on the component controller breaks the component controller also."
We will contact you further via this incident.
Regards,
Arun.