cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error in creating the method

Former Member
0 Kudos

HI All ,

I am getting this error when I am trying to create the following method .

Error : Method FILL_DISPLAY_TABLE

Explicit length specifications are necessary with types C, P, X, N, and W in the OO context.

*****Method ********************

METHOD fill_display_table .

DATA:

node_relationshipdetails TYPE REF TO if_wd_context_node,

elem_relationshipdetails TYPE REF TO if_wd_context_element,

stru_relationshipdetails TYPE if_relationshipdetails=>element_relationshipdetails .

DATA:

node_relation TYPE REF TO if_wd_context_node,

elem_relation TYPE REF TO if_wd_context_element.

TYPES :

bigin of d_display,

parner1 TYPE bu_partner ,

description TYPE bu_bez50 ,

validfromdate TYPE bu_datfrom ,

validuntildate TYPE bu_datto ,

partner1_idtype TYPE bu_id_type,

partner1_idnum TYPE bu_id_number ,

partner2_idtype TYPE bu_id_type ,

partner2_idnum TYPE bu_id_number ,

partner1_firstname TYPE bu_namep_f ,

partner1_lastname TYPE bu_namep_l,

partner2_firstname TYPE bu_namep_f ,

partner2_lastname TYPE bu_namep_l,

idtype_number_name TYPE string ,

idtype_name_rel TYPE string ,

END OF d_display.

DATA : t_display TYPE TABLE OF d_display INITIAL SIZE 0 ,

wa_display TYPE d_display .

  • navigate from <CONTEXT> to <RELATIONSHIPDETAILS> via lead selection

node_relationshipdetails = wd_context->get_child_node( name = if_relationshipdetails=>wdctx_relationshipdetails ).

  • get element via lead selection

elem_relationshipdetails = node_relationshipdetails->get_element( ).

  • alternative access via index

  • Elem_Relationshipdetails = Node_Relationshipdetails->get_Element( Index = 1 ).

  • @TODO handle non existant child

  • if ( Elem_Relationshipdetails is initial ).

  • endif.

  • get all declared attributes

elem_relationshipdetails->get_static_attributes(

IMPORTING

static_attributes = stru_relationshipdetails ).

  • navigate from <CONTEXT> to <RELATION> via lead selection

node_relation = wd_context->get_child_node( name = if_relationshipdetails=>wdctx_relation ).

  • get element via lead selection

elem_relation = node_relation->get_element( ).

node_relation->bind_table( new_items = t_display ).

ENDMETHOD.

thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Change bigin to Begin here.


TYPES :
begin of d_display,
parner1 TYPE bu_partner ,
description TYPE bu_bez50 ,
validfromdate TYPE bu_datfrom ,
validuntildate TYPE bu_datto ,
partner1_idtype TYPE bu_id_type,
partner1_idnum TYPE bu_id_number ,
partner2_idtype TYPE bu_id_type ,
partner2_idnum TYPE bu_id_number ,
partner1_firstname TYPE bu_namep_f ,
partner1_lastname TYPE bu_namep_l,
partner2_firstname TYPE bu_namep_f ,
partner2_lastname TYPE bu_namep_l,
idtype_number_name TYPE string ,
idtype_name_rel TYPE string ,
END OF d_display.

Former Member
0 Kudos

Hi All ,

Thanks for your help. ...

Answers (1)

Answers (1)

mohammed_anzys
Contributor
0 Kudos

Hi

There are some errors in the code .For eg

TYPES :

bigin of d_display,

parner1 TYPE bu_partner ,

description TYPE bu_bez50 ,

it should be BEGIN..not bigin....

Thanks

Anzy