cancel
Showing results for 
Search instead for 
Did you mean: 

Error betwen tables.

Former Member
0 Kudos

Hi,

look at this code:

 data: empleado type table of HRWPC_S_EP_GENERALDATA.
  data: tabla_retorno  type  BAPIRET2.
  CALL FUNCTION 'HRMSS_RFC_EP_READ_GENERALDATA'
    EXPORTING
      PERNR       = STRU_TEAM-PERNR
      DATUM       = SY-DATUM
      READ_IT0008 = 'X'
    IMPORTING
      GENERALDATA = tabla_empleado
      RETURN      = tabla_retorno.
   
  DATA: node_TEAMTAB TYPE REF TO if_wd_context_node.
  node_TEAMTAB = wd_context->get_child_node('TEAMTAB').
  CALL METHOD node_TEAMTAB->bind_table
  EXPORTING
      <b>new_items = tabla_empleado</b>.

Error: tabla_empleado is not type compatible with formal parameter or new_items.

How Can I do with new_items=tabla_empleado?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi.

I guess you get a compiler error!? Or is it a short dump?

The below code should be compilable.


data: tabla_empleado type table of HRWPC_S_EP_GENERALDATA.
  data: tabla_retorno  type  BAPIRET2.
  CALL FUNCTION 'HRMSS_RFC_EP_READ_GENERALDATA'
    EXPORTING
      PERNR       = STRU_TEAM-PERNR
      DATUM       = SY-DATUM
      READ_IT0008 = 'X'
    IMPORTING
      GENERALDATA = tabla_empleado
      RETURN      = tabla_retorno.
   
  DATA: node_TEAMTAB TYPE REF TO if_wd_context_node.
  node_TEAMTAB = wd_context->get_child_node('TEAMTAB').
  node_TEAMTAB->bind_table( tabla_empleado ).

Cheers,

Sascha

Answers (2)

Answers (2)

Madhu2004
Active Contributor
0 Kudos

Hai,

Once check the cardinality of Node TEAMTAB,

whether it is 0..1 r 0..n

Cheers,

Madhu

Former Member
0 Kudos

Hi,

I've the solution:

data: empleado type table of HRWPC_S_EP_GENERALDATA.

data: tabla_empleado type HRWPC_S_EP_GENERALDATA.

<b> APPEND tabla_empleado to empleado.</b> -


> <i>This is the solution</i>

DATA: node_TEAMTAB TYPE REF TO if_wd_context_node.

node_TEAMTAB = wd_context->get_child_node('TEAMTAB').

node_TEAMTAB->bind_table(empleado ).

Thanks.

Former Member
0 Kudos

Hi Guillermo,

Try checking the definition of <b>tabla_empleado</b>. If it is a generated code, then you should add 'TYPE TABLE OF' in the definition of tabla_empleado.

Or else check the definition and cardinality of <b>Teamtab</b> in the context.

Regards,

Satheesh Raja.