Sep 12, 2017 at 07:32 AM|104 Views | Last edit Sep 12, 2017 at 10:20 AM 5 rev.
METHOD save_employee.
DATA : gs_empl TYPE yempl_details.
DATA : lv_success TYPE abap_bool.
FIELD-SYMBOLS: <empl_attr_n> LIKE LINE OF gt_employee.
lv_success = 'X'.
READ TABLE gt_employee ASSIGNING <empl_attr_n> WITH
KEY guid = cs_key-guid
employee_id = cs_key-employee_id.
CHECK sy-subrc = 0.
CASE<empl_attr_n>-new.
WHEN 'C' OR 'M'.
MOVE-CORRESPONDING <empl_attr_n> TO gs_empl.
MODIFY yempl_details FROM gs_empl.
WHEN OTHERS.
ENDCASE.
CALL FUNCTION 'DEQUEUE_EYEMPL_DETAILS'
EXPORTING
mode_yempl_details = 'E'
client = sy-mandt
guid = cs_key-guid
employee_id = cs_key-employee_id.
CLEAR cs_key.
ENDMETHOD.
Hello Experts,
I have requirement that in sap crm web ui, when user click on 'new' button it was navigating to create view. The mobile no field was showing initially zeros. This should not be shown so for that particular field in domain level i kept conversion exit as ALPHA and also in create method i written a statement of 'delete leading zeros'. In web ui after giving all values and clicking on save the Mobile No. field which has conversion exit and leading zero that was not getting saved into data base custom table. Insted it was saving all zeros to data base.
When i debugged the API Custom class i got to know that there was problem in save_method.
Above is method for save employee details into data base.
Here data was successfully passing to <empl_attr_n>,but only one field i,e. mobile number field which was char format is not passing not to gs_empl. So it was not saving to data base.
Add comment