cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to fetch data from plug

Former Member
0 Kudos

Hi,

In my WDC I have 2 views , I am passing data from one view to another view using parameters in plug and inbound method of 2nd view.

In Debugging I can see data passing when plug navigation is done.

I am able to receive any data in inbound method of other view.

If the parameter is not optional it leads to run time error CX_WD_BAD_ARGS.

following is the error description.

*=======================

method handlefrom_first.

*=======================

" typecasting from generic to specific arguments

* data declaration

  data:

    !wdevent like !event.

  field-symbols:

    <cur_param>   type wdr_event_parameter.

  wdevent = event.

  " optional  parameter im_matnr

  data:

    !im_matnr type matnr .

  read table event->parameters[]

    with table key name = `IM_MATNR` assigning <cur_param>.

  if ( 0 eq sy-subrc ).

--->  " Cx_Sy_Conversion or similar issues may occur

  " but this is caused by the invocing party !!!

    f_internal_api->assign_untyped_reference(

      exporting !data_ref = <cur_param>-value

      importing !data =     !im_matnr ).

  endif.

  me->f_appl_class->handlefrom_first(

     !im_matnr = !im_matnr.

Thanks in advance

Ravindranath Reddy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

please paste sceen shot of plugs you have created with parameter

Former Member
0 Kudos

Please find the image

former_member184578
Active Contributor
0 Kudos

Hi,

Now IM_MATNR will contain the material number which you are passing rite! why you are accessing wd_event parameters..?

Regards,

Kiran

Former Member
0 Kudos

there is nothing wrong with your inbound and outbound plug.

when you are firing outbound plug.

Former Member
0 Kudos

Hi Kiran,

I didn't pass that it come by default when handler method is created.

I am not able to delete it.

Is that creating problem.?

Former Member
0 Kudos

I have an action in that i am firing plug.

Former Member
0 Kudos

you did everything correct even without optional your matnr value suppose to flow.

in debugger check if   event->parameters[] contain your parameter

read table event->parameters[]

    with table key name = `IM_MATNR` assigning <cur_param>.

Former Member
0 Kudos

In event->paramter matnr = ->00000000000009

Former Member
0 Kudos

change your im_matnr importing parameter of inbound plug into matnr.

Former Member
0 Kudos

Thanks Jitendra,

Answers (0)