Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem When Transferring Values from program to workflow

Hi Friends,

I am new to workflow. I have tried simple workflow which is called from program.

My workflow will send mail with purchase order no. Workflow is working fine, but problem is purchase order is not transferred to workflow. I have created a container element in workflow as import parameter and defined its character as ABAP dic data type. EBELN.

Purchase order Value in Mail box is : 00000000010C. I am provind my code below.

Kindly help me in this regard .

INCLUDE:<cntn01>. "All Default Macros Defined here.

********Workflow Declaration

DATA: t_task TYPE swr_struct-task,

retcode TYPE sy-subrc,

workitemid TYPE swr_struct-workitemid,

newstatus TYPE swr_wistat,

wf_status TYPE swl_status,

it_cont TYPE TABLE OF swr_cont ,

wa_cont TYPE swr_cont,

obj_key TYPE swr_struct-object_key,

ret_code TYPE sy-subrc,

event_id TYPE swr_struct-event_id,

ebeln TYPE ebeln VALUE '5500002034'.

********Define Container.

swc_container t_wf_cont.

********Create Container.

swc_create_container t_wf_cont.

********Clear Container.

swc_clear_container t_wf_cont.

swc_set_element t_wf_cont 'EBELN' ebeln.

t_task = 'WS99700002'.

CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'

EXPORTING

task = t_task

  • 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 = retcode

WORKITEM_ID = workitemid

NEW_STATUS = newstatus

TABLES

INPUT_CONTAINER = t_wf_cont

  • MESSAGE_LINES =

  • MESSAGE_STRUCT =

  • AGENTS =

.

*CALL FUNCTION 'DB_COMMIT'

  • .

Thanks in advance,

Senthil kumar.

Former Member
Not what you were looking for? View more on this topic or Ask a question