cancel
Showing results for 
Search instead for 
Did you mean: 

Ouput field is not getting displayed

Former Member
0 Kudos

Hi All,

I created an object type in BOB which gives me ernam field of MARA table on testing.

I need to use that object type in the new workflow in which user inserts a material number and should get ernam (Created by) as an output field.

I tied doing that but on testing , it shows task's status 'COMPLETED' but does not display the ERNAM.

What else I need to do to make it displayed on the screen?

Thanks in advance

Shweta

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Paul,

My problem has been solved.

Thanks,

Shweta

paul_bakker2
Active Contributor
0 Kudos

Great! Please describe how it was solved and mark the correct / helpful answers.

cheers

Paul B

former_member185167
Active Contributor
0 Kudos

Hello,

I don't understand the question. I assume you mean BOR (instead of BOB).

How does an object "give" you the ERNAM field? Do you mean it's an attribute?

What's the key of your object?

How does the user insert a material number in the workflow?

regards

Rick Bakker

Former Member
0 Kudos

Yes, the output should be the ERNAM field of MARA table.

Key of the object is MATNR of MARA.

I want to insert the material number via se80 program but I am not able to find what needs to be done for passing the material number from se80 program i.e. which function module should I use for passing the material number via se80?

former_member212124
Active Participant
0 Kudos

1) If you have event to trigger workflow then use

'SAP_WAPI_CREATE_EVENT'

2) IF you don't have event to trigger workflow then use.

'SAP_WAPI_START_WORKFLOW'

Former Member
0 Kudos

Hi Vidya,

I used 'SAP_WAPI_CREATE_EVENT' to pass the values. Also , I created an event parameter 'MATERIAL' so that the value can be passed as the event gets triggered then I did the binding of event parameter and workflow container parameter of material.

after that i run the following code in se80.

DATA : MATERIAL like SWR_STRUCT-OBJECT_KEY,

       lv_matnr TYPE mara-matnr.

DATA : wa_event like  SWR_STRUCT-EVENT,

       wa_obj LIKE swr_struct-object_typ.

DATA : lv_user TYPE SWC_ELEM VALUE 'INITUSER',

       LV_MATERIAL TYPE SWC_ELEM VALUE 'MATERIAL'.

DATA : T_MSG TYPE STANDARD TABLE OF SWR_MESSAG.

DATA : flg(1) TYPE c.


DATA : it_cont TYPE TABLE OF SWCONT,

       wa_cont like LINE OF it_cont.


wa_event = 'ZCLICK_EVENT'.

Wa_obj = 'ZDEMO_BOR1'.


   MATERIAL = lv_matnr.


   wa_cont-element = lv_user.

   wa_cont-value = sy-uname.

   append wa_cont to it_cont.

   CLEAR : wa_cont.

   wa_cont-element = LV_MATERIAL.

   wa_cont-value = LV_MATNR.

   append wa_cont to it_cont.

   CLEAR : wa_cont.

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'

   EXPORTING

     object_type             = wa_obj

     object_key              = MATERIAL    "Key field in BOR

     event                   = WA_EVENT

*   COMMIT_WORK             = 'X'

*   EVENT_LANGUAGE          = SY-LANGU

*   LANGUAGE                = SY-LANGU

    USER                    = SY-UNAME

*   IFS_XML_CONTAINER       =

* IMPORTING

*   RETURN_CODE             =

*   EVENT_ID                =

  TABLES

    INPUT_CONTAINER         = it_cont[]

    MESSAGE_LINES           = T_MSG[].

*   MESSAGE_STRUCT          =

           .

   READ TABLE T_MSG WITH KEY MSG_TYPE = 'E' TRANSPORTING NO FIELDS.

       IF SY-SUBRC = 0.

         Flg = 'N'.

         MESSAGE E208(00) WITH 'Error initiating Workflow.'.

        ELSEIF SY-SUBRC <> 0.

         MESSAGE 'Workflow initiated.' Type 'S'.



After this code , I get a message 'Worlflow initiated' but I can not see the value being transferred to the workflow respective container

former_member212124
Active Participant
0 Kudos

Did check the binding from event to workflow container.

If the workflow container elements are not binded correctly with event container elements the values will not be transferred to workflow container. 

Former Member
0 Kudos

I did. still no output.

anjan_paul
Active Contributor
0 Kudos

Hi,

    Share your screenshot

paul_bakker2
Active Contributor
0 Kudos

Does the material number appear in the workflow container?

If yes, does it also appear in the step container?

Check your bindings in event -> workflow and workflow -> step.

cheers

Paul