bw2:sending_data_to_the_service_layer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
bw2:sending_data_to_the_service_layer [2020/12/15 12:46]
akoehler [JSON Samples]
bw2:sending_data_to_the_service_layer [2021/08/09 14:28] (current)
akoehler Adding how to add an attachment
Line 32: Line 32:
  
 [[bw2:Purchase Order for Service Layer]] [[bw2:Purchase Order for Service Layer]]
 +
 +==== Attachments ====
 +
 +Sending attachments through Service Layer is generally done in conjunction with another SAP method such as Purchase Orders. Using the Versago Temples provided **//[[https://wiki.twbs.com/doku.php/versago/template|here]]//** a user can call a Bizweaver workflow to add an attachment. **In the provided workflow below it will be used specifically with Purchase Orders Versago Template**. The attached workflow was exported in Bizweaver version 2.6.10 if imported to an older instance there is not a guarantee that it will import successfully.
 +
 +{{ :bw2:sap_sl_attachments.zip |}}
 +
 +===Setting Update Attachment Tables and Connections===
 +
 +**An SAP Service Layer connection is necessary for this configuration to work. **
 +
 +Using the below scripts set up the tables in the desired database that Bizweaver can connect to. These tables need to be setup before importing the Bizweaver workflow.
 +
 +<code>
 +CREATE TABLE [dbo].[vgo_SBO_PurchaseRequest_Attachments](
 + [RecNum] [int] IDENTITY(1,1) NOT NULL,
 + [vgoRecNum] [int] NOT NULL,
 + [FileLocation] [nvarchar](500) NULL,
 + [FilePath] [nvarchar](50) NULL,
 + [FileName] [nvarchar](200) NULL,
 + [FileType] [nvarchar](20) NULL,
 + [AttachmentCreateStatus] [nvarchar](1) NULL,
 + [AttachmentCreateDate] [datetime] NULL,
 + [AttachmentCreateError] [nvarchar](500) NULL,
 + [AttachmentAddPRStatus] [nvarchar](1) NULL,
 + [AttachmentAddPRDate] [datetime] NULL,
 + [AttachmentAddPRError] [nvarchar](500) NULL,
 + [AtcEntry] [int] NULL, 
 +CONSTRAINT [PK_vgo_SBO_PurchaseRequests_Attachments] PRIMARY KEY CLUSTERED 
 +(
 + [RecNum] ASC
 +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
 +) ON [PRIMARY]
 +</code>
 +<code>
 +CREATE TABLE [dbo].[vGo_SBO_PurchaseRequest_Dtl](
 + [vgoRecNum] [int] NULL,
 + [vgoLineNum] [int] NULL,
 + [ItemCode] [nvarchar](50) NULL,
 + [ItemName] [nvarchar](100) NULL,
 + [CatalogNo] [nvarchar](20) NULL,
 + [Quantity] [decimal](18, 0) NULL,
 + [Info_GrossPrice] [decimal](18, 6) NULL,
 + [Info_DiscPct] [decimal](18, 2) NULL,
 + [Info_NetPrice] [decimal](18, 6) NULL,
 + [Info_LineTotal] [decimal](18, 6) NULL,
 + [LineText] [nvarchar](250) NULL,
 + [SlpName] [nvarchar](50) NULL,
 + [WhsName] [nvarchar](50) NULL,
 + [UoMCode] [nvarchar](20) NULL,
 + [NeedDate] [date] NULL,
 + [AcctCode] [nvarchar](15) NULL,
 + [AccName] [nvarchar](100) NULL,
 + [FormatCode] [nvarchar](250) NULL,
 + [ProjectName] [nvarchar](50) NULL,
 + [zWhsCode] [nvarchar](8) NULL,
 + [zUoMEntry] [int] NULL,
 + [zSlpCode] [int] NULL,
 + [zPriceList] [int] NULL,
 + [PQT_VendorName] [nvarchar](100) NULL,
 + [zPQT_VendorCode] [nvarchar](50) NULL,
 + [zProjectcode] [nvarchar](20) NULL,
 + [TrnspName] [nvarchar](50) NULL,
 + [TrnspCode] [int] NULL,
 + [PriceStatus] [nvarchar](15) NULL,
 + [POCreation_SAPDocEntry] [int] NULL,
 + [POCreation_SAPDocNum] [int] NULL,
 + [POCreation_SAPErrMsg] [nvarchar](200) NULL,
 + [POCreation_PostingStatus] [int] NULL,
 + [POCreation_PostingDate] [datetime] NULL,
 + [ItemLink] [nvarchar](200) NULL
 +) ON [PRIMARY]
 +</code>
 +<code>
 +CREATE TABLE [dbo].[vGo_SBO_PurchaseRequest_Hdr](
 + [vgoRecNum] [int] NOT NULL,
 + [vgoDocStatus] [nvarchar](20) NULL,
 + [vgoApprovalStatus] [nvarchar](10) NULL,
 + [OrderType] [int] NULL,
 + [NumAtCard] [nvarchar](50) NULL,
 + [DocDate] [date] NULL,
 + [DocDueDate] [date] NULL,
 + [ValidUntilDate] [date] NULL,
 + [Comments] [nvarchar](max) NULL,
 + [DocTotal] [decimal](18, 0) NULL,
 + [ShipToLoc] [nvarchar](100) NULL,
 + [ShipViaName] [nvarchar](50) NULL,
 + [ProjectName] [nvarchar](50) NULL,
 + [BPLName] [nvarchar](100) NULL,
 + [OwnerName] [nvarchar](100) NULL,
 + [Currency] [nvarchar](10) NULL,
 + [ExchangeRate] [decimal](18, 0) NULL,
 + [PriceListName] [nvarchar](50) NULL,
 + [zShipToCode] [nvarchar](50) NULL,
 + [zTrnspCode] [int] NULL,
 + [zProjectCode] [nvarchar](20) NULL,
 + [zBplId] [nvarchar](50) NULL,
 + [zOwnerCode] [int] NULL,
 + [zPriceList] [int] NULL,
 + [vgoCreateDate] [date] NULL,
 + [vgoCreatedBy] [nvarchar](50) NULL,
 + [vgoCreatedById] [int] NULL,
 + [SAPDocNum] [int] NULL,
 + [SAPDocEntry] [int] NULL,
 + [SAP_ErrMsg] [nvarchar](200) NULL,
 + [vgoPostingStatus] [int] NULL,
 + [vgoPostingDate] [datetime] NULL,
 + [PQT_EmpUserName] [nvarchar](50) NULL,
 + [zPQT_EmpUserCode] [int] NULL,
 + [PQT_BranchName] [nvarchar](50) NULL,
 + [zPQT_BranchCode] [int] NULL,
 + [PQT_DeptName] [nvarchar](50) NULL,
 + [zPQT_DeptCode] [int] NULL,
 + [PQT_RequestorEmail] [nvarchar](50) NULL,
 + [PQT_ProductTotal] [decimal](18, 0) NULL,
 + [PQT_DocTotal] [decimal](18, 6) NULL,
 + [zRequestorType] [nvarchar](1) NULL,
 + [CurrentLevelApprovalsTotal] [int] NULL,
 + [CurrentOtherApprovalsTotal] [int] NULL,
 + [CurrentOtherApprovalAmount1] [int] NULL,
 + [CurrentOtherApprovalAmount2] [int] NULL,
 + [ApprovalEmailStatus] [nvarchar](10) NULL,
 + [ApprovalEmailDate] [datetime] NULL,
 + CONSTRAINT [PK_vGo_SBO_PurchaseRequest_Hdr] PRIMARY KEY CLUSTERED 
 +(
 + [vgoRecNum] ASC
 +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
 +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
 +
 +</code>
  
bw2/sending_data_to_the_service_layer.1608054368.txt.gz · Last modified: 2020/12/15 12:46 by akoehler