cancel
Showing results for 
Search instead for 
Did you mean: 

Defaulting Address details on Supplier UI

Saravanan_SD
Advisor
Advisor
0 Kudos

Hi Friends,

We are working on MDG 7.0 for Supplier and utilizing the Vendor Like UI for the create process (VENDR01).

One of the scenarios is to default the address of the Supplier based on the External Number of the Vendor.

I have tried doing it on the Cross Entity BADI to pick the Vendor Name and default the address. But ADDRNO of the address is not available to set the field values of the address. ADDRNO is auto numbering and is set only when any of the field (ex. country, state, city, etc) is populated.

i.e if the user launch the create UI and does not fill any address details the ADDRNO ($XXX) does not get generated. This is the expected behaviour.

So I am looking for following options:

1. Default the country on launch of the Vendor UI

or

2. How do I generate the ADDRNO of the address entity to set the address?

Your inputs are highly appreciated.

Regards,
Saravanan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I suggest that you use personalization so that each user can set their own defaults. This is a common scenario for the country field. Basically, each use should right-click the field and then save the country value as their own default.

Why do you even need the address number since you are using the external vendor number? If address is mandatory, the MDG application will display an error message any way.

Saravanan_SD
Advisor
Advisor
0 Kudos

Thank you for the response Abdullah.

Standard Supplier UI enable users to provide the address. But my requirement is to default the whole address information (country, street, city, pincode, etc.,) depending on the external number. With the external number, I will fetch the address details from a ERP table and set it to the supplier UI, so user will make changes on address, if needed.

In order to set the address, technically in MDG, ADDRNO is required. This value is generated only if any of the address fields are filled.

So I want to either default any of the address fields on launch of the UI or generate the ADDRNO. But I could not find a solution for the same.

Requesting every user to set the default address would be tough.

Any other ideas or options?

Former Member
0 Kudos

Why isn't the address there in the first place? Is not your suppliers linked to BP's? Even though you are using the supplier UI, your BP should still be created and linked to your supplier. If not, I'm afraid you have bigger issues to worry about. You need to synchronize your BP and suppliers first for MDG to work correctly for you.

Saravanan_SD
Advisor
Advisor
0 Kudos

Creating Supplier in MDG will create the Business Partner using CVI configuration. We have taken care of the configurations.

Our concern is to default the address on new Supplier creation process. 

Former Member
0 Kudos

Where are you getting the address of the new supplier from? Is it from an existing supplier? Then, you are creating duplicate suppliers, are not you? This goes against why MDG was created in the first place.

Any way, in order to read and default data from different entities, you can use the cross-entity BAdI. See this OSS note for an example: 1806103.

Also, see this document for more information. It includes details on how to derive entity contents in general and on how to "read" cross-entity information in MDG7: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90243ca8-92af-2e10-b895-92533b2de...

Saravanan_SD
Advisor
Advisor
0 Kudos

Thank you for the response.

Here is my exact scenario:

The external number for the vendor has certain format and will hold the Company code number (Last 3 digits in vendor number). Based on the 3 digits, the address details must be fetched from T001, ADRC tables and defaulted on the UI. We have validation to avoid duplicate scenarios. Additionally user will/can change the address on the Supplier UI and we have address cleansing and duplicate check enabled on address with DQM.

I have already started implementing the approach and I can default the address if the user fill the country in the UI manually first and then provide the vendor number. But the issue is with defaulting the Address information on the Supplier UI, if the user did not fill any address field in UI.

Reason:

Address has it own ID and has 2 key fields (BP_HEADER and ADDRNO). These numbers are auto generated. BP_HEADER is always generated once we launch the UI. ADDRNO will be only generated, if one of the fields in address has value. Otherwise no ADDRNO is generated. Without the ADDRNO, I could not set the address details on the Address entity in MDG.

Below are the alternate options I wanted to try.

1. Default the country on launch of the UI (Again, I do not have the ADDRNO to set the country)

2. Generate the ADDRNO number on the fly and set it to Address Entity ( I do not know if this is possible on the Supplier Framework )

3. Any other alternate options to overcome this scenario?

Former Member
0 Kudos

OK, the addrno that you find when the user enters a country is a temporary number. Check out how that number is generated and if there is no address number already, generate it yourself and assign it to the entity.

Saravanan_SD
Advisor
Advisor
0 Kudos

That's exactly my approach and my question is about the same

I found the feature to write data into entity but could not find any options to initiate the entity to generate the temporary number (in my case ADDRNO ).

Former Member
0 Kudos

Hi Saravanan,

Are you able to default address with cross entity Badi. I generated tem key and trying to write data for entity 'ADDRNO'. ADDRNO is also an entity 1 and can't be write through Cross entity Badi.

Saravanan_SD
Advisor
Advisor
0 Kudos

Hi Vik,

Cross entity did not help in initializing the entity (ADDRNO).

It requires enhancement in the feeder class for the Address UIBB and then the temporary key can be assigned.

Please make sure to utilize the change log (it_change_log - fpmgb_t_changelog) to determine if the ADDRNO entity is updated, otherwise the address will be defaulted to the initial value even after the user make changes in the UI.

Regards,
Saravanan