%3CLINGO-SUB%20id%3D%22lingo-sub-1909185%22%20slang%3D%22en-US%22%3EHandling%20Errors%20in%20SAP%20BAPI%20Transactions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1909185%22%20slang%3D%22en-US%22%3E%3CH3%20id%3D%22toc-hId-1310852094%22%20id%3D%22toc-hId-1312429994%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3EIntroduction%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBizTalk%20artifacts%20are%20typically%20deployed%20in%20production%20once%20they%20have%20been%20thoroughly%20tested%20for%20functionality%2C%20stress%2C%20performance%2C%20integration%2C%20to%20name%20a%20few.%20Regardless%20of%20the%20amount%20of%20testing%20though%2C%20a%20system%20is%20vulnerable%20to%20the%20external%20data%20being%20received.%20Here%2C%20we%20consider%20what%20happens%20when%20BAPI%20transactions%20requests%20contain%20invalid%20data%2C%20such%20as%20fields%20that%20are%20not%20of%20the%20right%20formats%20or%20do%20not%20have%20expected%20values.%26nbsp%3BThe%20reader%20should%20be%20familiar%20with%20the%20orchestration%20presented%20in%20%3CA%20id%3D%22link_6%22%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fbiztalk-server-team-blog%2Fdebatching-sap-bapi-transaction-requests%2Fba-p%2F1786613%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EDebatching%20SAP%20BAPI%20Transaction%20Requests%3C%2FA%3E%2C%20which%20is%20augmented%20here%20for%20better%20error%20handling%20and%20fault-tolerant%20batch%20processing%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGenerally%20speaking%2C%20after%20the%20BAPI%20transaction%20requests%20are%20created%2C%20validation%20can%20happen%3A%3C%2FP%3E%0A%3CP%3E(1)%20locally%2C%20in%20the%20BizTalk%20host%20instance%2C%20when%20the%20BAPI%20transactions%20are%20published%20and%20sent%2C%20and%3C%2FP%3E%0A%3CP%3E(2)%20remotely%2C%20on%20the%20SAP%20server%2C%20when%20the%20transactions%20are%20received%20and%20processed.%3C%2FP%3E%0A%3CP%3ELocal%20failures%20result%20in%20the%20SAP%20adapter%20throwing%20such%20exceptions%20as%3A%3C%2FP%3E%0A%3CP%3E%3CEM%3E%22A%20message%20sent%20to%20adapter%20%22WCF-SAP%22%20on%20send%20port%20%22%E2%80%A6%22%20with%20URI%20%22%E2%80%A6%22%20is%20suspended.%20Error%20details%3A%20System.InvalidOperationException%3A%20The%20Inner%20Channel%20to%20use%20was%20not%20found%20for%20the%20key.%22%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3Eor%20other%20exceptions%20documented%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fadapters-and-accelerators%2Fadapter-sap%2Fexceptions-and-error-handling-with-the-sap-adapter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EExceptions%20and%20Error%20Handling%20with%20the%20SAP%20adapter%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3ERemote%20data%20failures%20correspond%20to%20the%20SAP%20server%20returning%20error%20messages%20in%20the%20RETURN%20elements%20of%20the%20BAPI%20responses.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20distinction%20local%2Fremote%20is%20important%20because%20error%20handling%20is%20implemented%20differently%20depending%20on%20whether%20errors%20happen%20on%20outbound%20or%20inbound%20data%20flows.%20For%20instance%2C%20as%20we%20shall%20see%2C%20BAPI_TRANSACTION_COMMIT%20and%20BAPI_TRANSACTION_ROLLBACK%20are%20not%20always%20applicable%26nbsp%3Bdepending%20on%20how%20validation%20fails.%20From%20a%20customer%20perspective%20though%2C%20errors%20from%20invalid%20data%20need%20to%20be%20surfaced%20consistently%20regardless%20of%20where%20the%20errors%20happen.%20Some%20may%20expect%20%22fail%20fast%22%2C%20where%20any%20invalid%20data%20should%20abort%20further%20processing.%20Others%20would%20rather%20handle%20invalid%20data%20with%20graceful%20error%20handling.%20This%20is%20especially%20relevant%20in%20the%20context%20of%20BAPI%20transactions%20where%20a%20Logical%20Unit%20of%20Work%20(LUW)%20may%20comprise%20a%20large%20number%20of%20transactions%20and%20the%20%22one-fails%2Fall-fail%22%20behavior%20would%20be%20cost-prohibitive%3B%20In%20such%20cases%2C%20it%20would%20be%20preferable%20to%20keep%20the%20processing%20going%20rather%20than%20to%20suspend%20an%20orchestration%20instance%20for%20some%20invalid%20field%20in%20one%20out%20of%20many%20transactions%20(e.g.%2C%20a%20vendor%20no%20longer%20exists%20but%20a%20request%20uses%20the%20vendor's%20code).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20lightgrey%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3EAt%20this%20point%2C%20it%20is%20noteworthy%20to%20mention%20that%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fhelp.sap.com%2Fsaphelp_46c%2Fhelpdata%2Fen%2Fa5%2F3ec88c4ac011d1894e0000e829fbbd%2Fframeset.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EOld%20BAPI%20Transaction%20Model%20(with%20Commit)%3C%2FA%3E%20to%20execute%20a%20commit%20after%20every%20single%20RFC%20call%20has%20been%20phased%20out%20a%20long%20time%20ago%20in%20favor%20of%20the%20new(er)%20%3CA%20href%3D%22https%3A%2F%2Fhelp.sap.com%2Fsaphelp_46c%2Fhelpdata%2Fen%2Fa5%2F3ec88c4ac011d1894e0000e829fbbd%2Fframeset.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBAPI%20Transaction%20Model%20(Without%20Commit)%2C%3C%2FA%3E%26nbsp%3Bi.e.%2C%20multiple%20BAPI%20calls%20in%20one%20LUW.%26nbsp%3BIn%20the%20latter%20model%2C%20BAPIs%20can%20be%20used%20as%20a%20way%20to%20do%20mass%20data%20transfer%20effectively%20as%20documented%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fhelp.sap.com%2Fsaphelp_46c%2Fhelpdata%2Fen%2F4c%2F4c0e8a725311d396a80004ac96334b%2Fframeset.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBAPIs%20for%20Mass%20Data%20Transfer%3C%2FA%3E%26nbsp%3Bthereby%20taking%20advantage%20of%20the%20improved%20performance%20through%20common%20updates.%20The%20%22Without%20Commit%22%20model%20has%20also%20been%20enhanced%20to%20a%20%22Transaction%20Model%20with%20Buffering%22%20(%3CA%20href%3D%22http%3A%2F%2Fremote-database.com%2F00000217%2Fc259aeb4969111d2ad4c080009b0fb56.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBuffering%20with%20Write%20BAPIs%3C%2FA%3E)%2C%20which%20allows%20creates%20and%20updates%20to%20happen%20in%20the%20same%20LUWs.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--496602369%22%20id%3D%22toc-hId--495024469%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EScenario%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20stage%20of%20the%20main%20orchestration%20is%20the%20debatching%20pipeline%20explained%20in%20detail%20in%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fbiztalk-server-team-blog%2Fdebatching-sap-bapi-transaction-requests%2Fba-p%2F1786613%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EDebatching%20SAP%20BAPI%20Transactions%3C%2FA%3E%20and%20summarized%20below.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20style%3D%22direction%3A%20ltr%3B%22%3E%0A%3CTABLE%20style%3D%22direction%3A%20ltr%3B%20border-collapse%3A%20collapse%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%20title%3D%22%22%20border%3D%221%22%20summary%3D%22%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22background-color%3A%20%23f2f2f2%3B%20vertical-align%3A%20top%3B%20width%3A%203.6569in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EOrchestration%20receives%E2%80%A6%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23f2f2f2%3B%20vertical-align%3A%20top%3B%20width%3A%204.5062in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EOrchestration%20then%20produces%E2%80%A6%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%203.6763in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20color%3A%20%23569cd6%3B%22%3ERequestsInfo%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Exmlns%3Ans0%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23cb8f76%3B%22%3E%22%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EProcessErrors%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3Etrue%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EIsCommit%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20color%3A%20%23569cd6%3B%22%3EOrders%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens2%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20color%3A%20%23569cd6%3B%22%3EOrder%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Exmlns%3Ans2%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23cb8f76%3B%22%3E%22%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_HEADER_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EDOC_TYPE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3ETA%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EDOC_TYPE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3ESALES_ORG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E1000%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3ESALES_ORG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EDISTR_CHAN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E12%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EDISTR_CHAN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_HEADER_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_ITEMS_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EMATERIAL%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3EDPC1020%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EMATERIAL%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_ITEMS_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_PARTNERS%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EPARTN_ROLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3EAG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EPARTN_ROLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EPARTN_NUMB%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E0000001012%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EPARTN_NUMB%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_PARTNERS%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens2%3AOrder%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens2%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20color%3A%20%23569cd6%3B%22%3EOrder%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Exmlns%3Ans2%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23cb8f76%3B%22%3E%22%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_HEADER_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EDOC_TYPE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3ETA%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EDOC_TYPE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3ESALES_ORG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E1000%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3ESALES_ORG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EDISTR_CHAN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E12%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EDISTR_CHAN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_HEADER_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_ITEMS_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EMATERIAL%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3EDPC1020%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EMATERIAL%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_ITEMS_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_PARTNERS%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EPARTN_ROLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3EAG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EPARTN_ROLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EPARTN_NUMB%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E0000001012%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EPARTN_NUMB%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EORDER_PARTNERS%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens2%3AOrder%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3EOrders%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3ARequestsInfo%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%204.5562in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20color%3A%20%23569cd6%3B%22%3ECREATEFROMDAT2%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Exmlns%3Ans0%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23cb8f76%3B%22%3E%22%E2%80%A6%22%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Exmlns%3Ans3%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23cb8f76%3B%22%3E%22%E2%80%A6%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_HEADER_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADOC_TYPE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3ETA%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADOC_TYPE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ASALES_ORG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E1000%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ASALES_ORG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADISTR_CHAN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E12%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADISTR_CHAN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADIVISION%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADIVISION%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_HEADER_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_ITEMS_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ABAPISDITM%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3AMATERIAL%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3EDPC1020%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3AMATERIAL%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ABAPISDITM%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_ITEMS_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_PARTNERS%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ABAPIPARNR%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3APARTN_ROLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3EAG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3APARTN_ROLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3APARTN_NUMB%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E0000001012%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3APARTN_NUMB%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ABAPIPARNR%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_PARTNERS%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3ACREATEFROMDAT2%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20color%3A%20%23569cd6%3B%22%3ECREATEFROMDAT2%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Exmlns%3Ans0%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23cb8f76%3B%22%3E%22%E2%80%A6%22%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2372a1ba%3B%22%3Exmlns%3Ans3%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23cb8f76%3B%22%3E%22%E2%80%A6%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_HEADER_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADOC_TYPE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3ETA%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADOC_TYPE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ASALES_ORG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E1000%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ASALES_ORG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADISTR_CHAN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E12%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADISTR_CHAN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADIVISION%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ADIVISION%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_HEADER_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_ITEMS_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ABAPISDITM%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3AMATERIAL%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3EDPC1020%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3AMATERIAL%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ABAPISDITM%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_ITEMS_IN%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_PARTNERS%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ABAPIPARNR%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3APARTN_ROLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3EAG%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3APARTN_ROLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3APARTN_NUMB%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E0000001012%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3APARTN_NUMB%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens3%3ABAPIPARNR%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23979797%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3AORDER_PARTNERS%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Consolas%3B%20font-size%3A%2010.5pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23569cd6%3B%22%3Ens0%3ACREATEFROMDAT2%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20gray%3B%22%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3C%2FDIV%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221_BAPIErrorsHandlingPipelineOverview.png%22%20style%3D%22width%3A%20734px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F234828i505E3F2F445A2D1C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221_BAPIErrorsHandlingPipelineOverview.png%22%20alt%3D%221_BAPIErrorsHandlingPipelineOverview.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20few%20changes%20were%20made%20to%20the%20original%20pipeline.%20First%2C%20we%20introduced%20a%20Boolean%20element%20%3CEM%3EProcessErrors%20%3C%2FEM%3Eto%20indicate%20the%20desired%20error%20behavior%20when%20BAPI%20transaction%20requests%20fail%20(%22failure%22%20being%20defined%20in%20the%20next%20section).%20If%20true%2C%20the%20orchestration%20will%20log%20the%20errors%20and%20continue%20processing%20the%20debatched%20transaction%20requests.%20If%20false%2C%20the%20orchestration%20will%20record%20the%20errors%2C%20roll%20back%20existing%20transactions%2C%20and%20exit.%20%3CEM%3EOrchestration%20instances%20are%20not%20suspended%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3EThe%20idea%20of%20using%20%3CEM%3EProcessErrors%3C%2FEM%3E%20came%20out%20of%20consistency%20with%20the%20BAPI%20parameter%20BEHAVE_WHEN_ERROR%2C%20which%20is%20documented%20as%20a%20way%20to%20control%20order%20creation%20when%20some%20sale%20items%20within%20a%20transaction%20(BAPISDITM%20field)%20cannot%20be%20created.%20A%20value%20of%20%22P%22%20(Process)%20means%20that%20the%20order%20will%20be%20saved%20when%20errors%20occur%20and%20problematic%20items%20will%20not%20be%20saved.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESecond%2C%20the%20helper%20class%20%3CEM%3EBAPIOrdersList%3C%2FEM%3E%20used%20for%20caching%20debatched%20CREATEFROMDAT2%20documents%20was%20modified%20to%20allocate%20a%20BAPIRET2%5B%5D%20array%20inside%20each%20CREATEDFROMDAT2%2C%20which%20is%20used%20on%20the%20SAP%20side%20as%20a%20return%20parameter%20(explained%20in%20the%20next%20section).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3E%5BSerializable%5D%0A%20%20%20%20public%20class%20BAPIOrdersList%20%3A%20List%3CCREATEFROMDAT2%3E%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20public%20BAPIOrdersList()%20%7B%20%7D%0A%0A%20%20%20%20%20%20%20%20public%20void%20AddFromXMLString(XmlDocument%20document)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20MemoryStream%20stream%20%3D%20new%20MemoryStream()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20document.Save(stream)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20stream.Flush()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20stream.Position%20%3D%200%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20XmlSerializer%20reader%20%3D%20new%20System.Xml.Serialization.XmlSerializer(typeof(CREATEFROMDAT2))%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20StreamReader%20st%20%3D%20new%20StreamReader(stream)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20CREATEFROMDAT2%20transact%20%3D%20(CREATEFROMDAT2)reader.Deserialize(st)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20transact.RETURN%20%3D%20new%20BAPIRET2%5B1%5D%3B%20%2F%2F%20Allocate%20this%20structure%20to%20get%20the%20return%20values%20in%20the%20response.%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20this.Add(transact)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20st.Close()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20public%20CREATEFROMDAT2%20Get(int%20index)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this%5Bindex%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20public%20int%20OrdersCount()%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this.Count%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20public%20void%20Insert(BAPIOrdersList%20orders)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.AddRange(orders)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%3C%2FCREATEFROMDAT2%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELast%2C%20exception%20processing%20was%20introduced%20in%20the%20debatching%20process%20in%20order%20to%20catch%20errors%20that%20could%20happen%20during%20transforms%20from%20bad%20data.%20The%20details%20are%20covered%20in%20a%20separate%20article%20as%20they%20are%20not%20specific%20to%20BAPIs.%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1990910464%22%20id%3D%22toc-hId-1992488364%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-183456001%22%20id%3D%22toc-hId-185033901%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EInvalid%20Data%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20classified%20%22invalid%22%20data%20into%20two%20types%20based%20on%20where%20the%20error%20happen%20and%20the%20corresponding%20impact%3A%20%3CEM%3Evalue%3C%2FEM%3E%20errors%20and%20%3CEM%3Eformat%3C%2FEM%3E%20errors.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-874017475%22%20id%3D%22toc-hId-875595375%22%3E%3CSTRONG%3EInvalid%20Values%3C%2FSTRONG%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EData%20value%20errors%20correspond%20to%20values%20that%20cause%20transaction%20errors%20on%20the%20SAP%20side.%20For%20instance%2C%20using%20a%20vendor%20or%20material%20that%20do%20not%20exist.%20In%20these%20cases%2C%20the%20CREATEFROMDAT2Response%20contains%20information%20in%20the%20BAPIRET2%20structure%20parameter%20provided%20in%20the%20CREATEFROMDAT2%20request.%20Example%20of%20data%20value%20error%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-html%22%3E%3CCODE%3E%20%20%20%3CRETURN%3E%0A%20%20%20%20%20%20%20%20%3CBAPIRET2%20xmlns%3D%22http%3A%2F%2FMicrosoft.LobServices.Sap%2F2007%2F03%2FTypes%2FRfc%2F%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CTYPE%3EE%3C%2FTYPE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CID%3ECZ%3C%2FID%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNUMBER%3E95%3C%2FNUMBER%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE%3ESales%20organization%20abcd%20does%20not%20exist%3C%2FMESSAGE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CLOG_NO%3E%3C%2FLOG_NO%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CLOG_MSG_NO%3E0%3C%2FLOG_MSG_NO%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE_V1%3Eabcd%3C%2FMESSAGE_V1%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE_V2%3E%3C%2FMESSAGE_V2%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE_V3%3E%3C%2FMESSAGE_V3%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE_V4%3E%3C%2FMESSAGE_V4%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CPARAMETER%3ESALES_HEADER_IN%3C%2FPARAMETER%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CROW%3E0%3C%2FROW%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CFIELD%3E%3C%2FFIELD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CSYSTEM%3ET90CLNT090%3C%2FSYSTEM%3E%0A%20%20%20%20%20%20%20%20%3C%2FBAPIRET2%3E%0A%20%20%20%20%20%20%20%20%3CBAPIRET2%20xmlns%3D%22http%3A%2F%2FMicrosoft.LobServices.Sap%2F2007%2F03%2FTypes%2FRfc%2F%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CTYPE%3EE%3C%2FTYPE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CID%3EV4%3C%2FID%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CNUMBER%3E219%3C%2FNUMBER%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE%3ESales%20document%20%20was%20not%20changed%3C%2FMESSAGE%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CLOG_NO%3E%3C%2FLOG_NO%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CLOG_MSG_NO%3E0%3C%2FLOG_MSG_NO%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE_V1%3E%3C%2FMESSAGE_V1%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE_V2%3E%3C%2FMESSAGE_V2%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE_V3%3E%3C%2FMESSAGE_V3%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CMESSAGE_V4%3E%3C%2FMESSAGE_V4%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CPARAMETER%3E%3C%2FPARAMETER%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CROW%3E0%3C%2FROW%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CFIELD%3E%3C%2FFIELD%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CSYSTEM%3ET90CLNT090%3C%2FSYSTEM%3E%0A%20%20%20%20%20%20%20%20%3C%2FBAPIRET2%3E%0A%20%20%20%20%3C%2FRETURN%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20explained%20in%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fremote-database.com%2F00000217%2Fa53eca474ac011d1894e0000e829fbbd.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EUsing%20BAPIs%20in%20Distributed%20Systems%20(ALE)%3C%2FA%3E%2C%20a%20value%20of%20%22E%22%20in%20any%20of%20the%20TYPE%20fields%20of%20BAPIRET2%20indicates%20transaction%20failure%26nbsp%3Band%20therefore%2C%20nothing%20to%20commit.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--933436988%22%20id%3D%22toc-hId--931859088%22%3E%3CSTRONG%3EInvalid%20Formats%3C%2FSTRONG%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFormat%20errors%20correspond%20to%20field%20values%20that%20do%20not%20abide%20by%20the%20metadata%20schemas%20provided%20by%20the%20SAP%20server%20and%20generated%20in%20Visual%20Studio%20(cf.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fbiztalk-server-team-blog%2Fsap-bapi-transactions-walkthrough%2Fba-p%2F1772148%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3ESAP%20BAPI%20Transactions%20Walkthrough%3C%2FA%3E).%20Such%20errors%20cause%20exceptions%20in%20the%20SAP%20adapter%20before%20a%20BAPI%20transaction%20is%20even%20sent%2C%20which%20then%20results%20in%20the%20SAP%20channel%20being%20broken.%20For%20example%2C%20if%20we%20used%20a%20string%20of%20length%20greater%20than%204%20in%20the%20SALES_ORG%20field%2C%20we%20would%20get%20the%20following%20error%20in%20the%20event%20log%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20lightgrey%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3EA%20message%20sent%20to%20adapter%20%22WCF-SAP%22%20on%20send%20port%20%22BAPI2032SalesOrdersSP%22%20with%20URI%20%22sap%3A%2F%2FCLIENT%3D800%3BLANG%3DEN%3B%40a%2F...%22%20is%20suspended.%3C%2FP%3E%0A%3CP%3E%26nbsp%3BError%20details%3A%20Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException%3A%20An%20error%20occurred%20when%20trying%20to%20convert%20the%20XML%20string%20thisistoolong%20of%20RFCTYPE%20RFCTYPE_CHAR%20with%20length%204%20and%20decimals%200%20to%20a%20.NET%20type.%20Parameter%2Ffield%20name%3A%20SALES_ORG%26nbsp%3B%26nbsp%3B%20Error%20message%3A%20The%20length%20of%20the%20value%20for%20the%20field%20exceeds%20the%20allowed%20value.%20Value%3A%2013%26nbsp%3B%20Field%3A%20SALES_ORG%20Allowed%20value%3A%204.%20---%26gt%3B%20Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException%3A%20The%20length%20of%20the%20value%20for%20the%20field%20exceeds%20the%20allowed%20value.%20Value%3A%2013%26nbsp%3B%20Field%3A%20SALES_ORG%20Allowed%20value%3A%204%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%20at%20Microsoft.Adapters.SAP.SapMetadataUtilities.ConvertXmlStringToRfcStringNCo(String%20data%2C%20RfcTypes%20type%2C%20Int32%20singleByteLength%2C%20Int32%20decimals%2C%20String%20fieldname%2C%20Encoding%20encoding%2C%20Encoding%20realPartnerEncoding%2C%20Boolean%20padToExactLength%2C%20SAPConnection%20sapconnection)%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAny%20further%20attempt%20to%20submit%20BAPI%20transactions%20in%20the%20same%20LUW%20would%20result%20in%20the%20dreaded%20%22Inner%20Channel%22%20exception%20which%20indicates%20that%20the%20connection%20to%20the%20server%20was%20already%20closed%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20lightgrey%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3EA%20message%20sent%20to%20adapter%20%22WCF-SAP%22%20on%20send%20port%20%22BAPI2032SalesOrdersSP%22%20with%20URI%20%22sap%3A%2F%2FCLIENT%3D800%3BLANG%3DEN%3B%40a%2F...%22%20is%20suspended.%3C%2FP%3E%0A%3CP%3E%26nbsp%3BError%20details%3A%20System.InvalidOperationException%3A%20The%20Inner%20Channel%20to%20use%20was%20not%20found%20for%20the%20key%20%7B0A73F66F-31FA-4E48-BAC5-14EAED9571D4%7D_%7B27D07099-1874-47C3-9E69-2AD1FA42DE8D%7D%3BURI%3Dsap%3A%2F%2FCLIENT%3D800%3BLANG%3DEN%3B%40a%2F....%20Specify%20a%20valid%20key.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20would%20see%20the%20%22Inner%20Channel%22%20error%20if%20a%20BAPI_TRANSACTION_COMMIT%20or%20BAPI_TRANSACTION_ROLLBACK%20was%20sent%20after%20the%20data%20format%20error.%20To%20make%20things%20worse%2C%20if%20we%20were%20to%20send%20a%20BAPI_TRANSACTION_ROLLBACK%20in%20an%20exception%20handler%2C%20we%20would%20then%20get%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20lightgrey%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3EA%20message%20sent%20to%20adapter%20%22WCF-SAP%22%20on%20send%20port%20%22BAPI2032SalesOrdersSP%22%20with%20URI%20%22sap%3A%2F%2FCLIENT%3D800%3BLANG%3DEN%3B%40a%2F...%22%20is%20suspended.%3C%2FP%3E%0A%3CP%3E%26nbsp%3BError%20details%3A%20System.ServiceModel.CommunicationException%3A%20The%20server%20did%20not%20provide%20a%20meaningful%20reply%3B%20this%20might%20be%20caused%20by%20a%20contract%20mismatch%2C%20a%20premature%20session%20shutdown%20or%20an%20internal%20server%20error.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20latter%20happens%20because%20the%20ABORT%20message%20of%20BAPI_TRANSACTION_ROLLBACK%20is%20sent%20as%20first%20message%20on%20a%20new%20connection%20and%20therefore%20produces%20undesirable%20results%20as%20documented%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fadapters-and-accelerators%2Fadapter-sap%2Frun-bapi-transactions-in-sap-using-biztalk-server%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ERun%20BAPI%20Transactions%20in%20SAP%20using%20BizTalk%20Server.%3C%2FA%3E%26nbsp%3BAs%20a%20side-note%2C%20this%20illustrates%20the%20point%20that%20BAPI_TRANSACTION_ROLLBACK%20is%20not%20particularly%20suited%20to%20an%20orchestration%20exception%20block%2C%20unlike%20what%20has%20been%20documented%20elsewhere.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EExceptions%20in%20the%20SAP%20adapter%20result%20in%20suspended%20messages%2C%20as%20shown%20below%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SuspendedMessages.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F234850i108B4328907E6EC4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SuspendedMessages.PNG%22%20alt%3D%22SuspendedMessages.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20the%20orchestration%20design%20presented%20next%2C%20such%20exceptions%20will%20not%20cause%20suspended%20orchestrations%20and%20related%20messages%20though.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--943940092%22%20id%3D%22toc-hId--942362192%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3EOrchestration%20Overview%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20logical%20flow%20through%20the%20orchestration%20was%20divided%20into%20four%20%22tracks%22%20based%20on%20%3CEM%3EProcessErrors%3C%2FEM%3E%20%3D%20true%2Ffalse%2C%20and%20data%20error%20type%20%3D%20format%2Fvalue.%20The%20following%20table%20provides%20the%20details%3A%20track%20name%20(a%2C%20b%2C%20c%2C%20d)%2C%20%3CEM%3EProcessErrors%3C%2FEM%3E%2FError%20type%20combination%2C%20example%20of%20message%20with%20error%2C%20and%20the%20processing%20steps.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TracksTable.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F235008i979590BDE52B4A8F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TracksTable.png%22%20alt%3D%22TracksTable.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELegends%20correspond%20to%20the%20flows%20presented%20in%20the%20overview%20below.%20The%20orchestration%20changes%20and%20additional%20stages%20for%20error%20handling%20are%3A%3C%2FP%3E%0A%3CP%3E-%20Per-BAPI-transaction%20exception%20block%20(inner%20loop)%3B%3C%2FP%3E%0A%3CP%3E-%20Rollback%20exception%20block%3B%3C%2FP%3E%0A%3CP%3E-%20Commit%20and%20Rollback%20logic%20including%20exception%20handling%20(presented%20later).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221_BAPIErrorHandlingFlow.png%22%20style%3D%22width%3A%20724px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F234773i346419B4A302C80A%2Fimage-dimensions%2F724x2547%3Fv%3D1.0%22%20width%3D%22724%22%20height%3D%222547%22%20role%3D%22button%22%20title%3D%221_BAPIErrorHandlingFlow.png%22%20alt%3D%221_BAPIErrorHandlingFlow.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1543572741%22%20id%3D%22toc-hId-1545150641%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EProcessing%20Value%20Errors%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EValue%20errors%20are%20contained%20in%20the%20CREATEFROMDAT2Response%20messages%20received%20from%20the%20SAP%20server.%20They%20are%20extracted%20by%20the%20orchestration%20into%20a%20variable%20of%20type%20the%20following%20helper%20class%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3E%20%5BSerializable%5D%0A%20%20%20%20public%20class%20BAPIReturnValues%20%3A%20List%3CBAPIRET2%3E%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20public%20BAPIReturnValues()%20%7B%20%7D%0A%0A%20%20%20%20%20%20%20%20public%20void%20Set(XmlDocument%20document)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20MemoryStream%20stream%20%3D%20new%20MemoryStream()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20document.Save(stream)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20stream.Flush()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20stream.Position%20%3D%200%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20XmlSerializer%20reader%20%3D%20new%20System.Xml.Serialization.XmlSerializer(typeof(CREATEFROMDAT2Response))%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20StreamReader%20st%20%3D%20new%20StreamReader(stream)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20CREATEFROMDAT2Response%20transactResponse%20%3D%20(CREATEFROMDAT2Response)reader.Deserialize(st)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20this.InsertRange(0%2C%20transactResponse.RETURN)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20st.Close()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20public%20BAPIRET2%20Get(int%20index)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this%5Bindex%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20public%20bool%20IsError()%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20(int%20i%20%3D%200%3B%20i%20%26lt%3B%20this.Count%3B%20i%2B%2B)%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(this%5Bi%5D.TYPE%20%3D%3D%20%22E%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20public%20string%20GetErrorString()%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20string%20errorString%20%3D%20string.Empty%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20(int%20i%20%3D%200%3B%20i%20%26lt%3B%20this.Count%3B%20i%2B%2B)%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(this%5Bi%5D.TYPE%20%3D%3D%20%22E%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20errorString%20%2B%3D%20string.Format(%22Index%20%7B0%7D%3A%20%7B1%7D%3B%20%22%2C%20i%2C%20this%5Bi%5D.MESSAGE)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20errorString%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3C%2FBAPIRET2%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ewhich%20is%20used%20in%20the%20expression%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3EBAPIResponseRetVal.Set(BAPIResponse)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ewhere%20%3CEM%3EBAPIResponse%3C%2FEM%3E%20is%20of%20type%20BUS2032.CREATEFROMDAT2Response%20and%20implicitly%20cast%20to%20%3CEM%3EXMLDocument%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20method%20%3CEM%3EBAPIReturnValues.GetErrorString()%3C%2FEM%3E%20produces%20the%20error%20string%20logged%20to%20a%20file%20in%20the%20error%20branch%20of%20the%20orchestration.%20The%20string%20is%20saved%20as-is%2C%20by%20using%20the%20%3CEM%3ERawString%3C%2FEM%3E%20class%20documented%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2Fa82eab63-db47-4666-a642-b41aa28b923a%2Fsending-string-to-file-location-in-biztalk%3Fforum%3Dbiztalkgeneral%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esending%20string%20to%20file%20location%20in%20BizTalk.%3C%2FA%3E%26nbsp%3Band%20included%20in%20the%20BizTalk%20code%20attached%20to%20this%20blog%20post.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3EDataValueErrorMessage%20%3D%20new%20Microsoft.Samples.BizTalk.XlangCustomFormatters.RawString(%0A%20%20%20%20System.String.Format(%22Message%20%7B0%7D%3A%20%7B1%7D%22%2C%20BAPIOrdersCount%2C%20BAPIResponseRetVal.GetErrorString()))%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EExample%20of%20error%20output%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20lightgrey%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CEM%3EMessage%201%3A%20Index%200%3A%20For%20sales%20org.%20abcd%20distribution%20channel%2012%20is%20not%20allowed%3B%20Index%201%3A%20Sales%20document%26nbsp%3B%20was%20not%20changed%3B%3C%2FEM%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20%3CEM%3EProcessError%3C%2FEM%3E%20is%20set%20to%20false%2C%20the%20orchestration%20flow%20is%20interrupted%20with%20a%20%3CEM%3ESystem.Exception%3C%2FEM%3E%20created%26nbsp%3B%20to%20be%20caught%20later%20on%20in%20the%20rollback%20stage%20of%20the%20orchestration.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3EBAPIDataValueExceptionVar%20%3D%20new%20System.Exception(BAPIResponseRetVal.GetErrorString())%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20every%20place%20in%20the%20orchestration%20where%20exceptions%20are%20logged%2C%20the%20exception%20error%20messages%20follow%20the%20schema%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ExceptionSchema.PNG%22%20style%3D%22width%3A%20152px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F235222iBAF3DCFF145A09B1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ExceptionSchema.PNG%22%20alt%3D%22ExceptionSchema.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eand%20messages%20are%20created%20with%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3EDataFormatErrorMessageVar%20%3D%20new%20System.Xml.XmlDocument()%3B%0ADataFormatErrorMessageVar.LoadXml(System.String.Format(%0A%22%3CEXCEPTIONINFO%20ns0%3D%22%5C%26quot%3Bhttp%3A%2F%2FSapBAPITxClientDebatching.ExceptionInfo%5C%26quot%3B%22%3E%3CTYPE%3E%7B0%7D%3C%2FTYPE%3E%3CMESSAGE%3E%7B1%7D%3C%2FMESSAGE%3E%3C%2FEXCEPTIONINFO%3E%22%2C%0ASystemException.GetType()%2C%20%0ASystemException.ToString()))%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%20the%20use%20of%20CDATA%20to%20prevent%20parsing%20of%20characters%20that%20would%20otherwise%20invalidate%20the%20xml%20format.%20Example%20of%20output%20for%20the%20same%20data%20value%20error%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-html%22%3E%3CCODE%3E%3CEXCEPTIONINFO%20ns0%3D%22http%3A%2F%2FSapBAPITxClientDebatching.ExceptionInfo%22%3E%0A%20%20%3CTYPE%3ESystem.Exception%3C%2FTYPE%3E%0A%20%20%3CMESSAGE%3ESystem.Exception%3A%20Index%200%3A%20For%20sales%20org.%20abcd%20distribution%20channel%2012%20is%20not%20allowed%3B%20Index%201%3A%20Sales%20document%20%20was%20not%20changed%3B%20%0A%20%20%20at%20SapBAPITxClientDebatching.BAPIOrchestration.segment12(StopConditions%20stopOn)%0A%20%20%20at%20Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment%20s%2C%20StopConditions%20stopCond%2C%20Exception%26amp%3Bamp%3B%20exp)%3C%2FMESSAGE%3E%0A%3C%2FEXCEPTIONINFO%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDetailed%20steps%20are%20shown%20in%20the%20following%20diagram%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222_BAPIErrorHandlingValueErrors.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F234783i2BE9EFFBDDA831D4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222_BAPIErrorHandlingValueErrors.png%22%20alt%3D%222_BAPIErrorHandlingValueErrors.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESuccessful%20BAPI%20transactions%20are%20added%20to%20a%20list%20of%20BAPI%20orders%20to%20commit%20(highlighted%20in%20yellow).%20This%20will%20be%20clarified%20in%20the%20next%20sections.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--263881722%22%20id%3D%22toc-hId--262303822%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EFormat%20Errors%20and%20Adapter%20Exceptions%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFormat%20errors%20-%20as%20well%20as%20any%20other%20adapter%20exception%20happening%20when%20sending%20the%20BAPI%20CREATEFROMDAT2%20requests%20-%20are%20handled%20in%20a%20per-request%20catch%20block%20for%20System.Exception%2C%20which%20encompasses%20the%20System.Web.Services.Protocols.SoapException%20and%20Microoft.XLANGs.Core.XlangSoapException.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%223_BAPIErrorHandlingFormatErrors.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F234785i3717359896AC3F6D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223_BAPIErrorHandlingFormatErrors.png%22%20alt%3D%223_BAPIErrorHandlingFormatErrors.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESimilarly%20to%20the%20previous%20stage%2C%20error%20messages%20and%20faulty%20requests%20are%20logged.%20As%20previously%20mentioned%2C%20exceptions%20are%20logged%20in%20a%20specific%20schema.%20With%20our%20test%20data%2C%20exception%20info%20looked%20like%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-html%22%3E%3CCODE%3E%3CEXCEPTIONINFO%20ns0%3D%22http%3A%2F%2FSapBAPITxClientDebatching.ExceptionInfo%22%3E%0A%20%20%3CTYPE%3EMicrosoft.XLANGs.Core.XlangSoapException%3C%2FTYPE%3E%0A%20%20%3CMESSAGE%3EMicrosoft.XLANGs.Core.XlangSoapException%3A%20An%20error%20occurred%20while%20processing%20the%20message%2C%20refer%20to%20the%20details%20section%20for%20more%20information%20%0AMessage%20ID%3A%20%7B1EC13267-2C5A-4AA0-A8B0-BD5F2632162D%7D%0AInstance%20ID%3A%20%7B9556809F-27B8-49C5-AB2E-6814CB9EC6FA%7D%0AError%20Description%3A%20Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException%3A%20An%20error%20occurred%20when%20trying%20to%20convert%20the%20XML%20string%20thisistoolong%20of%20RFCTYPE%20RFCTYPE_CHAR%20with%20length%204%20and%20decimals%200%20to%20a%20.NET%20type.%20Parameter%2Ffield%20name%3A%20SALES_ORG%20%20%20Error%20message%3A%20The%20length%20of%20the%20value%20for%20the%20field%20exceeds%20the%20allowed%20value.%20Value%3A%2013%20%20Field%3A%20SALES_ORG%20Allowed%20value%3A%204.%20---%26gt%3B%20Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException%3A%20The%20length%20of%20the%20value%20for%20the%20field%20exceeds%20the%20allowed%20value.%20Value%3A%2013%20%20Field%3A%20SALES_ORG%20Allowed%20value%3A%204%0A%20%20%20at%20Microsoft.Adapters.SAP.SapMetadataUtilities.ConvertXmlStringToRfcStringNCo(String%20data%2C%20RfcTypes%20type%2C%20Int32%20singleByteLength%2C%20Int32%20decimals%2C%20String%20fieldname%2C%20Encoding%20encoding%2C%20Encoding%20realPartnerEncoding%2C%20Boolean%20padToExactLength%2C%20SAPConnection%20sapconnection)%0A%20%20%20---%20End%20of%20inner%20exception%20stack%20trace%20---%0A%0AServer%20stack%20trace%3A%20%0A%20%20%20at%20System.Runtime.AsyncResult.End%5BTAsyncResult%5D(IAsyncResult%20result)%0A%20%20%20at%20System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult%20result)%0A%20%20%20at%20System.ServiceModel.Channels.ServiceChannel.EndCall(String%20action%2C%20Object%5B%5D%20outs%2C%20IAsyncResult%20result)%0A%20%20%20at%20System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult%20result)%0A%0AException%20rethrown%20at%20%5B0%5D%3A%20%0A%20%20%20at%20System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage%20reqMsg%2C%20IMessage%20retMsg)%0A%20%20%20at%20System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData%26amp%3Bamp%3B%20msgData%2C%20Int32%20type)%0A%20%20%20at%20System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult%20result)%0A%20%20%20at%20Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient%602.RequestCallback(IAsyncResult%20result)%0A%0A%20%20%20at%20Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(Envelope%20env%2C%20Int32%20operationId%2C%20Context%20ctx)%0A%20%20%20at%20Microsoft.XLANGs.Core.Subscription.Receive(Segment%20s%2C%20Context%20ctx%2C%20Envelope%26amp%3Bamp%3B%20env%2C%20Boolean%20topOnly)%0A%20%20%20at%20Microsoft.XLANGs.Core.PortBase.GetMessageId(Subscription%20subscription%2C%20Segment%20currentSegment%2C%20Context%20cxt%2C%20Envelope%26amp%3Bamp%3B%20env%2C%20CachedObject%20location)%0A%20%20%20at%20SapBAPITxClientDebatching.BAPIOrchestration.segment11(StopConditions%20stopOn)%0A%20%20%20at%20Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment%20s%2C%20StopConditions%20stopCond%2C%20Exception%26amp%3Bamp%3B%20exp)%3C%2FMESSAGE%3E%0A%3C%2FEXCEPTIONINFO%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20%3CEM%3EProcessErrors%3C%2FEM%3E%20is%20set%20to%20true%2C%20transactions%20that%20have%20been%20successful%20are%20re-enqueued%20at%20the%20back%20of%20the%20%3CEM%3EBAPIOrders%3C%2FEM%3E%20list%20to%20be%20resent.%20The%20assumption%20that%20in%20this%20particular%20scenario%20configuration%2C%20BAPIs%20can%20be%20submitted%20in%20any%20order%2C%20which%20is%20reasonable%20if%20one%20is%20willing%20to%20ignore%20errors%20and%20let%20the%20processing%20continue.%26nbsp%3BThe%20%3CEM%3EBAPIConnectionState%3C%2FEM%3E%20is%20reset%20to%20%22OPEN%22%20so%20that%20a%20new%20connection%20to%20the%20SAP%20server%20may%20be%20open%20to%20replace%20the%20connection%20broken%20from%20the%20SAP%20adapter%20exception.%20The%20re-enqueueing%20expression%20is%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3EBAPIOrders.Insert(BAPIOrdersToCommit)%3B%0ABAPIOrdersToCommit.Clear()%3B%0ABAPIConnectionState%20%3D%20%22OPEN%22%3B%0ASuccessCount%20%3D%200%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20lightgrey%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3ENote%3A%20As%20mentioned%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fadapters-and-accelerators%2Fadapter-sap%2Frun-bapi-transactions-in-sap-using-biztalk-server%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3ERun%20BAPI%20Transactions%20in%20SAP%20using%20BizTalk%20Server%3C%2FA%3E%2C%26nbsp%3B%3CSPAN%3Ethe%20send%20port%20binding%20property%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EEnableConnectionPooling%3C%2FEM%3E%3CSPAN%3E%26nbsp%3Bhas%20to%20be%20set%20to%20false%20to%20prevent%20the%20same%20connection%20to%20be%20reused%20when%20an%20LUW%20is%20unexpectedly%20interrupted.%26nbsp%3B%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20can%20be%20seen%20in%20the%20figure%20below%2C%20iterations%20will%20continue%20until%20%3CEM%3EBAPIOrders.Count()%3C%2FEM%3E%20has%20been%20reached%2C%20which%20will%20include%20re-enqueued%20requests.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%223_BAPIErrorHandlingReenqueuing.png%22%20style%3D%22width%3A%20802px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F234840i04EA62795EC4102C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223_BAPIErrorHandlingReenqueuing.png%22%20alt%3D%223_BAPIErrorHandlingReenqueuing.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--2071336185%22%20id%3D%22toc-hId--2069758285%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EBAPI_TRANSACTION_COMMIT%20and%20BAPI_TRANSACTION_ROLLBACK%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECommit%20and%20Rollback%20stages%20are%20almost%20identical.%20The%20former%20happens%20when%20there%20is%20no%20error%20or%20if%20any%20error%20has%20been%20processed%3B%20the%20latter%20when%20execution%20is%20interrupted.%20In%20both%20cases%2C%20BAPI%20commit%2Frollback%20requests%20are%20sent%20only%20if%20there%20has%20been%20any%20successful%20transaction.%20In%20both%20cases%2C%20BAPI%20requests%2Fresponses%20are%20processed%20in%20their%20own%20scope%20for%20exception%20handling%20and%20logging%20as%20previously%20described.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECommit%20stage%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%224_BAPIErrorHandlingCommit.png%22%20style%3D%22width%3A%20843px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F234786i217C75987806177B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%224_BAPIErrorHandlingCommit.png%22%20alt%3D%22BAPI_TRANSACTION_COMMIT%20Stage%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EBAPI_TRANSACTION_COMMIT%20Stage%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERollback%20stage%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%224_BAPIErrorHandlingRollback.png%22%20style%3D%22width%3A%20722px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F234790i6BAFC78EDC497C33%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%224_BAPIErrorHandlingRollback.png%22%20alt%3D%22BAPI_TRANSACTION_ROLLBACK%20Stage%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EBAPI_TRANSACTION_ROLLBACK%20Stage%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--278986831%22%20id%3D%22toc-hId--277408931%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3EDeploying%20the%20Solution%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAll%20artifacts%20used%20in%20this%20article%20can%20be%20created%20with%20the%20bindings%20file%20provided%20in%20the%20attached%20archive.%20There%20is%20one%20file%20location%20per%20logical%20send%20port%20used%20for%20logging.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%225_BAPIErrorHandlingBindingsAndTestings.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F235261iA0664F9998C787BA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%225_BAPIErrorHandlingBindingsAndTestings.png%22%20alt%3D%225_BAPIErrorHandlingBindingsAndTestings.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20SAP%20Static%20Solicit-Response%20port%20is%20configured%20with%20RetryCount%20%3D%200%20and%20%22propagate%20fault%20message%22%20checked.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20archive%20also%20contain%20some%20sample%20input%20files%20and%20output%20illustrating%20the%20various%20logical%20flows%20through%20the%20orchestration%20with%20variations%20on%20batch%20size%2C%20error%20type%2C%20ProcessErrors%20flag%2C%20etc.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--2086441294%22%20id%3D%22toc-hId--2084863394%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EConcluding%20Remarks%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20is%20surprisingly%20little%20BizTalk%20material%20on%20how%20to%20use%20error%20handling%20and%20rollback%20in%20BAPI%20transactions.%20Our%20aim%20here%20was%20to%20explore%20what%20can%20be%20done%20based%20on%20existing%20orchestrations%20such%20as%20the%20ones%20presented%20in%20this%20series%20of%20blog%20articles.%20Basically%2C%20what%20it%20would%20look%20like%20if%20we%20wanted%20to%20do%20more%20than%20%22putting%20a%20BAPI_TRANSACTION_ROLLBACK%20in%20a%20catch%20exception%20shape%22%2C%20while%20keeping%20things%20as%20simple%20as%20possible.%20This%20meant%20leaving%20some%20items%20intentionally%20out-of-scope%20for%20this%20article%2C%20and%20it%20is%20worth%20mentioning%20some%20of%20them%20here%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E-%20Re-enqueuing%20may%20be%20expensive%20if%26nbsp%3B%20%22channel-ending%20%22errors%20tend%20to%20happen%20at%20the%20end%20of%20a%20large%20batch%20of%20error-free%20transactions.%20It%20can%20be%20remedied%20by%20tuning%20the%20batch%20sizes%2C%20or%20by%20simply%20saving%20the%20transactions%20for%20later%20processing%20by%20a%20different%20orchestration%20instance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E-%20As%20previously%20mentioned%2C%20BAPI%20requests%20that%20could%20not%20be%20sent%20due%20to%20exceptions%20in%20the%20SAP%20adapter%20are%20suspended%20with%20%3CEM%3Eresumable%3C%2FEM%3E%20status.%20In%20the%20case%20of%20errors%20caused%20by%20the%20data%20in%20the%20messages%2C%20resuming%20is%20of%20limited%20use%20though.%20There%20are%20ways%20to%20flow%20these%20messages%20back%20into%20the%20orchestration%20so%20they%20don't%20linger%20in%20the%20message%20box.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3E-%20Last%2C%20as%20we%20hinted%20at%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fbiztalk-server-team-blog%2Fscatter-gather-pattern-with-sap-bapi-transactions%2Fba-p%2F1810936%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EScatter-Gather%20Pattern%20with%20SAP%20BAPI%20Transactions%3C%2FA%3E%2C%20a%3CSPAN%3En%20interesting%20way%20to%20extend%20the%20topic%20presented%20here%20could%20be%20to%20combine%20error%20handling%20with%20asynchronous%20processing%20in%20multiple%20orchestrations..%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-401071539%22%20id%3D%22toc-hId-402649439%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3EReferences%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fbiztalk-server-team-blog%2Fsap-bapi-transactions-walkthrough%2Fba-p%2F1772148%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3ESAP%20BAPI%20Transactions%20Walkthrough%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20id%3D%22link_6%22%20class%3D%22page-link%20lia-link-navigation%20lia-custom-event%22%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fbiztalk-server-team-blog%2Fdebatching-sap-bapi-transaction-requests%2Fba-p%2F1786613%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EDebatching%20SAP%20BAPI%20Transaction%20Requests%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fadapters-and-accelerators%2Fadapter-sap%2Fexceptions-and-error-handling-with-the-sap-adapter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EExceptions%20and%20Error%20Handling%20with%20the%20SAP%20adapter%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fhelp.sap.com%2Fsaphelp_46c%2Fhelpdata%2Fen%2Fa5%2F3ec88c4ac011d1894e0000e829fbbd%2Fframeset.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EOld%20BAPI%20Transaction%20Model%20(with%20Commit)%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fhelp.sap.com%2Fsaphelp_46c%2Fhelpdata%2Fen%2Fa5%2F3ec88c4ac011d1894e0000e829fbbd%2Fframeset.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBAPI%20Transaction%20Model%20(Without%20Commit)%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fhelp.sap.com%2Fsaphelp_46c%2Fhelpdata%2Fen%2F4c%2F4c0e8a725311d396a80004ac96334b%2Fframeset.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBAPIs%20for%20Mass%20Data%20Transfer%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fremote-database.com%2F00000217%2Fc259aeb4969111d2ad4c080009b0fb56.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBuffering%20with%20Write%20BAPIs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fremote-database.com%2F00000217%2Fa53eca474ac011d1894e0000e829fbbd.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EUsing%20BAPIs%20in%20Distributed%20Systems%20(ALE)%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fadapters-and-accelerators%2Fadapter-sap%2Frun-bapi-transactions-in-sap-using-biztalk-server%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ERun%20BAPI%20Transactions%20in%20SAP%20using%20BizTalk%20Server%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2Fa82eab63-db47-4666-a642-b41aa28b923a%2Fsending-string-to-file-location-in-biztalk%3Fforum%3Dbiztalkgeneral%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esending%20string%20to%20file%20location%20in%20BizTalk%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fadapters-and-accelerators%2Fadapter-sap%2Frun-bapi-transactions-in-sap-using-biztalk-server%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3ERun%20BAPI%20Transactions%20in%20SAP%20using%20BizTalk%20Server%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fbiztalk-server-team-blog%2Fscatter-gather-pattern-with-sap-bapi-transactions%2Fba-p%2F1810936%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EScatter-Gather%20Pattern%20with%20SAP%20BAPI%20Transactions%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1909185%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20tackle%20a%26nbsp%3Btopic%20that%20has%20been%20set%20aside%20in%20previous%20posts%20about%26nbsp%3B%20SAP%20BAPI%20transactions%2C%20namely%2C%20%3CEM%3Eerror%20handling%3C%2FEM%3E.%20The%20orchestration%20previously%20presented%20in%26nbsp%3B%3CA%20id%3D%22link_6%22%20class%3D%22page-link%20lia-link-navigation%20lia-custom-event%22%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fbiztalk-server-team-blog%2Fdebatching-sap-bapi-transaction-requests%2Fba-p%2F1786613%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EDebatching%20SAP%20BAPI%20Transaction%20Requests%3C%2FA%3E%26nbsp%3Bis%20improved%20to%20a%20flexible%20fault-tolerant%20BAPI%20batch%20processing%20solution%20with%20the%20following%20features%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EGraceful%20handling%20of%20exceptions%20and%20errors%20from%20invalid%20data%3B%3C%2FLI%3E%0A%3CLI%3EOption%20to%20specify%20whether%20processing%20should%20continue%20or%20abort%3B%3C%2FLI%3E%0A%3CLI%3ELog%20all%20errors%20and%20non-committed%20transactions.%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1909185%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBizTalk%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E

Introduction

 

BizTalk artifacts are typically deployed in production once they have been thoroughly tested for functionality, stress, performance, integration, to name a few. Regardless of the amount of testing though, a system is vulnerable to the external data being received. Here, we consider what happens when BAPI transactions requests contain invalid data, such as fields that are not of the right formats or do not have expected values. The reader should be familiar with the orchestration presented in Debatching SAP BAPI Transaction Requests, which is augmented here for better error handling and fault-tolerant batch processing

 

Generally speaking, after the BAPI transaction requests are created, validation can happen:

(1) locally, in the BizTalk host instance, when the BAPI transactions are published and sent, and

(2) remotely, on the SAP server, when the transactions are received and processed.

Local failures result in the SAP adapter throwing such exceptions as:

"A message sent to adapter "WCF-SAP" on send port "…" with URI "…" is suspended. Error details: System.InvalidOperationException: The Inner Channel to use was not found for the key."

or other exceptions documented in Exceptions and Error Handling with the SAP adapter.

Remote data failures correspond to the SAP server returning error messages in the RETURN elements of the BAPI responses.

 

The distinction local/remote is important because error handling is implemented differently depending on whether errors happen on outbound or inbound data flows. For instance, as we shall see, BAPI_TRANSACTION_COMMIT and BAPI_TRANSACTION_ROLLBACK are not always applicable depending on how validation fails. From a customer perspective though, errors from invalid data need to be surfaced consistently regardless of where the errors happen. Some may expect "fail fast", where any invalid data should abort further processing. Others would rather handle invalid data with graceful error handling. This is especially relevant in the context of BAPI transactions where a Logical Unit of Work (LUW) may comprise a large number of transactions and the "one-fails/all-fail" behavior would be cost-prohibitive; In such cases, it would be preferable to keep the processing going rather than to suspend an orchestration instance for some invalid field in one out of many transactions (e.g., a vendor no longer exists but a request uses the vendor's code).

 

At this point, it is noteworthy to mention that the Old BAPI Transaction Model (with Commit) to execute a commit after every single RFC call has been phased out a long time ago in favor of the new(er) BAPI Transaction Model (Without Commit), i.e., multiple BAPI calls in one LUW. In the latter model, BAPIs can be used as a way to do mass data transfer effectively as documented in BAPIs for Mass Data Transfer thereby taking advantage of the improved performance through common updates. The "Without Commit" model has also been enhanced to a "Transaction Model with Buffering" (Buffering with Write BAPIs), which allows creates and updates to happen in the same LUWs.

 

Scenario

 

The first stage of the main orchestration is the debatching pipeline explained in detail in Debatching SAP BAPI Transactions and summarized below.

 

Orchestration receives…

Orchestration then produces…

<ns0:RequestsInfo xmlns:ns0="">

  <ProcessErrors>true</IsCommit>

  <Orders>

    <ns2:Order xmlns:ns2="">

      <ORDER_HEADER_IN>

        <DOC_TYPE>TA</DOC_TYPE>

        <SALES_ORG>1000</SALES_ORG>

        <DISTR_CHAN>12</DISTR_CHAN>

      </ORDER_HEADER_IN>

      <ORDER_ITEMS_IN>

          <MATERIAL>DPC1020</MATERIAL>

      </ORDER_ITEMS_IN>

      <ORDER_PARTNERS>

         <PARTN_ROLE>AG</PARTN_ROLE>

        <PARTN_NUMB>0000001012</PARTN_NUMB>

      </ORDER_PARTNERS>

    </ns2:Order>

    <ns2:Order xmlns:ns2="">

      <ORDER_HEADER_IN>

        <DOC_TYPE>TA</DOC_TYPE>

        <SALES_ORG>1000</SALES_ORG>

        <DISTR_CHAN>12</DISTR_CHAN>

      </ORDER_HEADER_IN>

      <ORDER_ITEMS_IN>

          <MATERIAL>DPC1020</MATERIAL>

      </ORDER_ITEMS_IN>

      <ORDER_PARTNERS>

          <PARTN_ROLE>AG</PARTN_ROLE>

        <PARTN_NUMB>0000001012</PARTN_NUMB>

      </ORDER_PARTNERS>

    </ns2:Order>

  </Orders>

</ns0:RequestsInfo>

<ns0:CREATEFROMDAT2 xmlns:ns0="…" xmlns:ns3="…">

    <ns0:ORDER_HEADER_IN>

        <ns3:DOC_TYPE>TA</ns3:DOC_TYPE>

        <ns3:SALES_ORG>1000</ns3:SALES_ORG>

        <ns3:DISTR_CHAN>12</ns3:DISTR_CHAN>

        <ns3:DIVISION></ns3:DIVISION>

    </ns0:ORDER_HEADER_IN>

    <ns0:ORDER_ITEMS_IN>

        <ns3:BAPISDITM>

            <ns3:MATERIAL>DPC1020</ns3:MATERIAL>

        </ns3:BAPISDITM>

    </ns0:ORDER_ITEMS_IN>

    <ns0:ORDER_PARTNERS>

        <ns3:BAPIPARNR>

            <ns3:PARTN_ROLE>AG</ns3:PARTN_ROLE>

            <ns3:PARTN_NUMB>0000001012</ns3:PARTN_NUMB>

        </ns3:BAPIPARNR>

    </ns0:ORDER_PARTNERS>

</ns0:CREATEFROMDAT2>

 

<ns0:CREATEFROMDAT2 xmlns:ns0="…" xmlns:ns3="…">

    <ns0:ORDER_HEADER_IN>

        <ns3:DOC_TYPE>TA</ns3:DOC_TYPE>

        <ns3:SALES_ORG>1000</ns3:SALES_ORG>

        <ns3:DISTR_CHAN>12</ns3:DISTR_CHAN>

        <ns3:DIVISION></ns3:DIVISION>

    </ns0:ORDER_HEADER_IN>

    <ns0:ORDER_ITEMS_IN>

        <ns3:BAPISDITM>

            <ns3:MATERIAL>DPC1020</ns3:MATERIAL>

        </ns3:BAPISDITM>

    </ns0:ORDER_ITEMS_IN>

    <ns0:ORDER_PARTNERS>

        <ns3:BAPIPARNR>

            <ns3:PARTN_ROLE>AG</ns3:PARTN_ROLE>

            <ns3:PARTN_NUMB>0000001012</ns3:PARTN_NUMB>

        </ns3:BAPIPARNR>

    </ns0:ORDER_PARTNERS>

</ns0:CREATEFROMDAT2>

 

1_BAPIErrorsHandlingPipelineOverview.png

 

A few changes were made to the original pipeline of Debatching SAP BAPI Transaction Requests.

 

First, we introduced a Boolean element ProcessErrors to indicate the desired error behavior when BAPI transaction requests fail ("failure" being defined in the next section).

- If set to true, the orchestration will log the errors and continue processing the debatched transaction requests.

- If false, the orchestration will record the errors, roll back existing transactions, and exit. Orchestration instances are not suspended.

The idea of using ProcessErrors came out of being consistent with the BAPI parameter BEHAVE_WHEN_ERROR, which is documented by SAP as a way to control order creation when some sale items within a transaction (BAPISDITM field) cannot be created. A value of "P" (Process Errors) means that the order will be saved when errors occur and problematic items will not be saved. 

 

The second modification was as follows: the method AddFromXMLString of helper class BAPIOrdersList, used for caching debatched CREATEFROMDAT2 documents,  now allocates a BAPIRET2[] array inside each CREATEDFROMDAT2, which is used on the SAP side as a return parameter (explained in the next section).

 

[Serializable]
    public class BAPIOrdersList : List<CREATEFROMDAT2>
    {
        public BAPIOrdersList() { }

        public void AddFromXMLString(XmlDocument document)
        {
            MemoryStream stream = new MemoryStream();
            document.Save(stream);
            stream.Flush();
            stream.Position = 0;

            XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(typeof(CREATEFROMDAT2));
            StreamReader st = new StreamReader(stream);

            CREATEFROMDAT2 transact = (CREATEFROMDAT2)reader.Deserialize(st);
            transact.RETURN = new BAPIRET2[1]; // Allocate this structure to get the return values in the response.

            this.Add(transact);
            st.Close();
        }

        public CREATEFROMDAT2 Get(int index)
        {
            return this[index];
        }

        public int OrdersCount()
        {
            return this.Count;
        }

        public void Insert(BAPIOrdersList orders)
        {
            this.AddRange(orders);
        }
    }

 

Last, exception processing was introduced in the debatching pipeline in order to catch errors that could happen during transforms from bad data. The details are covered in a separate article as they are not specific to BAPIs. 

 

Invalid Data

 

We classified "invalid" data into two types based on where the error happen and the corresponding impact: value errors and format errors.

 

Invalid Data Values

 

Data value errors correspond to values that cause transaction errors on the SAP side. For instance, using a vendor or material that do not exist. In these cases, the CREATEFROMDAT2Response contains information in the BAPIRET2 structure parameter provided in the CREATEFROMDAT2 request. Example of data value error:

 

   <RETURN>
        <BAPIRET2 xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">
            <TYPE>E</TYPE>
            <ID>CZ</ID>
            <NUMBER>95</NUMBER>
            <MESSAGE>Sales organization abcd does not exist</MESSAGE>
            <LOG_NO></LOG_NO>
            <LOG_MSG_NO>0</LOG_MSG_NO>
            <MESSAGE_V1>abcd</MESSAGE_V1>
            <MESSAGE_V2></MESSAGE_V2>
            <MESSAGE_V3></MESSAGE_V3>
            <MESSAGE_V4></MESSAGE_V4>
            <PARAMETER>SALES_HEADER_IN</PARAMETER>
            <ROW>0</ROW>
            <FIELD></FIELD>
            <SYSTEM>T90CLNT090</SYSTEM>
        </BAPIRET2>
        <BAPIRET2 xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">
            <TYPE>E</TYPE>
            <ID>V4</ID>
            <NUMBER>219</NUMBER>
            <MESSAGE>Sales document  was not changed</MESSAGE>
            <LOG_NO></LOG_NO>
            <LOG_MSG_NO>0</LOG_MSG_NO>
            <MESSAGE_V1></MESSAGE_V1>
            <MESSAGE_V2></MESSAGE_V2>
            <MESSAGE_V3></MESSAGE_V3>
            <MESSAGE_V4></MESSAGE_V4>
            <PARAMETER></PARAMETER>
            <ROW>0</ROW>
            <FIELD></FIELD>
            <SYSTEM>T90CLNT090</SYSTEM>
        </BAPIRET2>
    </RETURN>

 

As explained in Using BAPIs in Distributed Systems (ALE), a value of "E" in any of the TYPE fields of BAPIRET2 indicates transaction failure and therefore, nothing to commit.

 

Invalid Data Formats

 

Data Format errors correspond to field formats that do not abide by the metadata schemas provided by the SAP server, when generated in Visual Studio (cf. SAP BAPI Transactions Walkthrough). Such errors cause exceptions in the SAP adapter before a BAPI transaction is even sent, which then results in the SAP channel being broken. For example, if we used a string of length greater than 4 in the SALES_ORG field, we would get the following error in the event log:

A message sent to adapter "WCF-SAP" on send port "BAPI2032SalesOrdersSP" with URI "sap://CLIENT=800;LANG=EN;@a/..." is suspended.

 Error details: Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: An error occurred when trying to convert the XML string thisistoolong of RFCTYPE RFCTYPE_CHAR with length 4 and decimals 0 to a .NET type. Parameter/field name: SALES_ORG   Error message: The length of the value for the field exceeds the allowed value. Value: 13  Field: SALES_ORG Allowed value: 4. ---> Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The length of the value for the field exceeds the allowed value. Value: 13  Field: SALES_ORG Allowed value: 4

   at Microsoft.Adapters.SAP.SapMetadataUtilities.ConvertXmlStringToRfcStringNCo(String data, RfcTypes type, Int32 singleByteLength, Int32 decimals, String fieldname, Encoding encoding, Encoding realPartnerEncoding, Boolean padToExactLength, SAPConnection sapconnection)

Any further attempt to submit BAPI transactions in the same LUW would result in the dreaded "Inner Channel" exception which indicates that the connection to the server was already closed:

A message sent to adapter "WCF-SAP" on send port "BAPI2032SalesOrdersSP" with URI "sap://CLIENT=800;LANG=EN;@a/..." is suspended.

 Error details: System.InvalidOperationException: The Inner Channel to use was not found for the key {0A73F66F-31FA-4E48-BAC5-14EAED9571D4}_{27D07099-1874-47C3-9E69-2AD1FA42DE8D};URI=sap://CLIENT=800;LANG=EN;@a/.... Specify a valid key.

We would see the "Inner Channel" error if a BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK was sent after the data format error. To make things worse, if we were to send a BAPI_TRANSACTION_ROLLBACK in an exception handler, we would then get:

A message sent to adapter "WCF-SAP" on send port "BAPI2032SalesOrdersSP" with URI "sap://CLIENT=800;LANG=EN;@a/..." is suspended.

 Error details: System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

The latter happens because the ABORT message of BAPI_TRANSACTION_ROLLBACK is sent as first message on a new connection, which produces undesirable results as documented in Run BAPI Transactions in SAP using BizTalk Server. As a side-note, this illustrates the point that BAPI_TRANSACTION_ROLLBACK is not always suited to an orchestration exception block depending on the error.

 

Exceptions in the SAP adapter, caused by data format errors as well as from other errors such as using the wrong URL, result in suspended messages as shown below:

SuspendedMessages.PNG

In the orchestration design presented next, such exceptions are handled gracefully and do not cause suspended orchestrations.

 

Orchestration Overview

 

The logical flow through the orchestration can be divided into four "tracks":

a. Process errors = true, data format errors,

b. Process errors = false, data format errors,

c. Process errors = true, data value errors,

d. Process errors = false, data value errors.

 

TracksTable.png

 

Legends correspond to the flows presented below. Stages 1 and 2 are the same as in Debatching SAP BAPI Transaction Requests. The differences start at stage 3, CREATEFROMDAT2 and CREATEFROMDAT2Response processing:

- Stage 3: Per-BAPI-transaction error processing;

- Stage 4: Per-BAPI-transaction exception handling;

- Stage 5: Commit and Rollback logic.

 

1_BAPIErrorHandlingFlow.png

 

For the sake of keeping the implementation as generic as possible, processing is geared towards logging everything that happens in order to show the different places of interest that could be adapted to "real-world" applications. 

 

Orchestration Overview: Logging

 

We look at the messages being constructed and the data being logged. What gets saved:

1. Original CREATEFROMDAT2 documents if there are any errors (value or format);

2. CREATEFROMDAT2Response documents received from SAP; 

3. Errors contained in CREATEFROMDAT2Response documents, formatted as strings;

4. Exception strings.

 

Error strings: Value errors are contained in the CREATEFROMDAT2Response messages received from the SAP server. They are extracted by the orchestration into a variable of type the following helper class (complete code in attached archive):

 

 [Serializable]
 public class BAPIReturnValues : List<BAPIRET2>
 {
...
    public bool IsError()
   {
       for (int i = 0; i < this.Count; i++)
       {
           if (this[i].TYPE == "E")
           {
               return true;
           }
       }

       return false;
    }

    public string GetErrorString()
    {
       string errorString = string.Empty;

       for (int i = 0; i < this.Count; i++)
       {
           if (this[i].TYPE == "E")
           {
               errorString += string.Format("Index {0}: {1}; ", i, this[i].MESSAGE);
           }
       }

       return errorString;
    }
}

 

which would be used as in the expression:

 

BAPIResponseRetVal.Set(BAPIResponse);

 

where BAPIResponse is of type BUS2032.CREATEFROMDAT2Response. The method BAPIReturnValues.GetErrorString() produces the error string logged to a file by using the RawString class documented in sending string to file location in BizTalk included in the BizTalk code attached to this blog post.

 

DataValueErrorMessage = new Microsoft.Samples.BizTalk.XlangCustomFormatters.RawString(
    System.String.Format("Message {0}: {1}", BAPIOrdersCount, BAPIResponseRetVal.GetErrorString()));

 

Exception strings: Exceptions are logged in XML with the schema:

ExceptionSchema.PNG

XML messages are created with:

 

DataFormatErrorMessageVar = new System.Xml.XmlDocument();
DataFormatErrorMessageVar.LoadXml(System.String.Format(
"<ns0:ExceptionInfo xmlns:ns0=\"http://SapBAPITxClientDebatching.ExceptionInfo\"><Type>{0}</Type><Message><![CDATA[{1}]]></Message></ns0:ExceptionInfo>",
SystemException.GetType(), 
SystemException.ToString()));

 

Note the use of CDATA to prevent parsing of characters that would otherwise invalidate the xml format. Example of output for the same data value error:

 

Each of the stages is presented in detail in the next sections. We will look at value errors, then format errors, and finally commit/rollback. 

 

Orchestration Details: Processing Value Errors

 

Detailed steps are shown below:

 

2_BAPIErrorHandlingValueErrors.png

 

In case of success: CREATEFROMDAT2Response documents are saved and CREATEFROMDAT2 are added to a list of BAPI orders to commit (highlighted in yellow). 

 

In case of errors:

1. Errors get logged. Example of error output:

Message 1: Index 0: For sales org. abcd distribution channel 12 is not allowed; Index 1: Sales document  was not changed;

2. When ProcessError is set to false, the orchestration flow is interrupted with a System.Exception created as:

 

BAPIDataValueExceptionVar = new System.Exception(BAPIResponseRetVal.GetErrorString());

 

The exception will be caught later on, in the rollback stage of the orchestration. Example of logged exception:

 

<ns0:ExceptionInfo xmlns:ns0="http://SapBAPITxClientDebatching.ExceptionInfo">
  <Type>System.Exception</Type>
  <Message><![CDATA[System.Exception: Index 0: For sales org. abcd distribution channel 12 is not allowed; Index 1: Sales document  was not changed; 
   at SapBAPITxClientDebatching.BAPIOrchestration.segment12(StopConditions stopOn)
   at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)]]></Message>
</ns0:ExceptionInfo>

 

Orchestration Details: Processing Format Errors and Adapter Exceptions

 

Format errors are handled in a per-request catch block for System.Exception, which encompasses the System.Web.Services.Protocols.SoapException and Microsoft.XLANGs.Core.XlangSoapException

 

3_BAPIErrorHandlingFormatErrors.png

 

At this stage, regardless of ProcessErrors, exceptions are logged. Example of exception message:

 

<ns0:ExceptionInfo xmlns:ns0="http://SapBAPITxClientDebatching.ExceptionInfo">
  <Type>Microsoft.XLANGs.Core.XlangSoapException</Type>
  <Message><![CDATA[Microsoft.XLANGs.Core.XlangSoapException: An error occurred while processing the message, refer to the details section for more information 
Message ID: {1EC13267-2C5A-4AA0-A8B0-BD5F2632162D}
Instance ID: {9556809F-27B8-49C5-AB2E-6814CB9EC6FA}
Error Description: Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: An error occurred when trying to convert the XML string thisistoolong of RFCTYPE RFCTYPE_CHAR with length 4 and decimals 0 to a .NET type. Parameter/field name: SALES_ORG   Error message: The length of the value for the field exceeds the allowed value. Value: 13  Field: SALES_ORG Allowed value: 4. ---> Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The length of the value for the field exceeds the allowed value. Value: 13  Field: SALES_ORG Allowed value: 4
   at Microsoft.Adapters.SAP.SapMetadataUtilities.ConvertXmlStringToRfcStringNCo(String data, RfcTypes type, Int32 singleByteLength, Int32 decimals, String fieldname, Encoding encoding, Encoding realPartnerEncoding, Boolean padToExactLength, SAPConnection sapconnection)
   --- End of inner exception stack trace ---

Server stack trace: 
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

   at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(Envelope env, Int32 operationId, Context ctx)
   at Microsoft.XLANGs.Core.Subscription.Receive(Segment s, Context ctx, Envelope& env, Boolean topOnly)
   at Microsoft.XLANGs.Core.PortBase.GetMessageId(Subscription subscription, Segment currentSegment, Context cxt, Envelope& env, CachedObject location)
   at SapBAPITxClientDebatching.BAPIOrchestration.segment11(StopConditions stopOn)
   at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)]]></Message>
</ns0:ExceptionInfo>

 

When ProcessErrors is set to true: transactions that have been successful are re-enqueued at the back of the BAPIOrders list to be resent. The assumption that in this particular scenario configuration, BAPIs can be submitted in any order, which is reasonable if one is willing to ignore errors and let the processing continue. The BAPIConnectionState is reset to "OPEN" so that a new connection to the SAP server may be open to replace the connection broken from the SAP adapter exception. The re-enqueueing expression is: 

 

BAPIOrders.Insert(BAPIOrdersToCommit);
BAPIOrdersToCommit.Clear();
BAPIConnectionState = "OPEN";
SuccessCount = 0;

 

Note: As mentioned in Run BAPI Transactions in SAP using BizTalk Serverthe send port binding property EnableConnectionPooling has to be set to false to prevent the same connection to be reused when an LUW is unexpectedly interrupted. 

As can be seen below, iterations will continue until BAPIOrders.Count() has been reached, which will include re-enqueued requests.

 

3_BAPIErrorHandlingReenqueuing.png

 

Orchestration Details: BAPI_TRANSACTION_COMMIT/ROLLBACK

 

Commit and Rollback stages are almost identical. The former happens when there is no error or if any error has been processed; the latter when execution is interrupted by exceptions. In both cases, BAPI commit/rollback requests are sent only if there has been any successful transaction.

BAPI requests/responses are processed in their own scope for exception handling and logging as previously described.

 

Commit stage:

4_BAPIErrorHandlingCommit.png

 

Rollback stage:

4_BAPIErrorHandlingRollback.png

 

Deploying the Solution

 

All artifacts used in this article can be created with the bindings file provided in the attached archive. There is one file location per logical send port used for logging.

 

5_BAPIErrorHandlingBindingsAndTestings.png

 

The SAP Static Solicit-Response port is configured with RetryCount = 0 and "propagate fault message" checked. 

The archive also contains some sample input files and output illustrating the various logical flows through the orchestration with variations on batch size, error type, ProcessErrors flag, etc.

 

Concluding Remarks

 

There is little BizTalk material on how to use error handling and rollback in BAPI transactions. Our aim here was to explore what can be done based on existing orchestrations such as the ones presented in this series of blog articles. Basically, what it would look like if we wanted to do more than "putting a BAPI_TRANSACTION_ROLLBACK in a catch exception shape", while keeping things as simple as possible. This meant leaving some items intentionally out-of-scope for this article, and it is worth mentioning some of them here:

 

- Re-enqueuing may be expensive if  channel-ending errors tend to happen at the end of a large batch of error-free transactions. The ideal workload would be one with either many errors at the beginning of a batch, or where errors happen randomly only in some batches. Clearly, there are some "pathological" cases, which could be mitigated by tuning the batch sizes, or by simply saving the transactions for later processing by a different orchestration instance. 

 

- BAPI requests that could not be sent due to exceptions in the SAP adapter are suspended with resumable status. In the case of errors caused by the data in the messages, as considered in this article, resuming is of limited use. But there are ways to flow these messages back so they don't linger for too long in the message box.

 

- Last, as hinted at in Scatter-Gather Pattern with SAP BAPI Transactions, an interesting way to extend the topic presented here could be to combine error handling with asynchronous processing in multiple orchestrations.

 

References

 

SAP BAPI Transactions Walkthrough

Debatching SAP BAPI Transaction Requests

Exceptions and Error Handling with the SAP adapter

Old BAPI Transaction Model (with Commit)

BAPI Transaction Model (Without Commit)

BAPIs for Mass Data Transfer

Buffering with Write BAPIs

Using BAPIs in Distributed Systems (ALE)

Run BAPI Transactions in SAP using BizTalk Server

sending string to file location in BizTalk

Run BAPI Transactions in SAP using BizTalk Server

Scatter-Gather Pattern with SAP BAPI Transactions