cancel
Showing results for 
Search instead for 
Did you mean: 

internal table binding to table ui Element

prasad
Participant
0 Kudos

Hi

i have filled the internal table with certain data . while debugging i am able to view the internal table data , but when i bind this internal table to a table iam not able to see the data in table ui element. i can see only some of the fields data .

what could be the reason

Regards

Prasad

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

First check whether the Table UI element is correctly bounded with the node.

Check the order of fields in nodes and order in db table.

Use the following code, change <Node Name> into your node name that should be in CAPS.

DATA: lo_nd_attendance TYPE REF TO if_wd_context_node.

   

*  navigate from <CONTEXT> to <ATTENDANCE> via lead selection

   lo_nd_attendance = wd_context->get_child_node( name = '<Node Name in CAPS>').

**   attendance = wd_context->get_child_node( name = wd_this->wdctx_attendance ).

   lo_nd_attendance->bind_table( it_finalattend ).

Former Member
0 Kudos

Hi prasad,

Check whether you have done context binding for all the columns you want to show. All the columns in the internal table need not be shown always. All columns should exist in the context node to which you have bound the table.

Regards,

Fareez

Former Member
0 Kudos

Check if u have done the binding.If the problem persits

put your coding and screen shot of the output

prasad
Participant
0 Kudos

Hi

Below is the screen shot and coding for submit button.

   method ONACTIONSUBMIT .

  data r_pernr TYPE REF TO data.
  FIELD-SYMBOLS <R_PERNR> type ANY TABLE.
   R_PERNR = wd_thiS->selopt->get_range_table_of_sel_field( I_ID = 'PERS').
  ASSIGN R_PERNR->* TO <R_PERNR>.

  data r_BEGDA TYPE REF TO data.
  FIELD-SYMBOLS <R_BEGDA> type ANY TABLE.
  R_BEGDA = wd_thiS->selopt->get_range_table_of_sel_field( I_ID = 'BEGD').
  ASSIGN R_BEGDA->* TO <R_BEGDA>.

   TYPES: BEGIN OF attend,
            pernr  TYPE pa0001-pernr,           " Employee Number
            begda  TYPE pa0001-begda,           " Date of Joining
            sname  TYPE pa0001-sname,           " Employee Name
            orgeh  TYPE pa0001-orgeh,            " Org. Unit
            desig  TYPE pa0001-desig,           " Designation
            subdeg TYPE pa0001-subdeg,          " Sub Designation
          END OF attend.

           TYPES: BEGIN OF finalattend,
            pernr  TYPE pa0001-pernr,           " Employee Number
            begda  TYPE pa0001-begda,           " Date of Joining
            sname  TYPE pa0001-sname,           " Employee Name
            orgeh  TYPE pa0001-orgeh,            " Org. Unit
            desig  TYPE pa0001-desig,           " Designation
            subdeg TYPE pa0001-subdeg,          " Sub Designation
            schkz  TYPE pa0007-schkz,           " Employee Number
            changedate  TYPE pa0007-begda,   " changed date
            resigdate  TYPE pa0000-begda,     " date of resignation
          END OF finalattend.

   TYPES: BEGIN OF gty_pa0007,
             pernr TYPE pa0007-pernr,
            schkz  TYPE pa0007-schkz,           " Employee Number
            aedtm  TYPE pa0007-begda,           " Date of Joining
          END OF gty_pa0007.

TYPES: BEGIN OF gty_pa0000,
             pernr TYPE pa0000-pernr,
            massn  TYPE pa0000-massn,           " Employee Number
            begda  TYPE pa0000-begda,           " Date of Joining
          END OF gty_pa0000.


data it_pa0007 TYPE TABLE OF gty_pa0007.
DATA wa_pa0007 type gty_pa0007.

data it_pa0000 TYPE TABLE OF gty_pa0000.
DATA wa_pa0000 type gty_pa0000.

data it_attend TYPE TABLE OF attend.
DATA wa_attend type attend.

data it_finalattend TYPE TABLE OF finalattend.
DATA wa_finalattend type finalattend.

  SELECT pernr schkz
         aedtm
      FROM pa0007
         INTO TABLE it_pa0007 WHERE  pernr IN <R_pernr>
      and aedtm in <r_begda>.

if it_pa0007 is not INITIAL.
select  pernr begda sname orgeh desig subdeg
    from  pa0001
   into table it_attend
   for ALL ENTRIES IN it_pa0007
    where pernr =  it_pa0007-pernr.
   select pernr massn begda from pa0000 into TABLE it_pa0000
     FOR ALL ENTRIES IN it_pa0007
     where pernr =  it_pa0007-pernr
     and   massn = 'AF' .
endif.


LOOP AT it_pa0007 INTO wa_pa0007.
    wa_finalattend-pernr = wa_pa0007-pernr.
    wa_finalattend-schkz = wa_pa0007-schkz.
    wa_finalattend-changedate = wa_pa0007-aedtm.
    CLEAR: wa_attend.
    READ TABLE it_attend INTO wa_attend WITH KEY pernr = wa_pa0007-pernr.
    IF sy-subrc = 0.
      wa_finalattend-begda   = wa_attend-begda.
      wa_finalattend-sname   = wa_attend-sname.
      wa_finalattend-orgeh   = wa_attend-orgeh.
      wa_finalattend-desig  = wa_attend-desig.
      wa_finalattend-subdeg = wa_attend-subdeg.
     ENDIF.
     CLEAR: wa_pa0000.
     READ TABLE it_pa0000 INTO wa_pa0000 WITH KEY pernr = wa_pa0007-pernr.
    IF sy-subrc = 0.
      wa_finalattend-resigdate   = wa_pa0000-begda.
    ENDIF.

    APPEND wa_finalattend TO it_finalattend.
    CLEAR: wa_finalattend.
ENDLOOP.

   DATA lo_nd_attendance TYPE REF TO if_wd_context_node.

   DATA lo_el_attendance TYPE REF TO if_wd_context_element.
   DATA ls_attendance TYPE wd_this->element_attendance.

*  navigate from <CONTEXT> to <ATTENDANCE> via lead selection
   lo_nd_attendance = wd_context->get_child_node( name = wd_this->wdctx_attendance ).
**   attendance = wd_context->get_child_node( name = wd_this->wdctx_attendance ).
   lo_nd_attendance->bind_table( it_finalattend ).

endmethod.

prasad
Participant
0 Kudos

Problem solved

Context structure for which the table is binded is not in proper order

Regards

Prasad

former_member199125
Active Contributor
0 Kudos

Did you check whether attendance node and internal table structure are same or not, if same, did you bind all the columns to repsecitve attritbutes?

Regards

srinivas

Former Member
0 Kudos

close the discussion

prasad
Participant
0 Kudos

How to close the discussion

Former Member
0 Kudos

Mark as answered