How can i show sales order details for specific partner in view
Hi All,
My Requirement is that I want to display the sales order id,sataus,amount in sales order assignment block in Customer FACTSHEET. I created a new componnet and new view for Sales Order View using BTQRSlsOrd BOL Entity in ONEORDER I want to diplay sales order id ,status ,amount for specifc business partner which i selected from Account Tab in WEB UI.How can i bind my ( view or context node or context ) so that it shows details of sales order for specific business partner.
Thanks in Advance.......
Vishwas Sahu
Hi Vishwas
I hope the following link helps you in setting up the sales order in account fact sheet:
Add Sales Order to Account Factsheet
If you are on CRM 2007 SP03 then you might need the following note:
Note 1165224 - Search result is not showing up in IC account factsheet.
Regards
Rupesh
Similar Messages
-
How to get customer / sales order details for VBBS table?
Hi Friends,
I have a requirement to create a report that will give the details of sales order ( VBELN ) and customer ( KUNNR) details from the sales requirement totals record table ( VBBS )
Currently we have a report that just gives out the VBBS table entries for plant and material combination. As you are aware, the VBBS table contains the sales / deliveries requirements as displayed in MD04 transaction.
Now there is a requirement to have the customer ( KUNNR ) and sales order (VBELN ) detail for each individual requirement totals.
I checked the VBBE table ( sales requrirement : individual records ) but I cannot find any relationship between VBBS and VBBE. If there is a material / plant in VBBS , the same entry does not exist in VBBE.
Please suggest if there is any other table to get this detail.
Thanks
SatyaTables are related.
MATNR
WERKS
MBDAT
LGORT
CHARG
etc fields are common in both VBBS and VBBE.
May be you can generate a condition a fetch data using this.
I hope it helps.
thanks -
Hi experts . how can we know the stock details for a perticular plant?
hi experts . how can we know the stock details for a perticular plant
check this code
REPORT YSG_MATSTK_REP LINE-SIZE 220
LINE-COUNT 50(5).
*& DATA DECLARATION *
TABLES: MARA, "GENERAL MASTER DATA
MARC, "PLANT DATA FOR MATERIAL
MARD, "STORAGE LOCATION DATA FOR MATERIAL
MBEW, "MATERIAL VALUATION
MVKE, "SALES DATA FOR MATERIAL
MAKT. "MATERIAL DESCRIPTION
DATA: BEGIN OF I_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,"MATERIAL NUMBER
MBRSH LIKE MARA-MBRSH,"INDUSTRY SECTOR
MEINS LIKE MARA-MEINS,"BASE UNIT OF MEASURE
END OF I_MARA.
DATA: BEGIN OF I_MARC OCCURS 0,
MATNR LIKE MARC-MATNR,"MATERIAL NUMBER
WERKS LIKE MARC-WERKS,"PLANT
LVORM LIKE MARC-LVORM,"FLAG MATERIAL FOR DELETION AT PLANT
"LEVEL
PSTAT LIKE MARC-PSTAT,"MAINTENANCE STATUS
DISPO LIKE MARC-DISPO,"MRP CONTROLLER
END OF I_MARC.
DATA: BEGIN OF I_MAKT OCCURS 0,
MATNR LIKE MAKT-MATNR,"MATERIAL NUMBER
MAKTX LIKE MAKT-MAKTX,"MATERIAL DESCRIPTION
END OF I_MAKT.
DATA: BEGIN OF I_MVKE OCCURS 0,
MATNR LIKE MVKE-MATNR,"MATERIAL NUMBER
VKORG LIKE MVKE-VKORG,"SALES ORGANIZATION
VTWEG LIKE MVKE-VTWEG,"DISTRIBUTION CHANNEL
END OF I_MVKE.
DATA: BEGIN OF I_MARD OCCURS 0,
MATNR LIKE MARD-MATNR,"MATERIAL NUMBER
LGORT LIKE MARD-LGORT,"STORAGE LOCATION
LABST LIKE MARD-LABST,"VALUATED STOCK WITH UNRESTRICTED USE
END OF I_MARD.
DATA: BEGIN OF I_OUT OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
LVORM LIKE MARC-LVORM,
PSTAT LIKE MARC-PSTAT,
DISPO LIKE MARC-DISPO,
MBRSH LIKE MARA-MBRSH,
MEINS LIKE MARA-MEINS,
MAKTX LIKE MAKT-MAKTX,
VKORG LIKE MVKE-VKORG,
VTWEG LIKE MVKE-VTWEG,
LGORT LIKE MARD-LGORT,
LABST LIKE MARD-LABST,
END OF I_OUT.
DATA : TOT TYPE I. " TOT - TOTAL TO PRINT STOCK
*& S E L E C T I O N - S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR OBLIGATORY.
PARAMETERS: P_WERKS LIKE MARC-WERKS OBLIGATORY.
SELECT-OPTIONS: S_LGORT FOR MARD-LGORT,
S_DISPO FOR MARC-DISPO.
SELECTION-SCREEN END OF BLOCK B1.
*& I N I T I A L I Z A T I O N *
INITIALIZATION.
S_MATNR-SIGN = 'I'.
S_MATNR-OPTION = 'EQ'.
S_MATNR-LOW = 'M-14'.
S_MATNR-HIGH = 'M-18'.
P_WERKS = '3000'.
S_LGORT-SIGN = 'I'.
S_LGORT-OPTION = 'EQ'.
S_LGORT-LOW = '0001'.
S_LGORT-HIGH = '0004'.
S_DISPO-SIGN = 'I'.
S_DISPO-OPTION = 'EQ'.
S_DISPO-LOW = '001'.
S_DISPO-HIGH = '002'.
APPEND S_DISPO.
APPEND S_LGORT.
APPEND S_MATNR.
CLEAR S_DISPO.
CLEAR S_LGORT.
CLEAR S_MATNR.
*& S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
SELECT MATNR WERKS LVORM DISPO FROM MARC
INTO CORRESPONDING FIELDS OF TABLE I_MARC
WHERE WERKS EQ P_WERKS
AND MATNR IN S_MATNR
AND DISPO IN S_DISPO
AND WERKS = P_WERKS.
IF I_MARC[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARC'.
EXIT.
ENDIF.
SELECT MATNR LGORT LABST FROM MARD INTO TABLE I_MARD
FOR ALL ENTRIES IN I_MARC
WHERE MATNR = I_MARC-MATNR
AND WERKS EQ P_WERKS
AND LGORT IN S_LGORT.
IF I_MARD[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARD'.
EXIT.
ENDIF.
SELECT MATNR VKORG VTWEG FROM MVKE INTO TABLE I_MVKE
FOR ALL ENTRIES IN I_MARC
WHERE MATNR = I_MARC-MATNR.
IF I_MVKE[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MVKE'.
EXIT.
ENDIF.
LOOP AT I_MARC.
MOVE-CORRESPONDING I_MARC TO I_OUT.
CLEAR MARC.
SELECT SINGLE MATNR MBRSH MEINS FROM MARA
INTO CORRESPONDING FIELDS OF MARA
WHERE MATNR = I_OUT-MATNR.
IF SY-SUBRC = 0.
MOVE: MARA-MBRSH TO I_OUT-MBRSH,
MARA-MEINS TO I_OUT-MEINS.
ELSE.
CONTINUE.
ENDIF.
SELECT SINGLE MATNR MAKTX FROM MAKT
INTO CORRESPONDING FIELDS OF MAKT
WHERE MATNR = I_OUT-MATNR.
IF SY-SUBRC = 0.
MOVE: MAKT-MAKTX TO I_OUT-MAKTX.
ELSE.
CONTINUE.
ENDIF.
LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR.
MOVE: I_MARD-LABST TO I_OUT-LABST,
I_MARD-LGORT TO I_OUT-LGORT.
APPEND I_OUT.
ENDLOOP.
LOOP AT I_MVKE WHERE MATNR = I_MARC-MATNR.
MOVE: I_MVKE-VKORG TO I_OUT-VKORG,
I_MVKE-VTWEG TO I_OUT-VTWEG.
APPEND I_OUT.
ENDLOOP.
CLEAR I_OUT.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\matstk.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = I_OUT.
*& T O P - O F - P A G E *
TOP-OF-PAGE.
WRITE:/ 'DATE:' ,SY-DATUM.
*& E N D - O F - P A G E *
END-OF-PAGE.
WRITE: / SY-ULINE,
/100 'PAGNO: ',SY-PAGNO,
SY-ULINE.
*& E N D -- O F -- S E L E C T I O N *
END-OF-SELECTION.
LOOP AT I_OUT.
AT FIRST.
WRITE :/ 'MATERIAL EXTRACTION REPORT',
SY-ULINE.
ENDAT.
WRITE:/ SY-VLINE,
I_OUT-MATNR,SY-VLINE,
I_OUT-MEINS,SY-VLINE,
I_OUT-WERKS,SY-VLINE,
I_OUT-LVORM,SY-VLINE,
I_OUT-PSTAT,SY-VLINE,
I_OUT-DISPO,SY-VLINE,
I_OUT-MBRSH,SY-VLINE,
I_OUT-MAKTX,SY-VLINE,
I_OUT-VKORG,SY-VLINE,
I_OUT-VTWEG,SY-VLINE,
I_OUT-LGORT,SY-VLINE,
I_OUT-LABST,SY-VLINE.
TOT = TOT + I_OUT-LABST.
AT NEW MATNR.
WRITE : 'NEW RECORD',
SY-VLINE.
ENDAT.
AT END OF LABST.
WRITE : 'STOCK = ',
TOT,
SY-VLINE,
SY-ULINE.
ENDAT.
AT LAST.
FORMAT COLOR 7 INTENSIFIED OFF.
WRITE : /159 'TOTAL STOCK = ',
TOT.
ENDAT.
ENDLOOP.
WRITE : /159 'TOTAL STOCK = ',
TOT.
regards,
srinivas
<b>*reward for useful answers*</b> -
Hi, We are a physiotherapy practice trying to use i-cal as a clinic diary system for 15 therapists. We need to block out availability of therapists but cant do this? How can you block someones diary out for specific times on i-cal? Any help please..
iCal is designed for personal use, and isn't really meant to handle this sort of situation.
The best suggestion I can offer, though it's a trifle untidy, is: create a calendar for each therapist, giving each a different colour. Enter the availability for each therapist - if it's on a weekly basis you can make them repeating events. Then add the individual appointments, which will show alongside in the daily view. In this example, the 'purple' therapist is available from 1030 to 1700 and has appointments at 1200 and 1500.
If you have more than a few therapists available at any one time it's liable to look a bit messy, but it's the best I can think of at the moment. -
How can I reallocate sales order stock within sales order?
I have a material that is strategy 50 and produces sales order stock. A customer placed an order for a quantity to be shipped to a single location. So the sales order was set up with a single line item and a single ship-to partner. Just before shipping, the customer now wants the quantity broken into deliveries for 4 different ship-to locations. The total quantity is the same, but it is now to be spread across 4 ship-to partners. I thought we could just add 3 more line items to the sales order, set the ship to partners for each of the 4 sales order items to the new ship to locations, and then adjust the quantities to the amount to be shipped to each partner. But when I do this, ATP does not let me confirm the new order items and confirms the original item with a note that the quantity produced is less than the order quantity. How can I split this order up into multiple items?
Thanks in advance.I was able to resolve the problem yesterday evening. The solution was to first create a posting change using MB1B with movement 413 E - Sales Order to Sales Order. Then I did a posting change notice to change the material - the only thing that I changed, however, was the special stock number. Worked like a charm, but was tough to figure out (I am an SD person, not IM/MM).
-
How can attach a sales order link into an Internal Mail - Workplace.
Hello, is there somebody can give me some tips to do this.
I need to attach a link of a sales order into a message of an internal mail (workplace).
When a sales order is blocked by credit, one mail sent to the representative credit manager.
The subject of the mail already have the number of the sales order (&VBAK-VBELN&), BUT I don't know how to attach the link of a sales order. The idea is the user that will read the mail can clic the link to display the sales order.
Thanks for your help,
JEOS.Hi Jeos
While maintaining condition record VV11 with transmission medium Internal Mail you will get the option attach file then you can attach that file and send internally to the other user . But you cant attach the sales order , you convert the sales order data into an excel file and then upload that excel file and then send to the other user
Regards
Srinath -
How can we set the Order block for One-Time Billto-address?
Hi Experts,
How can we set Order bolck,if user uses one-time bill to address and needs to trigger workflow for releasing process according to order block.
Please suggest me.
Thanks and Regards,
Kiransuggest me pls!!!!
-
How can i capture sales order items in C# and pass them to a BAPI?
Hi everybody,
here is another novice question for you.
What control should i use in Visual Studio to allow the user to enter sales order items (material and qty) as a table on the screen and then put these items on a table and call the BAPI to create an order?.
I've tried using a Datagrid and set the "edititemindex" as "1" but doesn't work.
Any help will be greatly appretiated.
thank you
Javier ...Dear Todd,
thanks for your reply. I'm using ASP. I tried a grid but i cannot seem to make it work, it doesn't appear at first because it's empty, i tried creating some blank rows but the same happens.
The other thing i tried just to test is to create a row on the table "partners" to pass the needed "AG" (sold to party) and its number and the BAPI keeps returning an error "Please enter Sold ot or Ship to party". Like if the table was empty. Is there any special way to send a table to a BAPI ?. I'm sending it by ref, and i'm creating the record by first creating a structure, filling it an then calling the ADD method of the table and passing the structure. I'm i missing something here?
Please Help, it's been days with this problem,
I'll appreatiate it very much
Best regards and have a great day.
Javier .. -
How can I disable automatic spell checking for specific websites?
I'd like to disable automatic spell-checking for specific domains, such as programming-oriented forums. Is there a way to do this in about:config?
See:
*https://developer.mozilla.org/en/Controlling_spell_checking_in_HTML_forms
You could create a Greasemonkey script to add a spellcheck="false" attribute or create a bookmarklet to add the attribute. -
How can I set up notification details for messages...
I can't see who is sending my messages - i simply get the phone number. My user guide doesnt seem to mention this - although it is probably me not being able to find it. Any help gratefully received.
in contacts choose only one memory to use.
go to contacts select options and memo in use and choose phone or sim NOT BOTH
If i have helped at all a click on the white star below would be nice thanks.
Now using the Lumia 1520 -
I am using Firefox 14.0.1. I have it set to delete cache/cookies on exit, keeping my "foxden" clean. However, if I want to save the cache and cookies for a particular website, i.e a flash game that will save my current level, I cannot unless i disable the cache -clearing feature.
I would like to be able to "add an exception" to the cache-clearing or at the very least, be able to copy the relevant files for that page and paste them back before opening Firefox again.
Any ideas?That is not possible.<br />
You can only clear the entire cache.
If you do not want specific content to get cached or written to disk then you need to switch on Private Browsing.
*https://support.mozilla.org/kb/Private+Browsing
* https://wiki.mozilla.org/Firefox3.1/PrivateBrowsing/SecurityReview#Configuration
For cookies you must not use clear history, but let all cookies expire when you close Firefox and make an allow exception for cookies from domains that you want to keep. -
How can I remove one company detail from SAP prodcut for customer
I have done one SAP product.I have created two comp SBB1,SBB2.According to this company I developed SAP product.now customer needs only one company.How can I remove one company detail for this purticular customer.kindly guide on this.
Hi,
If you are saying- you created 2 company codes in your implementation and now, the client says - only one company code should be active - then all you need to do is: make the second comp code non-productive.
You can do it using the foll menu path:
SPRO>Financial Accounting>Financial Accounting Global Settings>Company Code>Set Company Code to Productive
Under this node, you mark only one of the two comp codes as productive.
Does this answer you?
Pls confirm,
Siva -
Deleting Sales Order Details using BAPI_SALESORDER_CHANGE And Reinserting
Hi All,
I need to <b>change a Sales Order</b> in such a way that I would <b>delete all the existing Line Items</b> of that SO And <b>then reinsert new Line Items</b> as generally is the practice of saving a document.(Update Header-Delete Old Item Entries-Reinsert New Present Entries).
I coded a small test program in ABAP using the <b>BAPI_SALESORDER_GETLIST And BAPI_SALESORDER_CHANGE</b>.
In order to affect the Qty I have to update the Schedule Parameter also of the BAPI_SALESORDER_CHANGE Function.But this causes a new entry in VBEP.
eg:
<b>Before BAPI Calls</b>
SO-Number:9001
Header:9001,etc......
Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
I coded the program such that
1.I <b>Get the List of Items</b> using BAPI_SALESORDER_GETLIST.
2.Call the <b>BAPI_SALESORDER_CHANGE</b> filling appropraite values in Parameters <b>with UpdateFlag = 'D'</b>
3.<b>Insert new values</b> in OrderItems And Schedule Parameters
say:
Detail:ItemNo=10,Material=xyz,TargetQty=25,etc..
Scedule:ItemNo=10,Scheduleline=1,Req_Qty=25,etc...
4.<b>Call the BAPI_SALESORDER_CHANGE</b> filling appropraite values in Parameters <b>with UpdateFlag = 'I'</b>
<b>The output now becomes.</b>Header:9001,etc......
Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
ItemNo=10,Scheduleline=2,Req_Qty=25,etc...
Now After Commit when I see my <b>SO it shows me a qty of
125</b>.
I am attaching the code for your analysis.
Thanx in advance.
*& Report ZSM_CHANGESALESORDER *
REPORT ZSM_CHANGESALESORDER .
DATA:
For Calling the GetList BAPI Function
CUSTOMER_NUMBER LIKE BAPI1007-CUSTOMER,
SALES_ORGANIZATION LIKE BAPIORDERS-SALES_ORG,
IT_SALES_ORDERS LIKE TABLE OF BAPIORDERS,
WA_SALES_ORDERS LIKE LINE OF IT_SALES_ORDERS,
IT_RETURN LIKE TABLE OF BAPIRETURN,
WA_RETURN LIKE LINE OF IT_RETURN.
For Calling the ChangeFromData BAPI Function
DATA:
SALESDOCUMENT LIKE BAPIVBELN-VBELN,
WA_ORDER_HEADER_IN LIKE BAPISDH1,
WA_ORDER_HEADER_INX LIKE BAPISDH1X,
IT_ORDER_ITEM_IN LIKE TABLE OF BAPISDITM ,
WA_ORDER_ITEM_IN LIKE LINE OF IT_ORDER_ITEM_IN,
IT_ORDER_ITEM_INX LIKE TABLE OF BAPISDITMX ,
WA_ORDER_ITEM_INX LIKE LINE OF IT_ORDER_ITEM_INX,
IT_SCHEDULE_LINES LIKE TABLE OF BAPISCHDL ,
WA_SCHEDULE_LINES LIKE LINE OF IT_SCHEDULE_LINES,
IT_SCHEDULE_LINESX LIKE TABLE OF BAPISCHDLX ,
WA_SCHEDULE_LINESX LIKE LINE OF IT_SCHEDULE_LINESX,
IT_RETURN_CHG LIKE TABLE OF BAPIRET2,
WA_RETURN_CHG LIKE LINE OF IT_RETURN_CHG.
DATA:
IT_RETURN_CT LIKE BAPIRET2.
PARAMETERS:
P_SO LIKE VBAK-VBELN,
P_CUSTNO LIKE BAPI1007-CUSTOMER,
P_SORG LIKE BAPIORDERS-SALES_ORG.
START-OF-SELECTION.
SALESDOCUMENT = P_SO.
CUSTOMER_NUMBER = P_CUSTNO.
SALES_ORGANIZATION = P_SORG.
Retrieve the Existing Sales Order details for that Sales Order.
PERFORM GETREQSODETAILS.
Delete the Existing Sales Order details from that Sales Order.
PERFORM DELETEOLDSODETAILS.
Insert New details for that Sales Order.
PERFORM ADDNEWSODETAILS.
END-OF-SELECTION.
PERFORM COMMITTRANS.
*& Form GetReqSODetails
FORM GETREQSODETAILS .
CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
EXPORTING
CUSTOMER_NUMBER = CUSTOMER_NUMBER
SALES_ORGANIZATION = SALES_ORGANIZATION
IMPORTING
RETURN = WA_RETURN
TABLES
SALES_ORDERS = IT_SALES_ORDERS.
*delete the Sales Order Details of Sales Orders other than the req.One
IF NOT IT_SALES_ORDERS[] IS INITIAL.
SORT IT_SALES_ORDERS BY SD_DOC.
LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
IF WA_SALES_ORDERS-SD_DOC NE SALESDOCUMENT.
DELETE IT_SALES_ORDERS.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " GetReqSODetails
*& Form deleteOldSODetails
FORM DELETEOLDSODETAILS .
DATA: IRECCOUNT TYPE I.
IRECCOUNT = 1.
*Clear all the Inernal Tables And Work Areas
*and Update the SO Header Index
PERFORM CLEARDATA.
PERFORM SOHEADERINDEX.
LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
*Fill the Order Details Index Internal Table
PERFORM FILLSODELETEDTLS_INDEX_PARAM
USING WA_SALES_ORDERS-ITM_NUMBER 'D'.
*Fill the Order Scedule Index Internal Table
PERFORM FILLSODELETESCH_INDEX_PARAM
USING WA_SALES_ORDERS-ITM_NUMBER IRECCOUNT 'D'.
ENDLOOP.
*call the Sales Order Change Fumction to delete the Existing Data
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = SALESDOCUMENT
ORDER_HEADER_INX = WA_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN_CHG
ORDER_ITEM_INX = IT_ORDER_ITEM_INX
SCHEDULE_LINESX = IT_SCHEDULE_LINESX.
ENDFORM. " deleteOldSODetails
*& Form SOHeaderIndex
FORM SOHEADERINDEX .
WA_ORDER_HEADER_INX-UPDATEFLAG = 'U'.
ENDFORM. " SOHeaderIndex
*& Form FillSODeleteDtls_Index_param
FORM FILLSODELETEDTLS_INDEX_PARAM
USING VALUE(P_ITM_NUMBER) VALUE(P_FLAG).
WA_ORDER_ITEM_INX-ITM_NUMBER = P_ITM_NUMBER.
WA_ORDER_ITEM_INX-UPDATEFLAG = P_FLAG.
APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
ENDFORM. " FillSODeleteDtls_Index_param
*& Form FILLSODELETEsch_Index_PARAM
FORM FILLSODELETESCH_INDEX_PARAM
USING VALUE(P_ITM_NUMBER) VALUE(P_RECCOUNT) VALUE(P_FLAG).
WA_SCHEDULE_LINESX-ITM_NUMBER = P_ITM_NUMBER.
WA_SCHEDULE_LINESX-SCHED_LINE = P_RECCOUNT.
WA_SCHEDULE_LINESX-UPDATEFLAG = P_FLAG.
APPEND WA_SCHEDULE_LINESX TO IT_SCHEDULE_LINESX.
ENDFORM. " FILLSODELETEsch_Index_PARAM
*& Form addnewSODETAILS
FORM ADDNEWSODETAILS .
DATA: IRECCOUNT TYPE I, ITEMNO TYPE I.
IRECCOUNT = 1.
*Clear all the Inernal Tables And Work Areas
*and Update the SO Header Index
PERFORM CLEARDATA.
PERFORM SOHEADERINDEX.
WHILE IRECCOUNT <= 1.
ITEMNO = IRECCOUNT * 10.
*Fill the New Order Details in the Internal Table
PERFORM FILLSODTLDATA USING ITEMNO 'TEST FG' 37 .
*Fill the Order Details Index Internal Table
PERFORM FILLSODELETEDTLS_INDEX_PARAM USING ITEMNO 'I'.
*Fill the New Schedule Details in the Internal Table
PERFORM FILLSOSCHDATA USING ITEMNO IRECCOUNT 37 .
*Fill the Order Scedule Index Internal Table
PERFORM FILLSODELETESCH_INDEX_PARAM
USING ITEMNO IRECCOUNT 'I'.
IRECCOUNT = IRECCOUNT + 1.
ENDWHILE.
*call the Sales Order Change Fumction to Insert New Data
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = SALESDOCUMENT
ORDER_HEADER_INX = WA_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN_CHG
ORDER_ITEM_IN = IT_ORDER_ITEM_IN
ORDER_ITEM_INX = IT_ORDER_ITEM_INX
SCHEDULE_LINES = IT_SCHEDULE_LINES
SCHEDULE_LINESX = IT_SCHEDULE_LINESX.
ENDFORM. " addnewSODETAILS
*& Form clearData
FORM CLEARDATA .
CLEAR WA_ORDER_HEADER_INX.
CLEAR WA_ORDER_ITEM_INX.
REFRESH IT_ORDER_ITEM_INX.
CLEAR WA_SCHEDULE_LINESX.
REFRESH IT_SCHEDULE_LINESX.
CLEAR WA_RETURN.
REFRESH IT_RETURN.
CLEAR WA_ORDER_ITEM_IN.
REFRESH IT_ORDER_ITEM_IN.
CLEAR WA_SCHEDULE_LINES.
REFRESH IT_SCHEDULE_LINES.
ENDFORM. " clearData
*& Form FILLSODTLDATA
FORM FILLSODTLDATA USING VALUE(P_ITEMNO) VALUE(P_MATERIAL)
VALUE(P_TARGET_QTY) .
WA_ORDER_ITEM_IN-ITM_NUMBER = P_ITEMNO.
WA_ORDER_ITEM_IN-MATERIAL = P_MATERIAL.
WA_ORDER_ITEM_IN-TARGET_QTY = P_TARGET_QTY.
APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
ENDFORM. " FILLSODTLDATA
*& Form FILLSOschDATA
FORM FILLSOSCHDATA USING VALUE(P_ITEMNO)
VALUE(P_RECCOUNT)
VALUE(P_REQ_QTY) .
WA_SCHEDULE_LINES-ITM_NUMBER = P_ITEMNO.
WA_SCHEDULE_LINES-SCHED_LINE = P_RECCOUNT.
WA_SCHEDULE_LINES-REQ_QTY = P_REQ_QTY.
APPEND WA_SCHEDULE_LINES TO IT_SCHEDULE_LINES.
ENDFORM. " FILLSOschDATA
*& Form committrans
FORM COMMITTRANS .
DATA:SUCCESSFLAG(1).
LOOP AT IT_RETURN_CHG INTO WA_RETURN_CHG.
IF WA_RETURN_CHG-TYPE = 'S'
AND WA_RETURN_CHG-ID = 'V1'
AND WA_RETURN_CHG-NUMBER = 311
AND SUCCESSFLAG IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = IT_RETURN_CT.
SUCCESSFLAG = 'X'.
ENDIF.
ENDLOOP.
IF SUCCESSFLAG IS INITIAL.
WRITE: 'SORRY SOME ERROR'.
ELSE.
WRITE: 'SUCCESSFUL'.
ENDIF.
ENDFORM. " committransThanx wolfgang,
I needed that info.
As I had mentioned in the earlier posts, I want to delete the old Sales Order Item Details,
Schedule Details,Basic Price data And Reinsert data in the same.
I am giving u the algo that I have used.
1.<b>Get the SalesOrder Details</b> for a particular Sales Order using BAPI_SALESORDER_GETLIST(para:customer & sales Org and then deleting unwanted SO data).
2.<b>Delete</b> the Sales Order <b>Item Details,Schedule Details</b> using BAPI_SALESORDER_CHANGE.
3.<b>Commit</b> Transaction(<b>If I dont use this commit Error comes in Step No.7 while Commiting</b>)
using BAPI_TRANSACTION_COMMIT.
4.Check <b>Return Table</b> of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
5.if Step No.4 is <b>Not okay</b> <b>then Rollback</b>(BAPI_TRANSACTION_TRANSACTIN) <b>and Exit</b> <b>else move to step 6</b>.
6.<b>Add New</b> Sales Order <b>Item Details,Schedule Details, Basic Price</b> using BAPI_SALESORDER_CHANGE.
7.<b>Commit Transaction</b> using BAPI_TRANSACTION_COMMIT.
8.<b>Check Return</b> Log of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
9.if Step No.9 is okay then Exit else Rollback(BAPI_TRANSACTION_TRANSACTIN) and move to step 10.
10.Add Old Sales Order Item Details,Schedule Details, Basic Price from Data available in Internal
table(Filled in step.1 ) using BAPI_SALESORDER_CHANGE.
11.Commit Transaction using BAPI_TRANSACTION_COMMIT.
This <b>works fine in 1 server in which I get the message of Incomplete Data,etc...when I make a Sales Order from va01</b>.
But in another server where I dont this message,I get <b>error in step 7 or 11 as per the flow</b>.
The return structure of BAPI_TRANSACTION_COMMIT contains error with Message 'Updating was not possible'. Also the message 'Updation was terminated' cms frm the SAP server.
What could be the reason?
Thanx in advance -
How can i create slaes order using BAPI
hi all,
i didnt work on BAPIS .how can i create sales order using BAPI here i should pass Z values.
Moderator message : FAQ, search for available information. Thread locked.
Edited by: Vinod Kumar on Sep 13, 2011 12:22 PMHi!
There are a lot of answered threads regarding your question. Try searching first. Below is a sample link.
BAPI_SALESORDER_CREATEFROMDAT2
Regards,
Steph
Edited by: stephquion on Sep 13, 2011 8:25 AM -
How can i show a raise message?
Hi...
I am use JDev 11.1.2.0.0
How can i show a raise message for the user for validations issues
and after his message the user can't do any thing.
thanks...HI ,
You can use your entity level validations for this .For this go to your entity object then select the required attribute ,now at the bottom of the page validation rules for that attribute is given just click on that ,now you can select the validation that you want and give error handling msg also.
If you want that user cannot move further without filling that field then you can mark that fields as compulsory by selecting true value at its required field in property inspector.
Maybe you are looking for
-
How to create a grid with arrays and booleans?
As part of a bigger project, I'm trying to create a sub-VI which will allow me to move a "cursor" in a 3x3 array. There should be 2 boolean inputs, one for moving down in the array, and the other for moving to the right. Once the edge of the array ha
-
Anyone using Blackmagic Intensity Pro with Premiere CS4
I've looked through the threads and have seen similar postings, but no real good answers. Is anyone using Blackmagic Intensity Pro to viiew timeline on a HDTV using the HDMI connector? I purchasedf the Intensity Pro and can't get it to work with CS4.
-
Flattening images in Acrobat X pro
Hi everyone, I need to flatten some images in a pdf. It is a thirty page pdf and when printed all the images have transparent boxes around them. So far the only solution I know is to take each page into photoshop, flatten the image and reinsert the i
-
Hi All, Can any one forward me the docs regarding the following topics? 1) Transportation 2)Packing 3)Foreign Trade. My mail Id is [email protected] Thanks in Advance, Regards, Ajit
-
OOB CapEx Module in 11.1.2.3
Hi, We are facing a peculiar problem in OOB Capex module in 11.1.2.3. When we calculate Asset, all the expenses are correct except that they are not appearing for the final month. If the asset life is for 24 months, expenses are appearing only for 23