/AWS1/IF_MPI=>GETOFFERSET()¶
About GetOfferSet¶
Provides details about an offer set, which is a bundle of offers across multiple products. Includes the seller, availability dates, buyer notes, and associated product-offer pairs.
Method Signature¶
METHODS /AWS1/IF_MPI~GETOFFERSET
IMPORTING
!IV_OFFERSETID TYPE /AWS1/MPIOFFERSETID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpigetoffersetoutput
RAISING
/AWS1/CX_MPIACCESSDENIEDEX
/AWS1/CX_MPIINTERNALSERVEREX
/AWS1/CX_MPITHROTTLINGEX
/AWS1/CX_MPIVLDTNEXCEPTION
/AWS1/CX_MPIRESOURCENOTFOUNDEX
/AWS1/CX_MPICLIENTEXC
/AWS1/CX_MPISERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_offersetid TYPE /AWS1/MPIOFFERSETID /AWS1/MPIOFFERSETID¶
The unique identifier of the offer set to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mpigetoffersetoutput /AWS1/CL_MPIGETOFFERSETOUTPUT¶
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->getofferset( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_offersetid = lo_result->get_offersetid( ).
lv_catalog = lo_result->get_catalog( ).
lv_nonemptystring = lo_result->get_offersetname( ).
lv_timestamp = lo_result->get_availablefromtime( ).
lv_timestamp = lo_result->get_expirationtime( ).
lv_nullablestring = lo_result->get_buyernotes( ).
lo_sellerinformation = lo_result->get_sellerofrecord( ).
IF lo_sellerinformation IS NOT INITIAL.
lv_sellerprofileid = lo_sellerinformation->get_sellerprofileid( ).
lv_nonemptystring = lo_sellerinformation->get_displayname( ).
ENDIF.
LOOP AT lo_result->get_badges( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_nonemptystring = lo_row_1->get_displayname( ).
lv_purchaseoptionbadgetype = lo_row_1->get_badgetype( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_associatedentities( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lo_productinformation = lo_row_3->get_product( ).
IF lo_productinformation IS NOT INITIAL.
lv_productid = lo_productinformation->get_productid( ).
lv_nonemptystring = lo_productinformation->get_productname( ).
lo_sellerinformation = lo_productinformation->get_manufacturer( ).
IF lo_sellerinformation IS NOT INITIAL.
lv_sellerprofileid = lo_sellerinformation->get_sellerprofileid( ).
lv_nonemptystring = lo_sellerinformation->get_displayname( ).
ENDIF.
ENDIF.
lo_offerinformation = lo_row_3->get_offer( ).
IF lo_offerinformation IS NOT INITIAL.
lv_offerid = lo_offerinformation->get_offerid( ).
lv_nullablestring = lo_offerinformation->get_offername( ).
lo_sellerinformation = lo_offerinformation->get_sellerofrecord( ).
IF lo_sellerinformation IS NOT INITIAL.
lv_sellerprofileid = lo_sellerinformation->get_sellerprofileid( ).
lv_nonemptystring = lo_sellerinformation->get_displayname( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
Get offer set with multiple products¶
Get offer set with multiple products
DATA(lo_result) = lo_client->getofferset( |offerset-sampleId| ).