How to update Sales Order status using BAPI_SALESORDER_CHANGE
Hi,
I want to update Sales Order status using BAPI_SALESORDER_CHANGE, this BAPI is called from middle ware, but there is no parameter to pass the status value to this function, please help me how to update sales order status using BAPI only.
Thanks
RK
Hi,
Can u give me details of what status u would like to update in sales order.
If we are able to update the status from VA02, Then BAPI will assist for the same.
Regards.
Similar Messages
-
How to update sales orders using B1WS in SAP 8.8 PL18
Hello all.
We are having a problem updating sales orders using Sap Business One Web Service ( B1WS ).
We are running SBO 8.8 PL18, MS-SQL 2008, and all is fine when using the SBO client.
But when it comes to updating sales orders through B1WS we just cannot get it to work.
We can add new orders easily without problems. Updating orders always gives this error:
\[ORDR.PayDuMonth\]\[line: 0\] , 'Field cannot be updated (ODBC -1029)'
We have checked and verified multiple times that our setup is correct.
Also the WDSL files are verified.
We can update orders just fine using the sboclient.
And using B1WS we can basically do everything, besides updating.
We have also tried this on different company db's, so we are quite sure this is not
something related to some general setting we missed, but who knows?
We have tried different ways to "assemble" the order before updating, but it always
ends with the above error.
Here is an example of one of the tests, where we load an order by docentry,
increment the quantity of all open lines by '1', and then try to update it.
protected void Page_Load(object sender, EventArgs e)
// First we login
string sessionId = "";
LoginService.LoginService l_login = new LoginService.LoginService();
LoginService.LoginDatabaseType l_dbtype = LoginService.LoginDatabaseType.dst_MSSQL2008;
LoginService.LoginLanguage _lang = LoginService.LoginLanguage.ln_English;
string _server = "SAP-8_8PL18";
string _licserver = "SAP-8_8PL18:30000";
string _db = "my_test_company";
string _user = "manager";
string _pass = "********";
try
sessionId = l_login.Login(_server, _db, l_dbtype, true, _user, _pass,
_lang, true, _licserver);
catch (Exception ex)
Response.Clear();
Response.Write(ex.Message);
Response.End();
if (sessionId == "")
Response.Clear();
Response.Write("No sessionId");
Response.End();
// We are logged in and have a sessionId
// Now load a valid open order by docentry
try
OrdersServiceRef.OrdersService orderService = new OrdersServiceRef.OrdersService();
orderService.MsgHeaderValue = new OrdersServiceRef.MsgHeader();
orderService.MsgHeaderValue.SessionID = sessionId;
orderService.MsgHeaderValue.ServiceName = OrdersServiceRef.MsgHeaderServiceName.OrdersService;
orderService.MsgHeaderValue.ServiceNameSpecified = true;
OrdersServiceRef.DocumentParams docParams = new OrdersServiceRef.DocumentParams();
docParams.DocEntry = 31; // Docentry of a known open order
docParams.DocEntrySpecified = true;
OrdersServiceRef.Document order = orderService.GetByParams(docParams);
OrdersServiceRef.DocumentDocumentLine line = null;
for (int i = 0; i < order.DocumentLines.Length; i++)
line = order.DocumentLines<i>;
if (line.LineStatus == OrdersServiceRef.DocumentDocumentLineLineStatus.bost_Open)
line.Quantity += 1;
orderService.Update(order);
catch (System.Web.Services.Protocols.SoapException ex)
Response.Clear();
Response.Write(ex.Message);
Response.End();
catch (Exception ex)
Response.Clear();
Response.Write(ex.Message);
Response.End();
Response.Clear();
Response.Write("All OK");
Response.End();
I hope that someone has an idea as to why this happens.
The customer often changes quantity or adds lines on their orders,
and the only way to solve it so far has been to make a new order and
close the old one.
Thanks in advance
J. ThomsenHi,
Welcome you post on the forum.
Have you checked if you only update a specific line instead of a loop?
Thanks,
Gordon -
Updating Sales Order Status in Batch
Hi
Please let me know if we can update Sales Order Line details like Ship To Address , Date , Status in a batch?
We are using 11.5.10
ThanksUse the Order management API or the OM interface tables.
See irep.oracle.com for details. -
How to update Sales Order Delivery Block while saving Delivery ?
Hi,
I have a requirement wherein i need to update sales order delivery block field(VBAK-LIFSK) while saving the delivery for the order.
Also I need to remove this block while execution of Backorder Rescheduling program SDV03V02 (Tcode : V_V2),
Can anybody help me out in this?
regards,
NitinHI,
try using BAPI_SALESORDER_CHANGE
pass ur vbeln in SALESDOCUMENT
pass an 'X' to BAPISDH1-DLV_BLOCK
and 'X' to BAPISDH1X-DLV_BLOCK
Also add the UPDATE task clause, you will want to set the flag only when delivery is being saved, not before that. -
Inbound IDoc used for updating Sales order status
I have a requirements to set use standard IDoc to send out the Sales order to a non-SAP software as well as receiving Inbound IDoc to update the status of sales order in SAP. Could someone comment on my questions below:
1. What are the difference between all the ORDERSxx Idoc types?
2. What IDoc should be used for Inbound IDoc to update the sales order stataus in SAP?
3. Can the same IDoc type be used for both Inbound and Outbound with only the difference in the segment of Direction?
Thank you. Points will be awarded appropriately for helpful comments.Hi,
1.Intially standard IDOC types "ORDERS01" is having limited
segments. After few months the requirement got increased to
add more fields to "ORDERS01".So,once you release the IDOC
type you can not add any more fields .So SAP come up
with "ORDERS02" with new fields.Like that all IDocs types have
some more new seg ments.
2.You can use ORDER05
3. Yes you can use same IDOC type -
How to update sale order haeder conditions
hi
how to update header conditions using sale order bapi ' create from data 2'.
regards
Siva Shanmugam.A.V.u can use 'BAPI_SALESORDER_CHANGE'
and see the following link
http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE
Edited by: krupa jani on Nov 25, 2008 11:15 AM -
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 -
Hi
I have a senario, Clarify RA's are interfaced to Oracle with Entered Status, some validation has to be performed before making the Order Status to Booked,
Could any help me the API Process how to do
ThanksThe same package has Book_order and update_booked_flag procedures which do check a number of things before booking the order. If you want to do the same before you complete the activity in workflow, you can just borrow the code from there and do pre-validations to make sure that there are no hiccups in booking the order.
Attributes check is done in OE_Validate_Header.Check_Book_Reqd_Attributes and OE_Validate_line.Check_Book_Reqd_Attributes and other important checks like sales credits at the header level and other validation with respect to invalid configuration (if you are using models and configuring the product) or prepayment is not valid and so on. You can call all these checks before you complete the activity.
Thanks
Nagamohan -
How to update Prodcution order qty using /AFS/BAPI_GOODSMVT_CREATE
Hi Friends,
I need your help desperately,
I am using the BAPI, '/AFS/BAPI_GOODSMVT_CREATE' its working fine but it gets updated only Inv management / warehouse management perfectly, but my requirement is this return qty to be adjusted against the production order material. (MB1A with movement type '262' - for returns)
I need to know any other parameters to be included in the BAPI to update the production order also.
I have attached the code.
please reply ASAP.
Thanks
Shankar
*Header Structure
st_gm_code-gm_code = '03'. "
st_gm_header-pstng_date = st_gm_header-doc_date = sy-datum.
SORT itab BY aufnr matnr j_3asized.
LOOP AT itab.
itab_afs_gm_itemx-material = itab-matnr.
itab_afs_gm_itemx-plant = itab-werks.
itab_afs_gm_itemx-stge_loc = itab-lgort.
itab_afs_gm_itemx-batch = itab-new_charg .
itab_afs_gm_itemx-stock_cat = itab-j_4kscat.
itab_afs_gm_itemx-stck_type = 'F'.
itab_afs_gm_itemx-move_type = '262'.
itab_afs_gm_itemx-entry_qnt = itab-j_3aerfmg .
itab_afs_gm_itemx-grid_value = itab-j_3asized.
itab_afs_gm_itemx-orderid = itab-aufnr.
APPEND itab_afs_gm_itemx .
ENDLOOP.
CALL FUNCTION '/AFS/BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = st_gm_header
goodsmvt_code = st_gm_code
IMPORTING
goodsmvt_headret = st_gm_headret
materialdocument = mat_doc
matdocumentyear = doc_year
TABLES
afs_goodsmvt_item = itab_afs_gm_itemx
return = bapi_return .
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
itsoh-mat_doc = mat_doc.
itsoh-doc_year = doc_year.
APPEND itsoh.
status = '06'.
ENDIF.u can use 'BAPI_SALESORDER_CHANGE'
and see the following link
http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE
Edited by: krupa jani on Nov 25, 2008 11:15 AM -
Hi,
We have a scenario wherein we create shipment cost documents against delivery. As a result of shipments fully transferred, a PO for freight vendor is automatically created and a service entry sheet confirmation happens. As a result of service entry sheet confirmation, we have Financial accounting, Controlling and profitability analysis documents created. We have a requirement wherein we need to have the characteristic “sales order number (KAUFN)” populated in the profitability analysis document created as a result of service entry sheet confirmation.
Could someone please advice how could this be attained in COPA. Thanks for your help in advance.
Regards,
SandeepHi Ajay,
Thank you for the quick update.
The document is updated to COPA through OKB9 settings. The profitability segment is updated with fields like customer, product, company code, plant, sales area data, profit center, etc; however the sales order number is missing.
Could you please elaborate further how could FI substitution be implemented to call for the FM COPA_PROFITABILITY_SEGMENT through user exit? Are you recommending the substitution through GGB1? What could be the possible validation to call for the user exit to be implemented?
Regards,
Sandeep Kulkarni -
Update sales orders status after changing item completion rule
Hello!
I've just changed the item completion rule of a given sales document item (from 'B' to blank). But we have several old orders, which have deliveries created with reference, with some fields still open (due to the 'no reference' status at the item level). The orders created after the new condiguration are ok.
So, is there any way I can update the status of those old orders? Already tried the report SDVBUK00, but did not work out.
Any ideas are welcome.
Thanks.
Adriano CardosoHi,
check if oss note 1472007 helps.
Regards,
JM -
How to update a BP status Using CRMXIF_ORDER_SAVE for any transaction .
Hey i am able to perform deleting a transaction or inserting a BP for a transaction using CRMXIF_ORDER_SAVE .
But i am not able to delete or update a BP for a transaction using my program .
REPORT ZCRMBUSIPART1.
data : t_crm type CRMXIF_BUSTRANS_T ,
wa_crm like line of t_crm ,
wa type CRMXIF_PARTNER ,
i_ret type BAPIRETM .
*PARAMETER : p_input type CRMXIF_BUSTRANS-object_id .
wa_crm-OBJECT_TASK = 'U' .
wa_crm-object_guid = '220939E0B523274FB6C0E380766BCEEA' .
wa_crm-partner-datax = 'X'.
wa-partner_fct = '00000031'.
wa-partner_no = '0000000025'.
wa-object_task = 'U'.
wa-kind_of_entry = 'A'.
wa-addr_type = '2'.
wa-display_type = 'BP'.
wa-MAINPARTNER = ''.
wa-input_fields-PARTNER_FCT = 'X'.
wa-input_fields-partner_no = 'X'.
wa-input_fields-kind_of_entry = 'X'.
wa-input_fields-addr_type = 'X'.
wa-input_fields-display_type = 'X'.
wa-input_fields-MAINPARTNER = 'X' .
append wa to wa_crm-partner-data .
append wa_crm to t_crm .
CALL FUNCTION 'CRMXIF_ORDER_SAVE'
EXPORTING
data = t_crm
IMPORTING
RETURN = i_ret
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
write 'done'.
IF any1 can please point out the reason , it wud be appreciated .
THanks guyzHi ,
PUT a break point in CRM_ORDER_MAINTAIN and try to change the partner in order and you will come to know which values needs to be passed.
example.
REF_GUID pass the ref guid
REF_HANDLE 0000000000
REF_KIND pass the ref kind
REF_PARTNER_HANDLE 0000
REF_PARTNER_FCT pass the old partner function
REF_PARTNER_NO pass the old partner no
REF_NO_TYPE BP
REF_DISPLAY_TYPE BP
PARTNER_GUID pass the guid
KIND_OF_ENTRY pass the kind of entry
PARTNER_FCT new partner function
PARTNER_NO new partner no
DISPLAY_TYPE BP
NO_TYPE BP
Regards,
Gangadhar.S
Edited by: gangadhar rao on Mar 7, 2011 11:31 AM -
Sales order creation using webdynpro in ABAP
Plz give the process how to create sales order creation using webdynpro in ABAP. if not possible plz let me know how to create in JAVA.
It is very urgent. I hope i will get it very soon.
Thanks all
SaiIn your WDA application, all you need to do is call the BAPI BAPI_SALESORDER_CREATEFROMDAT2 when the user clicks some button. Most likely, you can put the code for this BAPI call in the onAction method for your button.
Regards,
Rich Heilman -
Hi All,
We are implementing the sales order status using EDI 870. Does anybody implemented the same and if so please share IDOC/Message type name or process.
Thanks & Regards,
HarishVBUK-GBSTK Stores the overall status of the order. ' ' - Not relevant, 'A' - Not yet processed, 'B' - Partially processed , 'C' - Completely Processed.
If you are looking the status based on Object status, then use the function module "STATUS_SHOW_CHANGE_DOCUMENTS"
Regards
Vinod
Edited by: Vinod Kumar on Apr 8, 2010 1:47 PM -
Sales order status to update costing
HI
I am trying to update sales order cost estimate using CK51n But it is not updating.
Order status is Completed.Is this could be the issue ??
If yes pls let me know at which status I can release order cost estimate and for this what I have to do.
and like material cost estiamte do we need to releae sales order cost estimate too. Pls let me know the procedure normally we follow
Thanks in advance
Sneha>
1Sneha wrote:
> HI
>
> I am trying to update sales order cost estimate using CK51n But it is not updating.
> Order status is Completed.Is this could be the issue ??
>
> If yes pls let me know at which status I can release order cost estimate and for this what I have to do.
>
> and like material cost estiamte do we need to releae sales order cost estimate too. Pls let me know the procedure normally we follow
>
>
> Thanks in advance
>
> Sneha
Hi Sneha,
Sale order cost estimate Generaaly used for MTO, it is carried out in sale order itself while creating sale order or after sale order creation, After run sale order cost estimate Eko2 condition( cost of goods sold) will added in to sale order.
This value is taken while doing Billing as cost of goods sold
Since you are trying to do estimate for closed order, i.e after billing, System is not updating the Eko2 value in old sale order
Maybe you are looking for
-
Using HAL to generate XML files
Greetings,<BR>I'd like to use HAL to build XML files and feeding certain variables while these files are generated. When the XML file is done being created, it will contain the variables passed. There are over 500 XML required to be build and for eac
-
I can't download a few songs in my iPod
I can't download a few songs (in iTunes) in my iPod (bought in my iMac)
-
Background Pictures Changes to Default
Each time I reboot my iMac (not very often), my desktop picture always reverts to the Leopard Default, my Macbook doesn't suffer this fate, I've looked everywhere and cant see what is causing this odd behaviour. Has anyone else out there suffered the
-
Anyone familiar with Flash 8 Slide presentations?
I am creating a Computer based training using the slide presentation format in Flash 8. I created buttons on the parent slide to appear in all child slides. I want to disable the buttons for 15 seconds on each slide. Is this possible? I have used: bu
-
What is "unknown error -50"?
I deleted iTunes and a bunch of other iTunes related files and downloaded the latest version and now it works (if you saw my previous post) but now it says "The iTunes Library file cannot be saved. An unknown error occured (-50)." I could just say "D