|
How To Mass Update Infotype 0006?
Was trying to update infotype 0006. I have tried the things in following way using 'HR_INFOTYPE_OPERATION' function. CALL FUNCTION 'HR_INFOTYPE_OPERATION'
IMPORTING
Function was executed successfully but there was no updates found in the record. Answer: The following is a sample program to Upload Address data into infotype 0006. REPORT zhr_upload_infotype_0006. *----------------------------------------------------------------------*
TABLES:pernr. TYPES: BEGIN OF ty_data,
TYPES:
TYPES: BEGIN OF ty_proposed_values.
TYPES: BEGIN OF ty_modified_keys.
DATA: it_data
TYPE TABLE OF ty_data
WITH HEADER LINE,
DATA: L_PERNR LIKE PSPAR-PERNR. PARAMETERS: p_file TYPE string. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
START-OF-SELECTION. CALL FUNCTION 'GUI_UPLOAD'
END-OF-SELECTION. LOOP AT it_data . SPLIT it_data AT ','
INTO
it_pernr-aedtm = sy-datum.
APPEND it_pernr. ENDLOOP. LOOP AT it_pernr. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. it_proposed_values-infty = '0006'.
APPEND it_proposed_values. L_PERNR = it_pernr-pernr. CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
IMPORTING
TABLES
ENDLOOP. *&---------------------------------------------------------------------*
FORM f4_file_name . *-- F4 functionality for file name on Presentation Server DATA: l_file TYPE string. CALL METHOD cl_salv_test_data=>select_file IMPORTING
ENDFORM. " F4_FILE_NAME ************************************************************************************** Notes: Here is the file format is as below and you need to save it in .txt file format. 00000003,1,20100101,99991231,20100101,John,1,c/0 John,city,city,city,535579,gb Take note that this is for the single subtype only. |
|
See Also
Get help for your ABAP problems
ABAP Books
More ABAP Tips
SAP ERP Modules, Basis, ABAP and Other IMG Stuff All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|