Unable to read line level data

Hello

I am trying to read data from SO_SalesOrderDetial

i tried setting key value to read data for a given sales order

i am able to get data using GetResultSet but i am not able to read values like price , ordered etc

and when i am trying to use getvale i am not able to select the sales order

  • 0
    Can you please explain in detail exactly what you are doing and if you are working with a script, post the script.
  • 0
    Can you post the relevant portion of your code? From your post it is not clear what language or methods you are using to execute the code.
  • 0 in reply to TomTarget
    i am trying to build a 3rd party application using c# to read sales order and create a xml ,

    and i have also added the sample code that i am using

    *********************************************************************************************************************************************
    *********************************************************************************************************************************************

    OrderLineObject.nGetResultSets("QuantityOrdered$", "UnitOfMeasure$", Quantity, PointOfTitleTransfer,
    "SalesOrderNo$ = " & Chr(34) & SONumber & Chr(34) & " AND LineKey$=" &
    Chr(34) & Snumber(i) & Chr(34), "", "")
    Qunt = (Split(Mid(Quantity, 3, Len(Quantity) - 3), Chr(138)))
    POT = (Split(Mid(PointOfTitleTransfer, 3, Len(PointOfTitleTransfer) - 3), Chr(138)))


    'If Not (CBool(OrderLineObject.nSetKeyValue("SalesOrderNo$", SONumber))) Then MsgBox(OrderLineObject.sLastErrorMsg)
    'If Not (CBool(OrderLineObject.nSetKeyValue("LineSeqNo$",lineseq(i)))) Then MsgBox(OrderLineObject.sLastErrorMsg)
    'If Not (CBool(OrderLineObject.nSetKeyValue("LineKey$", Snumber(i)))) Then MsgBox(OrderLineObject.sLastErrorMsg)
    'If Not (CBool(OrderLineObject.oLines.nSetKey(Onumber(0)+lineseq(i)+Snumber(i)))) Then MsgBox(OrderLineObject.sLastErrorMsg)

    If Not (CBool(OrderLineObject.nGetValue("TaxAmt", taxam))) Then MsgBox(OrderLineObject.sLastErrorMsg)
    If Not (CBool( OrderLineObject.nGetValue("QuantityOrdered", qua))) Then MsgBox(OrderLineObject.sLastErrorMsg)
    If Not (CBool(OrderLineObject.nGetValue("UnitPrice", unitprice ))) Then MsgBox(OrderLineObject.sLastErrorMsg)
    If Not (CBool(OrderLineObject.nGetValue("ExtensionAmt", Totalprice ))) Then MsgBox(OrderLineObject.sLastErrorMsg)
    If Not (CBool(OrderLineObject.nGetValue("QuantityOrdered", qua))) Then MsgBox(OrderLineObject.sLastErrorMsg)
  • 0 in reply to seshasai
    Note that you are just reading the data so you don't need to SetKeyValue, just do a GetValue on all fields.
  • 0 in reply to BigLouie
    Thx BigLouie

    its working but i am not able to loop through the line, can you please help me on how can i loop through lines ?
  • 0 in reply to seshasai
    Kinda busy right now. Seach in the Business Objects section for examples on how to loop through the lines.