SAP SRM Add Custom Field Extension

Custom Field for SRM SC WebDynpro Application


http://scn.sap.com/docs/DOC-25692


 


Table extensions in SRM documents


http://scn.sap.com/docs/DOC-28602


위 문서대로 생성 후 테스트를 해 보면 아래와 같은 경우가 발생된다.


1.     Table Add Button Enter(PDO Action) 라인 오류 (Add 한 만큼의 라인이 더 생긴다.)


WD_COMPONENT           /SAPSRM/WDC_DODC_CT                      


VIEW                           V_DODC_CT


Method                        ONACTIONON_ADD                   Post-Exit


—————————————————————————————————


wd_comp_controller->mo_mapper->fire_event_refresh( ).


—————————————————————————————————


2.     VIEW UI Properties  변경


WD_COMPONENT           /SAPSRM/WDC_DODC_CT                      


VIEW                           V_DODC_CT


Method                        WDDOMODIFYVIEW                  Post-Exit


—————————————————————————————————


IF first_time EQ abap_true.
  wd_this
->mo_view    view.
  wd_this
->mv_bo_type wd_comp_controller->mo_task_container->get_bo_type( ).
ENDIF.

CASE wd_this->mv_bo_type.
  
WHEN ‘BUS2202’“Quotation
    wd_this
->modifyview_quotfirst_time first_time ).
  
WHEN OTHERS.
ENDCASE.


—————————————————————————————————


MODIFYVIEW_QUOT 


DATA lr_table         TYPE REF TO cl_wd_table,
         lr_table_column  
TYPE REF TO cl_wd_table_column,
         lr_header        
TYPE REF TO cl_wd_caption,
         lr_linktoaction  
TYPE REF TO cl_wd_link_to_action,
         lr_text_view     
TYPE REF TO cl_wd_text_view,
         lr_dropdown_cate 
TYPE REF TO cl_wd_dropdown_by_key,
         lr_container     
TYPE REF TO cl_wd_transparent_container,
         lr_gutter        
TYPE REF TO cl_wd_horizontal_gutter.

  DATA lt_abstr_columns TYPE cl_wd_abstr_table_column=>tt_abstr_table_column,
         lr_abstr_column  
TYPE REF TO cl_wd_abstr_table_column,
         lr_column        
TYPE REF TO cl_wd_table_column,
         lr_cell          
TYPE REF TO cl_wd_abstr_table_cell_var,
         lr_summary_cell  
TYPE REF TO cl_wd_table_summary_cell,
         lv_variant       
TYPE string,
         lv_design        
TYPE wdui_table_sum_cell_design.

  IF first_time EQ abap_true.
*——————————————————————–*
*   Change Title.
    lr_linktoaction ?= wd_this
->mo_view->get_element‘CON_TICUS_TITLE’ ).
    
IF lr_linktoaction IS BOUND.
      lr_linktoaction
->set_text상세 정보‘ ).
    
ENDIF.
*——————————————————————–*
*   Invisible Container.
    lr_container    ?= wd_this
->mo_view->get_element‘CON_TIGPM_TRAY_CONT’ ).
    
IF lr_container IS BOUND.
      lr_container
->set_visible’01’ ).
    
ENDIF.
*   Invisible Gutter.
    lr_gutter       ?= wd_this
->mo_view->get_element‘GUTTER_12’ ).
    
IF lr_gutter IS BOUND.
      lr_gutter
->set_visible’01’ ).
    
ENDIF.
*   Invisible Container.
    lr_container    ?= wd_this
->mo_view->get_element‘CON_TIGPS_TRAY_CONT’ ).
    
IF lr_container IS BOUND.
      lr_container
->set_visible’01’ ).
    
ENDIF.
*   Invisible Gutter.
    lr_gutter       ?= wd_this
->mo_view->get_element‘GUTTER_123’ ).
    
IF lr_gutter IS BOUND.
      lr_gutter
->set_visible’01’ ).
    
ENDIF.
*——————————————————————–*
*   Add Table Column – DropDownListBox.
    lr_table ?= wd_this
->mo_view->get_elementid ‘TICUS’ ).
    
CHECK lr_table IS BOUND.

    lr_table_column cl_wd_table_column=>new_table_column( ).

    lr_header cl_wd_caption=>new_captiontext 비용구분‘ ).
    lr_table_column
->set_headerlr_header ).
    lr_table_column
->set_h_align’01’ ).
    lr_table_column
->set_width‘200’ ).

    lr_dropdown_cate cl_wd_dropdown_by_key=>new_dropdown_by_key(
      bind_read_only     
‘TICUS.ZCOST_PRICE:READ_ONLY’
      bind_selected_key  
‘TICUS.ZCOST_CATE’
      
id                 ‘ZCOST_CATE_DROP’
      on_select          
‘ON_ENTER’
    
).

    lr_table_column->set_table_cell_editorlr_dropdown_cate ).

    lr_table->add_columnindex      1
                          the_column 
lr_table_column ).


lr_table_column ?= wd_this->mo_view->get_elementid ‘TICUS_CZCOST_CATE’ ).
   
IF lr_table_column IS BOUND.
      lr_table_column
->set_visible’01’ ).
   
ENDIF.



    lr_table->set_display_empty_rowsabap_false ).
    lr_table
->set_visible_row_count).

  ENDIF.


—————————————————————————————————


결과 화면 


 

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments