Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Last SMTP Address not getting updated in the Customer master(Contacts tab).

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

Check your program logic. I'd guess that you're failing to call the FM after the last record in the table.

0 Kudos

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.

0 Kudos

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.