Quantcast
Channel: SCN : Discussion List - Customer Relationship Management (SAP CRM)
Viewing all articles
Browse latest Browse all 4296

SAP CRM Sales 2.0 Mobile - Custom Enhancement - Data Type Issue

$
0
0

Hello dear Experts,

Hello to all,

 

I'm trying to enhance the mobile application reagrdingt the sales orders. I want to add the field requested delivery day in the UI.

I have implemented the GET_DETAIL method of the corresponding badi, as follows:

 

method /MSA/IF_CE_SALESORDER~GETDETAIL.
*  data:
*         ls_header_guids           TYPE crmt_object_guid,
*         lt_header_guids            TYPE crmt_object_guid_tab,
*         ls_order_header            like line of ct_header,
*         lt_requested_objects     TYPE crmt_object_name_tab,
*         lt_cumulat_h                 type CRMT_CUMULAT_H_WRKT,
*         ls_cumulat_h                like line of lt_cumulat_h,
*         lt_order_h                     TYPE CRMT_SALES_WRKT,
*         ls_order_h                     like line of lt_order_h,
*         ls_ce_ct_order_h           like line of CE_CT_HEADER.
*
*    append 'SALES' to lt_requested_objects.
*
*    loop at ct_header into ls_order_header.
*      ls_header_guids = ls_order_header-object_guid.
*      APPEND ls_header_guids TO lt_header_guids.
*    ENDLOOP.

*    CALL FUNCTION 'CRM_ORDER_READ'
*      EXPORTING
*        it_header_guid       = lt_header_guids
*        it_requested_objects = lt_requested_objects
*      IMPORTING

*        ET_SALES          = lt_order_h[]
*      EXCEPTIONS
*        document_not_found   = 1
*        error_occurred       = 2
*        document_locked      = 3
*        no_change_authority  = 4
*        no_display_authority = 5
*        no_change_allowed    = 6
*        OTHERS               = 7.
*
*    loop at ct_header into ls_order_header.
*      read table lt_order_h into ls_order_h with key ref_guid = ls_order_header-object_guid.
*      if sy-subrc = 0.
*        ls_ce_ct_order_h-object_guid = ls_order_header-object_guid.
*        ls_ce_ct_order_h-object_id = ls_order_header-object_id.
*        ls_ce_ct_order_h-field_name = 'REQ_DLV_DATE'.
*        ls_ce_ct_order_h-field_text = 'Wunschlieferdatum'.
*        ls_ce_ct_order_h-data_type = '1401'.
**        ls_ce_ct_order_h-data_length = ' '.
**        ls_ce_ct_order_h-decimals = ' '.
*        ls_ce_ct_order_h-field_value = ls_order_h-REQ_DLV_DATE.
*        ls_ce_ct_order_h-general_flag = 'X'.
*        append ls_ce_ct_order_h to ce_ct_header.
*      endif.
*    ENDLOOP.
* endmethod.

 

I used the ls_ce_ct_order_h-data_type = '1401', because I only want to display the date. I did not defined the length.

I am able to diplay the requested delivery date but when I try to update it on mobile a get a sysfail MMW_Q_000000000000000*-queue in NetWeaver, because the Date with the format yyyy-mm-dd cannot be processed.

 

I read the documentation regarding the custom enhancement but did not understand the convention section reagrding the data types.

 

Kind regards

Ioannis Moutogiorgos 


Viewing all articles
Browse latest Browse all 4296

Trending Articles