Help with shipment report picking

Hi,

I am trying to create a Flow to do report picking, but i cannot get it to work.
I am creating a new FndTempLob, then doing an FndTempLobs update ClobData (from string) to add the details by passing this in the Text data:

{“0”: “CONTRACT=01^PICK_LIST_NO=29040^PICK_LIST_TYPE=CUST_ORDER_PICK_LIST^LOCATION_NO=FGS01^HANDLING_UNIT_ID=132^”}

However, when i trigger the ReportPickAggregated, i get the following error:
An error occurred while processing this request.
{“error”:{“code”:“DATABASE_ERROR”,“message”:“Database error occurred. Contact administrator.”,“details”:[{“code”:40587,“message”:“ORA-40587: invalid JSON type”}]}}

Could anyone please provide any help/guidance, as I am tearing my hair out.

Thanks

Mark

When working with Clob’s, try to create it in a flow script step first. I do not have an example for Report Picking, but I have one for Register Arrivals. The flowscript for it looks like this:

Return '["SOURCE_REF1=' & SourceRef1 &
       '^SOURCE_REF2=' & SourceRef2 &
       '^SOURCE_REF3=' & SourceRef3 &
       '^SOURCE_REF4=' & ReceiptInfoRec.SourceRef4 &
       '^SOURCE_REF_TYPE_DB=' & ReceiptInfoRec.SourceRefTypeDb &
       '^SOURCE_QTY_TO_RECEIVE=' & SourceQtyToReceive & 
       '^INV_QTY_TO_RECEIVE=' & (SourceQtyToReceive * ReceiptInfoRec.ConvFactor) & 
       '^CATCH_QTY_TO_RECEIVE=' &
       '^LOCATION_NO=' & ToLocationNo &
       '^LOCATION_TYPE_DB=' & FIRST(ToLocationTbl WHERE LocationNo = ToLocationNo).LocationTypeDb &
       '^LOT_BATCH_NO=' & CASE WHEN LotBatchNo = '' THEN '*' ELSE LotBatchNo END &
       '^SERIAL_NO=' & CASE WHEN SerialNo = '' THEN '*' ELSE SerialNo END &
       '^ENG_CHG_LEVEL=' & ReceiptInfoRec.EngChgLevel & 
       '^WAIV_DEV_REJ_NO=' & CASE WHEN WDRNo = '' THEN '*' ELSE WDRNo END &
       '^CONDITION_CODE=' & ConditionCode &
       '^RECEIVE_CASE=' & 
            CASE 
               WHEN ReceiveCaseDb = 'INVDIR'  THEN 'ReceiveIntoInventory'
               WHEN ReceiveCaseDb = 'ARRPUT'  THEN 'RcvIntoArrPerfPutaway'
               WHEN ReceiveCaseDb = 'ARRINV'  THEN 'ReceiveIntoArrival'
               WHEN ReceiveCaseDb = 'ARRINSP' THEN 'RcvIntoArrInspectAtArr'
               WHEN ReceiveCaseDb = 'ARRQA'   THEN 'RcvIntoArrInspectAtQa'
               WHEN ReceiveCaseDb = 'QAINV'   THEN 'RcvIntoQaInspectAtQa'
            ELSE 'ReceiveIntoArrival' END &
       '^SOURCE_QTY_TO_INSPECT=' & (Case When InspectionAtLocation = 'True' Then SourceQtyToReceive Else ReceiptInfoRec.SourceQtyToInspect End) &
       '^QC_CODE=' & 
       '^NOTE_TEXT=' & 
       '^ORDER_CODE=' & ReceiptInfoRec.OrderCode &
       '^INPUT_QTY=' & 
       '^INPUT_CONV_FACTOR=' & 
       '^INPUT_VARIABLE_VALUES=' & 
       '^PART_COST_LEVEL_DB=' & ReceiptInfoRec.InventoryPartCostLevelDb &
       '^PACKING_INSTRUCTION_ID=' & 
       '^RENTAL_DB=' & LOWER(ReceiptInfoRec.RentalDb) &
       '^MANUFACTURER_ID=' & 
       '^MANUFACTURER_PART_NO=' & 
       '^;"]'
;

If this variable is called ClobData, you then pass this into the body like such:

let Response = HTTP.patchText(
                              "/main/ifsapplications/projection/v1/CreateReceipt.svc/FndTempLobs('"&TempLobId&"')/ClobData",
                             {
                               "Accept"      :"application/json; odata.metadata=minimal",
                               "Content-Type":"application/json; odata.metadata=minimal",
                               "If-Match"    :"*"
                             },
                             ClobData
                           );

Hi Daniel,

Thank you so much.
It looks like it was just my formatting of the ClobData.
I wasn’t using square brackets.

Yes, the thing with structured languages i.e. json is that it has to be exactly correct. Make sure to mark this as resolved to help others!