UFFE - XML Export
Hi,
I am trying to setup an export and have some errors. I am following the scripts on this page (SQL) but its showing an error.
https://help.boyum-it.com/B1UP/index.html?univfuncfileexpouffe.html
Body SQL Source
SELECT DocNum, CardCode, CardName FROM OINV WHERE DocEntry = DocKey@
Could not execute SQL: SELECT DocNum, CardCode, CardName FROM OINV WHERE DocEntry = testitemjp2 (1). [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;260 invalid column name: DOCNUM: line 1 col 8 (at pos 7)
)
Any help would be greatly appreciated, if anyone has another example that works and they could send me that, it would be GREATLY appreciated.
Brian
-
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
-
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 -
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 -
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
-
Perfect, I got it all working, thanks for your help!!!
Please sign in to leave a comment.
Comments
5 comments