Lesson Learnt: Pulling Data from SAP using BizTalk Orchestration using WCF LOB Adapter SDK SP2 and BizTalk Adapter Pack 2
1. Enable safe typing in the binding (this, more than often, will safe you headache of dealing w/ date and other numerical problem when converting one message to another in BizTalk (to and from SAP)
2. When pulling data from something like BAPI_EMPLOYEE_GETDATA that returns things back in an array, make sure you pass an empty node of the array that you are interested in inside the REQUEST message. For example, in BAPI_EMPLOYEE_GETDATA... if you are interested in ARCHIVELINK and PERSONAL_DATA being returned in the RESPONSE message, construct the REQUEST message like so:
<!—Here is the tricky part, need to add these empty placeholders -->
<ns1:BAPITOAV0 xmlns:ns1=”…” />
<ns1:BAPIP0002B xmlns:ns1=”…” />
and pass it to BizTalk to pass to SAP. SAP will then return the two nodes w/ the appropriate content.
3. Use Add Generated Item, Consume Adapter Service to create the appropriate SAP binding file.