/AWS1/IF_MPG=>GETAGREEMENTTERMS()
¶
About GetAgreementTerms¶
Obtains details about the terms in an agreement that you participated in as proposer or acceptor.
The details include:
-
TermType
– The type of term, such asLegalTerm
,RenewalTerm
, orConfigurableUpfrontPricingTerm
. -
TermID
– The ID of the particular term, which is common between offer and agreement. -
TermPayload
– The key information contained in the term, such as the EULA forLegalTerm
or pricing and dimensions for various pricing terms, such asConfigurableUpfrontPricingTerm
orUsageBasedPricingTerm
.
-
Configuration
– The buyer/acceptor's selection at the time of agreement creation, such as the number of units purchased for a dimension or setting theEnableAutoRenew
flag.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_agreementid
TYPE /AWS1/MPGRESOURCEID
/AWS1/MPGRESOURCEID
¶
The unique identifier of the agreement.
Optional arguments:¶
iv_maxresults
TYPE /AWS1/MPGMAXRESULTS
/AWS1/MPGMAXRESULTS
¶
The maximum number of agreements to return in the response.
iv_nexttoken
TYPE /AWS1/MPGNEXTTOKEN
/AWS1/MPGNEXTTOKEN
¶
A token to specify where to start pagination
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_mpggetagreementterm01
/AWS1/CL_MPGGETAGREEMENTTERM01
¶
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_mpg~getagreementterms(
iv_agreementid = |string|
iv_maxresults = 123
iv_nexttoken = |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_acceptedterms( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_legalterm = lo_row_1->get_legalterm( ).
IF lo_legalterm IS NOT INITIAL.
lv_unversionedtermtype = lo_legalterm->get_type( ).
LOOP AT lo_legalterm->get_documents( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_boundedstring = lo_row_3->get_type( ).
lv_boundedstring = lo_row_3->get_url( ).
lv_boundedstring = lo_row_3->get_version( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_supportterm = lo_row_1->get_supportterm( ).
IF lo_supportterm IS NOT INITIAL.
lv_unversionedtermtype = lo_supportterm->get_type( ).
lv_boundedstring = lo_supportterm->get_refundpolicy( ).
ENDIF.
lo_renewalterm = lo_row_1->get_renewalterm( ).
IF lo_renewalterm IS NOT INITIAL.
lv_unversionedtermtype = lo_renewalterm->get_type( ).
lo_renewaltermconfiguratio = lo_renewalterm->get_configuration( ).
IF lo_renewaltermconfiguratio IS NOT INITIAL.
lv_boolean = lo_renewaltermconfiguratio->get_enableautorenew( ).
ENDIF.
ENDIF.
lo_usagebasedpricingterm = lo_row_1->get_usagebasedpricingterm( ).
IF lo_usagebasedpricingterm IS NOT INITIAL.
lv_unversionedtermtype = lo_usagebasedpricingterm->get_type( ).
lv_currencycode = lo_usagebasedpricingterm->get_currencycode( ).
LOOP AT lo_usagebasedpricingterm->get_ratecards( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
LOOP AT lo_row_5->get_ratecard( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_boundedstring = lo_row_7->get_dimensionkey( ).
lv_boundedstring = lo_row_7->get_price( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
lo_configurableupfrontpric = lo_row_1->get_cfgurableupfrontpricin00( ).
IF lo_configurableupfrontpric IS NOT INITIAL.
lv_unversionedtermtype = lo_configurableupfrontpric->get_type( ).
lv_currencycode = lo_configurableupfrontpric->get_currencycode( ).
LOOP AT lo_configurableupfrontpric->get_ratecards( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lo_selector = lo_row_9->get_selector( ).
IF lo_selector IS NOT INITIAL.
lv_boundedstring = lo_selector->get_type( ).
lv_boundedstring = lo_selector->get_value( ).
ENDIF.
lo_constraints = lo_row_9->get_constraints( ).
IF lo_constraints IS NOT INITIAL.
lv_boundedstring = lo_constraints->get_multipledimelection( ).
lv_boundedstring = lo_constraints->get_quantityconfiguration( ).
ENDIF.
LOOP AT lo_row_9->get_ratecard( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_boundedstring = lo_row_7->get_dimensionkey( ).
lv_boundedstring = lo_row_7->get_price( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lo_configurableupfrontpric_1 = lo_configurableupfrontpric->get_configuration( ).
IF lo_configurableupfrontpric_1 IS NOT INITIAL.
lv_boundedstring = lo_configurableupfrontpric_1->get_selectorvalue( ).
LOOP AT lo_configurableupfrontpric_1->get_dimensions( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_boundedstring = lo_row_11->get_dimensionkey( ).
lv_zerovalueinteger = lo_row_11->get_dimensionvalue( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_byolpricingterm = lo_row_1->get_byolpricingterm( ).
IF lo_byolpricingterm IS NOT INITIAL.
lv_unversionedtermtype = lo_byolpricingterm->get_type( ).
ENDIF.
lo_recurringpaymentterm = lo_row_1->get_recurringpaymentterm( ).
IF lo_recurringpaymentterm IS NOT INITIAL.
lv_unversionedtermtype = lo_recurringpaymentterm->get_type( ).
lv_currencycode = lo_recurringpaymentterm->get_currencycode( ).
lv_boundedstring = lo_recurringpaymentterm->get_billingperiod( ).
lv_boundedstring = lo_recurringpaymentterm->get_price( ).
ENDIF.
lo_validityterm = lo_row_1->get_validityterm( ).
IF lo_validityterm IS NOT INITIAL.
lv_unversionedtermtype = lo_validityterm->get_type( ).
lv_boundedstring = lo_validityterm->get_agreementduration( ).
lv_timestamp = lo_validityterm->get_agreementstartdate( ).
lv_timestamp = lo_validityterm->get_agreementenddate( ).
ENDIF.
lo_paymentscheduleterm = lo_row_1->get_paymentscheduleterm( ).
IF lo_paymentscheduleterm IS NOT INITIAL.
lv_unversionedtermtype = lo_paymentscheduleterm->get_type( ).
lv_currencycode = lo_paymentscheduleterm->get_currencycode( ).
LOOP AT lo_paymentscheduleterm->get_schedule( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_timestamp = lo_row_13->get_chargedate( ).
lv_boundedstring = lo_row_13->get_chargeamount( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_freetrialpricingterm = lo_row_1->get_freetrialpricingterm( ).
IF lo_freetrialpricingterm IS NOT INITIAL.
lv_unversionedtermtype = lo_freetrialpricingterm->get_type( ).
lv_boundedstring = lo_freetrialpricingterm->get_duration( ).
LOOP AT lo_freetrialpricingterm->get_grants( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_boundedstring = lo_row_15->get_dimensionkey( ).
lv_positiveintegerwithdefa = lo_row_15->get_maxquantity( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_fixedupfrontpricingterm = lo_row_1->get_fixedupfrontpricingterm( ).
IF lo_fixedupfrontpricingterm IS NOT INITIAL.
lv_unversionedtermtype = lo_fixedupfrontpricingterm->get_type( ).
lv_currencycode = lo_fixedupfrontpricingterm->get_currencycode( ).
lv_boundedstring = lo_fixedupfrontpricingterm->get_duration( ).
lv_boundedstring = lo_fixedupfrontpricingterm->get_price( ).
LOOP AT lo_fixedupfrontpricingterm->get_grants( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_boundedstring = lo_row_15->get_dimensionkey( ).
lv_positiveintegerwithdefa = lo_row_15->get_maxquantity( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.