BizTalk RosettaNet Custom PIP code

Source: Internet
Author: User
Tags usml biztalk

Use [btarndata]go/****** object:storedprocedure [dbo].    [Proc_getactivitystatus] Script date:09/16/2015 16:16:02 ******/set ansi_nulls ongoset quoted_identifier ongoalter PROCEDURE [dbo]. [Proc_getactivitystatus] (@PIPCode varchar, @PIPVersion varchar, @PIPInstanceID nvarchar (255), @SourcePartnerName nvarchar (255), @ Destinationpartnername nvarchar (255), @IsInitiatorActivity bit) ASIF (@DestinationPartnerName = ' seagate-amk ' and @ Pipcode = ' sg_3b2 ') begin SET @PIPCode = ' 3B2 ' ENDIF (@DestinationPartnerName = ' seagate-us ' and @PIPCode = ' sg_3b2 ') begin S  ET @PIPCode = ' 3B2 ' ENDIF (@DestinationPartnerName = ' SEAGATE-USML ' and @PIPCode = ' sg_3b2 ') BEGIN SET @PIPCode = ' 3B2 ' ENDIF (@DestinationPartnerName = ' Seagate-amk ' and @PIPCode = ' sg_4b2 ') Begin Set @PIPCode = ' 4B2 ' ENDIF (@DestinationPartnerName = ' seagate-us ' and @PIPCode = ' sg_4b2 ') begin set @PIPCode = ' 4B2 ' ENDIF (@DestinationPartnerName = ' SEAGATE-USML ' and @PIPCode = ' sg_4b2 ') BEGIN SET @PIPCode = ' 4B2 ' END DECLARE @sourcePartn ErkEY int DECLARE @destinationPartnerKey int DECLARE @ActivityID nvarchar (255) Set @sourcePartnerKey = '-1 ' set @destination Partnerkey = '-1 ' Select @sourcePartnerKey = Partnerkey from Partnerlookup WHERE [email protected] Select @destinatio  Npartnerkey = Partnerkey from Partnerlookup WHERE [email protected] SELECT TOP 1 currentstatus from activitytracking    Tblat WHERE Tblat.pipcode = @PIPCode and tblat.pipversion = @PIPVersion and Tblat.pipinstanceid = @PIPInstanceID and Tblat.sourcepartnerkey = @sourcePartnerKey and Tblat.destinationpartnerkey = @destinationPartnerKey and Tblat.isini Tiatoractivity = @IsInitiatorActivity

Use [btarnconfig]go/****** object:storedprocedure [dbo].    [Gettpaconfigdata] Script date:09/16/2015 16:47:17 ******/set ansi_nulls offgoset quoted_identifier ongoalter PROCEDURE [dbo]. [Gettpaconfigdata] (@PIPCode Char, @PIPVersion char, @HomePartnerName nvarchar (255), @TradingPartnerName nvarchar (255), @  Ishomeroleinitiator tinyint) as DECLARE @homePartnerKey int DECLARE @tradingPartnerKey int set @homePartnerKey = '-1 ' Set @tradingPartnerKey = '-1 ' Select @homePartnerKey = Partnerkey from Partnerlookup WHERE [email protected] Select @tra Dingpartnerkey = Partnerkey from Partnerlookup WHERE [email protected] if (@homePartnerKey = 1 and @HomePartnerName <> ") BEGIN INSERT into Partnerlookup (partnername) VALUES (@HomePartnerName) SELECT @homePartnerKey = @ @IDENTITY E ND if (@tradingPartnerKey = 1 and @TradingPartnerName <> ") BEGIN INSERT into Partnerlookup (partnername) VALUES (@ Tradingpartnername) SELECT @tradingPartnerKey = @ @IDENTITY ENDIF (@TradiNgpartnername = ' Seagate-amk ' and @PIPCode = ' 3B2 ') BEGIN SET @PIPCode = ' sg_ ' + @PIPCodeENDIF (@TradingPartnerName = ' Seag  Ate-us ' and @PIPCode = ' 3B2 ') BEGIN SET @PIPCode = ' sg_ ' + @PIPCodeENDIF (@TradingPartnerName = ' SEAGATE-USML ' and @PIPCode = ' 3B2 ') begin set @PIPCode = ' Sg_ ' + @PIPCodeENDIF (@TradingPartnerName = ' Seagate-amk ' and @PIPCode = ' 4B2 ') begin set @P Ipcode = ' Sg_ ' + @PIPCodeENDIF (@TradingPartnerName = ' seagate-us ' and @PIPCode = ' 4B2 ') BEGIN SET @PIPCode = ' sg_ ' + @PIPC  Odeendif (@TradingPartnerName = ' SEAGATE-USML ' and @PIPCode = ' 4B2 ') BEGIN SET @PIPCode = ' sg_ ' + @PIPCodeEND SELECT tc.* From Tpaconfig TC, pipconfig pc WHERE @PIPCode = pc. Code and @PIPVersion = pc. Version and @homePartnerKey = TC. Homepartnerkey and @tradingPartnerKey = TC. Tradingpartnerkey and pc.id = TC. Pipid and @IsHomeRoleInitiator = TC. Ishomeroleinitiator and Status = ' 1 ' ORDER by TC. Name

  

BizTalk RosettaNet Custom PIP code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.