Standard Address Book B.F. v/s Insert or Update operation to update Address Book info

That function you are using UpdateAddressBook calls the MBF with a blank version which defaults ZJDE0001 (see attached). You'd be better off calling the MBF yourself.
 

Attachments

  • abmbf.jpg
    abmbf.jpg
    220 KB · Views: 22
Craig, Thanks.

In the Update Address Book BV, I pass the version correctly(the 32nd parameter with value VERBE009), but it does not forward this value to the 6th parameter of Address Book MBF. I wonder why ? :(

How about the 103rd parameter(szVersionconsolidated). The function "Get PO version for MBF" reads this parameter and defaults the version of P0100041 application.

As you suggested I also checked the code of Update Address Book function, it calls the Address Book MBF in the line number 445.


I can call the Address Book MBF, but I am afraid of blank values for Address Book fields such as MCU, DOB etc. Because my screen will have only address details. So if I pass a blank value or don't assign the parameter for MCU(for example), will the Address Book MBF write the blank value to address book?
 
Last edited:
To avoid updating the address book record with blank or default values, you should call the MBF in inquiry (I) mode first, save the existing values and then call the MBF in update (C or U) overriding the values you want to change.
 
I agree with you. But Address Book MBF accepts/receives 134 parameters. Should I create this much of variables and assign back to the same BF if I just need to update the address lines ?
 
My recommendation is to create a C business function that wraps the calls to the Address Book MBF. You won't have to create 134 variables as you can simply declare the data structure in one line. The C business function will accept the address number along with the fields you need to update.
 
Thanks Mr. Hari.

As I am not that much into JDE C API's, it will take more time to learn, and implement the task.
But these things happened only because of the P0100041 Version issue. I still did not understand, why the "Update Address Book" function do not forward the P0100041 version to the Address Book - MBF ? I can fix this issue by specifying a "Default Business Unit" in the default version (ZJDE001) of P0100041, but I am afraid of touching the standard version.
 
Hi Rauf,

The szN0100041_Version parameter is completely ignored by The UpdateAddressBook business function. So, it will use ZJDE0001 no matter what you specify. The ZJDE0001 version in your system has business unit set to blank. If left blank, the system will use 1 as the business unit by default. If 1 is not defined as a valid business unit in your system, you will get an error. Business unit is not a required field for entry in standard address book. In your debug log, address# 1032143 is showing up as having a blank business unit (i.e not padded by spaces) - my guess is that this is causing the business unit to default from the version instead of just passing it though as a blank formatted business unit.
 
Hi Hari,
You are absolutely right.
We identified(some posts ago) this is the real cause of the issue. And now, I need to fix this issue or find an alternative way.
As I can see in our discussion "The szN0100041_Version parameter is completely ignored by The UpdateAddressBook business function", I wonder why does this function completely ignore the version ?
 
Back
Top