Quantcast
Channel: SCN : All Content - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 3667

ALV TABLE WITH BUSINESS GRAPHIC (WD-ABAP)- SHOWING NULL ERROR

$
0
0

Hi Experts,

 

In one of my Scenarios, I have to display the Employee details in a table with the Business Graphics. The Employee details contain the organization unit he is working, Percentage of Assignment, start date and end date.



NODE.JPG


( Previously I had  created a custom infotype 9027 with structure ps9027 and components as


ORG_UNIT                 ORGEH

PER_OF_ASSIGN      ZZASSG

START_DATE             DATE

END_DATE                DATE

 

 

the main window is like

 

MAIN WINDOW.JPG



and the code :-


method ONACTIONGET_EMP_DETAILS .

 

 

  wd_This->Fire_To_Alv_Table_Plg(

  ).

 

 

 

  data:

    Node_Employee                       type ref to If_Wd_Context_Node,

    Elem_Employee                       type ref to If_Wd_Context_Element,

    Stru_Employee                       type wd_This->ElementS_Employee .

 

 

DATA IS_EMPLOYEE type wd_This->Element_Employee .

 

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

  Node_Employee = wd_Context->get_Child_Node( Name = wd_This->wdctx_Employee ).

 

 

 

 

 

data:

    Elem_Context                        type ref to If_Wd_Context_Element,

    Stru_Context                        type wd_This->Element_Context ,

    Item_EMP_NO                         like Stru_Context-EMP_NO.

 

 

  DATA LV_NUM TYPE I.

 

* get element via lead selection

  Elem_Context = wd_Context->get_Element(  ).

 

* get single attribute

  Elem_Context->get_Attribute(

    exporting

      Name =  `EMP_NO`

    importing

      Value = Item_Emp_No ).

 

 

  SELECT ORG_UNIT PER_OF_ASSIGN START_DATE END_DATE INTO CORRESPONDING FIELDS OF TABLE

    Stru_Employee FROM PA9027 WHERE PERNR EQ Item_Emp_No AND ENDDA EQ '99991231'.

 

  DESCRIBE TABLE Stru_Employee LINES LV_NUM.

 

 

  Node_Employee->BIND_TABLE( Stru_Employee ).

 

  data: l_ref_cmp_usage type ref to if_wd_component_usage.

 

  l_ref_cmp_usage =   wd_This->wd_CpUse_Alv_Component( ).

  if l_ref_cmp_usage->has_active_component( ) is initial.

    l_ref_cmp_usage->create_component( ).

  endif.

 

  DATA: l_ref_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

  l_ref_INTERFACECONTROLLER =   wd_This->wd_CpIfc_Alv_Component( ).

  data:

    l_VALUE type ref to Cl_Salv_Wd_Config_Table.

 

  l_VALUE = l_ref_INTERFACECONTROLLER->Get_Model(

  ).

 

  l_VALUE->IF_SALV_WD_TABLE_SETTINGS~SET_VISIBLE_ROW_COUNT( LV_NUM ).

 

 

 

  DATA:I_REF_CONFIG_TABLE TYPE REF TO IF_SALV_WD_TABLE_SETTINGS,

        I_DISPLAY_AS TYPE SALV_WD_CONSTANT VALUE'02'.

 

 

  I_REF_CONFIG_TABLE ?= L_VALUE.

  I_REF_CONFIG_TABLE->SET_DISPLAY_AS( VALUE = I_DISPLAY_AS ).

 

 

 

endmethod.

 

 

 

Its showing no syntax error. But during the test of WD-Application its showing dump with below error

 

ERROR.JPG

 

NULL-ERROR.JPG

 

 

Dear Experts I have tried a lot , but I am unable to find the solution. Kindly suggest me .

 

 

 

Thanks in Adv.

 

Bunty.


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>