question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Purchase order SDK not support item selection .

See original GitHub issue

Describe the bug The following code worked 👍

const {purchaseOrderService} =require(‘@sap/cloud-sdk-vdm-purchase-order-service’); const {purchaseOrderApi, purchaseOrderItemApi} = purchaseOrderService();

function getPurchaseOrders(req) {

return purchaseOrderApi.requestBuilder()
.getAll()
.top(1)
.filter(purchaseOrderApi.schema.PURCHASE_ORDER.equals(req.body.purchaseOrder))
.select(
    purchaseOrderApi.schema.PURCHASE_ORDER,
    purchaseOrderApi.schema.PURCHASE_ORDER_DATE,
    purchaseOrderApi.schema.PURCHASING_ORGANIZATION,
    purchaseOrderApi.schema.PURCHASING_GROUP,
    purchaseOrderApi.schema.COMPANY_CODE
    )
.execute({
    destinationName: 'O5P',
    JWT: retrieveJwt(req)
});

} The following code does not work, but it should work ,it is a bug

const {purchaseOrderService} =require(‘@sap/cloud-sdk-vdm-purchase-order-service’); const {purchaseOrderApi, purchaseOrderItemApi} = purchaseOrderService();

function getPurchaseOrders(req) {

return purchaseOrderApi.requestBuilder()
.getAll()
.top(1)
.filter(purchaseOrderApi.schema.PURCHASE_ORDER.equals(req.body.purchaseOrder))
.select(
    purchaseOrderApi.schema.PURCHASE_ORDER,
    purchaseOrderApi.schema.PURCHASE_ORDER_DATE,
    purchaseOrderApi.schema.PURCHASING_ORGANIZATION,
    purchaseOrderApi.schema.PURCHASING_GROUP,
    purchaseOrderApi.schema.COMPANY_CODE,
    purchaseOrderApi.schema.TO_ITEM
    .select(purchaseOrderItemApi.schema.MATERIAL,purchaseOrderItemApi.schema.STORAGE_LOCATION)
    )
.execute({
    destinationName: 'O5P',
    JWT: retrieveJwt(req)
});

}

To Reproduce Steps to reproduce the behavior:

  1. Set up …
  2. Execute …
  3. Confirm …
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Used Versions:

  • node version via node -v
  • npm version via npm -v
  • SAP Cloud SDK version you used as dependency

Code Examples If applicable, add code snippets as examples to help explain your problem. Please remove sensitive information.

Log file If applicable, add your log file or related error message. Again, please remove your sensitive information.

Impact / Priority

Affected development phase: e.g. Getting Started, Development, Release, Production

Impact: e.g. No Impact, Inconvenience, Impaired, Blocked

Timeline: e.g. Go-Live is in 12 weeks.

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
horsemanjackyliucommented, Apr 27, 2022

Found the document , thanks!

const { businessPartnerApi, businessPartnerAddressApi } = businessPartnerService(); const businessPartner = businessPartnerApi .entityBuilder() .firstName(‘John’) .lastName(‘Doe’) .businessPartnerCategory(‘1’) .toBusinessPartnerAddress([ businessPartnerAddressApi .entityBuilder() .country(‘DE’) .postalCode(‘14469’) .cityName(‘Potsdam’) .streetName(‘Konrad-Zuse-Ring’) .houseNumber(‘10’) .build() ]) .build();

// execute the create request businessPartnerApi .requestBuilder() .create(businessPartner) .execute(myDestination);

0reactions
jjtang1985commented, Apr 27, 2022

I’ll close this issue. Feel free to reopen, if you have further questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linking item reciept and bill to purchase order, invoice to sales ...
In the SDK, the request messages for adding item receipts, bills, and invoices contain elements for identifying the originating purchase order or sales ......
Read more >
Purchasing Workflow - Ex Libris Knowledge Center
The Alma purchasing workflow, which specifies the way in which a PO line is handled from its creation until it awaits activation or...
Read more >
SP-API for Vendors - Direct Fulfillment Frequently Asked ...
All the purchase order line items should be present in the shipment confirmation. Partial order fulfillment is not allowed. Vendors should reject the...
Read more >
Purchase Orders API (/purchase_orders) - Coupa Certification
Element Description In Out Data Type acknowledged‑at acknowledged_at yes datetime acknowledged‑flag Has PO been acknowledged by Supplier? yes yes boolean attachments attachments yes yes Attachment
Read more >
Glossary of QuickBooks API Errors - Syncro community
An item in your PO order list is not mapped to a corresponding item in QuickBooks, you need to make sure all of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found