Using CI _ BBP _ ITEM _ SC
Hi,
I try to transfer a cuf field from catalogue to the SC.
I read the OCI documentation that explains 2 methods :
Method 1 :
I did not succeed in passing the value from catalogue to SC using method IF_EX_BBP_CATALOG_TRANSFER~ENRICH_ITEM_DATA
Here is my code to pass the new_item_cust_field1 froùcatalogue to the ztoto cuf field in the SC :
method IF_EX_BBP_CATALOG_TRANSFER~ENRICH_ITEM_DATA.
DATA: wa_sc_item_data TYPE BBP_PDS_SC_ITEM_D.
DATA: wa_catalog_content TYPE BBP_WS_OCI_ITEM_S.
LOOP AT catalog_content INTO wa_catalog_content.
LOOP AT et_sc_item_data INTO wa_sc_item_data
WHERE catalogitem = wa_catalog_content-cust_field1.
wa_sc_item_data-ztoto= wa_catalog_content-cust_field1.
MODIFY et_sc_item_data FROM wa_sc_item_data.
ENDLOOP.
ENDLOOP.
endmethod.
what's wrong in my code ?
Did anybody make it work ?
If yes, what are the step by step ?
Kind regards,
Yann
Hi Yann,
<u>Please try this code..</u>
Hope this will help.
method IF_EX_BBP_CATALOG_TRANSFER~ENRICH_ITEM_DATA.
DATA: wa_sc_item_data TYPE BBP_PDS_SC_ITEM_D.
DATA: wa_catalog_content TYPE BBP_WS_OCI_ITEM_S.
DATA: l_tabix TYPE sy-tabix.
ev_sc_structures_used = 'X'.
LOOP AT et_sc_item_data INTO wa_sc_item_data
WHERE catalogitem = wa_catalog_content-cust_field1
AND del_ind EQ space.
l_tabix = sy-tabix.
READ TABLE catalog_content INTO wa_cat_content INDEX l_tabix.
wa_sc_item_data-ztoto= wa_catalog_content-cust_field1.
MODIFY et_sc_item_data FROM wa_sc_item_data.
ENDLOOP.
endmethod.
Do let me know.
Regards
- Atul
Similar Messages
-
Can i use BAPI_ACC_DOCUMENT_POST for clearing open items of credit memo
Can i use BAPI_ACC_DOCUMENT_POST for clearing open items of credit memo
If yes kindly let me know the import parameters and what this BAPI returnsHi,
Use this
BAPI_PAYIT_POST_CLEARING
<b>Reward points</b>
Regards -
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 -
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.... -
Why can't I use the function of menu item 'issue delivery output'?
why can't I use the function of menu item 'issue delivery output' in main screen of delivery note?
And at the same time I can't use the button of printing in main screen of delivery note.
the main screen of delivery note I mean above is in screen of maintaining shipping data instand of the first screen of VL02N.
TKS in advance.Hi,
Because delivery will be having header level output and item level output. So if u try to print through main screen then system will not know whether it is header related or item related. That is the reason it is only print output at header level or item level but not in main screen.
I think u may have doubt like how billin will be issued output through Main screen. Because for billing both header and item level data are same..
Regards
Sankar -
How to use external CSS for standard items ?
Hi,
I would like to use my external CSS style-sheet for the standard items I add to my portal page.
I build an UI template with a CSS-link to my css style-sheet, and I used this UI template for my portal page. But it seems that items cannot use this UI template CSS reference.
Is there a way to use external CSS on standard items (text, url,...) ?
Thanks for your help,
Best Regards,
JC.AUDARDEasiest way I find to do it is to drop your css file in the portal/images folder. Make a hidden html portlet on your template and link to /images/mycss.css. You can then use it for many items such as text, links, html portlets, etc.
-
Why cannot I use hidden or display only item to store value for insert?
hi, Gurus:
I have a question:
I implemented a form with report region in a page, the update works OK, but the add function has a problem:
There is a column, offender_ID, which is a foreign key for another table, it should not be null during insert. However, even I pass the offender ID from master page when user click the create button, and it did shows in the form, it must be a text filed to insert successfully, why cannot I use hidden or display only item to store this value for insert? (If I use hidden or display only item, insert won't be successful, apex reports I tried to insert a null value to offender_ID column.)
Many Thanks in advance.
SamHi,
There is a column, offender_ID, which is a foreign key for another table, it should not be null during insert. However, even I pass the offender ID from master page when user click the create button, and it did shows in the form, it must be a text filed to insert successfully, why cannot I use hidden or display only item to store this value for insert? (If I use hidden or display only item, insert won't be successful, apex reports I tried to insert a null value to offender_ID column.)I think both hidden and display items have attributes that can cause problems because of different ways these items function than non-hidden and non-display-only items function. Display Only items have a "Setting" of "Save Session State" Yes/No? That can be a problem.
Would you do this? Make these items regular items instead and see if you can get those working. Then, we will try to change the fields back to hidden or display only.
Howard
Congratulations. Glad you found the solution.
Edited by: Howard (... in Training) on Apr 11, 2013 10:26 AM -
How to use "discontinuation data" in BOM item ?
Hi everyone!
I would like to use "discontinuation data" in BOM item , not in MRP4 view, how to set? thanks!
Dandan>
dandan li wrote:
>
>
> I want to know the "discontinuation data" in BOM item, not Priority of AltItemGroup !
Dear Dandan Li,
Plz Re-check Mr. SmanS Reply in that thread
it is Regarding As per ur query
More over Plz try to encourage your repliers always
[committed quantity in production order;
Like wise there are many other threads of ur's
Plz Don't misunderstand
Regards
Madhu -
Need to know the name of DSO used to load Header and Item level info in LO
Hi friends ,
can some one tell me the name of DSO used to load Header and Item Level information from Data sources - 2lis_11_vahdr and 2lis_11_vaitm .
plz make it fast
ThanksHi ,
It is 0SD_O03 from 2lis_11_vahdr and 0SD_O01 & 0SD_O02 from 2lis_11_vaitm.
Bye
Dinesh -
My ipad 2 just shows itunes and plug icon my computer wont take new version of itunes too old how do i get my ipad 2 working do not care about saving data just want to use this very expensive useless item!
My iPad2 works great now after IOS 8.1 Update
I did my iPad2 update thru iTunes on my iMac and it was sucking the iMacs memory very low during the update. Safari froze before loading the first web page and I did a hard boot and went fishing as I saw where it was going to take a long time to recover. When I tried again it wasn't quite right and then did one more hard boot and then did a Reset by going to General-Reset-"Reset all Settings" and it works real well now without loosing any data and in-home wi-fi clocks at 17Mbps download. Probably like most of you I’m sticking with OSX 10.9.5 Mavericks as it gets the job done very nicely and don’t need all that extra fancy stuff that probably will slow things down. -
I simply want to update the Skype app on my Iphone, but keep getting a message that says: must use itunes to download because item is 20MB. Help. Mack
Go to iTunes on your mac/pc and click on apps in your library.
Click check for updates at the bottom.
Selcet and start the skype update.
After this sync your newer version of skype to your iPhone -
Unable to move some items to Buckets by using option 'Move to' in Item dash
Hi All,
i am unable to move some items from one bucket to another bucket by using option "MOVE TO" in Item dashboard in screen.
and also some items(100 out of 95) are moving ine.
Can anybody help me
Thanks&Regards,
Dhananjaya
Edited by: cvdreddy on Oct 4, 2011 3:45 PMHi Amit,
I am not getting any error.when i am trying to move item from one bucket to another bucket, its not moving.
Regards,
Dhannajaya -
Tcode to be used to approve a workflow item
Hi Gurus,
Which tcode can be used to approve a workflow item manually?
br
jackSWO1
SELECT THE BUSINESS OBJECT
IF IT IS SC
BUS2121
EXUCUTE
INSTANCE
GIVE SC NUMBER
GO TO METHOD
SET RELEASED
EXECUTE
SC APPROVED.
THIS IS BACKEND METHOD .........FIRE FIGHTING NOT ALWAYS.. -
If I have money on my App Store account can I use that money to purchase items from the Apple Store app
No. Those use separate systems.
(120229)
Maybe you are looking for
-
The best way to get wireless internet?
I have a new g5 but didnt know it doesnt come with aiport card. What adapter would work best to get signal from our linksys router in the house? thanks
-
PO email output type program causes unable to print preview
Hi Guys, i am customising a program for print preview email for PO output type, but the preview does not come out , here is the code: form entry_neu using ent_retco ent_screen. data: dtext like tline. data: l_druvo like t166k-druvo, l_nas
-
HOW DO I USE DEFAULT THEME MUSIC & SAVING
Hello from Italy. My question does concern the default theme music for the travel theme. I realize this is a bit off subject but I am new to this board and can't figure out how to enter a new topic. Perhaps you can help me. I actually would like use
-
Importing PDF files into iPhoto
I seem to remember being able to import pdf files into iPhoto; now I am unable to. When I click on the pdf option in Print, "Save PDF to iPhoto" is one of the options given. If I click it, and try to save pdfs to iPhoto, I get a dialog box asking me
-
Install database server with the existance of 9iAS and internet directory
I want install the 9i database to a Sun Unix system. But that system already has the internet directory and 9i application server with the infrastructure. What are those steps I should follow to install the database? Where can I find any documentatio