Skip to end of metadata
Go to start of metadata

Change Own Data modifications Following is the sequence of Function Modules used in modified Change Own Data application: 

    Exporting parameter DETAIL_TABLE contains the list of 6 std fields used in change own data application.  The existing change in above will get the custom subtypes in addition to above. So there will be totally 9 fields in Detail_table.

 Add the following code to acheive the same.  

LOOP AT wiw_detail_table INTO wa.   
	IF wa-fieldname = 'YYYY'..      
APPEND wa TO detail_table.   
// YYYY should be the fieldname value of detail_table. 

2.    Function HRXSS_COD_READ

Create enhancement YHRXSS_COD  for function modue HRXSS_COD_READ.  For deletion it is mandatory that the XSS adapter has to receive the old values stored in the data base. To achieve the same following code hasd to be added as an enhancement in above mentioned RFC.   

subtype_wa-subtype = 'XXXX''.*Begin of Note_1223687.  
call method cl_hrpa_masterdata_factory=>get_read_molga 
	read_molga = read_molga.  
	molga = read_molga->read_molga_by_pernr( tclas = 'A' pernr = pernr ).  
CLEAR wa_t7xsspersubtype.  
WHERE molga = molga and infotype = '0105' and subtype = subtype_wa-subtype.  
IF sy-subrc = 0.  
	subtype_wa-case = wa_t7xsspersubtype-usecase.  
else.*End of Note_1223687. 
subtype_wa-case = 'B2'. 
 ENDIF.     "Note_1223687  APPEND subtype_wa TO subtype_tab_0105.

 If there is any need to add subtype it is important that each subtype is handled as above. XXXX is a suntype of infotype 105.   


  Add following code to handle the update and deletion flags in function module HRXSS_COD_MODIFY_PDATA.     

CHECK wa-fieldname+0(16) = 'SYHR_A_P0105_AF_'.    
CASE wa-fieldname+16(4).      
WHEN 'XXXX'.       
l_subtype = 'XXXX'.       
PERFORM prepare_0105_to_save TABLES   records_0105 messages                                    
USING    l_subtype wa-fieldname wa-value                                     
CHANGING record0105subrc record_0105 old_record_0105 deleteflag_0105. 

The code written in first step will provide values in table records_0105.

This will make sure that the flag is set for deletion or update. For any additional subtype it is important to add this code for each subtype. It is also important that procedure "prepare_105_to_save" is also enhanced.  

ELSEIF p_subtype = 'XXXX'.   
IF ( ( p_record_0105-usrid IS NOT INITIAL OR p_record_0105-usrid IS NOT INITIAL ) AND ( p_value IS INITIAL ) ).     
p_deleteflag_0105 = 'X'.   
IF p_fieldname+16(4) = 'XXXX'.       
p_record_0105-usrid    = p_value.     
p_record_0105-usrid = p_value.     
p_record_0105-usrty      = p_subtype.    ENDIF 

Above code has to be repeated for all the subtypes under include LHRXSS_COD_INTERFACEF01.  On clicking EDIT, the control goes to the function. After the change introduced in step 3 the above table will carry additional subtypes. 5. Functiom HRXSS_COD_SAVE 
This Function Module commits the data  of standard fields which has been modified and saved in the Function Module hrxss_cod_modify

  Webdynpro java changes 

A. For mapping additional fields to standard attributes 

Name of the component - VcCodChangeComp

Name of the method - setInputValuesFromPersonalDetailTable


Added following code in above method for mapping the extra field to the standard attributes of component controller.                    

else if (detailElement.getFieldname().equals("YYYY"))
{ detailElement.setValue(wdContext.currentValInftyElement().getVal_YYYY());

YYYY should be the fieldname that appears in the detail_table.

B. Message removal SAP Note 1163517

You will need to make modification in webdynpro which may cause issues with solution covered in above mentioned note 1163517.  

There will be an additional save message appearing on the review screen. The same had to be removed. 

Name of the component - FCCodBusinessLogicComp

Name of the method - getRFCResult 

The standard code doesn't handle the message for which there is a correction provided by  SAP. This correction however is not sufficient. Following code has to be added to achieve this functionality.                        

EventData ed = fpm.getEventData();                       
String eventNameForMessageDisplay = null;                       
eventNameForMessageDisplay = ed.getEventName();                                                                                     
  • No labels