cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Contaner values to Internal table

0 Kudos

Hi All,

Any Idea how do we get Container values to Internal table?

I will get container values using SAP_WAPI_READ_CONTAINER. The data will come into SIMPLE_CONTAINER.

From SIMPLE_CONTAINER I want to get data to my internal table which has Element structures.

It is just like reverse result of CALL FUNCTION 'SWC_TABLE_SET'.


Thanks.


Accepted Solutions (1)

Accepted Solutions (1)

sbl
Active Contributor
0 Kudos

HI

If you want the exact opposite do use function SWC_TABLE_GET.

Regards

Stephane

Former Member
0 Kudos

Hi,

Check the below Code snippet..It will be help full

DATA gt_container TYPE TABLE OF swr_cont.

CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'

EXPORTING

  workitem_id = xxxxxxx           "pass the work item

* LANGUAGE = SY-LANGU

* USER = SY-UNAME

* BUFFERED_ACCESS = 'X'

* IMPORTING

* RETURN_CODE =

* IFS_XML_CONTAINER =

* IFS_XML_CONTAINER_SCHEMA =

TABLES

  simple_container = gt_container

* MESSAGE_LINES =

* MESSAGE_STRUCT =

* SUBCONTAINER_BOR_OBJECTS =

* SUBCONTAINER_ALL_OBJECTS =

.

LOOP AT gt_container INTO DATA(gs_container).

ENDLOOP.

In gt_container we have Element and Value.

Element is the Field name in the work flow container and Value Contains the Value of the Field.

for example

Matnr(element) 123459(value)

Thanks & Regards

@Surendra@

0 Kudos

Hi Surendra,

Thanks for reply.

Answers (0)