Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Journal entries error

Former Member
0 Likes
473
  • SAP Managed Tags

I'm trying to use api from sap for journal entry but it gives me error when sending information, it's for creating a campaign.

Call:

Object: "MaterialRevaluation"
array:8 [
  "DocDate" => "2018-09-06"
  "MaterialRevaluationLines" => array:1 [
    0 => array:8 [
      "LineNum" => 0
      "ItemCode" => "P012130"
      "Quantity" => 200
      "WarehouseCode" => "O01"
      "RevaluationDecrementAccount" => 611
      "RevaluationIncrementAccount" => 321
      "SNBLinesCollection" => []
      "DebitCredit" => 200
    ]
  ]
  "RevalType" => "M"
  "InflationRevaluation" => "tNO"
  "JournalMemo" => "dsfsdaa"
  "Reference2" => "Camp#000049"
  "Comments" => "asdfasfsa"
  "TaxDate" => "2018-09-06"
]

Object: "JournalEntries"
array:5 [
  "JournalEntryLines" => array:2 [
    0 => array:6 [
      "Reference2" => "Camp#000049"
      "AccountCode" => 2252
      "ContraAccount" => 611
      "ShortName" => "CP000015"
      "FCDebit" => 3000.0
      "FCCurrency" => "USD"
    ]
    1 => array:4 [
      "Reference2" => "Camp#000049"
      "AccountCode" => 611
      "ContraAccount" => "CP000015"
      "Credit" => 2579.09
    ]
  ]
  "Memo" => "dsfsdaa"
  "Reference2" => "Camp#000049"
  "Series" => 631
  "ReferenceDate" => "2018-09-06"
]

Error:

array:1 [
  "error" => array:2 [
    "code" => -5002
    "message" => array:2 [
      "lang" => "en-us"
      "value" => "Serial or batch managed items cannot be defined as by-products "
    ]
  ]
]
0 REPLIES 0