12-24-2013 1:25 PM
I am updating Customer master and specifically the mobile number but all the fields are getting updated EXCEPT the Mobile number (the field is TELF2). kindly provide the solution for this.. I am using BDC to upload this data,.
12-25-2013 5:44 AM
I have solved the Issue.
In the recording we need to check Address as well as 'USE CENTRAL ADDRESS MANAGEMENT'.
After doing this the KNA1-TELF2 will get updated.
Without this checkbox one can never update the Mobile Number field.
12-24-2013 1:30 PM
Did you try executing your bdc in A mode and check if fields are filled..?
12-25-2013 5:06 AM
yes Nabheet.
Let me send you the code.
REPORT zvc_customer_phone_upload
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF it_final OCCURS 0,
kunnr LIKE kna1-kunnr,
telf1 LIKE kna1-telf1,
telf2 LIKE kna1-telf2,
END OF it_final.
DATA: it_raw TYPE truxs_t_text_data.
DATA : input TYPE string.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS :filename TYPE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK b1.
INCLUDE bdcrecx1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
PERFORM select_file.
START-OF-SELECTION.
PERFORM get_data.
START-OF-SELECTION.
PERFORM open_group.
LOOP AT it_final.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_final-kunnr
IMPORTING
output = it_final-kunnr.
PERFORM bdc_dynpro USING 'SAPMF02D' '0101'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02D-D0110'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02D-KUNNR'
it_final-kunnr."'10000007'.
PERFORM bdc_field USING 'RF02D-D0110'
'X'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KNA1-TELF2'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=UPDA'.
PERFORM bdc_field USING 'KNA1-TELF1'
it_final-telf1.
PERFORM bdc_field USING 'KNA1-TELF2'
it_final-telf2.
PERFORM bdc_transaction USING 'XD02'.
ENDLOOP.
PERFORM close_group.
*&---------------------------------------------------------------------*
*& Form SELECT_FILE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM select_file .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'FILENAME'
IMPORTING
file_name = filename.
ENDFORM. " SELECT_FILE
*&---------------------------------------------------------------------*
*& Form GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM get_data .
input = filename.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = input
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = it_final.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " GET_DATA
this is my code.
the scenario is I need to update Mobile number only. The customer is already created so I have to update their number so I recorded the bdc for XD02.
In which I successfully updated the telephone number but the recording is not updating the Mobile number.
Though I can see in the process that the mobile number field is appearing the process.
Please help me.
12-25-2013 5:44 AM
I have solved the Issue.
In the recording we need to check Address as well as 'USE CENTRAL ADDRESS MANAGEMENT'.
After doing this the KNA1-TELF2 will get updated.
Without this checkbox one can never update the Mobile Number field.