Any exits to change the ship-to-party in VA01 before its display
Hi All,
I'm having a situation here that i would need your help.
From IW51 i'll create a sales order VA01 and just before creation i would need to do some validation on the plant and service center and then change the Ship-to-party value to another.
I am not sure on which exit or badi offers that functions. the ones that i've found is EXIT_SAPLV46H_002 and EXIT_SAPLV09A_004. Both of this doesn't work.
If any one of you has encountered this problem and manage to resolve it please help me resolve mine as well.
Thank you.
Vinod
Hi,
here u will find complete example:
http://sap.niraj.tripod.com/id21.html
Jogdand M B
Similar Messages
-
User Exit to change the Ship-to party address at Sales Order headder level
Hi,
I have requirement like this......
I need to change the ship-to party address at Sales Order headder level. for that which user exit i need to use and which structure i need to use to update the transaction.
I used : userexit_save_document_prepare, in that i passed data to 'xvbpa' and 'xvbadr' structures. even though it is not update the transaction.
Please let me know the answer.
Thanks,
Satish.Hi Satish,
Step1. Create new Data Copy Routine using Tcode VOFM.
Step2. *-----------------------------------Ship to Party from contract
IF CVBPA-PARVW = 'WE' OR
CVBPA-PARVW = 'SH'.
REFRESH IT_STP.
SELECT KTOKD
A~KUNNR
NAME1
NAME2
A~ADRNR
FROM VBPA AS A INNER JOIN KNA1 AS B ON A~KUNNR = B~KUNNR
INTO CORRESPONDING FIELDS OF TABLE IT_STP
WHERE VBELN = CVBPA-VBELN .
Step3.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL = 80
ENDPOS_ROW = 10
STARTPOS_COL = 10
STARTPOS_ROW = 5
TITLETEXT = 'Your Title'
IMPORTING
CHOISE = T_SELIDX<=====Index No of selection
TABLES
VALUETAB = IT_STP
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
Step4.
READ TABLE IT_STP INTO WA_STP INDEX T_SELIDX.
IF SY-SUBRC = 0.
CLEAR:CVBPA-KUNNR, CVBPA-ADRNR.
MOVE WA_STP-KUNNR TO CVBPA-KUNNR.
MOVE WA_STP-ADRNR TO CVBPA-ADRNR. <========Address ID (Change Here).
ENDIF.
Regards,
Amrendra
Moderator Message - Please do not reply to old, dormant threads.
Message was edited by: Suhas Saha -
BAPI_SALESORDER_CHANGE - Want to change the Ship-to-party at header level
Hi
I want to change the Ship-to-party at header level in the Sales Order created. I tried using the BAPI BAPI_SALESORDER_CHANGE as shown below.
When I run the program I get the log as Sales Order 45 saved succesfully. However, I don't find the SO changed. Apart from this I get an Express Message saying the Updation failure. Not sure of what'z wrong here.
Pls help
thanks
girish
REPORT ZBAPI_SALESORD_CHANGE.
data : zBAPISDHD type BAPISDH1,
zSALESDOCUMENT type BAPIVBELN-VBELN.
data : zORDER_ITEMS_IN like /AFS/BAPISDITM occurs 0 with header line,
zORDER_SCHEDULES_IN like /AFS/BAPISDSCHD occurs 0 with header line,
zORDER_PARTNERS like BAPIPARNR occurs 0 with header line,
zRETURN like BAPIRET2 occurs 0 with header line,
so_no type BAPIVBELN-VBELN,
zORDER_HEADER_INX TYPE BAPISDH1X,
zPARTNERCHANGES like BAPIPARNRC occurs 0 with header line.
clear : zBAPISDHD.
so_no = '0000000045'.
data : l_comp_qty like zORDER_ITEMS_IN-COMP_QUANT.
l_comp_qty = 10.
zBAPISDHD-SALES_ORG = 'BP01'.
zBAPISDHD-DISTR_CHAN = '02'.
zBAPISDHD-DIVISION = '01'.
zORDER_HEADER_INX-UPDATEFLAG = 'U'.
zORDER_HEADER_INX-SALES_ORG = 'X'.
zORDER_HEADER_INX-DISTR_CHAN = 'X'.
zORDER_HEADER_INX-DIVISION = 'X'.
Ship to pary
zORDER_PARTNERS-PARTN_ROLE = 'WE'.
zORDER_PARTNERS-PARTN_NUMB = 'BPAFS0007'.
append zORDER_PARTNERS.
zPARTNERCHANGES-DOCUMENT = '45'.
zPARTNERCHANGES-ITM_NUMBER = '10'.
zPARTNERCHANGES-UPDATEFLAG = 'U'.
zPARTNERCHANGES-PARTN_ROLE = 'WE'.
zPARTNERCHANGES-P_NUMB_OLD = 'BPAFS0001'.
zPARTNERCHANGES-P_NUMB_NEW = 'BPAFS0007'.
append zPARTNERCHANGES.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = so_no
ORDER_HEADER_IN = zBAPISDHD
ORDER_HEADER_INX = zORDER_HEADER_INX
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
NO_STATUS_BUF_INIT = ' '
TABLES
RETURN = zRETURN
ORDER_ITEM_IN =
ORDER_ITEM_INX =
PARTNERS = zORDER_PARTNERS
PARTNERCHANGES = zPARTNERCHANGES.
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
SCHEDULE_LINES =
SCHEDULE_LINESX =
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
data : s_BAPIRET2 like BAPIRET2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = s_bapiret2.Thanks Prashanth. It worked !!!!!!!!!!!!!
Now I am facing another type of problem. The requirement is to change the Sales Order Item Quantity. I basically planned to update the quantity of Schedule Item which needs to be changed. When I run the below code, it works and says the Sales Order changed succesfully. However I get an express message saying the Database update failure. I don't get any sort of technical information.
Appreciate if you could help me finding the error.
Thanks
regards
girish
Note --> I am trying to change the Quantity for 2 line item in SO '56' to 40 Units.
REPORT ZBAPI_SALESORD_CHANGE.
data : zBAPISDHD type /AFS/BAPISDHD,
zORDER_HEADER_INX TYPE /AFS/BAPISDHDX,
zSALESDOCUMENT type BAPIVBELN-VBELN.
data : zORDER_ITEMS_IN like /AFS/BAPISDITM occurs 0 with header line,
zORDER_ITEM_INX like /AFS/BAPISDITMX occurs 0 with header line,
zORDER_SCHEDULES_IN like /AFS/BAPISDSCHD occurs 0 with header line,
ZSCHEDULE_LINESX LIKE /AFS/BAPISDSCHDX occurs 0 with header line,
zORDER_PARTNERS like BAPIPARNR occurs 0 with header line,
zRETURN like BAPIRET2 occurs 0 with header line,
so_no type BAPIVBELN-VBELN,
zPARTNERCHANGES like BAPIPARNRC occurs 0 with header line.
data : l_comp_qty like zORDER_ITEMS_IN-COMP_QUANT.
data : g_qty like /AFS/BAPISDSCHD-REQ_QTY.
g_qty = 40.
l_comp_qty = 40.
clear : zBAPISDHD.
so_no = '0000000056'.
zBAPISDHD-REFOBJTYPE = '/AFS/ORDER'.
zBAPISDHD-SALES_ORG = 'BP01'.
zBAPISDHD-DISTR_CHAN = '02'.
zBAPISDHD-DIVISION = '01'.
zBAPISDHD-PMNTTRMS = '0001'.
zORDER_HEADER_INX-UPDATEFLAG = 'U'.
zORDER_HEADER_INX-SALES_ORG = 'X'.
zORDER_HEADER_INX-DISTR_CHAN = 'X'.
zORDER_HEADER_INX-DIVISION = 'X'.
zORDER_HEADER_INX-PMNTTRMS = 'X'.
**********ITEM ***************************************
zORDER_ITEMS_IN-ITM_NUMBER = '00020'.
zORDER_ITEMS_IN-MATERIAL = 'F1202'.
zORDER_ITEMS_IN-PLANT = 'BP01'.
zORDER_ITEMS_IN-ITEM_CATEG = 'TAS'.
zORDER_ITEMS_IN-SHIP_POINT = 'BP01'.
zORDER_ITEMS_IN-COMP_QUANT = l_comp_qty.
zORDER_ITEMS_IN-TARGET_QTY = l_comp_qty.
zORDER_ITEMS_IN-TARGET_QU = 'ST'.
append zORDER_ITEMS_IN.
zORDER_ITEM_INX-ITM_NUMBER = '00020'.
zORDER_ITEM_INX-UPDATEFLAG = 'U'.
zORDER_ITEM_INX-MATERIAL = 'X'.
zORDER_ITEM_INX-PLANT = 'X'.
zORDER_ITEM_INX-ITEM_CATEG = 'X'.
zORDER_ITEM_INX-SHIP_POINT = 'X'.
zORDER_ITEM_INX-COMP_QUANT = 'X'.
zORDER_ITEM_INX-TARGET_QTY = 'X'.
zORDER_ITEM_INX-TARGET_QU = 'X'.
append zORDER_ITEM_INX.
*********SCHEDULE LINE******************************
refresh zORDER_SCHEDULES_IN.
clear zORDER_SCHEDULES_IN.
zORDER_SCHEDULES_IN-ITM_NUMBER = '000020'.
zORDER_SCHEDULES_IN-SCHED_LINE = '0001'.
zORDER_SCHEDULES_IN-REQ_DATE = '20070525'.
zORDER_SCHEDULES_IN-DATE_TYPE = '1'.
zORDER_SCHEDULES_IN-SCHED_TYPE = 'CS'.
zORDER_SCHEDULES_IN-GRID_VALUE = 'BLK2728'.
zORDER_SCHEDULES_IN-REQ_CATEGORY = '1DE'.
zORDER_SCHEDULES_IN-REFOBJTYPE = '/AFS/ORDER'.
zORDER_SCHEDULES_IN-REQ_QTY = g_qty.
append zORDER_SCHEDULES_IN.
refresh ZSCHEDULE_LINESX.
clear ZSCHEDULE_LINESX.
ZSCHEDULE_LINESX-ITM_NUMBER = '000020'.
ZSCHEDULE_LINESX-SCHED_LINE = '0001'.
ZSCHEDULE_LINESX-UPDATEFLAG = 'U'.
ZSCHEDULE_LINESX-REQ_DATE = 'X'.
ZSCHEDULE_LINESX-DATE_TYPE = 'X'.
ZSCHEDULE_LINESX-SCHED_TYPE = 'X'.
ZSCHEDULE_LINESX-GRID_VALUE = 'X'.
ZSCHEDULE_LINESX-REQ_CATEGORY = 'X'.
ZSCHEDULE_LINESX-REFOBJTYPE = 'X'.
ZSCHEDULE_LINESX-REQ_QTY = 'X'.
append ZSCHEDULE_LINESX.
CALL FUNCTION '/AFS/BAPI_SALESORD_CHANGE'
EXPORTING
SALESDOCUMENT = so_no
ORDER_HEADER_IN = zBAPISDHD
ORDER_HEADER_INX = zORDER_HEADER_INX
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
TABLES
RETURN = zRETURN
ORDER_ITEM_IN = zORDER_ITEMS_IN
ORDER_ITEM_INX = zORDER_ITEM_INX
ORDER_SCHEDULE_LINES = zORDER_SCHEDULES_IN
ORDER_SCHEDULE_LINESX = ZSCHEDULE_LINESX.
PARTNERS =
PARTNERCHANGES = zPARTNERCHANGES
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
*CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = so_no
ORDER_HEADER_IN = zBAPISDHD
ORDER_HEADER_INX = zORDER_HEADER_INX
TABLES
RETURN = zRETURN
ORDER_ITEM_IN = zORDER_ITEMS_IN
ORDER_ITEM_INX = zORDER_ITEM_INX
PARTNERS = zORDER_PARTNERS
PARTNERCHANGES = zPARTNERCHANGES
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
SCHEDULE_LINES = zORDER_SCHEDULES_IN
SCHEDULE_LINESX = ZSCHEDULE_LINESX.
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
data : s_BAPIRET2 like BAPIRET2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
importing
return = s_bapiret2. -
No text redetermination once change the ship to party
Hello Experts,
We have text like picking/packing/shipping text in ship to party. and we have assigned such text value in ship to party.
Suppose:
Ship to party A has shipping text: ABCDEFG
Ship to party B has shipping text: 12345678
I create the sales order with ship to party: A and system determine text (header level) as ABCDEFG, I save it later i change the ship to party in sale order from A to B. according to business logic system should change the shipping text from ABCDEFG to 12345678 once I change the ship to party from A to B. But it is not happening.
Even though changing the ship to party from A to B, system is not redetermining text and I am wondering why it's happening?
Is it the standard functionality ? why it is happening ?
Thanks,How text will be redetermined if the ship to party is changed
Please refer the above tread, System does not re determine the text if Ship to party is changed, it changes only for SP, also if you want to redetermine the SH text then refer the notes also which was mentioned in the above tread.
thanks,
Srinu. -
How to change the ship to party when PO raised and sent to vendor in the 3rd party sales?
Edited by: Lakshmipathi on Aug 28, 2011 8:05 AM
Please use the subject effectivelyHi gaddammai ,
u can change Ship to Party goto va02 tcode then Goto -> Header -> Partner...
but u should have shipping point determination in place
u can change any partner at sales order level only Sold to Party remains unchanged in standard sap System.
Thanks & Regards,
Deepaks -
Change of ship-to party right before dispatch on delivery (not order)
have a client that consistently has to change the ship-to party right before dispatch. the client has customers that are dealers, who in turn have sub-dealers. the dealers very rarely accept shipment to their address, they want the delivery posted to the sub-dealers and this can change at the last minute. as of right now, the addresses for sub-dealers is not maintained by the client, but they would like to have this option.
i would like to maintain the address of the sub-dealers. but once the delivery document is created the ship-to party is greyed out, how would i change this, so i can enter a new ship-to party? the address changes last minute, but after the delivery has been created.
thanks in advance!Hi
In standard SAP it is not possible.
Once , you create a Delivery document, you can not change the Ship-to-party. Ship-to-party is a Header data in Delivery.
If you want the change then you have to delete the Delivery.
Make your client understand that it is not only Ship-to-party, so many other related data will get redetermine once the Ship-to-party is changed.
For example, When Ship-to-party is changed, Route will be redetermined, Tax will be redetermined, partial delivery agreement may be different etc.
The new Ship-to-party may have a choice of different Plant also.
Normally, the above data are determined in Sales order, therefore you can change those in Sales order only and NOT possible to change in the Delivery document. -
Change of Ship-to-party address in IC WebClient
Dear Guru's,
Acc. my business requirement i need to configure IC-webclient,
Scenario1:- End User should be able to change the Ship-to-party address (on customers request) thru IC-Webclient. (in this scenario sold-to-party & ship-to-party are 2 different addresses.)
can ny1 guide me on this.
Thanx in advance
-Nirav.Hi,
Nirav
Pull in the Transaction BP view from the transaction launcher .This will have the BP transaction which will have the details in edit mode for you .You can restrict the views with authorisations for the user.
Hope this will resolve your Issue
Regards
Raj
Don't forget to reward!! -
Change of ship-to party right before dispatch
have a client that consistently has to change the ship-to party right before dispatch. the client has customers that are dealers, who in turn have sub-dealers. the dealers very rarely accept shipment to their address, they want the delivery posted to the sub-dealers and this can change at the last minute. as of right now, the addresses for sub-dealers is not maintained by the client, but they would like to have this option. so, a 2 part question, do we have to maintain the addresses for the sub-dealers or can we use them as a one-time customer? and 2, how would be change the ship-to address last minute right before dispatch?
thanks a bunch!Hi Astro,
Option 1 - Since most of the Deliveries are shipped to the Sub Dealers, it is better to maintain Ship to Party Master Record for these Sub dealers and assign the same to the Sold to Party. Here, you have to justify the correct Ship to Party and maintain or change in Sales Order before the Delivery is created.
Option 2 - Maintain one single Ship to Party for all the Sub Dealers and you can change the address of the Ship to party as required at the last minute before goods issue.
Hope this will be helpful to u. let me know if anything.
Rgds,
Ravi. -
Predefine ship-to party at VA01
Hi
Is there any possibility to predefine the ship-to party in a sales document.
When starting transaction VA01 e.g. from another program
its possible to predefine values via parameter ids
(VKO -> VKORG,etc.)
I also found an user exit to set the sold-to-party in a sales document but none to set the ship-to-party.
(The field is KUWEV-KUNNR in Dynpr 4701 of SAPMV45A)
Is there posiibility to solve my problem?
Thanks in advanceHi Sasi,
thanks for your advise but
using your hint only sets the ship-to-party
when changing from overview to the header data.
But i need to set the ship-to-party at the
overview dynpro, that directly appears after entering data at the selection screen of VA01.
So i have to use an user exit
at load of the overview dynpro.
E.g. when using userexit VA450002 or parameter id 'VAU'
i can (only) set the customer.
cheers tom -
Exit for changing Pricing Conditions with change in Ship to party
Hi All,
In transaction VA01/ VA02 the pricing conditions are getting calculated with respect to the Sold-to-party no.. Instead I wanted it to get calculated with respect to the Ship-to-party. Please guide me with an Exit that i can use, or any other way of solving this.
Thanks in Advance.Hi Roberto,
I am creating a sales order with transaction VA01 using a Sold-to-party say 1 and a Ship-to-party 2. While saving the order the tax calculations (if it is interstate - cst and intrastate - vat) are happening with respect to the Sold-to-party.
But I want it to happen with respect to the Ship-to-party. Is there anyway of changing this tax calculations in the pricing condition to take place with respect to my Ship-to-party. -
How text will be redetermined if the ship to party is changed
Hello,
The test is maintaining at ship to party level and if the ship to party is changed how the text will be redetermined here in the order the text is not redetermining. kindly give the solution for redetermination on this.
Regards,
Kishore.aHi Kishore,
Sorry, note 784371 is not released to customer anymore.
Please refer to note 548615, point 5 about the description of this standard system behavior.
You want to change the SAP standard behavior described above with a user-defined modification and trigger the text determination in dependency of other fields (for example ship-to party).
Take into account that all header texts and item texts entered manually are lost when you call you own text determination again.
If you still want to modify, use the following include for the item
data:
> FV45PFAP_VBAP_FUELLEN_TEXTE
and for the header data, use the include
> FV45KFAK_VBAK_FUELLEN_TEXTE
In both includes, the RV_TEXT_COPY function module is called. A user exit is not provided here.
Ensure that the modification is retained (using transaction SPAU) when you import a new Support Package after an upgrade.
Thanks,
Alex -
Transportation Zone in the ship to party changed after delivery
Dear Guru,
Earlier when the user was creating sales order and the delivey the transportation zone for the ship to party was france, now before billing he has changed the transportation zone to netherlands.
When he created billing, tax MWST was not getting triggered. i asked him to create pricing condition for Export tax, but it is not heling us.
If he changes the transportation zone for the ship to party and try to crete billing will it help to trigger MWST.
Reg,
NZHi Nayaz,
You should maintain create condition records for MWST from vk11 in access sequence like (departure country/destination country, domestic, and export taxes). additionally, maintain your route determination regarding of your requirement and customer and material master billing tax tab should be maintained according to this configurations.
I hope these will solve your problem.
Regrds, -
Is there any user exit to change the UOM of a material while creating sales
Hi experts,
I have a requirement to change the UOM of the item material in sales order while creating. Could anybody help me in finding the correct user-exit to change the UOM.
Thanks,
srinivas.Hi Ravish,
I am already changing the UOM in the same include and in the subroutine "USEREXIT_MOVE_FIELD_TO_VBAP". But it is again over writing in the standard program. What I need to do, to remain same UOM.
Thanks,
srinivas. -
Change of Ship to Party on sales order after invoice
Hi all,
I have created a sales order, created a despatch advice and then created an invoice. After that i opened sales order and changed ship to party there. System is allowing me to change ship to party on sales order after invoice. I want that system should not let me change ship to party on sales order after invoice.
How can i do that as this is an audit issue as we have different prices for different ship to parties.
Please respond.
Best Regards,
AI.Hi
You have two options
1. create a transaction variant in T.code SHD0 for VA02 and make the field as display in the variant. But remember that you will not be able to use standard T.code VA02 after this, you need to make and use a "Z" t.code like ZA02
2. Take the help of your ABAPER and ask him to find a screen exit in the sales order PBO module, where he will be able to grey out the ship to party field.
Hope this helps
Chandra Kiran -
Schedule date changing with change in ship-to-party address
Hi Experts,
When ship-to-party address in the "Partners" (tab_pg) is changed from one country to the other in the header level, the confirmed quantity date is being changed automatically in the Schedule lines (tab_pg).
Any help is highly appreciated........Hi Sunil,
Whenever the ship to party is changed on the Sales order the Country (picked from ship to party master) will be redetermined. Few other parameters being redetermined are Shipping point, route, transit time etc because of the Ship-To-party(partner receiving the goods) chnages in Sales order. According to that the above parameters will be changed in SO.
Hope this helps you.
Thanks
Arun
Maybe you are looking for
-
F110 Automatic Payment without invoice
Hi I have one vendor that I want to auto pay him without an open item. It sould be supplier against bank without clearing a specific open items for this vendor. Is it posible? Thanks Ofer
-
One calendar is not shown in sunbird
Hi, I set up the ical server and sunbird. There are 4 calendars for one user that work fine for iCal client. When these calendars are integrated in sunbird there are only 3 of 'em shown. The fourth one is not shown at all which is maybe because of th
-
I have imovies 2, how do i upgrade to imovies 10 or more?
HI, i bought imovies about 18 months ago, and i got thr version 2.0. How can i upgrade? I think they arenup to imovies 11.0 now? In my AppStore i do not get an 'upgrade button' to click on :/ thanks for your help
-
Hi All I want to know about the difference between bw3.5 and bi7 cos am working in bw3.5 and i dont have any idea about bi7 i want to know from the basic wil you send me any document or snap shots regarding the bi7
-
Hi guys, I've been used to create web applications by using JSP and Servlet technologies as well as NetBeans 5.5 for business classes development and Dreamwaver for visual web pages development. So far so good, however, from now on, due to customer r