Skip to Content
0

Want to clear Email in partner of type 'SH'

Sep 11 at 08:10 AM

86

avatar image

Hi team ,

Am using BAPI_SALESORDER_CHANGE for updating rejection etc .

and another requirement is i need to clear the email of partner 'SH' and i want include in the above BAPI only .

Can you please help me experts for any solution .

or can you please suggest any other BAPI to clear email id of Partner of particular type.

my requirement is just to clear email id of partner .

i searched alot in many posts but unable to succeed ,

Thanks ,

Priya .

10 |10000 characters needed characters left characters exceeded

Why do you need to do this in the first place? Just don't maintain email in the customer master if you don't need it. Why do you have remove it from the order? This is a rather odd requirement...

0
Jelena Perfiljeva

Hi Jelena ,

Thanks for your gesture .

Actually we are doing some rejection , adding quantity to each items and after that we need to clear email id for partner SH .

As am abaper got requirement and trying for it .

So can you please guide me how do i do it ?

Thanks ,

Priya.

0

Question here is not "how" but whether this should be needed at all. What is the actual business requirement? What process exactly requires such odd change? I just can't imagine one that would be a good practice... Maybe I'm wrong but this looks suspiciously like trying to use ABAP to solve a business process problem.

0
Jelena Perfiljeva

Hi Jelena ,

Yes requirement is just to clear email id of partner 'SH' .

Thanks,

Priya.

0

Again - this is not a "business requirement", this is a technical specification someone passed to you. "Business requirement" could be something like: "we don't want to send advance shipment notifications for such and such scenario". This could be easily misinterpreted by a clueless SD person and passed to an ABAPer as "delete email". Like in that kids "broken phone" game. IMHO it'd make sense to find the original phrase first before jumping to action.

But it seems we're going in circles here...

1
Jelena Perfiljeva

Hi Jelena ,

for me as an abaper i just need to clear email for that partner .

It is the pending issue in my Queue .

So am asking for your experts suggestion .

As Raymond suggested below , if i use BAPI_BUPA_ADDRESS_CHANGE for replacing back my mobile ,then it would finish my requirement , but am unable to execute that BAPI , asking only any perfect example code for that BAPI .

Thanks ,

Priya .

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
priya ramani Sep 20 at 12:33 PM
0

Closing thread as we used BDC to furnish requirement .

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Sep 11 at 09:51 AM
0

You have to fill PARTNERCHANGES and PARTNERADRESSES to change the partner address. (Don't fill PARTNERS to prevent dump)

Show 12 Share
10 |10000 characters needed characters left characters exceeded

Hi Raymond ,

Thanks for your reply ,

Am filling both , but the problem is as am passing only email as space to

partneraddresses , all other fields like name1 , city , country etc all are getting blank/cleared in partner screen in va03 .

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = i_vbap-vbeln
order_header_in = lwa_bapisdh1
order_header_inx = lwa_bapisdh1x
TABLES
order_item_in = lt_item
order_item_inx = lt_itemx
return = lt_return
partners = lt_partners
partnerchanges = lt_bapiparnrc
partneraddresses = lt_bapiaddr1.

0

Without some PARTNERADRESSESX parameter, you must read the current address data to fill the PARTNERADRESSES parameter.

0
Raymond Giuseppi

Hi Raymond ,

I just wanted to clear only EMAIL id , hence am just passing

lwa_bapiaddr1-e_mail = space.

append lwa_bapiaddr1 to lt_bapiaddr1.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = i_vbap-vbeln
order_header_in = lwa_bapisdh1
order_header_inx = lwa_bapisdh1x
TABLES
order_item_in = lt_item
order_item_inx = lt_itemx
return = lt_return
partners = lt_partners
partnerchanges = lt_bapiparnrc
partneraddresses = lt_bapiaddr1.

Thanks ,

Priya .

0

At the risk of repeating myself ;-) you must provide the whole structure filled as there is no structure[X] to map only some fields. The operative word here is "must".

1

Hi Raymond ,

i searched PARTNERADRESSESX in the bapi , it is not there in the bapi itself , how do i pass ?

Thanks ,

priya .

0

There is (alas) no such parameter in this BAPI, so you must...

0

Can you please guide me rather confusing .

You initially said to pass PARTNERADRESSESX and now you are saying no such parameter .

am not getting any solution hence posting here ,

so guide me .

0

Seems you misunderstood my "Without some PARTNERADRESSESX parameter (*) you must" which meant that as there is no such parameter you MUST pass the whole structure.

(*) you should understand "provided by SAP"

0

Thanks Raymond ,

Yes am passing whole structure to PARTNERADRESSES .

Initially am passing ADRNR to FM ADDR_GET_COMPLETE_ALL_TYPES and getting all addr1_complete_bapi from FM and in that am clearing email like

addr1_complete_bapi-E_MAIL = space .

append addr1_complete_bapi to addr1_complete_bapi.

and then am passing addr1_complete_bapi to PARTNERADRESSES .

and am succeeding in that approach , but the problem is three fields MOBILE PHONE , DATA LINE and TELEBOX in the partner screen are getting blanked out (Clearing) .

and i see that in BAPI_SALESORDER_CHANGE , there is no such fields like

MOBILE PHONE , DATA LINE and TELEBOX .

Can you please guide me how to avoid the above fields to be unchanged ?

Thanks,

Priya.

0

Not sure, but you could try to get the new address number (of the document partner) after the update and then use BAPI_BUPA_ADDRESS_CHANGE to change those values back to previous values (of the original customer/document partner address number)

0
Raymond Giuseppi

Hey Thanks for your answer ,

Can you please help me in coding of BAPI_BUPA_ADDRESS_CHANGE , since i tried in SE37 doing that it wont work.

Thanks,

Priya

0
Raymond Giuseppi

Hi Raymond ,

can you please reply me , actually i need to finish this requirement .

Could you please explain me how would i use BUPA FM after BAPI_SALES ?

Thanks ,

Priya .

0