05-24-2011 10:52 AM
Hi,
I am modifying a program in which I am supposed to Create customers Via standalone program using a flat file . at the moment only the general data is crerated.
For the Second Run of the same program I am uploading the Customer contacts.
all the contact are getting created but the SMTP Address of the last contact does not get updated.
all the values are correct including the SMTP Addresses but still the SMTP of the last address does not get created in the system.
The FM being used in the program is : ADDR_PERS_COMP_MAINTAIN_COMPL.
CALL FUNCTION 'ADDR_PERS_COMP_MAINTAIN_COMPL'
EXPORTING
updateflag = 'U' "Update
addr3_complete = ls_addr3_complete
person_group = 'BP'
substitute_all_comm_data = abap_true
check_address = ' '
IMPORTING
returncode = lv_returncode
TABLES
error_table = lt_error
EXCEPTIONS
parameter_error = 1
address_not_exist = 2
person_not_exist = 3
handle_exist = 4
internal_error = 5
OTHERS = 6.
Can any one please help me to sort out this Prblem.
Regards,
Deepak.
05-25-2011 1:05 PM
Check your program logic. I'd guess that you're failing to call the FM after the last record in the table.
05-26-2011 1:02 PM
Hi,
I have debugged the program many times and also checked that values are populated in the respective structresd and tables.
The FM gets called for all the times as long as the records are there .
Only the Email address of the Last record is not updated .
I have forced the COMMIT WORK AND WAIT after all the calls to the FM but still the same status.
Can anybody give me any idea as to why this happens..?
Regards,
Deepak.
05-26-2011 4:10 PM
The errors table and return code are checked on that last record? I'm sorry, but this still sounds like an error in the loop processing. In debug, have you watched every step of that last record? Does the problem occur if you have only one row in your internal table? If so, does that first row update correctly if you add a 2nd row to the internal table? Suggest you post the code for the loop at the internal table along with the FM call.