/AWS1/IF_MDD=>LISTITEMS()¶
About ListItems¶
Provides a list of metadata entries about folders and objects in the specified folder.
Method Signature¶
METHODS /AWS1/IF_MDD~LISTITEMS
IMPORTING
!IV_PATH TYPE /AWS1/MDDLISTPATHNAMING OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/MDDLISTLIMIT OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/MDDPAGINATIONTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mddlistitemsresponse
RAISING
/AWS1/CX_MDDCONTAINERNOTFNDEX
/AWS1/CX_MDDINTERNALSERVERERR
/AWS1/CX_MDDCLIENTEXC
/AWS1/CX_MDDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_path TYPE /AWS1/MDDLISTPATHNAMING /AWS1/MDDLISTPATHNAMING¶
The path in the container from which to retrieve items. Format:
/ /
iv_maxresults TYPE /AWS1/MDDLISTLIMIT /AWS1/MDDLISTLIMIT¶
The maximum number of results to return per API request. For example, you submit a
ListItemsrequest withMaxResultsset at 500. Although 2,000 items match your request, the service returns no more than the first 500 items. (The service also returns aNextTokenvalue that you can use to fetch the next batch of results.) The service might return fewer results than theMaxResultsvalue.If
MaxResultsis not included in the request, the service defaults to pagination with a maximum of 1,000 results per page.
iv_nexttoken TYPE /AWS1/MDDPAGINATIONTOKEN /AWS1/MDDPAGINATIONTOKEN¶
The token that identifies which batch of results that you want to see. For example, you submit a
ListItemsrequest withMaxResultsset at 500. The service returns the first batch of results (up to 500) and aNextTokenvalue. To see the next batch of results, you can submit theListItemsrequest a second time and specify theNextTokenvalue.Tokens expire after 15 minutes.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mddlistitemsresponse /AWS1/CL_MDDLISTITEMSRESPONSE¶
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->listitems(
iv_maxresults = 123
iv_nexttoken = |string|
iv_path = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_items( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_itemname = lo_row_1->get_name( ).
lv_itemtype = lo_row_1->get_type( ).
lv_etag = lo_row_1->get_etag( ).
lv_timestamp = lo_row_1->get_lastmodified( ).
lv_contenttype = lo_row_1->get_contenttype( ).
lv_nonnegativelong = lo_row_1->get_contentlength( ).
ENDIF.
ENDLOOP.
lv_paginationtoken = lo_result->get_nexttoken( ).
ENDIF.