LSMW BAPI Open Sales Order Load - How to update conditions?
Hello gurus,
I was using the BAPI SALESORDER_CREATEFROMDAT2 to upload open sales orders. Wanted to overwrite the default PR00 pricing condition that gets pulled from the customer-material info record, with the price that was existing in the original legacy system when the order was created there. Used the E1BPCOND structure in the Idoc, but since there is no such thing as a E1BPCONDX structure(corresponding to the structure BAPICONDX in the origial BAPI) where you could specify whether the condition should be updated, added or deleted, it adds a second PR00 condition with the legacy system price. The original PR00 condition with the customer-material record price still stays there. Eventhough the order seems to be taking into consideration only the second one I added, to determine the total pricing, I am worried the original sitting there, might cause problems down the document flow. Is there a way to update the existing PR00 condition(rather than adding a new one) on the order, through some flag in the Idoc structure that I am not aware of?
Would greatly appreciate an answer ASAP.
Thanks a lot in advance,
Wayfarer
Thanks and appreciate your taking your time to reply, Gerard, I guess my problem is, we are still on 46C, and the only message type available for this BAPI is SALESORDER_CREATEFROMDAT201. Just called a friend who is on ECC 60 who confirmed that the later version of this message type, SALESORDER_CREATEFROMDAT202 has the E1BPCONDX structure. I don't have that option since on LSMW it automatically defaults to the only message type(and method CREATEFROMDAT2) that is available, when you choose business object BUS2032. Guess I am out of luck, unless you have any other options to suggest.
Thanks,
Wayfarer
Similar Messages
-
Open Sales Order values not getting updated after run RVKRED77 & RVKRED88
Hiiii,
In Production Server. We run the reports RVKRED77 & RVKRED88. Credit info structure and and Open Sales Order values not getting updated. In FD32, Status - Sales value it showing '0". At the time of creating Sales Order Dynamic Credit check not happening coz of Tables S066 not updating. Please provide me Solution.
Best Regards,
Sridhar . PDear Heagal,
I followed your suggestions and implemented in the Development and moved the changes in to Quality Server. I tested it thoroughly by creating New Customer and maintained Credit Limit. I come to know that Problem is in all Servers. I made 3 changes.
1. In Pricing Procedure Sub Total A it was not maintained against Net value. I placed it.
2. Removed Credit groups for Delivery Type.
3. In OVA8 i maintained Max. Doc Value :99,999,999.00 before it was with 1.00
I checked the OMO1 Settings it was Asynchronous. As SAP Notes Suggesting to use Synchronous but here it's a client setting. So, It's Can't possible to change. Changes will affect other Company Codes.
Tested both in DVP and QTY Dynamic Credit Check is working Perfectly and Status in FD33 Sales Value field getting update.
If i move these changes in to Production, Will i need to run the reports again or not? How it will affect on Old Cusomer Billing and Credit Limit data. For few of the Customers the Credit Limit data it was exceeded. Please provide me advice. The issue need to be Solved immediately.
Best Regards,
Sridhar -
LSMW-BAPI Method sales order creation
Hi,
Please any one guide me to create sales order using bapi method.
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Jul 1, 2011 9:23 AMHi
USE AG German key word fro sold to part and check if there is any issue with leading zeros.Post if need more help . You can pass two record for one sales order in partner function. Please check that also. -
Open sales order not getting updated in FD32
HI
We are configuring Credit management, and found that the open sales orders are not getting updated in FD32.
I have checked all the settings in OVA8 and all are working fine. This is a Static credit check and system is blocking the customer in case, the limit is exceeded. But the values are not getting reflected in FD32, for open sale orders, that are not blocked.
Info structure S066 in OMO1 all are configured perfectly. I have run F.28 and no log was issued.
Request to suggest other reasons for not getting updated in the table.
I have gone thru the previous threads, but cud not find any solution.
Regards
Vamsi Javaji.Hi Vamsi Javaji
First of all check in OVA8 wheather you have checked Open sales orders feild or not . Secondly check in your pricing procedure wheather you have maintained Subtotal A or not for the Net Value .Also check wheather you have assigned to your sales document type correctly or not Finally check in OMO1 wheather S066 has been assigned correctly or not
Check wheather you have assigned the Credit control area to the customer in CMR , in sales tab
Regards
Srinath -
How to create open sales order using BAPI....?
Hi Guru's,
please help me how to create open sales order and which BAPI i have to use for open sales order.
please provide any program logic related to this or step by step process.....
that would be helpful to me.
thanks in advance...
Srinivas....Hi sreenu,
Open PO or Open sales order means that the complete cycle is not complete. That means the Sales order is not completely delievered or is not billed or is not paid for. Only once the cycle is completed the order status shows as complete untill then its Open.
You can use VA05 to find open sales orders.
Similarlry open PO's are those PO's whos inbound delivery is not complete or whos goods receipt is not complete and whos payment is not done to the vendor
U cannot directly find the open PO and open SO from any table.
That u have to calculate from the status of the PO and SO and then check wheteher that is complete or not.
U have table VBUP for SO status.Check out the fields in that table
pls see the below link.
http://abaplovers.blogspot.com/2008/02/bapi-sales-order-create-code.html
http://msdn.microsoft.com/en-us/library/cc185190.aspx
thjanks
karthik -
Open sales order migration using lsmw
Hello guys iam migrating open sales order and iam having header fields
AUART
VKORG
VTWEG
SPART
KUNNR
KUNNR
BSTKD
BSTDK
VBEGDAT
VENDDAT
item fields are
MATNR
ZMENG
SPART
ISMACTIVATION
what is the standard object available for this migration in lsmw.?i thought of using
0090 salesdocument standrd object using direct input method but field ismactivation is not available in that object.
if i go for bapi method salesorder_createfromdat2 i couldnt find the above fields for mapping in that object.but some of the guys in this forum used this bapi method for this type of migration i dnt how they did it can u please suggest solution for this .
Regards
JanapathiHi!
In the given BAPI, the field names are different. You have to match them using their description or data type.
If you check this BAPI in transaction SE37, on hte Import tab, click on the BAPISDHD1ref type.
Here you can find the field DOC_TYPE (type AUART). With this way, you can find the matching fields.
Regards
Tamá -
Open Sales Order Migration - LSMW (Guide)
Hello
I search for some guide how to migrate with LSMW open orders. I have earlier migrated with LSMW other data, but not open sales orders.
Should I use Batch or BAPI? If BAPI, which Methode and Bisness-Object use? Can someone send me instruction step-by step?
Thanks in advance.
/MargaretHi,
If you want to use LSMW then you need to create two recordings,
Header Data(T.Code: VA01)
Item Data(T.Code: VA02)
Header Recording Data:(VA01)
1.Sales OrderType
2.Sales Org
3.Distr Chl
4.Div
5.Sold-To
6.PO No.
7.Data
8.Plant(If required)
9.Material (First line material)
10.Qty & mandatory field as per ur system requirement.
Item Recording Data:(VA02)
1.Sales Document No.
2.Item No.(20,30 etc)
3.Material Code
4.Qty & mandatory field as per ur system requirement
I uploaded the same way...[LSMW|http://www.sap-img.com/general/lsmw-steps-for-data-migration.htm]
Barathi -
Hello Friends
I want to find if anybody can guide me on how to get all open sales order tables , i want to create a format and create a flat file for uplodading the file , for this what do i need and how do i do it.
Also for creating LSWM can i use the existing one which i can just Assign the New file to the existing one .
Regards.Dear Mehmood,
I want to find if anybody can guide me on how to get all open sales order tables
You want to extract all the open sales orders- which you can get from Table:VBUP key in overall document status in selection screen ( You can use VBUK also- but if there are certain sales orders in which some of the items are completed or few of them open, using VBUK - you will not get exact records)
Secondly, you can get the data by using Query also- in SQVI
design a query with VBAK / VBAP & VBUP
so that from VBAK you can give time period & sales area details
from VBAP - you can enter plant relevant details to filter certain records & item category as well
where as VBUP- filter wth the status.
once downloaded store in flat file.
Now Create LSMW object by using batch input recording method. after mapping the relevant fields,
prepare the flat file in such a - it suits to the upload file / recording file. then you can upload the already downloaded n stored open sales orders in flat file.
Hope this is what you are looking for.
Regards,
ReazuddinMD -
Change of open sales order : using BAPI
Hi
this is ravi
can any one help me on this topic
1)change of open sales order using BAPI .With appropriate reason( like header level reason)
thanks & regardshI,
chk this FM BAPI_SALESORDER_PROXY_UPLOAD how the FM BAPI_SALESORDER_CHANGE was used
Check this code,
REPORT Z_SALES_ORDER_CHANGE
NO STANDARD PAGE HEADING
LINE-SIZE 132
LINE-COUNT 65(0)
MESSAGE-ID ZZ.
TABLES: VBAP.
DATA:
V_FILEIN(90) TYPE C,
V_RECIN TYPE I,
V_RECVBAP TYPE I,
V_RECORDER TYPE I,
V_VBELN LIKE VBAP-VBELN,
ORDERHEADERINX LIKE BAPISDH1X.
DATA: BEGIN OF I_ORDERS OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
BRGEW(18) TYPE C,
VOLUM(18) TYPE C,
END OF I_ORDERS.
DATA: BEGIN OF I_OUTPUT OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
GEWEI LIKE VBAP-GEWEI,
BRGEW LIKE VBAP-BRGEW,
VOLUM LIKE VBAP-VOLUM,
CKWGT TYPE C,
CKVOL TYPE C,
END OF I_OUTPUT.
DATA: BEGIN OF ORDERITEMIN OCCURS 0.
INCLUDE STRUCTURE BAPISDITM.
DATA: END OF ORDERITEMIN.
DATA: BEGIN OF ORDERITEMINX OCCURS 0.
INCLUDE STRUCTURE BAPISDITMX.
DATA: END OF ORDERITEMINX.
DATA: BEGIN OF RETURN OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA: END OF RETURN.
DATA: BEGIN OF BAPIRETURN OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA: END OF BAPIRETURN.
PARAMETERS:
P_PATH(45) TYPE C DEFAULT '/usr/users/ftpsapom/' LOWER CASE,
P_FNAME(32) TYPE C DEFAULT '/sweetjo.txt' LOWER CASE.
START-OF-SELECTION.
CONCATENATE PATH AND FILE NAME INTO ONE VARIABLE
CONCATENATE P_PATH P_FNAME INTO V_FILEIN.
OPEN DATASET
IF V_FILEIN IS INITIAL.
MESSAGE E002 WITH 'FILE' V_FILEIN 'DOES NOT CONTAIN ANY DATA!'.
ELSE.
OPEN DATASET V_FILEIN
FOR INPUT
IN TEXT MODE.
IF SY-SUBRC = 0.
READ DATASET
DO.
READ DATASET V_FILEIN INTO I_ORDERS.
IF SY-SUBRC = 0.
APPEND I_ORDERS.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET
CLOSE DATASET V_FILEIN.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'ERROR - CLOSING' V_FILEIN.
ENDIF.
ELSE.
MESSAGE E002 WITH 'ERROR - COULD NOT OPEN' V_FILEIN.
ENDIF.
ENDIF.
SORT AND REMOVE DUPLICATES FROM I_ORDERS
SORT I_ORDERS BY VBELN POSNR.
DELETE ADJACENT DUPLICATES FROM I_ORDERS.
POPULATE I_OUTPUT
LOOP AT I_ORDERS.
SHIFT I_ORDERS-POSNR LEFT DELETING LEADING SPACE.
CONCATENATE '0' I_ORDERS-POSNR INTO I_ORDERS-POSNR.
SELECT SINGLE BRGEW VOLUM
FROM VBAP
INTO (VBAP-BRGEW, VBAP-VOLUM)
WHERE VBELN = I_ORDERS-VBELN
AND POSNR = I_ORDERS-POSNR.
IF SY-SUBRC = 0.
IF VBAP-BRGEW = 0.
I_OUTPUT-CKWGT = 'X'.
ENDIF.
IF VBAP-VOLUM = 0.
I_OUTPUT-CKVOL = 'X'.
ENDIF.
I_OUTPUT-VBELN = I_ORDERS-VBELN.
I_OUTPUT-POSNR = I_ORDERS-POSNR.
I_OUTPUT-GEWEI = 'ST'.
I_OUTPUT-BRGEW = I_ORDERS-BRGEW.
I_OUTPUT-VOLUM = I_ORDERS-VOLUM.
APPEND I_OUTPUT.
CLEAR: I_OUTPUT.
ENDIF.
V_RECIN = V_RECIN + 1.
ENDLOOP.
POPULATE BAPI DATA AND RUN BAPI
CLEAR: ORDERHEADERINX, ORDERITEMIN, ORDERITEMINX,
RETURN, BAPIRETURN.
REFRESH: ORDERITEMIN, ORDERITEMINX, RETURN, BAPIRETURN.
ORDERHEADERINX-UPDATEFLAG = 'U'.
LOOP AT I_OUTPUT WHERE CKWGT = 'X' OR CKVOL = 'X'.
V_RECVBAP = V_RECVBAP + 1.
IF I_OUTPUT-VBELN <> V_VBELN AND SY-TABIX <> 1.
V_RECORDER = V_RECORDER + 1.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = V_VBELN
ORDER_HEADER_INX = ORDERHEADERINX
TABLES
RETURN = RETURN
ORDER_ITEM_IN = ORDERITEMIN
ORDER_ITEM_INX = ORDERITEMINX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPIRETURN.
WRITE OUT RETURN
LOOP AT RETURN.
WRITE: / RETURN.
ENDLOOP.
WRITE: / BAPIRETURN.
SKIP.
CLEAR: ORDERITEMIN, ORDERITEMINX,
RETURN, BAPIRETURN.
REFRESH: ORDERITEMIN, ORDERITEMINX, RETURN, BAPIRETURN.
ENDIF.
ORDERITEMIN-ITM_NUMBER = I_OUTPUT-POSNR.
ORDERITEMIN-UNTOF_WGHT = I_OUTPUT-GEWEI.
IF NOT I_OUTPUT-CKWGT IS INITIAL.
ORDERITEMIN-GROSS_WGHT = I_OUTPUT-BRGEW.
ORDERITEMINX-GROSS_WGHT = 'X'.
ENDIF.
IF NOT I_OUTPUT-CKVOL IS INITIAL.
ORDERITEMIN-VOLUME = I_OUTPUT-VOLUM.
ORDERITEMINX-VOLUME = 'X'.
ENDIF.
APPEND ORDERITEMIN.
ORDERITEMINX-ITM_NUMBER = I_OUTPUT-POSNR.
ORDERITEMINX-UNTOF_WGHT = 'X'.
ORDERITEMINX-UPDATEFLAG = 'U'.
APPEND ORDERITEMINX.
V_VBELN = I_OUTPUT-VBELN.
ENDLOOP.
RUN BAPI ON LAST ORDER
IF NOT ORDERITEMIN IS INITIAL.
V_RECORDER = V_RECORDER + 1.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = V_VBELN
ORDER_HEADER_INX = ORDERHEADERINX
TABLES
RETURN = RETURN
ORDER_ITEM_IN = ORDERITEMIN
ORDER_ITEM_INX = ORDERITEMINX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPIRETURN.
WRITE OUT RETURN
LOOP AT RETURN.
WRITE: / RETURN.
ENDLOOP.
WRITE: / BAPIRETURN.
SKIP.
ENDIF.
WRITE OUT RECORD COUNT FROM FILE
WRITE: / 'RECORD COUNT FROM FILE ', V_RECIN.
SKIP.
WRITE OUT RECORD COUNT FROM FILE
WRITE: / 'RECORD COUNT OF LINES TO CHANGE ', V_RECVBAP.
SKIP.
WRITE OUT RECORD COUNT FROM FILE
WRITE: / 'RECORD COUNT OF ORDERS TO CHANGE ', V_RECORDER.
SKIP.
TOP OF PAGE
TOP-OF-PAGE.
WRITE:/1(5) TEXT-H01, 6(8) SY-DATUM MM/DD/YY,
100(8) TEXT-H02, 126(8) SY-PAGNO.
WRITE:/1(5) TEXT-H03, 6(8) SY-UZEIT USING EDIT MASK '__:__:__',
20(77) TEXT-H04,
100(8) TEXT-H05, 108(25) SY-REPID.
WRITE:/1(6) TEXT-H06, 8(12) SY-UNAME,
20(4) TEXT-H07, 25(32) SY-HOST,
100(13) TEXT-H08, 121(8) SY-SYSID,
129 '/', 130(3) SY-MANDT.
ULINE.
SKIP
<b>Reward points</b>
Regards -
LSMW for open notifications,open sales order & open service order
Hi Gurus,
Can anyone please tell me how to go about writing LSMW's for open notifications,open sales order & open service order.
This is for service processing in CS ,where has the scenario is
Create Notification (IW51) --> create Sales Order(Multiple Line Items) ( VA02) --> Create Service Order ( IW32)
Service order is automatically (Item Proposal) generated w.r.t Sales Order (multiple line items)
How to I do the recording for transactions in such a scenario.
Please suggest!
Thanks!
Vinodyou can use the below LSMW IDOC method
SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
SERVICENOTIFICATION_CREATEFROM Create service notification
SERVICE_CREATE Creation of a Service Master Record
CARNOT Delivery: Shipping notification
DESADT Shipping notification
DESADV Delivery: Shipping notification
INOTIF Notifications
INTUPD Notification Status Update
ISU_ADVICE IS-U Deregulation: Notification
ISU_CHANGE_REQUEST IS-U: Notification of Change to
ISU_MAINT_SO IS-U Dereg.: Notification of Dev
ISU_REMITTANCE_ADVICE Transfer Notification -
How to update pricing in open sale order
Hi all
in open sale order suppose my basic price has been changed .how Can i update all open sales order basic price in one shot.Dear Sachin,
Please follow the point as given below;
1. In VTFL for your item category maintain pricing type as B if it is delivery related billing and if it is order related billing VTFA maintain pricing type as B and one more thing maintained Billing Quantity as C if you using VTFA and Billing Quantity as D if you using VTFL.
2. Create the new condition records in VK11 for your new price ( Do not change the existing condition record in VK12) with proper validity dates
3. Use update button in billing the system will pick the new record by accessing VK11 in billing.
Try this, it will work.
Regards,
Bharat B -
How to summarize Open sales order credit value
Hi, friends.
I am designing Add-on report about credit exposure.
I found the relevant tables of Credit Limit in FD32
KNKK
S066
S067
Then, I would like to show the document details of open sales order credit value in the report.
I tried to summarize the open sales order amount from VBAK, VAUK, VBAP, VBUP.
However, it doest match to the amount in S066 table.
Can anyone tell us how to summarize Open sales order credit value from SD documents?
Regards,
YuSudheer,
You need to check the update rule given in the definition of the Credit control Area which you are using for credit management. If you want only the open deliveries then you need to have update rule 15 in the credit control area.
In the credit controal settings, you need to have settings for the credit check at the delivery level.
Hope this will solve your issue.
Regards,
Chetan
Edited by: Chetan Gupte on Jul 15, 2010 8:56 PM -
How to include ZPR0 pricing condition in an exisiting open sales order
Hi...
i have an existing open sales order report. i wanted to include a column of ZPR0 condition in the existing ALV grid..i hav to add this ZPR0 pricing consition for intercompany STO...The delivery plant is LFA1-WERKS. how do i proceed.??? plz help me!!For sales order..
vbap-werks WAS MY REFERNCE IN THIS...
i fetched (VKORG,VTWEG) from t001w.. with that i gt KNUMH(FROM A004) table.. with the knumh(condition record number i gt KBETR AND KONWA from KONP.....
Similarly i gta do it with an STO.
LFA1-WERKS is the delivery plant.
how shud i proceed in this -
How to find the Open sale orders till date for given plant and material ?
Hi experts,
I have a requirement to calculate the open sale orders for a given plant and material. I have tried in VA05 wherein i can get only for the material and sales area combination. From the document nos obtained from VA05 i can then find the plant. But my question is how do i get the output of VA05 into my progra. (can i use submit for a module pool report ).
Also if ther is some other standard table or Function module to find the open sale orders till a given date ,it will be even more helpful....in which case i can drop the VA05 route.
Kindly help
Thanks in advance
AshwinHi Ashwin,
You can use SAP Tables VBAK and VBUP to get to know if the document is complete or not.
VBUK-GBSTK is the field that will give you the status of the Sales Order .
VBUK is used at header level , whereas VBUP is used for Item level.
So in your case what I would do is :
Get the Sales Orders that satisy the plant and material criteria from VBAP table , take this Sales Document numbers and go to VBUK or VBUP table to get the Sales Order Status.
If I need to find the open quantity as well I will link to VBFA table based on the document number.
Reward if helpful.
Thanks,
Imran -
BAPI or FM to get open sales orders to material like TC VA05N
Hi,
i'm searching for a bapi or fm to get a list with all open sales orders to a material like the tc va05n this do. Maybe some of you know such a bapi or fm.
I tried the fm SD_SELECT_SALES_DOCUMENTS but i don't get the result i hoped.
Would be happy if someone could help me.Hello Alexander,
To get Open Sales order has VA05N use the Function Module
RV_SALES_DOCUMENT_VIEW_3
We need to pass value to the Importing parameters VBCOM
To get the open sales order
VBCOM-VKORG = sales organisation
VBCOM-ZUART = 'A'
VBCOM-TRVOG = '0'
VBCOM-STAT_DAZU = 'X'
VBCOM-NAME_DAZU = 'X'
VBCOM-KOPF_DAZU = 'X'
VBCOM-VBOFF = 'X'
VBCOM-AUDAT = Begin Date
VBCOM-AUDAT_BIS = end date
By passing this variable you will get the all open sales for given sales organisation and given date.
Maybe you are looking for
-
How to specify image directory in Tomcat servlet?
The following will display the counter.png image stored in my Tomcat webapps/ROOT/images directory (even from a servlet at webapps/counters):outText.println("<IMG SRC=\"/images/counter.png\">");but what's the magical incantation to get at webapps/cou
-
In which SAP table does the GUI statuses gets stored ? Thanks and Regards, Linda.
-
How do I stop iPhoto from launching?
How do I stop iPhoto from launching? I usually find it's much easier to just use Photoshop to edit my pictures... iPhoto is slow as molasses in January. How do I stop iPhoto from launching everytime I connect my camera? I looked everywhere and can't
-
I updated to ios 6 and lost contact list. how do i retrieve?
-
How to invoke JSF With Standard Urls and parameters
Hi, Could some one please help me how to invoke JSF with standard Urls and parameters? My requirement is: http://localhost:8080/myapp/faces/jsf_page.jsp?trackerID=11&viewPage="products" then i want to save the tracker details into database and redire