Update Sales Document
Hi ,
i try to update a sales order with B1i , but can't suceed :
i put <DocEntry> in the message , but DI failed with "DocEntry is read only"
how can i setup a scenario for update ?
where can i put the DocEntry to find the object to update ?
thanks for help
Laurent
Hi,
If it is updating operation, you should put <DocEntry> under <QueryParams>. Sample:
<BOM>
<BO>
<AdmInfo>
<Object>22</Object>
<Version>2</Version>
</AdmInfo>
<QueryParams>
<DocEntry>
<xsl:value-of select="BOM/BO/Documents/row/NumAtCard"/>
</DocEntry>
</QueryParams>
<Documents>
<xsl:for-each select="BOM/BO/Documents/row">
<row>
<!--Update the Vendor Ref. No of Purchase order as the sale order in Headquarter-->
<NumAtCard>
HQ SO#<xsl:value-of select="DocEntry"/>
</NumAtCard>
</row>
</xsl:for-each>
</Documents>
</BO>
</BOM>
Kind Regards, Yatsea
Similar Messages
-
Updating Sales document with new sub sequent sales document
Hello All,
I am creating one sales contract from one sales document through some user exits and batch jobs.
After creating this new sales contract i want to update this doc number in Old Referenced sales document flow.
Is there any standard function module for this.. i tried some function modules containing FLOW..But no use..
Thanks&Regards,
Krishna.It is resolved..
as I am using FM SD_SALESDOCUMENT_CREATE to create this contract i just updated the Reference document number in header structure... -
Sales document created from CRM 4.0 needs to be updated from ECC 6.0
Hello experts,
When I create one sales document from CRM 4.0 this document is moved to ECC 6.0. But updating sales document from ECC 6.0 I receive message
"Process the original document in the CRM system"
and updates are not moved to CRM.
How could I avoid this ?
Usually I need update some fields from ECC 6.0 and move the information to CRM.
Regards
JuanHi Juan,
Please check the Note 541113 - Data exchange scenarios for orders (CRM-R/3) in which as per your requirement its the scenario Z i.e you want some data to flow from ECC to CRM for which below are the settings that needs to be done to make it effective.
Activation of the scenario in table CRMPAROLTP of the R/3 plug-in:
PARNAME: CRM_SCENARIO
PARNAME2: UPLOAD_ORDER
PARVAL1: Z
Go to SM30 and give the table name and put in the above values.
And if you want to make amutual change situation then proceed as follows:
Settings in the CRM Server: Table SMOFPARSFA
Key: R3A_SALES
Parameter Name 1: INT_CHANGE_ORDER
Parameter Name 2: <sales document type> , for example TA
Parameter Value 1: Z
Settings in the R/3 system: table CRMPAROLTP
Parameter Name: CRM_SCENARIO
Parameter Name 2: INT_CHANGE_ORDER
Parameter Name 3: <sales document type> , for example TA
Parameter Value: Z
Hope it helps.
Regards
Sidd -
Sales document number not updated in FI document
Hi,
Whenever invoice creates in FI through billing document, system will not update sales document number in FI document(Invoice). Please confirm if there is any way to update sales document number in FI document because I want to create dunning notices on sales order basis.
Request immediate help.
Thanks in advance.Hi,
In the standard system, FI postings will be updated with FI document numbers only. If you want to see respective billing document number in customer ledger, go to FBL5N, select 'Change Layout' icon and move billing document number from 'hidden fields' to display fields list and see.
Regds
Sarma BH -
User exit to copy Manual pricing conditions with in sales documents
Hi all,
I have a situation where i have to copy the manual pricing conditions from inquiry to quotation.
Problem: From VA21 when I try to do the same using the tab "create with reference" the document is being copied but the manually set pricing condition in the inquiry is not being copied into quotation. This is because in the copy controls the pricing type is set to 'B' which means "carry out new pricing". I can change it to 'C' or 'D' so that it copies manual pricing but i am not allowed to do so because other sales orgs in the company has a problem if i do so. Only our perticular sales org needs this config. I cannot even create another item catogory specific to this plant because it is against the rules of the company. So I am looking for a user exit in which i can change this pricing type during runtime so that i can plug in some code specific to this sales org to copy manual pricing. I have found one from the SAP note 24832 (MV61AFZA). It doesn't work as i think its obsolte. Can anyone suggest me a better way of solving this issue. Any quick response is appreciated.
Thanks,
Giridhar.Hi
The following EXITS may help you
Exit Name Description
SDTRM001 Reschedule schedule lines without a new ATP check
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
V45A0001 Determine alternative materials for product selection
Regards
PRabhu -
User-Exit for changing Sales Document Number - Urgent
Hi Experts ,
Please suggest me the <b>User Exit for changing Sales Document Number.</b>
thanks,
Jayesh<b></b>hi jayesh,
chech this exit-----EXIT_SAPFV45S_002.
this exit's description says " Change Sales Document Using Configuration".
Other available exits are
SDAPO001 Activating Sourcing Subitem Quantity Propagation
SDTRM001 Reschedule schedule lines without a new ATP check
V45A0001 Determine alternative materials for product selection
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
Enter these exits name in SMOD transaction and select components. u can find all the user exits available for this exit name.
Reward me if useful..........
Harimanjesh AN -
Delivery status update in sales document at PGI
Normally system updates the delivery status of sales document line level, when a delivery document is created with respect to that sales document line.
But I want system to update the delivery status (in sales doc. line) when PGI is done for respective delivery document; not at the creation of delivery document. Below I have shown the status updating scenarios that I expect.
Scenario 1
Sales doc line qty: 100 PCs
Delivery Doc qty: 50 PCs
PGI: Not done
Status in Sales document line should be A (Open)
Scenario 2
Sales doc line qty: 100 PCs
Delivery Doc qty: 50 PCs
PGI: 50 PCs
Status in Sales document line should be B (Partially delivered)
Scenario 3
Sales doc line qty: 100 PCs
Delivery Doc qty: 100 PCs
PGI: 100 PCs
Status in Sales document line should be C (Fully delivered)
Can anyone propose a possible way of doing this (configuration/ user exits/ BADI etc,)?
Thanks,
RaminduHi,
I dont know it with the use of ABAP development, but by functional logic, can suggest you to configure the rush order sales configuration for your particular sales order.
just check that availability of that particualar sales order is met or not prior to it.
and then automatically when your delivery doc is created, PGI would be done and the status of your sales order would be updated with it.
try it out on your development client, if it works out.
regards,
Siddharth. -
Issue in Updating Sales Order Document flow
Hi Experts,
We have developed a Z Program for posting Material document for the deliveries of Sales Order. This program runs in Batch job everyday.
Here we are getting an issue like in some of the cases it's not updating the Document flow of the Sales order though its Posting Material Document for the Delivery of Sales Order. If there will be a bulk amount of data then its creating issue in updating the Document flow ( Either the 1st set of record or last set of records).
We are using BAPI 'BAPI_GOODSMVT_CREATE' for posting Material Document for the delivery and FM 'RV_DOCUMENT_FLOW_UPDATE_U' for updating the document flow.
It seems it giving issue with bulk amount of data. Will it a time issue?
If any one have faced such issue, please throw some pointers.
Thanks in advance!
Regards,
Priyabrata.It could be a timing issue. After you create the material document, try to enque the material document and move to the next step only if the enque is successful. Keep trying to enque the material document until u are successful. But make sure you exit the loop after certain number of tries to avoid endless loops. Here is a sample code:
DO 20TIMES.
CALL FUNCTION ;'ENQUEUE_EMMKPF'
EXPORTING
MODE_MKPF = co_e
MBLNR = xxxxx
MJAHR = xxxx
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc EQ 0.
dequeue/unlock the notification again
CALL FUNCTION DEQUEUE_EMMKPF
EXPORTING
MODE_MKPF= co_e
MBLNR = xxxxx
MJAHR = xxxx
EXIT.
ELSE.
in case of no success, wait 1 seconds, before try again
CALL FUNCTION 'RZL_SLEEP'
EXPORTING
seconds = 1
EXCEPTIONS
argument_error = 1
OTHERS = 2. "#EC *
ENDIF.
ENDDO.
Regards,
Jitendar -
Block document flow update when creating a new sales document by reference
Hi,
I have set up copy rules to copy a quotation to a new quotation. However, my customer does not want the reference quotation to appear in the document flow. Could you please help me with this.
I have so far:
- Removed the value from 'Update document flow' in the item
- Put an empty value in 'Copy item number from reference' and 'Complete reference' at the header level
Could you please help me,
Thanks,Simply,
Create sales order (va01)
Goto EDIT in menu bar then choose Propose Item or press CTRL + f11 from key board.
Then provide Sales Document with default with/without quantity or selection list.
Hope it can assist you.
Thanks & Regards
JP -
Update prices at sales document.
Dear Gurus,
I would like to know if its possible to update prices to a sales document automatically, is there any standar program?
Thanks in advance.
Best regards!
Juan.Dear Juan,
I noticed you have received some answers from other contributors that probably covers your doubt.
However, I would like to remember another important exits that I have been using in almost every project to assure that sales order being edited get their price conditions updated.
MV45AFZB - FORM userexit_new_pricing_vbkd
MV45AFZB - FORM userexit_new_pricing_vbap
Suppose you are using some fields from vbkd as your keys for some of the discounts/surcharges, then you had better assure pricing will get updated when user manually changes any of these information. See an example below:
IF sy-ucomm NE 'LOES' AND " Insert or change transaction
" Any Pricing Relevant Sales Order data was changed?
( vbkd-zterm NE *vbkd-zterm OR " Payment Term was changed
vbkd-konda NE *vbkd-konda OR " Prc.Grp. was changed
vbkd-kdkg1 NE *vbkd-kdkg1 OR " Prc.Grp.Cond.1 ; was changed
vbkd-pltyp NE *vbkd-pltyp OR " Price List was changed
vbak-vkgrp NE *vbak-vkgrp ). " Sales Group was changed
" Then reprice keeping existing manual conditions
new_pricing = 'C'.
ENDIF.
Regards,
André L L Dantas -
Update vbup/vbuk from user-exit for sales document
Dear All.
Is it possible to update the sales document status for an item (vbup) from a user exit , customer function, badi, or other, in the billing document?
We'd like to make the control of updating the status tables dynamic, rather than based on the confiuration for an exception process.
For example, when service item (order related billing) is partially billed, depending on some conditions we would set the sales order service item to fully invoiced.
In this case vbup-FKSAA = C.
Many thanks!There is a BAdI LE_SHP_ITEM_STATUS that can change the item status in VBUP. Be sure to read the documentation first. It states
If you use this BAdI to change the delivery item status that was set in delivery
processing, it can affect further processing of the delivery extensively, and
lead to data inconsistencies. Therefore, SAP recommends that you only use
the BAdI to modify your own status fields.
Regards,
Brenda -
Updation of email address in the sales document
Hello People,
I have a requirement to update the mail adress for a certain partner function in a sales document in the user exit.
As in for e,g i would have to update the email address for the ship to party in a sales document header,
This is required because the address details in a sales document is independent of the customer master data. So any changes made here does not over write the master data.
But i am not able to find a structure with the mail address field in the user exit .
Could you suggest how this could be done ?
Suggestion would be appreciated and rewarded
ThankyouHi Brijesh,
Proceed as follows.
You can use the SELECT SINGLE <field> ..... stmt to retrieve the address number of the customer (ship to party).
or
1. Execute SE37 and input the FM KNA1_SINGLE_READER
2. execute this fumction module and input the customer number.. again execute.
3. This function module will return the details of the customer in the O_KNA1 output parameter. Take a note of the address number KNA1-ADRNR
4. Now pass this address number to the FM ADDR_GET_COMPLETE input parameter ADDRNUMBER.
5. Now run the FM and you can check that this one returns you the email info as well.
Try the following code in SE38 and then implement to your requirement.
REPORT ZSDN_CUST_ADDRESS.
TYPE-POOLS: szadr.
data: i_kunnr TYPE kna1-kunnr VALUE '66',
addrnr TYPE ADDR1_SEL-ADDRNUMBER.
data: o_kna1 type kna1,
i_addr type SZADR_ADDR1_COMPLETE,
wa_smtp LIKE LINE OF i_addr-ADSMTP_TAB.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = i_kunnr
IMPORTING
OUTPUT = i_kunnr.
CALL FUNCTION 'KNA1_SINGLE_READER'
EXPORTING
I_KUNNR = i_kunnr
I_BYPASSING_BUFFER = 'X'
IMPORTING
O_KNA1 = o_kna1
EXCEPTIONS
NOT_FOUND = 1
PARAMETER_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 4.
IF sy-subrc IS INITIAL.
move o_kna1-adrnr to addrnr.
CALL FUNCTION 'ADDR_GET_COMPLETE'
EXPORTING
ADDRNUMBER = addrnr
IV_CURRENT_COMM_DATA = 'X'
IMPORTING
ADDR1_COMPLETE = i_addr
EXCEPTIONS
PARAMETER_ERROR = 1
ADDRESS_NOT_EXIST = 2
INTERNAL_ERROR = 3
WRONG_ACCESS_TO_ARCHIVE = 4
OTHERS = 5.
ENDIF.
LOOP AT i_addr-ADSMTP_TAB INTO wa_smtp.
WRITE:/ wa_smtp-ADSMTP-SMTP_ADDR.
ENDLOOP. -
Update Sale Order Header Text through Enhancement
Hi Experts,
I Have a requirement to update the sale order Header Text , when the sale order is opened in VA02 and saved.
Here in I tried using edit_text, it updates sale order header text directly in DB during run time even before the save action is completed.
But I need to just fill the header text and that has to be saved during the save action only.
I tried coding the same in the user exit (userexit_save_document) but this user exit gets triggered only when there is some changes made to the document when opened in VA02 & Saved.
Is there any user exist to pass sale Order Header text and save when save button is clicked irrespective of the document been changed or not.
Thanks in advance
SathishHi Brad Bohn,
My actual requirement is to trigger an Idoc when the user goes to VA02 transaction and clicks save.
IDoc gets triggered only when there is some changes to that document, that is through NAST table entry based on the output configurations in NACE transaction.
Now that the user wants to trigger an IDoc even if there is no change (ie. to reprocess the IDoc) when he just opens a sale order in VA02 and click save.
It is not possible to trigger an IDoc through configurations when there is no actual change in VA02 and saved.
So it has to be forcefully sent by making some additions to the Order through coding, so I choose that Text box to fill some additional data and save .
Kindly Let me Know any thing could be done for this scenario.
Thanks in advance
Sathish -
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 -
Sales Document Flow - Ref. Value not showing correct currency
I have a question about document flow currency in ECC6.0. We recented upgraded to ECC6.0 from 4.7 and noticed the changes to document flow. We are a US based company with sales offices in Europe. Our European offices are finding that that document flow in ECC6.0 shows in base currency of USD. Even thought the sales order was entered in EUR euros. Is this intended to be this way; since it is causing our offices in Europe some confusion? I searched forums an SAP notes and did not find any references. Has anyone see this in ECC6.0
Example Document Flow: Line Level (I do not see Ref Value at header level)
Note Sales Document was entered in EUR euros.
Document Quantity Unit Ref. Value Currency
Standard Order 0025082768 / 10 12 EA 5,207.54 USD
...Delivery 0080211725 / 10 12 EA
.....Picking request 20100423 / 10 12 EA
.....Handling unit 0001221687 / 1 12 EA
.....GD goods issue:delvy 4901261948 / 1 12 EA 1,690.08 GBP
...Invoice 0092006736 / 10 12 EA 5,207.55 USD
Accounting document 0092006736 12 EA
If I highlight top line in document flow, I see the following in lower part of screen. This is the currency entered on the sales order.
0025082768 10 12 EA 3,847.80 EURSmile,
Thanks for pointing those configuration points out. I checked my system and found the following. I do not see any change documents for the configuration points, so they have been set this way since our implemenation in 2005.
XD02 is customer master change, the customer on my order is set to EUR in sales in distribution tabs.
OX02 - Company Code
1000 Middleton USD...ok
2000 London GBP ok
2100 Munich EUR...ok
2210 Amsterdam EUR...ok
4000 Hong Kong USD...ok
I think OVX5 is not set correctly, should be same as OX02. If I change them, do I need to run an update in the system for old data? Or is it as simple as changing the value here? I'm hesitant to change this not knowing how this will affect the system. Do you know?
OVX5 - Sales Org
1000 Middleton USD...ok
2000 London USD should be GBP
2100 Munich USD should be EUR
2210 Amsterdam USD...should be EUR
4000 Hong Kong USD...ok
Thanks,
Tony Romain
Maybe you are looking for
-
Button action outcome depends on a call to a stored procedure
Hi, I'm developing an application using JDeveloper 10.1.3.4, JSF and ADF BC 10.1.3.4. I've got a button "Update", his action outcome depends on the result of a store procedure, called by a method in my ApplicationModuleImpl (the actionListener of the
-
Only a small amount of my music, has moved across to all my devices. After must of my music there is a cloud with an exclamation mark??
-
I would like to paste a small 5" x 5" pdf on to a larger 24" x 36" pdf. How do I do that?
-
Hello everyone. I need help on ALE IDoc transaction codes in sap R/3 3.1H.My client is using SAP 3.1H system and i know the transaction codes for 4.6c. How different is the 3.1H system from 4.6c and what are the major difference between the transacti
-
Microsoft daemon do i really need to install
Microsoft daemon do i really need to install ? thanks