Skip to main content

UFFE - XML Export

Comments

5 comments

  • Geoff Booth

    Hi Brian,

    It looks to me like you have a HANA system therefore HANA syntax is required.

    Also "DocEntry" should be a numeric value

    Try: Select OINV."DocNum", OINV."CardCode", OINV."CardName" From OINV Where OINV."DocEntry" = 2

  • Brian Branco

    Hi Geoff,

    I was trying to replicate what was on the Boyum site because I need to change it.

    Basically I am trying to create an XML for item data and item availability, so I need to have the item code, item name from OITM and then the onhand and committed.  I have the query setup that goes to a flat file, but now I need it in XML and I am completely stuck.

    Any help would be greatly appreciated.

    Brian

     

     

  • Brian Branco

    So this is what I have

    Body Source 

    SELECT 'ItemCode', 'ItemName' FROM OITM WHERE 'ItemCode' = 'DocKey@'

    Line Source

    SELECT 'ItemCode', 'Onhand' FROM OITM WHERE 'ItemCode' = 'DocKey@'

    Body

    <?xml version="1.0" encoding="utf-8"?>

    <Availability>

    <ItemCode>@Get('ItemName')</ItemCode>

    <Lines>

    #foreach(@line in @DocumentLines)

    #BEGIN

    <Line Item="@line.Get('ItemCode')"/>

    #END

    </Lines>

    </Availability>


    It errors at ItemName if I take that out, then I dont get anything in the XML lines




  • Geoff Booth

    Body SQL Source

    SELECT "ItemCode", "ItemName" FROM OITM WHERE "ItemCode" = '1500-E'

    Line Source

    SELECT "ItemCode", "Onhand" FROM OITM WHERE "ItemCode" = '1500-E'

    Body

    <?xml version="1.0" encoding="utf-8"?>

    <Availability>

    <ItemCode>@Get('ItemName')</ItemCode>

    <Lines>

    #foreach(@line in @DocumentLines)

    #BEGIN

    <Line Item="@line.Get('ItemCode')"/>

    #END

     

    Output:

     

    <?xml version="1.0" encoding="utf-8"?>
    <Availability>
    <ItemCode>1500-E Air Compressor</ItemCode>
    <Lines>

     

    Good luck

     

  • Brian Branco

    Perfect, I got it all working, thanks for your help!!!

Please sign in to leave a comment.