Quantcast
Channel: SCN: Message List - ABAP in Eclipse

Re: Enable System Debugging

$
0
0

Hello Matthias,

 

thank you for your fast reply and the solution.

 

Cheers

Stefan


Text search services are not supported

$
0
0

How to get this run?

 

Unbenannt.PNG

Thank you for your help,

 

Peter

Re: Text search services are not supported

$
0
0

Hello Peter,

 

you can find the answer here.

 

Cheers

Stefan

 

P.S. The text search is really fast and a very good feature.

Control Init Error in Data Provider at GUI_DOWNLOAD in a Test Class

$
0
0

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

Re: Control Init Error in Data Provider at GUI_DOWNLOAD in a Test Class

$
0
0

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.

 

isgui_se80.jpg

 

But if I execute the unit test in AiE it delivers N.

 

isgui_aie.jpg

 

Thanks for tips and hints.

 

Cheers

Stefan

Re: Control Init Error in Data Provider at GUI_DOWNLOAD in a Test Class

$
0
0

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

Re: Control Init Error in Data Provider at GUI_DOWNLOAD in a Test Class

$
0
0

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

Re: Control Init Error in Data Provider at GUI_DOWNLOAD in a Test Class

$
0
0

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.


Erroneous Type Inference By Refactoring

$
0
0

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
importingcustomizingtype zif_prs_fwd_customizing=>tt_customizing
form_idtype zdav_form
raisingzcx_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.

 

refactoring.png

 

Could one please check and, possibly, correct it?

 

Regards

 

Gena

Re: Issues with Webdynpro Development (in Eclipse)

$
0
0

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.



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>