Friday, 24 May 2019

SAP S/4HANA Cloud Extensibility – Engraving sample scenario – run business process using postman Part-6

Run Business Process using postman


Now let execute the process and see if it’s running as expected.

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications


Check CBO Style


Goto app: “Style”

Press: “Go”

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Read Style from Postman


Open External Application “Postman”; can be downloaded from the internet

Create a Get Request

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

URL: https://XXX-api.s4hana.ondemand.com/sap/opu/odata/sap/YY1_STYLE_CDS/YY1_STYLE

Authorization:

Type = Basic Auth

Username + Password = use the user created in the Communication User and the corresponding password

Headers:

◈ Key = x-csrf-token
◈ Value = fetch

We need the x-csrf-token to make the post call later

Press: “Send”

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Create Style from Postman


Open External Application “Postman”; can be downloaded from the internet

Create a POST Request

URL: https://XXX-api.s4hana.ondemand.com/sap/opu/odata/sap/YY1_STYLE_CDS/YY1_STYLE

Authorization:

Type = Basic Auth

Username + Password = use the user created in the Communication User and the corresponding password

Header:

Key: Content-Type             Value: application/json

Key: x-csrf-token                Value: copy from GET Request

Body:

{
"Style_ID": "0000000004",
"Font": "Bell MT",
"SAP_Description": "Bell MT",
"FontSize": "12"
}

Press: “Send”

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Check CBO Style


Goto app: “Style”

Press: “Go”

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Create Sales Order from Postman


Open External Application “Postman”; can be downloaded from the internet

Create a POST Request

URL: https://XXX-api.s4hana.ondemand.com/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder

Authorization:

Type = Basic Auth

Username + Password = use the user created in the Communication User and the corresponding password

Header:

Key: Content-Type             Value: application/json

Key: x-csrf-token                Value: copy from GET Request

Body:

{
"SalesOrderType": "OR",
"SalesOrganization": "1010",
"DistributionChannel": "10",
"OrganizationDivision": "00",
"SalesGroup": "100",
"SalesOffice": "100",
"SalesDistrict": "ACT",
"SoldToParty": "10100001",
"PurchaseOrderByCustomer": "engraving Demo",
"CustomerPurchaseOrderType": "",
"CustomerPurchaseOrderDate": "2017-01-01T00:00:00",
"SalesOrderDate": "2018-07-01T00:00:00",
"TransactionCurrency": "EUR",
"SDDocumentReason": "001",
"PricingDate": "2018-07-01T00:00:00",
"RequestedDeliveryDate": "2018-07-01T00:00:00",
"ShippingCondition": "01",
"CompleteDeliveryIsDefined": false,
"ShippingType": "01",
"IncotermsVersion": "2010",
"IncotermsClassification": "EXW",
"IncotermsTransferLocation": "Walldorf",
"IncotermsLocation1": "Walldorf",
"IncotermsLocation2": "",
"CustomerPaymentTerms": "0004",
"PaymentMethod": "L",
"AssignmentReference": "API Test",
"to_PricingElement": [
{
"ConditionType": "DRN1",
"ConditionRateValue": "10"
}
],
"to_Item": [
{
"SalesOrderItem": "10",
"Material": "TG11",
"MaterialByCustomer": "TG11 API Test",
"RequestedQuantity": "1",
"RequestedQuantityUnit": "PC",
"MaterialGroup": "A001",
"Batch": "",
"ProductionPlant": "1010",
"StorageLocation": "101A",
"ShippingPoint": "1010",
"ShippingType": "01",
"IncotermsClassification": "EXW",
"IncotermsTransferLocation": "Darmstadt",
"IncotermsLocation1": "Darmstadt",
"CustomerPaymentTerms": "0004",
"DeliveryGroup": "001",
"to_PricingElement": [
{
"ConditionType": "YK07",
"ConditionRateValue": "11"
}
]
},
{
"SalesOrderItem": "20",
"Material": "TG11",
"RequestedQuantity": "10",
"YY1_engraving_SDI": "In_App_Demo",
"YY1_Style_ID_SDI": "0000000017",
"to_PricingElement": [
{
"ConditionType": "YK07",
"ConditionRateValue": "21"
}
]
}
]
}

Press: “Send”

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Check Sales Order


Goto app: “Manage Sales Orders”

Enter Sales Order ID 111378

Open the Sales Order

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Open Item 20

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Create Outbound Delivery


Goto app: Create Outbound Delivery

Search for Sales Order that has been created (111378)

Select checkbox and press “Create Delivery”

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Store/note down the Delivery ID (80084617)

Take care that you choose the second line item as i have created two line items in the sales order.

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Display Outbound Deliveries


Goto app: Display Outbound Delivery

Enter Delivery ID + Press “Enter”

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Navigate to item level

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Check Custom Fields Section

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

Check Custom Analytics


Goto app engraving

Consume analytics

SAP S/4HANA Cloud Extensibility, SAP ABAP Study Materials, SAP ABAP Guides, SAP ABAP Certifications

No comments:

Post a Comment