cancel
Showing results for 
Search instead for 
Did you mean: 

Container -- Urgent

Former Member
0 Kudos

Hi,

Iam creating a workflow and a container and i have to update container with multiple values (i.e pass internal table values into that container ) .

but Its working for single entry.

How can it be acheived for multiple.

Regards,

Vimal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use macro SWC_SET_TABLE which is used to set value in container element that is Multiline.

Thanks

Arghadip

Former Member
0 Kudos

Hi,

Thanks for ur answer.

but still im not getting .

this is my code , check and suggest

data : i_event_cont type table of SWR_CONT WITH HEADER LINE .

  • wa_MATERIAL_DESC type ZART_str_MATERIAL_DESCRIPTIONS.

  • Event Container declaration

  • swc_container i_event_cont.

swc_create_container i_event_cont.

i_event_cont-element = 'container'.

i_event_cont-value = I_MATERIAL_BASICDATA .

APPEND i_event_cont.

i_event_cont-element = 'MAT_HDR'.

i_event_cont-value = i_material_head .

APPEND i_event_cont.

i_event_cont-element = 'MAT_DESC'.

i_event_cont-value = wa_material_desc .

APPEND i_event_cont.

  • swc_set_table i_event_cont 'MAT_DESC' it_material_desc.

  • swc_set_element i_event_cont 'MAT_HD' i_material_head.

  • swc_set_element i_event_cont 'CONTAINER' i_material_basicdata.

CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'

EXPORTING

task = 'WS97400242'

LANGUAGE = SY-LANGU

DO_COMMIT = 'X'

  • USER = SY-UNAME

  • START_ASYNCHRONOUS = ' '

  • DESIRED_START_DATE =

  • DESIRED_START_TIME =

  • DESIRED_START_ZONLO = SY-ZONLO

  • IFS_XML_CONTAINER =

IMPORTING

  • RETURN_CODE =

WORKITEM_ID = lv_workitem

  • NEW_STATUS =

TABLES

INPUT_CONTAINER = i_event_cont

  • MESSAGE_LINES =

  • MESSAGE_STRUCT =

  • AGENTS =

.

Former Member
0 Kudos

Hi Vimal,

check the following code

data : i_event_cont type table of SWR_CONT,

i_event_msg TYPE TABLE OF swr_mstruc, " Message Struct

i_event_msgline TYPE TABLE OF swr_messag. " Message

data : I_event_cont_wa like i_event_cont

  • Event Container declaration

  • swc_container i_event_cont.

  • swc_create_container i_event_cont.

i_event_cont-element = 'container'.

i_event_cont-value = I_MATERIAL_BASICDATA .

APPEND i_event_cont.

i_event_cont_wa-element = 'MAT_HDR'.

i_event_cont_wa -value = i_material_head .

APPEND i_event_cont_wa to i_event_cont.

i_event_cont_wa -element = 'MAT_DESC'.

i_event_cont_wa -value = wa_material_desc .

APPEND i_event_cont_wa to i_event_cont.

CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'

EXPORTING

task = 'WS97400242'

LANGUAGE = SY-LANGU

DO_COMMIT = 'X'

  • USER = SY-UNAME

  • START_ASYNCHRONOUS = ' '

  • DESIRED_START_DATE =

  • DESIRED_START_TIME =

  • DESIRED_START_ZONLO = SY-ZONLO

  • IFS_XML_CONTAINER =

IMPORTING

  • RETURN_CODE =

WORKITEM_ID = lv_workitem

  • NEW_STATUS =

TABLES

INPUT_CONTAINER = i_event_cont

MESSAGE_LINES = i_event_msgline

MESSAGE_STRUCT = i_event_msg

  • AGENTS =

.

catch the message while debugging

Thanks & Regards

Hari Sankar M

Answers (2)

Answers (2)

sudhahar_ramachandran
Active Participant
0 Kudos

Please do not use the word 'Urgent' in the title.

Thanks & Regards,

Sudhahar R

sudhahar_ramachandran
Active Participant
0 Kudos

Use SWC_SET_TABLE container 'TABLENAME' LOCALTAB[].

it should work.

thanks & regards,

Sudhahar R.

Former Member
0 Kudos

And of course make sure that your container element is type "multiline".