Skip to content

/AWS1/IF_BII=>CREATEPROCUREMENTPORTALPREF()

About CreateProcurementPortalPreference

Creates a procurement portal preference configuration for e-invoice delivery and purchase order retrieval. This preference defines how invoices are delivered to a procurement portal and how purchase orders are retrieved.

Method Signature

METHODS /AWS1/IF_BII~CREATEPROCUREMENTPORTALPREF
  IMPORTING
    !IV_PROCUREMENTPORTALNAME TYPE /AWS1/BIIPROCUREMENTPORTALNAME OPTIONAL
    !IV_BUYERDOMAIN TYPE /AWS1/BIIBUYERDOMAIN OPTIONAL
    !IV_BUYERIDENTIFIER TYPE /AWS1/BIIBASICSTRWITHOUTSPACE OPTIONAL
    !IV_SUPPLIERDOMAIN TYPE /AWS1/BIISUPPLIERDOMAIN OPTIONAL
    !IV_SUPPLIERIDENTIFIER TYPE /AWS1/BIIBASICSTRWITHOUTSPACE OPTIONAL
    !IO_SELECTOR TYPE REF TO /AWS1/CL_BIIPROCUREMENTPORTA00 OPTIONAL
    !IV_PROCUREMENTPORTALSHARED00 TYPE /AWS1/BIISENSITIVEBSSTRWOUTS00 OPTIONAL
    !IV_PROCUREMENTPORTALINSTEN00 TYPE /AWS1/BIIBASICSTRWITHOUTSPACE OPTIONAL
    !IO_TESTENVPREFERENCE TYPE REF TO /AWS1/CL_BIITESTENVPREFINPUT OPTIONAL
    !IV_EINVOICEDELIVERYENABLED TYPE /AWS1/BIIBOOLEAN OPTIONAL
    !IO_EINVOICEDELIVERYPREF TYPE REF TO /AWS1/CL_BIIEINVOICEDLVRYPREF OPTIONAL
    !IV_PURCHASEORDERRETRIEVALE00 TYPE /AWS1/BIIBOOLEAN OPTIONAL
    !IT_CONTACTS TYPE /AWS1/CL_BIICONTACT=>TT_CONTACTS OPTIONAL
    !IT_RESOURCETAGS TYPE /AWS1/CL_BIIRESOURCETAG=>TT_RESOURCETAGLIST OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/BIIBASICSTRWITHOUTSPACE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_biicreprocurementpo01
  RAISING
    /AWS1/CX_BIIACCESSDENIEDEX
    /AWS1/CX_BIICONFLICTEXCEPTION
    /AWS1/CX_BIIINTERNALSERVEREX
    /AWS1/CX_BIISERVICEQUOTAEXCDEX
    /AWS1/CX_BIITHROTTLINGEX
    /AWS1/CX_BIIVALIDATIONEX
    /AWS1/CX_BIICLIENTEXC
    /AWS1/CX_BIISERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_procurementportalname TYPE /AWS1/BIIPROCUREMENTPORTALNAME /AWS1/BIIPROCUREMENTPORTALNAME

The name of the procurement portal.

iv_buyerdomain TYPE /AWS1/BIIBUYERDOMAIN /AWS1/BIIBUYERDOMAIN

The domain identifier for the buyer in the procurement portal.

iv_buyeridentifier TYPE /AWS1/BIIBASICSTRWITHOUTSPACE /AWS1/BIIBASICSTRWITHOUTSPACE

The unique identifier for the buyer in the procurement portal.

iv_supplierdomain TYPE /AWS1/BIISUPPLIERDOMAIN /AWS1/BIISUPPLIERDOMAIN

The domain identifier for the supplier in the procurement portal.

iv_supplieridentifier TYPE /AWS1/BIIBASICSTRWITHOUTSPACE /AWS1/BIIBASICSTRWITHOUTSPACE

The unique identifier for the supplier in the procurement portal.

iv_einvoicedeliveryenabled TYPE /AWS1/BIIBOOLEAN /AWS1/BIIBOOLEAN

Indicates whether e-invoice delivery is enabled for this procurement portal preference. Set to true to enable e-invoice delivery, false to disable.

iv_purchaseorderretrievale00 TYPE /AWS1/BIIBOOLEAN /AWS1/BIIBOOLEAN

Indicates whether purchase order retrieval is enabled for this procurement portal preference. Set to true to enable PO retrieval, false to disable.

it_contacts TYPE /AWS1/CL_BIICONTACT=>TT_CONTACTS TT_CONTACTS

List of contact information for portal administrators and technical contacts responsible for the e-invoice integration.

Optional arguments:

io_selector TYPE REF TO /AWS1/CL_BIIPROCUREMENTPORTA00 /AWS1/CL_BIIPROCUREMENTPORTA00

Selector

iv_procurementportalshared00 TYPE /AWS1/BIISENSITIVEBSSTRWOUTS00 /AWS1/BIISENSITIVEBSSTRWOUTS00

The shared secret or authentication credential used to establish secure communication with the procurement portal. This value must be encrypted at rest.

iv_procurementportalinsten00 TYPE /AWS1/BIIBASICSTRWITHOUTSPACE /AWS1/BIIBASICSTRWITHOUTSPACE

The endpoint URL where e-invoices will be delivered to the procurement portal. Must be a valid HTTPS URL.

io_testenvpreference TYPE REF TO /AWS1/CL_BIITESTENVPREFINPUT /AWS1/CL_BIITESTENVPREFINPUT

Configuration settings for the test environment of the procurement portal. Includes test credentials and endpoints that are used for validation before production deployment.

io_einvoicedeliverypref TYPE REF TO /AWS1/CL_BIIEINVOICEDLVRYPREF /AWS1/CL_BIIEINVOICEDLVRYPREF

Specifies the e-invoice delivery configuration including document types, attachment types, and customization settings for the portal.

it_resourcetags TYPE /AWS1/CL_BIIRESOURCETAG=>TT_RESOURCETAGLIST TT_RESOURCETAGLIST

The tags to apply to this procurement portal preference resource. Each tag consists of a key and an optional value.

iv_clienttoken TYPE /AWS1/BIIBASICSTRWITHOUTSPACE /AWS1/BIIBASICSTRWITHOUTSPACE

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_biicreprocurementpo01 /AWS1/CL_BIICREPROCUREMENTPO01

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->createprocurementportalpref(
  io_einvoicedeliverypref = new /aws1/cl_biieinvoicedlvrypref(
    it_einvdlvryattachmenttypes = VALUE /aws1/cl_biieinvdlvattachmen00=>tt_einvdlvryattachmenttypes(
      ( new /aws1/cl_biieinvdlvattachmen00( |string| ) )
    )
    it_einvoicedeliverydoctypes = VALUE /aws1/cl_biieinvdlvdoctypes_w=>tt_einvoicedeliverydoctypes(
      ( new /aws1/cl_biieinvdlvdoctypes_w( |string| ) )
    )
    it_purchaseorderdatasources = VALUE /aws1/cl_biipurchaseorderdat00=>tt_purchaseorderdatasources(
      (
        new /aws1/cl_biipurchaseorderdat00(
          iv_einvoicedeliverydoctype = |string|
          iv_purchaseorderdatasrctype = |string|
        )
      )
    )
    iv_connectiontestingmethod = |string|
    iv_einvoicedeliveryactdate = '20150101000000.0000000'
    iv_protocol = |string|
  )
  io_selector = new /aws1/cl_biiprocurementporta00(
    it_invoiceunitarns = VALUE /aws1/cl_biiinvoiceunitarns_w=>tt_invoiceunitarns(
      ( new /aws1/cl_biiinvoiceunitarns_w( |string| ) )
    )
    it_sellerofrecords = VALUE /aws1/cl_biisellerofrecords_w=>tt_sellerofrecords(
      ( new /aws1/cl_biisellerofrecords_w( |string| ) )
    )
  )
  io_testenvpreference = new /aws1/cl_biitestenvprefinput(
    iv_buyerdomain = |string|
    iv_buyeridentifier = |string|
    iv_procurementportalinsten00 = |string|
    iv_procurementportalshared00 = |string|
    iv_supplierdomain = |string|
    iv_supplieridentifier = |string|
  )
  it_contacts = VALUE /aws1/cl_biicontact=>tt_contacts(
    (
      new /aws1/cl_biicontact(
        iv_email = |string|
        iv_name = |string|
      )
    )
  )
  it_resourcetags = VALUE /aws1/cl_biiresourcetag=>tt_resourcetaglist(
    (
      new /aws1/cl_biiresourcetag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_buyerdomain = |string|
  iv_buyeridentifier = |string|
  iv_clienttoken = |string|
  iv_einvoicedeliveryenabled = ABAP_TRUE
  iv_procurementportalinsten00 = |string|
  iv_procurementportalname = |string|
  iv_procurementportalshared00 = |string|
  iv_purchaseorderretrievale00 = ABAP_TRUE
  iv_supplierdomain = |string|
  iv_supplieridentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_procurementportalprefer = lo_result->get_procurementportalprefarn( ).
ENDIF.

CreateProcurementPortalPreference for Coupa

CreateProcurementPortalPreference for Coupa

DATA(lo_result) = lo_client->createprocurementportalpref(
  io_einvoicedeliverypref = new /aws1/cl_biieinvoicedlvrypref(
    it_einvdlvryattachmenttypes = VALUE /aws1/cl_biieinvdlvattachmen00=>tt_einvdlvryattachmenttypes(
      ( new /aws1/cl_biieinvdlvattachmen00( |INVOICE_PDF| ) )
    )
    it_einvoicedeliverydoctypes = VALUE /aws1/cl_biieinvdlvdoctypes_w=>tt_einvoicedeliverydoctypes(
      ( new /aws1/cl_biieinvdlvdoctypes_w( |AWS_CLOUD_INVOICE| ) )
    )
    it_purchaseorderdatasources = VALUE /aws1/cl_biipurchaseorderdat00=>tt_purchaseorderdatasources(
      (
        new /aws1/cl_biipurchaseorderdat00(
          iv_einvoicedeliverydoctype = |AWS_CLOUD_INVOICE|
          iv_purchaseorderdatasrctype = |ASSOCIATED_PURCHASE_ORDER_REQUIRED|
        )
      )
    )
    iv_connectiontestingmethod = |PROD_ENV_DOLLAR_TEST|
    iv_einvoicedeliveryactdate = '20250618204120.0910000'
    iv_protocol = |CXML|
  )
  io_selector = new /aws1/cl_biiprocurementporta00(
    it_invoiceunitarns = VALUE /aws1/cl_biiinvoiceunitarns_w=>tt_invoiceunitarns(
      ( new /aws1/cl_biiinvoiceunitarns_w( |arn:aws:invoicing::111111111111:invoice-unit/12345678| ) )
      ( new /aws1/cl_biiinvoiceunitarns_w( |arn:aws:invoicing::111111111111:invoice-unit/12345679| ) )
    )
    it_sellerofrecords = VALUE /aws1/cl_biisellerofrecords_w=>tt_sellerofrecords(
      ( new /aws1/cl_biisellerofrecords_w( |AWS_INC| ) )
      ( new /aws1/cl_biisellerofrecords_w( |AWS_EUROPE| ) )
    )
  )
  io_testenvpreference = new /aws1/cl_biitestenvprefinput(
    iv_buyerdomain = |NetworkID|
    iv_buyeridentifier = |BuyerId_1_Test|
    iv_procurementportalinsten00 = |https://www.placeholder-domain.test|
    iv_procurementportalshared00 = |Coupa_Secret_test|
    iv_supplierdomain = |NetworkID|
    iv_supplieridentifier = |SupplierId_1_Test|
  )
  it_contacts = VALUE /aws1/cl_biicontact=>tt_contacts(
    (
      new /aws1/cl_biicontact(
        iv_email = |example-placeholder@amazon.com|
        iv_name = |John Doe|
      )
    )
  )
  it_resourcetags = VALUE /aws1/cl_biiresourcetag=>tt_resourcetaglist(
    (
      new /aws1/cl_biiresourcetag(
        iv_key = |testKey|
        iv_value = |testValue|
      )
    )
  )
  iv_buyerdomain = |NetworkID|
  iv_buyeridentifier = |BuyerId_1|
  iv_clienttoken = |e362c68e-4e74-48d7-9228-0bc5aa447b42|
  iv_einvoicedeliveryenabled = ABAP_TRUE
  iv_procurementportalinsten00 = |https://www.placeholder-domain.test|
  iv_procurementportalname = |COUPA|
  iv_procurementportalshared00 = |Coupa_Secret|
  iv_purchaseorderretrievale00 = ABAP_TRUE
  iv_supplierdomain = |NetworkID|
  iv_supplieridentifier = |SupplierId_1|
).