cancel
Showing results for 
Search instead for 
Did you mean: 

change phone number when SC is created

former_member582701
Contributor
0 Kudos

Hi all,

Scenario:

- In PPOSA_BBP we don't have ADDR_SHIP attribute mantained

- When the SC is created Location address is copied into the SC

It is working properly. But now we need to change phone number using a Z table. The problem is that in BADI change (BBP_DOC_CHANGE_BADI) in first time the address information is not populated yet so although we change phone number it is not working.

I mean:

1- Create item

2- BADI change is executed

3- We change phone number (but address information from location is still not filled)

4- Phone number in delivery address tab is the phone number from Location (it is wrong)

5- Now we change for example SC quantity

6- BADI change is executed

7- We change phone number

8- Now Z phone number is well displayed in SC (it is correct)

So do you know any other BADI or enhancement where we can change address information in order to have the correct telephone number is step 4?

Thx in advance,

Manel

Accepted Solutions (1)

Accepted Solutions (1)

former_member582701
Contributor
0 Kudos

I have fixed that removing PARTNER_ID from partner table (partner_id = location and parter function = 00000027) and I have informed all the fields by myself recovering all data from Location address and phone number from my Z table.

Thx for your help.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Manel,

Make a try using BBP_ITEM_CHECK_BADI.

Please confirm whether it was useful or not.

Regards,

Ganapathi

former_member582701
Contributor
0 Kudos

Hi Ganapathi,

With this BADI I can't change data. I need to change phone number after location address is recovered.

Any other idea?

Regards,

Manel

Former Member
0 Kudos

Sorry. I gave it by mistake. This is not for change. This does similar work like bbp_doc_check badi.

Ganapathi

Former Member
0 Kudos

As a workaround,

I hope, you are able to find a record with PARTNER_FCT = ' 00000075' in the table IT_PARTNER, first time itself. Here you can find out the addr number of plant using BE_PLANT of IT_ITEM, and then change the phone number which you wanted.

Ganapathi

former_member582701
Contributor
0 Kudos

It is still not working

I don't want to change the phone number of the addr number (address number of Location). I want to change only the phone number of the shopping cart. The problem is that the addres number of Location and all the fields (phone number, room, floor, etc) are filled after BADI change is executed so I can not change the phone number of the shopping cart.

Once I change for example the quantity the Partner table is already filled with all data from Location so I can change the phone number without any problem.

So the problem is in the first time

Regards,

Manel

laurent_burtaire
Active Contributor
0 Kudos

Hello Manel,

did you have a look at method i gave you?

Regards.

Laurent.

former_member582701
Contributor
0 Kudos

Yes, it is only executed firs time and it is recovering Company address number. Now I am trying to find where Location address number is assigned.

I don't understand why it is so difficult. So If you want to initalize any field (phone, room, floor...) with a different value than Company/Location address it is not possible?? It is very strange.

laurent_burtaire
Active Contributor
0 Kudos

Hello,

could you re-explain your problem as i do not understand...

At your step 3, for which partner function do you want to change phone number? Is it 00000027?

If yes, in table ET_PARTNER inside the SC change BAdI, there is not entry for this partner function?

Is it the case when you click onto "Add item"?

Regards.

Laurent.

laurent_burtaire
Active Contributor
0 Kudos

Hello Manel,

do not understand your problem...

As you do not have ADDR_SHIP attribute populated, default delivery address at SC item level comes froms user's default settings.

As in your case, this address is the location one, this means:

- delivery address from default settings is the location one,

- you have a specific developement which is used to change the default delivery address by the location one.

Default delivery address is linked to user context: if you want to change one of its value, check DELIVERY_ADDRESS_GLOBAL_FILL method from /SAPSRM/CL_PDO_SHARED_USER class.

But, by modifying delivery address, you will generate a new address number for your partner...

Regards.

Laurent.

former_member582701
Contributor
0 Kudos

Hi Laurent,

Checking this method it is only exucuted 1 time when you push Create Cart button. It is recovering the address number of the Company but later it is changed for Location address number (no Z development is created).

I am debugging standard code in order to find when/where the fields from Location are copied into the partner table.

Dou you have any other idea where I can change the phone number of the Shopping Cart? As I said BADI change is excuted before address fields are filled from Location so it is not working in the first time.

Regards,

Manel