URGENT: FM to update subcontract PO item component's field batch 'CHARG'
Hi, Experts,
Is there a FM to update subcontract PO item component's field batch 'CHARG' ?
Thanks
Hi,
I want to change filed <b>]BATCH</b> in subcontracting PO item using FM 'BAPI_PO_CHANGE' , but the parameter TABLES 'POCOMPONENTS' doesn't contain filed 'BATCH', is there another FM to substitute this one ?
Thanks,
Sun Jimin
Similar Messages
-
Trying to follow Serge Luca's Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007. http://sergeluca.spaces.live.com/blog/cns!E8A06D5F2F585013!859.entry
I have an onWorkflowActivated, followed by an ifElse condition and a log to history.
In the IfElse, each branch has a code segment, that trys to update the status column in the list that the workflow is attached to.
private void Authorize_ExecuteCode(object sender, EventArgs e)
// tried serveral methods
WorkflowProperties.Item["Status"] = "Automatically Approved";
// tried all of the following (one at a time)
item.update();
WorkflowProperties.Item.Update();
WorkflowProperties.Item.SystemUpdate();
//tried this as well.
Microsoft.SharePoint.SPListItem item = WorkflowProperties.Item;
item["Status"] = "Automatically Approved";
item.Update() ;
On the update call I keep getting "Invalid data has been used to update the list item. The field you are trying to update may be read only."
Could someone explain how to update "Status" column of the list item that the workflow is working on?
Thank you very much.
Bill
Hi:
you can do the following:
add the following code to the workflow.xml file (under the MetaData section)
Code Snippet
<ExtendedStatusColumnValues>
<StatusColumnValue>Branch1</StatusColumnValue>
<StatusColumnValue>Branch2</StatusColumnValue>
</ExtendedStatusColumnValues>
then add 2 SetState activities one in each branch of the IfElse.
for the code behind of setState1 (branch1) write the following code:
Code Snippet
state = Convert.ToInt32(SPWorkflowStatus.Max);
for setState2 (branch2) write the following:
Code Snippet
state = Convert.ToInt32(SPWorkflowStatus.Max) + 1;
where state is the variable assigned to the field State in the properties of the SetState(design lever), or instead of state u can use the following code:
Code Snippet
((SetState)sender).State
where sender is the object sent through the function parameter.
hope this answered your question
Best Regards -
Hi.
I am getting below error while adding value to look-up field.
Invalid data has been used to update the list item. The field you are trying to update may be read only.
I have tried many forums ans post but didn't come to know what's the root cause of issue. I am also posting Code for creating and adding lookup field.
CAML to create lookup field (It works Fine)
string lkproductNumber = "<Field Type='Lookup' DisplayName='Product Number' StaticName='ProductNumber' ReadOnly='FALSE' List='" + pNewMaster.Id + "' ShowField='Product_x0020_Number' />";
Code to insert value to lookup field
ClientContext client = new ClientContext(SiteUrl);
client.Load(client.Web);
client.Credentials = new NetworkCredential(this.UserName, this.Password, this.Domain);
// Lookup Lists
List pmList = client.Web.Lists.GetByTitle("Product_Master");
//List Conatining Lookup Columns
List piList = client.Web.Lists.GetByTitle("Product_Inventory");
client.Load(piList);
query.ViewXml = "<View/>";
ListItemCollection collection = pmList.GetItems(query);
client.Load(collection);
client.ExecuteQuery();
int prodid=0;
foreach (ListItem item in collection)
if (Convert.ToString(item["Product_x0020_Number"]) == ProductNumber)
{ prodid = Convert.ToInt32(item["ID"]); }
ListItem piItem = piList.AddItem(new ListItemCreationInformation());
piItem["Product_x0020_Number"] = new FieldLookupValue() { LookupId = prodid };
piItem.Update();
client.ExecuteQuery();
Exception Detail
Microsoft.SharePoint.Client.ServerException was caught
Message=Invalid data has been used to update the list item. The field you are trying to update may be read only.
Source=Microsoft.SharePoint.Client.Runtime
ServerErrorCode=-2147352571
ServerErrorTypeName=Microsoft.SharePoint.SPException
ServerStackTrace=""
StackTrace:
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at WebServiceProviders.ClientServices.NewProductInventory() in Z:\.............ClientServices.cs:line 889
InnerException:
Quick response is highly appreciated.
Thanks
MeharTry some thing like below,
your data value that needs to be update should be in this format "ID of the lookup";#"Title of the Lookup"
For example,
listItem["Product_x0020_Number"]
= "1;#iPhone";
listItem["Product_x0020_Number"]
= "2;#Mobile";
Hope this helped you.... -
Hi Everyone,
i am facing one problem ...
when i am updating an SharePoint List item, it is throwing above error....
This is my code......
try
tbl = getListDateTable("NCR");
DataTable dt = tbl;
oWebsite = mysite.OpenWeb();
oList = oWebsite.Lists["NCR"];
SPListItem itemToUpdate = null;
foreach (SPListItem listItem in oList.Items)
listItem.Update();
workOrderID = Convert.ToInt32(txtTitle.Text);
itemToUpdate = listItem;
//SPListItem itemToUpdate = oList.GetItemById(workOrderID);
//itemToUpdate.Fields["Title"].ReadOnlyField = false;
//string str = ddlStatus.SelectedValue;
itemToUpdate["Title"] = txtTitle.Text;
itemToUpdate["JobNumber"] = txtJobNumber.Text;
itemToUpdate["PartNumber"] = txtPartNumber.Text;
itemToUpdate["PartDescription"] = txtPartDescription.Text;
//itemToUpdate["RequiredBy"] = txtRequiredBy.Text;
itemToUpdate["ReportedBy"] = txtReportedBy.Text;
itemToUpdate["WrittenBy"] = txtWrittenBy.Text;
//itemToUpdate["DateOpened"] = txtDateOpened.SelectedDate;
//itemToUpdate["DateClosed"] = txtDateClosed.SelectedDate;
itemToUpdate.Update();
oList.Update();
// bind();
catch (Exception ex)
throw ex;
Thanks
viswanathHi Viswanath,
If you are using People/User Type Field Column then use below code methord
SPUser user = web.EnsureUser(loginName);
item["UserTypeFieldName"] = user;
Lookup Type Field Column then use below code methord
public static SPFieldLookupValue GetLookupFieldFromValue(string lookupValue,string lookupSourceColumn, SPList lookupSourceList)
SPFieldLookupValue value = null;
SPQuery query = new SPQuery();
query.Query = "<Where><Eq><FieldRef Name='" + lookupSourceColumn + "'/><Value Type='Text'>" + lookupValue + "</Value></Eq></Where>";
SPListItemCollection listItems = lookupSourceList.GetItems(query);
if(listItems.Count > 0 )
value = new SPFieldLookupValue(listItems[0].ID,lookupValue);
return value;
item["LookupField"] = GetLookupFieldFromValue(lookupfieldValue, lookupSourceColumn, listName);
Please mark the replies as answers if they help or unmark if not. -
Hi All
I have one sharepoint list with huge data i.e with 20columns and more than 200 records with the fields .
Suppose lets consider there are A,B,C,D,E,F,G,H columns.
Now i want to create one form with the fields A,C,E.
When the user enter the existing data of list for columns A,C..based on C value the E column value should change and update that particular item in the list.
Please guide me without visual web part can we acheive this by Sharepoint designer 2013 or what would be the preferable solution.
Please help me on this as it is very urgent from me..
Thanks in Advance
Sowjanya GHi,
According to your post, my understanding is that you wanted to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.
I recommend to create workflow associated to the list and then start the workflow automatically when an item is changed.
In the workflow, you can add condition and actions as below:
If current item: C equal to Test1
Set E to Test2
Then the value of the filed E will be changed based on the value of the filed C.
In addition, if you create the form using InfoPath, you can add rule to the filed C as below:
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
How can i update an existing item in sap using CSV file?
Hi,
i am trying to update an existing Item in SAP using a CSV file.
in the message log i get an error message that the item already exists.
what should i do in order to update the existing record?
Thanks, UdiHi..........
I would sugest you to use Tab delimited file and choose proper option in order to update the itsm master in DTW......
Regards,
Rahul -
How to update an existing item in a sharepoint list using the WSS adapter for Biztalk
Is there a way that a record in SP list be updated using WSS adapter in biztalk ?
BizTalk 2013 and SP 2013 ..
Regards
Ritu Raj
When you see answers and helpful posts,
please click Vote As Helpful, Propose As Answer, and/or Mark As AnswerA ListItem has its own unique row id so in all likelihood, an insert with the same data will result in a new list entry. The Lists Web Service however, has an UpdateListItem method which will take an update request. [refer
http://msdn.microsoft.com/en-us/library/office/websvclists.lists.updatelistitems(v=office.15).aspx ]
There is another note in the conference (marked answered) to your List Item Update problem. Probably worth a try too. [refer
http://social.msdn.microsoft.com/Forums/en-US/bee8f6c6-3259-4764-bafa-6689f5fd6ec9/how-to-update-an-existing-item-in-a-sharepoint-list-using-the-wss-adapter-for-biztalk?forum=biztalkgeneral ]
Regards. -
Contract Release value is not updated with Limit item value
We have SRM 4.0 with ECS scenario.
Contract are created in SRM and replicated to ERP.
If we create PO with Service line and Limit line using contract in both of these line items, contract Release value is getting updated only with Service line item value.
But the contract Total value is the addition of Service and Limit value of PO.
Why Contract Release value is not getting updated with Limit item value. Please help as early as possible.Hi Sandeep
Yes. there are various reasons .upon your contract incorrect status and linkage not establised / or more attachment in SRM GOA.
what type of contract are you using? GOA or CCTR
If it is GOA - which version of SRM and service pack ?are you in ?
If it is a GOA , BLAREL idoc might failed to post the release value in the SRM .
How contracts are created material / mat group ?
to fix or understand the issue, you need to recreate the issue.
what is the ERROR in BLAREL in SRM idoc monitoring ? -
Update material doc.num in assignment field of GR/IR line item of a/c doc
HI Experts,
please tell me the solution for my problem
My requirement : Transaction is : MIGO
Before posting of material document, update material document number in assignment field of GR/IR line item of accounting document (WE) at number commitment stage
Update MKPF-MBLNR (Material Document Number) in BSEG-ZUONR
but already i tried AC_DOCUMENT i got a problem .
What i did,
first use MB_DOCUMENT_BADI with method
mb_document_before_update.
here i tried to get the material document and export into memory
after use AC_DOCUMENT With method
change_after_check.
here Import the material document doc num and pass it to Assignment field in
but it is not working
when i debug first trigger the AC_DOCUMENT And then it goes to MB_DOCUMENT_BADI
Plese help me regarding this.
Moderator message: please open only one thread per issue.
Edited by: Thomas Zloch on Feb 9, 2012Hi,
Thanks, I will check the same. Well, I will be clearing the documents with reference to MIGO number itself. When I do my delivery chrgs migo, that number I need to be populated in my line item's assignment field. Not only that but I the same number should get populated in the delivery charges miro. Since my miro is with ref to PO it becomes difficult to fetch the field.
Plz let me know if you can help me on this as well.
Thanks,
Priyanka. -
Validation Error when updating Feature work item to completed state?
We are on the latest version of TFS 2013 and have customized process templates based off of the Scrum template.
We have a custom workflow for the Feature work item type. I get an error when trying to update the state to custom done state of "Prod Deployment Successful". The error I receive is below:
TF237165: Team Foundation could not update the work item because of a validation error on the server etc etc.
I have TFS Admin rights as well as project and project collection Admin rights.
Custom States:
Planned
Canceled
On Hold
In Progress
Ready For QA
QA Deployment Failed
QA Deployment Successful
Ready For Stage
Stage Deployment Failed
Stage Deployment Successful
Ready For Prod
Prod Deployment Failed
Prod Deployment Successful
Custom Workflow:
" " TO Planned
Planned TO Canceled
Planned TO On Hold
Planned TO In Progress
In Progress TO On Hold
In Progress TO Ready For QA
On Hold TO In Progress
Ready For QA TO QA Deployment Failed
Ready For QA TO QA Deployment Successful
QA Deployment Failed TO Ready For QA
QA Deployment Failed TO In Progress
QA Deployment Successful TO Ready For Stage
QA Deployment Successful TO Ready For Prod
Ready For Stage TO Stage Deployment Failed
Ready For Stage TO Stage Deployment Successful
Stage Deployment Failed TO Ready For Stage
Stage Deployment Failed TO In Progress
Stage Deployment Successful TO Ready For Prod
Ready For Prod TO Prod Deployment Failed
Ready For Prod TO Prod Deployment Successful
Prod Deployment Failed TO Ready For Prod
Prod Deployment Failed TO In Progress
I have also updated the Process Configuration file to map the states to the meta states so I can show the custom states on the Feature board. The section in the process configuration file that relates to Feature is below:
<States>
<State type="Proposed" value="Planned" />
<State type="InProgress" value="Canceled" />
<State type="InProgress" value="On Hold" />
<State type="InProgress" value="In Progress" />
<State type="InProgress" value="Ready For QA" />
<State type="InProgress" value="QA Deployment Failed" />
<State type="InProgress" value="QA Deployment Successful" />
<State type="InProgress" value="Ready For Stage" />
<State type="InProgress" value="Stage Deployment Failed" />
<State type="InProgress" value="Stage Deployment Successful" />
<State type="InProgress" value="Ready For Prod" />
<State type="InProgress" value="Prod Deployment Failed" />
<State type="Complete" value="Prod Deployment Successful" />
</States>
The error ONLY happens when I try to update a Feature state to "Prod Deployment Successful". I have looked at other posts and searched the internet and have found no help for my exact issue in TFS 2013. For some
reason, I can't update the state from "Ready For Prod" to "Prod Deployment Successful". Does anyone have any ideas of what could be wrong or causing my issue?
Thanks in advance!I finally figured out my issue and fixed it.
I had to update a reference name in the WIT xml file to Common.BusinessValue instead of Closed. -
I have created a farm solution and then i deploy it to SharePoint server, the code looks as follow, and i use it to update a page info values (as the current page values represents old info):-
[ToolboxItemAttribute(false)]
public partial class VisualWebPart1 : WebPart
// Uncomment the following SecurityPermission attribute only when doing Performance Profiling using
// the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
// for production. Because the SecurityPermission attribute bypasses the security check for callers of
// your constructor, it's not recommended for production purposes.
// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
public VisualWebPart1()
protected override void OnInit(EventArgs e)
base.OnInit(e);
InitializeControl();
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
using (SPWeb web = site.OpenWeb())
SPList list = web.Lists["Pages"];
web.AllowUnsafeUpdates = true;
foreach (SPListItem items in list.Items)
items["Author"] = "SharePoint";
items["Created"] = "01/08/2014 01:44 PM";
items.Update();
list.Update();
web.AllowUnsafeUpdates = false;
protected void Page_Load(object sender, EventArgs e)
but when i try adding this web part to a page i got the following error:-
Invalid data has been used to update the list item.The field you are trying to update may be read only
so can anyone advice?i only changed lines bitween
web.AllowUnsafeUpdates = true;
and
web.AllowUnsafeUpdates = false;
and other parts of code remains without change
so it will updates all pages in current web
yaşamak bir eylemdir -
In the past, when I updated iTunes, some items would be 'lost'. I quit updating, still running 10.6. I do keep my files on an external hard drive, which I plug in before starting iTunes. If I leave the drive off, and update, would that keep me from losing any files? Also, does anyone know how to search the iTunes store by price? I'm particularly interested in movies and audiobooks... Thanks
iTunes does not have provision for automatically storing one kind of media on a separate drive, so you have some basic decisions to make first. Do you want these movies to still appear in your iTunes library, or are you content with browsing filenames on a drive in Finder when you want to look for one? The second's the easiest thing because then you don't have to have an external drive permanently turned on and attached to your computer (wired or wireless). To do that you literelly only need to drag your movies folder to an archive drive and delete movies from iTunes. To watch them again you can add it back to iTunes while holding down the option key so the movie is used from its location on the external drive.
There's ways to move the movies to an external drive while keeping them in iTunes but the external drive iwll always have to be turned on and connected to the computer or you will see a bunch of broken link exclamation marks.
Realize what you are talking about is not "backup". Backup (which you should do) is putting a second or more copy of items on external drives for the day when your internal drive fails and everything on it is lost, inclduing all your home photos and perhaps things that have been pulled from the iTunes Store and can no longer be re-downloaded. -
Fbl1n txn for updating vendor line item
hello every one iam trying to update vendor line item when a billing document get cancelled in vf11 i have tried bapi BAPI_ACC_DOCUMENT_REV_POST .
the requirement is whenever a billing document get cancelled the commision need to get credited again for example if vendor line item is
St Assignment DocumentNo Type Doc. Date S DD Amount in local cur. LCurr Clrng doc. Text
COMMISSION 1700000014 CP 31.08.2011 71.26- INR
it need to get like this
St Assignment DocumentNo Type Doc. Date S DD Amount in local cur. LCurr Clrng doc. Text
COMMISSION 1700000014 CP 31.08.2011 71.26 INR
that means the amount in local currency need to get into + one like above
Please help ASAP & if some one give me code also that will be very helpul for meHii ali this is my code & below iam showing u what wasthe data in my return table please suggest me what to do
DATA : P_REVERSAL LIKE BAPIACREV ,
TRAN_DOC(20) TYPE C ,
p_busact LIKE BAPIACHE09-BUS_ACT ,
p_objkey LIKE BAPIACREV-OBJ_KEY .
DATA : P_RETURN LIKE TABLE OF BAPIRET2 ,
WA_RETURN TYPE BAPIRET2 ,
WF_REMARKS ,
PLANT TYPE VBRP-WERKS ,
bill_no type vbrk-vbeln ,
belnr type BELNR_D ,
AWKEY type AWKEY .
data : date1 type sy-datum .
date1 = sy-datum+0(4) .
select single belnr AWKEY from bkpf into (belnr , AWKEY) where blart = 'CP' and
budat = sy-datum and
xblnr = vbrk-kidno . "bill_no .
IF SY-SUBRC = 0 .
CONCATENATE belnr AWKEY+10(4) date1 INTO TRAN_DOC .
ENDIF .
SELECT SINGLE WERKS FROM VBRP INTO PLANT WHERE VBELN = vbrk-kidno .
p_reversal-obj_type = 'BKPFF'.
p_reversal-obj_key = tran_doc.
p_reversal-obj_key_r = tran_doc.
p_reversal-pstng_date = sy-datum.
p_reversal-comp_code = tran_doc+10(4).
p_reversal-reason_rev = '02'.
p_reversal-ac_doc_no = tran_doc+0(10).
p_busact = ' '.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = p_reversal
bus_act = p_busact
IMPORTING
obj_key = p_objkey
TABLES
return = p_return.
IF sy-subrc = 0.
---commit Work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ELSE .
*****Use the below statement, if the BAPI is sending back the 'RETURN' internal table.
READ TABLE p_return INTO WA_RETURN WITH KEY TYPE = 'F'.
IF SY-SUBRC EQ 0 .
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
MSGID = WA_RETURN-ID
MSGNR = WA_RETURN-NUMBER
MSGV1 = WA_RETURN-MESSAGE_V1
MSGV2 = WA_RETURN-MESSAGE_V2
MSGV3 = WA_RETURN-MESSAGE_V3
MSGV4 = WA_RETURN-MESSAGE_V4
IMPORTING
MESSAGE_TEXT_OUTPUT = WF_REMARKS.
ENDIF.
ENDIF.
1 E RW 609 Error in document: BKPFF $ DEVCLNT300 000000 BKPFF $
2 E RW 632 Document BKPFF 1700000061WPL12011 DEVCLNT300 cannot be reversed 000000 BKPFF 1700000061WPL12011
3 E F5 814 Document type ZX not defined 000000 ZX
4 E F5 814 Document type ZX not defined 000000 ZX -
BDC recording(updating two line items in a single call)
Hi,
I have a problem with the transaction PK31,while recording we enterd material number,plant,supply area in the first screen,after that it display line items for that control cycle,I want to update some fields in that line items,when i updated quantity and status fields in the first line item after that i cliked the change "qty/status button" and it saves that field values and it comes out from the transaction.
can you please suggest what is the solution for updating two line items in a single call(PK31 transaction).Hi,
In one screen . Put 2 containers with different names.
cont1,cont2
on each of the container call grid,grid1 like below .
1. this is for item line display
IF g_r_grid IS INITIAL.
CREATE OBJECT g_r_cont
EXPORTING container_name = 'CONT1'.
g_r_variant = sy-repid.
*--Build field catalog
PERFORM build_field_catalog.
*--Layout selection
g_r_layo-cwidth_opt = g_c_set.
g_r_layo-no_rowmark = g_c_set.
g_r_layo-sel_mode = space.
CALL METHOD g_r_grid->set_table_for_first_display
EXPORTING
i_buffer_active = g_c_set
is_variant = g_r_variant
is_layout = g_r_layo
i_save = g_c_set
i_default = g_c_set
CHANGING
it_outtab = g_t_alv
it_fieldcatalog = g_t_fieldcat
it_sort = g_t_sort.
endif
1. this is for error data display
IF g_r_grid1 IS INITIAL.
CREATE OBJECT g_r_cont
EXPORTING container_name = 'CONT2'.
g_r_variant = sy-repid.
*--Build field catalog
PERFORM build_field_catalog.
*--Layout selection
g_r_layo-cwidth_opt = g_c_set.
g_r_layo-no_rowmark = g_c_set.
g_r_layo-sel_mode = space.
CALL METHOD g_r_grid->set_table_for_first_display
EXPORTING
i_buffer_active = g_c_set
is_variant = g_r_variant
is_layout = g_r_layo
i_save = g_c_set
i_default = g_c_set
CHANGING
it_outtab = g_t_error
it_fieldcatalog = g_t_fieldcat
it_sort = g_t_sort.
endif -
Function Module to Change / Update BOM Line Items
Hi,
I need a Function Module to Change / Update BOM Line Items.
Please help.
Thanks.Try this FM - CSAP_MAT_BOM_MAINTAIN
Maybe you are looking for
-
Blank screen in iTunes after updating to iOS 6 on new iPad
I installed iOS 6 on my new iPad yesterday. When I open iTunes, it opens as blank white with black bar at top and rest white blank. My WiFi and everything else is working perfectly including Siri. I have tried rebooting the iPad (using both the norma
-
Mac keeps FREEZING and screen goes BLACK!?!
My computer freezes up and eventually the screen goes black withe the rainbow waiting mouse. So I restart it manually by pressing the button, and turn it back on again. I login, the old programs come back on. I try to click something. The screen free
-
Lightroom 5 keeps asking for my serial number. Help me stop this madness!
I have the latest version of lightroom 5. My copy is constantly asking me to enter my serial number. It does not ask me everytime I launch LR, but maybe every 5 to 8 times I open LR. I am on a windows 7 laptop. Can someone please help me? Thank you
-
Style Elements - defining your own ?
hi, I have a list of typography elements to define styles for - can map most to 'heading1', 'heading2', 'Portlet Header', etc. style elements in the portal style. however, to make more meaningful names for our site - e.g. 'Content Header', 'copy text
-
Greetings, I have a 3 months of SAP SD end user experience and I have skimmed the Text Implementing SAP R/3 sales and distribution by Glynn C.Williams I have collated the material for the SD certification and also intended to do the training at SAP