on 06-05-2019 3:49 PM
Hi,
Using Service Layer I want to filter IncomingPayments by IncomingPayments/PaymentInvoices/DocEntry and IncomingPayments/PaymentCreditCards/OwnerIdNum and IncomingPayments/CardCode.
Normally I would use a Crossjoin to achieve this, but IncomingPayments/PaymentInvoices and IncomingPayments/PaymentCreditCards don't have an attribute that references the IncomingPayment under which they are to be found. Therefore Service Layer returns too many results. Is there anyway to achieve this?
Example JSON:
{
"DocNum": 3,
"DocType": "rCustomer",
"HandWritten": "tNO",
"Printed": "tNO",
"DocDate": "2006-12-30",
"CardCode": "C30000",
"CardName": "Microchips",
"Address": "45th Street\r\r10010 SANTIAGO\rCHILE",
"CashAccount": "1-1-010-10-001",
...
"DocEntry": 3,
...
"PaymentInvoices": [
{
"LineNum": 0,
"DocEntry": 2,
"SumApplied": 1799875,
"AppliedFC": 0,
"AppliedSys": 3184,
"DocRate": 0,
"DocLine": 0,
"InvoiceType": "it_Invoice",
"DiscountPercent": 0,
"PaidSum": 0,
"InstallmentId": 1,
"WitholdingTaxApplied": 0,
"WitholdingTaxAppliedFC": 0,
"WitholdingTaxAppliedSC": 0,
"LinkDate": null,
"DistributionRule": null,
"DistributionRule2": null,
"DistributionRule3": null,
"DistributionRule4": null,
"DistributionRule5": null,
"TotalDiscount": 0,
"TotalDiscountFC": 0,
"TotalDiscountSC": 0
},
...
],
"PaymentCreditCards": [
{
"LineNum": 0,
"CreditCard": 3,
"CreditAcct": "1-1-010-20-000",
"CreditCardNumber": "5LII2pNL4FCK7bUEVMMkNw==",
"CardValidUntil": "2011-11-30",
"VoucherNum": "23123133",
"OwnerIdNum": "87678767",
"OwnerPhone": "(562) 345-9000",
"PaymentMethodCode": 1,
"NumOfPayments": 1,
"FirstPaymentDue": "2007-01-01",
"FirstPaymentSum": 53144286,
"AdditionalPaymentSum": 0,
"CreditSum": 53144286,
"CreditCur": "CLP",
"CreditRate": 0,
"ConfirmationNum": null,
"NumOfCreditPayments": 1,
"CreditType": "cr_Regular",
"SplitPayments": "tNO"
}
],
"PaymentAccounts": [],
"BillOfExchange": {},
"WithholdingTaxCertificatesCollection": [],
"CashFlowAssignments": [],
"Payments_ApprovalRequests": [],
"WithholdingTaxDataWTXCollection": []
}
In SQL I could do something like the following:
select * FROM ORCT T0
join RCT2 T4 on T0."DocEntry" = T4."DocNum" and T4."DocEntry"=48
join RCT3 T6 on T0."DocEntry" = T6."DocNum" and T6."OwnerIdNum" =123
where T0."CardCode" = '101'
How to achieve this with Service Layer?
Best regards,
Nils
Hi,
Kindly keep checking SAP Note 3121601 in this regards.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.