Hello, everyone! 😊 I've been googling and searching through the SDN forums for the past day trying to find the answer on my own. I found some sample code, but after a lot of unsuccessful trial-and-error in SAP, I'm hoping someone out there can help me out.
I am working on an outbound interface with a colleague. She is doing the "XI" portion of the interface, and I am doing the ABAP Proxy. What I'm doing is relatively straight-forward: I'm reading data from SAP, putting it into an internal table, and it's the data in that table that needs to go back to XI. Each record in my internal table represents one person (PERNR). The fields represent data that will eventually become separate record types that we'll send off-site to another system.
Sample record contains data for:
<Record 01><Record 02><Record 03><Record 04 "A"><Record 05 "A"><Record 04 "B"><Record 05 "B">
Record 04 and Record 05 exists twice because a person might have just a record 04/05 for "A", just a record for 04/05 for "B", or records for both. In any event, if situation "A" occurs, they have an 04/05 record. If situation "B" occurs, they have an 04/05 record for that as well.
Here's the sample code I plucked from SDN:
*& Report ZBLOG_ABAP_PROXY
DATA prxy TYPE REF TO zblogco_proxy_interface_ob.
CREATE OBJECT prxy.
DATA it TYPE zblogemp_profile_msg.
it-emp_profile_msg-emp_name = 'Sravya'.
it-emp_profile_msg-empno = '80101'.
it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.
CALL METHOD prxy->execute_asynchronous
output = it.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
Here's the class, structures, and tables generated for me to use from XI:
Ok, I know where to plug in the Class (that's what my "prxy" reference variable will reference). I was told structure ZXI_DT_PURDUE_STD_LTD includes the structures for the 5 record type (01 thru 05) above it.
I think I'll have to loop thru my internal table, populating the above stuff. I feel like the "MT" structure above will be the "it" table in the example based on another example I saw, but is that true? I've had tables generated for each of the 5 record types. The sample SDN code is a simple one, of course, and I feel like I'm so close to figure this out -- I think I have the pieces, I just don't know how to put them together.
Can someone tell me what my processing should look like. It can be simple pseudocode, as long as it references those "XI" items above. Thanks so much, folks -- points will be awarded for all helpful information. 😊