cancel
Showing results for 
Search instead for 
Did you mean: 

Reading workflow container Data

anand_nidamanuru
Active Participant
0 Kudos

Hi All,

I have a workflow setup in our system. I have to read its container data.

The container contains a BOR Object of type ZAFVC_AGNT, whose data is like

1) Routing number

2) Counter

3) Agent

4) Event Key

5) Object id

I have used SWW_WI_CONT_READ_SINGLE_OBJECT, SAP_WAPI_READ_CONTAINER to read the container data.

When ever I read the container, I am able to read the object type, but the object data is always concatenated in the form of a char of length 70.

Is there a way to retrieve the distinct values by forming a structure?

Thanks,

Anand

Accepted Solutions (1)

Accepted Solutions (1)

KKilhavn
Active Contributor
0 Kudos

Yes. Create a structure (either in dictionary or internally in your program) where the elements have the same types and ordering as the object type. Then simply move the contents of the key (e.g. a variable of type SWOTOBJID-OBJKEY) to your variable which has the structured type corresponding to the key fields.

That should be it.

anand_nidamanuru
Active Participant
0 Kudos

Thanks Kjetil,

Currently I am doing this way, But is there any function, that would create a structure and pass the values based on the BOR Object type of the workflow item?

Regards,

Anand

KKilhavn
Active Contributor
0 Kudos

Ah, I see. Well, I can't say there <u>isn't</u> any such function - but I am not aware of any. Poke around, you may find one (most likely not released for customer use ... but that usually doesn't stop any of the developers I know

anand_nidamanuru
Active Participant
0 Kudos

Yes Kjetil,

I was able to find those functions.

The function SWO_CREATE creates the object of the desired type for the given key and returns the handle to the same.

Now the modules SWC_ELEMENT_GET, SWC_TABLE_GET can be used to retrieve the values for the object that is created above using SWO_CREATE.

or else, the INCLUDE <CNTN01> Can be used, that contains macros to achieve this.

Thanks,

Anand

KKilhavn
Active Contributor
0 Kudos

Well, then I <b>completely</b> misunderstood what you were asking! Glad you found the solution in spite of my attempts to seriously confuse you

Normally, to create object references and read data (and call methods), I use the macros.

anand_nidamanuru
Active Participant
0 Kudos

Anyway, thanks for your help

Answers (0)