cancel
Showing results for 
Search instead for 
Did you mean: 

Read BAPIRET2 table within ccBPM

Former Member
0 Kudos

Hi,

I have the following scenario:

Asynchronous Sender (Marketplace Adapter)-> XI (ccBPM) <-> Synchronous Receiver (RFC Adapter)

A ccBPM has been created to switch Async call to Sync call to the receiver system. After RFC call, a BAPIRET2 will contain multiline messages and return to ccBPM. The next step in ccBPM is to determine if there is any "E" or "A" type messages, and trigger alert if any.

I have tried the following alternatives to read BAPIRET2 content:

Option 1 - Create a message mapping with user-defined function to loop through BAPIRET2. The end result of this map will put into a message containing only a xsd:string type element. The content is either either "OK" or "ERROR" text.

However, when I put this message into ccBPM as a simple type container element, and try to check the value in a "Switch" step, I got the following error message in SXI_CACHE display:

E 'BBP_ERRORSTATUS' is not a component of data object 'PAYLOAD'

Option 2 - Create an Abstract message type that references the same structure as BAPIRET2. Create both single line container element and multiline container element in ccBPM referecing this new message type. Create a ForEach block to loop through the multiline container element. However, my problem is, how am I supposed to extract BAPIRET2 from the rfc interface and append to the multiline container element.

I am stucked and appreciate anyone could give me some hints/help here. Thx in advance.

Regards

Chong Wah

Accepted Solutions (0)

Answers (3)

Answers (3)

STALANKI
Active Contributor
0 Kudos

Try clicking the mutiline checkbox in the CCBPM editor..and check..

Dont wait until SP16 to be loaded..:)

STALANKI
Active Contributor
0 Kudos

There is a gap here.What do you mean when you say multimessages?Are you meaning to multiple entries of BAPIRET2 as multiple messages or Is the RFC called multiple times from CCbpm?

if you do a single call then BAPIRET2 is not multi message..

You can do a switch in CCBPM itself to check the content of BAPIRET2 container element and check the element in condition editor of ccBPM.

Check wether the XPATH is filled correctly in your condition editor.

Try avoiding unnecessary transformations if possible.

Former Member
0 Kudos

Hi Sravya,

BAPIRET2 is a table parameter in a RFC function module - BBP_BC_POAKNOWLEDGMENT_ADD. The message structure looks something like the following:

BBP_BC_POAKNOWLEDGMENT_ADD.Response

---I_AKNOWLEDGMENT_DATA (1)

---item (0..unbounded) ref to BBP_BC_POCONF

---I_PARTNER (0..1)

---item (0..unbounded) ref to BAPI_BUP_C

<b> ---RETURN (1)

|

---item (0..unbounded) ref to BAPIRET2</b>

I have tried having an abstract message interface referencing this schema, and also read in the swtich step. This was attempted even before the two options that I mentioned in my previous question. But it gave similar error message.

Regards

Chong Wah

Former Member
0 Kudos

Hi Chong,

just check if this thread could help

Regards,

Sudharshan

Former Member
0 Kudos

Hi Sravya,

Notice the cardinality of Return/item element. And also, one of the subelement is Return/item/MESSAGE. That's what I mean multiline messages. The "multiline messages" was referring to an element not the XML message as a whole. Sorry for the confusion.

Regards

Chong Wah

Former Member
0 Kudos

Hi Sudharshan,

Will try to load SP16 on to our server. Hopefully, this could solve our problem. Keep our finger crossed.

Regards

Chong Wah

Former Member
0 Kudos

Hi Chong,

>>>However, when I put <b>this message into ccBPM as a simple type container element</b>, and try to check the value in a "Switch" step, I got the following error message in SXI_CACHE display:

I think u have to put it as another Abstract Interface and in condition u have to compare with Error or Ok

so the Interface Mapping for looping around BAPIRET2 must be between abstract Interfaces, the Target Interface of which is the Abstarct Interface with the message Type containing only a xsd:string type element.

Regards,

Sudharshan

Former Member
0 Kudos

Hi Sudharshan ,

>>I think u have to put it as another Abstract Interface and in condition u have to compare with Error or Ok

>>so the Interface Mapping for looping around BAPIRET2 must be between abstract Interfaces, the Target Interface of which is the Abstarct Interface with the message Type containing only a xsd:string type element.

That's exactly what I have done. I have a data type defined as the following:

BBP_ErrorStatus (complex type)

|

---Status (Element) xsd:string occurrence: 1

Then I created a message type BBP_ErrorStatus referecing the DT above. After that, I created an Asynchronous Abstract message interface BBP_ErrorStatus referencing the MT. Moving on to ccBPM, I created a container element BBP_ERRORSTATUS referecing the message interface I just created under process container. I also created message mapping to map BAPIRET2 (note that I have another abstract interface referecning BAPIRET2 as well) into this BBP_ErrorStatus, and put this as a transformation step in ccBPM. After the transformation step, here comes the Switch step. The XPath expression looks like this <b>BBP_ERRORSTATUS./p1:BBP_ErrorStatus/Status = 'OK'</b>. Guess what, I still get the same error.

Regards

Chong Wah