Skip to content

/AWS1/CL_GUR=>LISTRECOMMENDATIONS()

About ListRecommendations

Returns the list of all recommendations for a completed code review.

Method Signature

IMPORTING

Required arguments:

iv_codereviewarn TYPE /AWS1/GURARN /AWS1/GURARN

The Amazon Resource Name (ARN) of the CodeReview object.

Optional arguments:

iv_nexttoken TYPE /AWS1/GURNEXTTOKEN /AWS1/GURNEXTTOKEN

Pagination token.

iv_maxresults TYPE /AWS1/GURLSTRECOMMENDATIONSM00 /AWS1/GURLSTRECOMMENDATIONSM00

The maximum number of results that are returned per call. The default is 100.

RETURNING

oo_output TYPE REF TO /aws1/cl_gurlstrecommendatio03 /AWS1/CL_GURLSTRECOMMENDATIO03

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_gur~listrecommendations(
  iv_codereviewarn = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

LOOP AT lo_result->get_recommendationsummaries( ) into lo_row.
  lv_filepath = lo_row_1->get_filepath( ).
  lv_recommendationid = lo_row_1->get_recommendationid( ).
  lv_linenumber = lo_row_1->get_startline( ).
  lv_linenumber = lo_row_1->get_endline( ).
  lv_text = lo_row_1->get_description( ).
  lv_recommendationcategory = lo_row_1->get_recommendationcategory( ).
  lv_ruleid = lo_rulemetadata->get_ruleid( ).
  lv_rulename = lo_rulemetadata->get_rulename( ).
  lv_shortdescription = lo_rulemetadata->get_shortdescription( ).
  lv_longdescription = lo_rulemetadata->get_longdescription( ).
  LOOP AT lo_rulemetadata->get_ruletags( ) into lo_row_2.
    lv_ruletag = lo_row_3->get_value( ).
  ENDLOOP.
  lv_severity = lo_row_1->get_severity( ).
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).