on 07-20-2006 1:23 PM
Hi,
I would like to change the address of a specific ship-to party.
I've seen it is possible via SE37 with a 'B' in the addr_orig parameters.
But when I use the same parameters with the RFC call (inside my WD app) SAP return :
<b>Specify the address number or the address handler</b>
Someone can help me ?
regards,
Hi,
In this Bapi all are Optional fields.It can be execute without the input parameter.Clear all other unwanted input to the BAPI and try to execute it.
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't think you understood my request. Actually, I want to change the address of a specific partners without saving this new address.
for example : I set my order with my ship to number 10066,and its original address is XX street Marlon Brando. My request is i only want to change this address to YY street James Deem for the same ship to.
Regards
hi,
Actually, I want to create an order with BAPI_SALESORDER_CREATEFROMDAT2. And during this creation, instead of having the normal address of one of my shipto, I want to change this address without record it inside the R3.
Thus, if I check out with a XD03 of my partners, I have to see the normal address and not the modified address.
However, If i check out in the VA03, i have to see the new address of my partners.
Regards
Hi,
Does this do it:
//You have already done the following line, I'm assuming
Bapi_Salesorder_Createfromdat2_Input input = new Bapi_Salesorder_Createfromdat2_Input();
//For address
Bapiaddr1 address = new Bapiaddr1();
address.set<attribute1 name>(<value>);
address.set<attribute2 name>(<value>);
//etc...
input.addPartneraddresses(address);
Regards,
Satyajit.
Hi,
Have you tried to execute the BAPI after using this code?
As for your question, I think you will need to reference Bapiparnr(ORDER_PARTNERS) and set the addresses.
From the FM documentation for the BAPI:
<i>"This table parameter is used to enter partners such as sold-to party, or ship-to party, both at header and item level.
The minimum requirement is that the sold-to party is entered at header level. Additional partner functions can then be automatically determined.
You can also enter different addresses in the structure
"</i>
Regards,
Satyajit.
Hi Satyajit,
actually, there is my code :
<i>partners = wdContext.createOrder_PartnersElement(new Bapiparnr());
partners.setPartn_Numb(wdContext.currentContextElement().getShipToPartyList4DropKey());
partners.setPartn_Role("WE");
if (wdContext.currentShipToPartyElement().getIsChanged()) {
wdComponentAPI.getMessageManager().reportSuccess("Change");
// New Addr Address
IPublicSalesOrders.IPartneraddressesElement partnerAddr = wdContext.createPartneraddressesElement(new Bapiaddr1());
<b>partnerAddr.setAddr_No("0000000001");
partners.setAddr_Orig("B");
partners.setAddr_Link("0000000001");</b>
partnerAddr.setName(wdContext.currentShipToPartyElement().getName());
partnerAddr.setName_2(wdContext.currentShipToPartyElement().getName2()); partnerAddr.setCity(wdContext.currentShipToPartyElement().getCity()); partnerAddr.setCountry(wdContext.currentShipToPartyElement().getCountry());
partnerAddr.setStreet(wdContext.currentShipToPartyElement().getAddress());
partnerAddr.setFax_Number(wdContext.currentShipToPartyElement().getFax());
partnerAddr.setPostl_Cod1(wdContext.currentShipToPartyElement().getPostCode());
partnerAddr.setRegion(wdContext.currentShipToPartyElement().getRegion());
partnerAddr.setTel1_Ext(wdContext.currentShipToPartyElement().getTel1());
<b>wdContext.nodePartneraddresses().bind(partnerAddr);</b>
}
wdContext.nodeOrder_Partners().addElement(partners);</i>
I've tried this in the SE37 and it worked, but with my WD it doesn't !!!
Regards
Message was edited by: berthe joseph
Hi Berthe,
You dont need to pass the following.
partnerAddr.setAddr_No("0000000001");
partners.setAddr_Orig("B");
partners.setAddr_Link("0000000001");
Since you want to change the ship to addess at the Order Level, you need to pass the Ship-To party number and address details. While creating the order, the system will create the new ADRNR by itself.
Regards,
Shubham
Hi Berthe,
What is the error message its returning?
I dont call the standard BAPI directly.
Instead I have a wrapper over it
I pass the following values
CLEAR: lt_vbpakom.
lt_vbpakom-parvw = l_parvw.
lt_vbpakom-kunnr = wa_knvp-kunn2.
lt_vbpakom-name1 = 'James Brown ShipTo'.
lt_vbpakom-land1 = 'US'.
lt_vbpakom-regio = 'CA'.
lt_vbpakom-ort01 = 'ORANGE'.
lt_vbpakom-pstlz = '92606'.
lt_vbpakom-txjcd = 'USCA92606XXXX0'.
APPEND lt_vbpakom.
It works for me.
Regards,
Shubham
Hi Shubham,
First of all, i'm using WD for Java, so I can't make what you told me to do.
Anyway, I've tried, (it is nearest your code 😞
partners = wdContext.createOrder_PartnersElement(new Bapiparnr());
partners.setPartn_Numb(wdContext.currentContextElement().getShipToPartyList4DropKey());
partners.setPartn_Role("WE");
partners.setName("John");
partners.setCity("Lyon");
partners.setCountry("FR");
partners.setAddr_Orig("B");
wdContext.nodeOrder_Partners().addElement(partners);
And it still don't wortk :(. Actually I don't understand why it works with the transaction SE37 and not with Web Dynpro..... I'm getting crazy
Regards,
Hi Berthe,
I know you are using WD for Java.
I call my wrapper RFC around BAPI_SALESORDER_CREATE...
How do you say its not working?
What is the error messages the BAPI returns.
Are you calling the commit BAPI, BAPI_TRANSACTION_COMMIT incase there is no Return Messages from the BAPI?
Did you tried Remote Debugging to see what values are being passed to the BAPI?
Regard,
Shubham
Hi Shubham,
So i've found out my mistake. In fact, I didn't filled the countryiso attribute. Then now it work well.
Below the code which worked :
partners = wdContext.createOrder_PartnersElement(new Bapiparnr());
partners.setPartn_Numb("######");
partners.setPartn_Role("WE");
partners.setAddr_Orig("B");
partners.setAddr_Link("1");
IPublicSalesOrders.IPartneraddressesElement partnerAddr = wdContext.currentPartneraddressesElement();
partnerAddr.setName("John");
partnerAddr.setName_2("Doe");
<b>partnerAddr.setCountryiso("FR");</b>
partnerAddr.setAddr_No("1");
wdContext.nodePartneraddresses().bind(partnerAddr);
wdContext.nodeOrder_Partners().addElement(partners);
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.