To Modify a field value with field symbols
we had a requirement like we are getting in a floating point value in a field of an IDoc segment like 12.327- .Here if we see that the negative sign is after the floating point value and if we try to insert this into a database then it will throw out an error.Before inserting the value we need to covert the incoming value in the form -12.327.
I used the field symbols inorder to get the values and to change them.
But iam not able to modify the internal table from the new value.
Here is my sample code.
DATA: IT_MBEW TYPE TABLE OF MBEW,
WA_MBEW TYPE MBEW,
IT_DFIES TYPE TABLE OF DFIES,
WA_DFIES TYPE DFIES,
IT_DD03L TYPE TABLE OF DD03L,
WA_DD03L TYPE DD03L,
L_FIELD TYPE VALUE,
WA_VALUE TYPE mbew,
L_MBEW TYPE DDOBJNAME VALUE 'MBEW'.
FIELD-SYMBOLS: <FS1> TYPE ANY.
FIELD-SYMBOLS: <FS3> TYPE ANY.
FIELD-SYMBOLS: <FS2> TYPE ANY.
SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_MBEW
FROM MBEW WHERE MATNR = '000000000000100110'.
LOOP AT IT_MBEW INTO WA_MBEW.
WA_MBEW-SALK3 = - 354471.
MODIFY IT_MBEW FROM WA_MBEW.
ENDLOOP.
To call the FM inorder to get the fieldnames for MBEW table
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
TABNAME = L_MBEW
FIELDNAME = ' '
LANGU = SY-LANGU
LFIELDNAME = ' '
ALL_TYPES = ' '
GROUP_NAMES = ' '
UCLEN =
IMPORTING
X030L_WA =
DDOBJTYPE =
DFIES_WA =
LINES_DESCR =
TABLES
DFIES_TAB = IT_DFIES
FIXED_VALUES =
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SELECT TABNAME FIELDNAME DATATYPE POSITION INTO CORRESPONDING FIELDS OF TABLE
IT_DD03L FROM DD03L
WHERE TABNAME = 'MBEW'
AND DATATYPE = 'CURR'
ORDER BY POSITION ASCENDING.
*LOOP AT IT_MBEW INTO WA_MBEW.
LOOP AT IT_MBEW assigning <fs1>.
ASSIGN WA_MBEW TO <FS1>.
do.
LOOP AT IT_DD03L INTO WA_DD03L.
READ TABLE IT_DFIES INTO WA_DFIES WITH KEY FIELDNAME = WA_DD03L-FIELDNAME
DATATYPE = WA_DD03L-DATATYPE.
IF SY-SUBRC = 0.
ASSIGN WA_DFIES-FIELDNAME TO <FS2>.
ASSIGN COMPONENT SY-TABIX OF STRUCTURE <FS1> TO <FS3>.
MOVE <FS3> TO L_FIELD.
CONDENSE L_FIELD.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
VALUE = L_FIELD.
IF SY-SUBRC = 0.
ASSIGN L_FIELD TO <FS3>.
MODIFY ITMBEW INDEX SY-TABIX FROM <FS3>._
ENDIF.
ENDIF.
ENDLOOP.
*enddo.
ENDLOOP.
The Modify statement is not working.....Plesae help me in this regard.
Thanks
Srinivas
Hello.
When you write,
LOOP AT it_mbew ASSIGNING <fs1>.
ENDLOOP.
you don't need to use statements:
ASSIGN WA_MBEW TO <FS1>
nor
MODIFY it_mbew
after that.
If you just write:
LOOP AT it_mbew ASSIGNING <fs1>.
<fs1>-field1 = 'A'.
<fs1>-field2 = 'B'.
ENDLOOP.
all records of it_mbew will have field1 = 'A' and field2 = 'B'.
The point is, statement LOOP assigning <fs1> will make the field symbol to became a pointer to the records of the internal table. So, if you change the field symbol, you are changing the internal table already.
Regards.
Valter Oliveira.
Similar Messages
-
Can not set OARG.cstAllcAcc field value with CustomsGroups Object
Can not set OARG.cstAllcAcc field value with CustomsGroups Object, please open this field in this Object because it is a key field related to financial system.
I guess, it should work; instead of html:submit, try with button.
-
[LiveCycle Designer] Send Field Value with FDF Response
Hiya. I'm trying to send two FDF responses, a status message and a field/pair value, from a PHP script that has processed a HTTP POST. The status message is sent to the form successfully, but the field value is not sent to a form created in LiveCycle Designer (ES4 Version 11). Here's what I have:
<?php
header('Content-type: application/vnd.fdf');
// read and store the data however you want
// reply with some FDF data
echo <<<RESPONSE
%FDF-1.2
1 0 obj
<< /FDF <<
/Status (Wham bam! Journal data sent electronically. Save a copy of this PDF for your records.)
/Fields [ <</T(batchnum)/V(testt)>> ]
>>
>>
endobj
trailer
<< /Root 1 0 R >>
%%EOF
RESPONSE;
?>
<?php
I think I have tried the gamut, removed "!", "copy", "for" from the status message; adding quotes, single and double, as well as ``; spacing; changing and verifying field names; send only the /Status and sending only /Fields (btw no errors while is still not sent); and on. Additionally, the above PHP code works perfectly, sending both status and fields, on a form created in Acrobat Pro XI. But no success in LiveCycle where I need the form created to dynamically manage rows and such. Ideas? Anyone?It looks like the FDF you've written was designed for an AcroForm. You can still use a FDF on a XFA form, but it has to be done a bit differently. Use JavaScipt inside the FDF to set your fields. E.g.:
%FDF-1.2
1 0 obj
<<
/FDF
<<
/JavaScript << /After (FieldIWantTomodify.rawValue = ("My new value");) >>
>>
>>
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF -
Missing class for indicator field value [changed-fields-locking-policy]
-------<br>
Edit:<br>
Please, ignore the post below. I found the problem here. The real problem is reported in my other post.<br>
-------<br>
<br>
Hello,<br>
<br>
In order to test the optimistic locking by fields, I created a very simple TopLink project via the TopLink Workbench. It only consists of one table that was mapped via TopLink's own "Add or Update Existing Tables from Database". I made no modifications to the automatically generated mappings.<br>
<br>
After I set up the rest of the project, I ran it and it ran okay.<br>
<br>
Then I went to the table descriptor, then to the "Locking" tab, and then I selected "Optimistic Locking" -> "By Fields" -> "Changed Fields".<br>
<br>
That was ALL I changed.<br>
<br>
And when I tried to run the project this time, I got the following exception:
<blockquote>
Exception [TOPLINK-43] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DescriptorException
Exception Description: Missing class for indicator field value [toplink:changed-fields-locking-policy] of type [class java.lang.String].<br>
Descriptor: XMLDescriptor(oracle.toplink.descriptors.VersionLockingPolicy --> [DatabaseTable(locking-policy)])<br>
at oracle.toplink.exceptions.DescriptorException.missingClassForIndicatorFieldValue(DescriptorException.java:878)<br>
at oracle.toplink.internal.ox.QNameInheritancePolicy.classFromRow(QNameInheritancePolicy.java:109)<br>
at oracle.toplink.mappings.foundation.AbstractCompositeObjectMapping.valueFromRow(AbstractCompositeObjectMapping.java:150)<br>
at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1012)<br>
at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:241)<br>
at oracle.toplink.internal.ox.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:128)<br>
at oracle.toplink.ox.mappings.XMLCompositeCollectionMapping.buildCompositeObject(XMLCompositeCollectionMapping.java:157)<br>
at oracle.toplink.mappings.foundation.AbstractCompositeCollectionMapping.valueFromRow(AbstractCompositeCollectionMapping.java:735)<br>
at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1012)<br>
at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:241)<br>
at oracle.toplink.internal.ox.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:128)<br>
at oracle.toplink.internal.ox.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:284)<br>
at oracle.toplink.internal.ox.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:265)<br>
at oracle.toplink.internal.ox.record.DOMUnmarshaller.unmarshal(DOMUnmarshaller.java:152)<br>
at oracle.toplink.ox.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:339)<br>
at oracle.toplink.tools.workbench.XMLProjectReader.read(XMLProjectReader.java:162)<br>
at oracle.toplink.tools.workbench.XMLProjectReader.read(XMLProjectReader.java:209)<br>
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.loadProjectConfig(TopLinkSessionsFactory.java:307)<br>
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.createSession(TopLinkSessionsFactory.java:241)<br>
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildServerSessionConfig(TopLinkSessionsFactory.java:215)<br>
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildSession(TopLinkSessionsFactory.java:168)<br>
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildTopLinkSessions(TopLinkSessionsFactory.java:124)<br>
at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:103)
</blockquote>
Can anybody tell me what that means? And why do I see "VersionLockingPolicy" in the stack trace? I explicitly specified locking "By Fields".<br>
<br>
Here's a fragment from the project XML file:
<blockquote>
<toplink:locking xsi:type="toplink:changed-fields-locking-policy"/>
</blockquote>
Is this a TopLink bug or am I doing something wrong? (By the way, if I choose optimistic locking by "All fields", it works. But locking by "Changed fields" doesn't.)<br>
<br>
Best regards,<br>
Bisser
Message was edited by:
bisserOoooops, sorry, guys!
I was using TopLink 10.1.3.0 JARs to run a project created via TopLink 10.1.3.1 Workbench. That was the reason for the exception.
I ran across the REAL problem, however. The one that was occurring when I created the TopLink project via JDeveloper 10.1.3.1 and ran it via JDeveloper 10.1.3.1. That's why I decided to try with TopLink 10.1.3.1 Workbench instead of JDeveloper 10.1.3.1.
I will report the problem in a clean separate post. -
I want to display one column values with multiple symbols
i am created one report.
my column name is offshore & on shore i want display 3 values with % symbol, then i want show 4 th value as $ 2000,
but it was allowing only one format $ or % but i need to display symbols with my values.Try the following :
give a name to the following formula like @getvalue
Numbervar x;
if
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex)= 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Employee"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Contractor"), CurrentSummaryIndex) = 0 and
//(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mgt consult"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Clerical"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Other"), CurrentSummaryIndex) = 0
then
x:=0
else
x:=(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex))
(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Employee"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Contractor"), CurrentSummaryIndex) +
//GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mgt consult"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Clerical"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Other"), CurrentSummaryIndex)
) * 100
Now create a new formula and check the value of the above formula :
if {@getvalue} > 50 Then
"$"&{@getvalue}
else
{@getvalue}&"%"
Hope this will resove the issue.
Thanks,
Sastry -
How to modify person or group field value with new value
Hi
I have person or group field having property Person Only.
Thsi firls already have one value. Now I want to update it but this code to update value is not working.
string myName = @"ABC\myname";
web.EnsureUser(myName);
SPUser myUser = web.SiteUsers[myName];
SPFieldUserValue myNamevlaue = new SPFieldUserValue(web, myUser.ID, myUser.LoginName);
oSplistItem["My_x0020_User"] = myNamevalue;
oSplistItem.Update();
I am getting myNamevalue correct in the veriable. But why its not updating in the list?
is there any issue in the above code?
Do I need to delete previous value and then update new value in this field? How?Hi,
The format of the user value in people/Group field must be
ID;#Name, you can use the following code snippets to update the people/group field.
string loginName = "ABC\\myname";
SPUser user = web.SiteUsers[loginName];
SPList list = web.Lists.TryGetList("ListName");
if (list == null)
Console.WriteLine("list is not exist!");
return;
SPListItem item = list.GetItemById(3);
item["My_x0020_User"] = user.ID.ToString() + ";#" + user.Name;
item.Update();
Thanks,
Jason
Please remember to mark the reply as answer if it help, and unmark the answer if it provide no help. -
Assigning field value to Field symbol
Dear Experts,
I have one program which works fine in non unicode system.. The program contains Assign statement with offset and length..
This program dumps in Unicode system due to this instruction.. The field which i want to assign to field symbol is type P field..
Is there any ways to avoid the dump?
Thank you in Advance..Hi,
isn't it an ABAP question in an EP forum?
Romano -
Replacing a fields value with somethingelse in PLD
Hi All,
In the Batch Number Transaction Report's PLD, I want to replace Doc. Type OWTR with Production Order. I have some idea that it would be handled through a formula field but dont know the exact work flow. Could anybody tell me how to handle it by giving an example.
ThxNaveed,
Quite Clear now !!
This is what you need to do. Add two fields of type text to the PLD
Field1: Text Value = Production Order
Set the link to field to the Formula 1 field that you would create as below
Field2: Text Value = Issue for Production
Set the link to field to the Formula 2 field that you would create as below
Create two formula fields
Formula Field 1: Field_DocType == "OWTR" (use the actual DocType field number here == "OWOR")
Formula Field 2: Field_DocType == "OIGE" (use the actual DocType field number here == "OIGE")
Please let me know if you have any question
Suda
OWTR for Production Order, OIGE for -
Does anyone know how to delete a value in a field with DTW?
For example:
I want to use DTW to Update my BPs to delete the the Foreign Name for each BP.
Any thoughts?Suda,
Thanks for the reply. That was my assumption, but I was hoping I was missing something.
On that note, besides going into SQL, are you aware of any solution that can delete large amounts of records at once?
i.e. Deleting all BP Catalogs? -
How to display another table's field value with an LOV?
Hi all!
On my JSP application I'm using an LOV based on 2 tables (datasources). I take the EMP and DEPT tables as an example:
The user can click on the LOV button to select a department for a specific employee. I use the following code for the LOV:
<jbo:DataSource id="dsEmp" appid="am" viewobject="EmpView" />
<jbo:DataSource id="dsDept" appid="am" viewobject="DeptView" />
<jbo:InputSelectLOV datasource="dsEmp" dataitem="DeptId" displaydatasource="dsDept" displaydataitem="Id,Dname" displayvaluedataitem="Id" formname="my_form" />
So, the LOV windows shows the ID and Department Name from the DEPT table and returns Dept.Id into Emp.DeptId. This works fine but in the Edit JSP I want to display the Department Name instead of the Department Number. I don't know how I can pick the Department Name from the DEPT table. I tried to change the displayvaluedataitem="Name" but, as I thought, this didn't work.
Is there any possibility to handle this problem?!
PS: I'm using Oracle9i JDeveloper.
Thanks a lot!Tim,
See may answer to your other thread:
Re: constant value
Charles. -
Changing screen feild values through field symbols
hi
I am working on SAPMF02D user exit, it requires validation of searchterm1 feild, I have successfully completed this part with the help of field symbols, but the problem i am facing is that, after performing validation checks, searchterm1 feild would be updated, this I am not able to do, so far I have done the following:
DATA: fld(30) VALUE '(SAPLSZA1)ADDR1_DATA-SORT1'.
FIELD-SYMBOLS: <f1> TYPE ANY .
* Assign screen field values to field symbol
ASSIGN (fld) TO <f1>.
* get the value from field symbol into our field
IF <f1> IS ASSIGNED.
acc1 = <f1>.
ENDIF.
.. *Perform validation and updation on 'acc1'
* get the updated values back into screen feild
<f1> = acc1.
now this last thing is not working for me,, and the data does not get updated in screen/database....
I have tried using ' comit work' statement , but no use,
I require help on this issue and its quite urgent.
Thank you all for your time.Thank you again for the reply,
I am sorry , I am not able to use to that FM either,, I just cannot understand the parameters it is taking and how to provide them.
I have already used the FM "DYNP_UPDATE_FIELDS" and "DYNP_UPDATE_FIELDS" , as:
<f1> = acc1.
scrfields-fieldname = 'ADDR1_DATA-SORT1'.
scrfields-fieldvalue = <f1>.
APPEND scrfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLSZA1'
dynumb = '0301'
TABLES
dynpfields = scrfields[]
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* UNDEFIND_ERROR = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
but it did not helped my cause either..
Any help would be highly appreciated,
thank you -
Deleting date field value via import
I need to clear the value in a date field for a few thousand records. I tried doing this via import by setting the value to a space " " but it didn't work.
Any ideas on how this can be achieved through import or otherwise would be great.
Thanks.Hi Nakul,
Try any of the following, it will hopefully work in your case:
1) Import using excel with blank date field (no data in date field). This will erase the already existing value in the date field [provided there is no workflow that restricts such deletion of date data.]
2) Create a temp workflow on condition "before modified record saved" and update the date field value with blank (no values in fx), do the import, this workflow will delete the existing data.
Cheers!
Vix -
One field value missing in the spreadsheeet
Hi All,
I have created an ALV grid report, which displays proper output. All the headers and their field value are displayed properly in the ALV output.
But when I select the option to download the output to the spreadsheet format by using the following option, it displays all the headers and their field value, except field value for only one column.
Save List in file --> Local file --> Spreadsheet.
Can some body please let me know what could me the problem?
Regards,
ReshmaHi Reshma,
I hope the column is not added dynamically. I had faced this problem for dynamic columns.
Also, you could try and download the internal table data using 'GUI_DOWNLOAD' just to cross check that you face the smae issue.
Regards,
Shyam -
F4IF_INT_TABLE_VALUE_REQUEST not returning value with 2 decimals point
hi all,
i use function F4IF_INT_TABLE_VALUE_REQUEST to do search help, the master data in table ZINVEST has field ZNO, with field type CURR , 2 decimals point.
the return table shows 2 decimals point but in display screen it only shows 1 decimal point, pls advice
here's the coding:
DATA : BEGIN OF itab OCCURS 0,
e_value(20),
END OF itab.
DATA: BEGIN OF field_tab OCCURS 0.
INCLUDE STRUCTURE dfies.
DATA END OF field_tab.
DATA : return_tab LIKE ddshretval OCCURS 0 .
CLEAR field_tab.
field_tab-fieldname = 'E_VALUE'.
field_tab-intlen = 17.
field_tab-outputlen = 17.
field_tab-decimals = 2.
field_tab-inttype = 'C'.
field_tab-scrtext_m = 'Investment No'.
APPEND field_tab.
SELECT * FROM ZINVEST.
CLEAR: itab.
itab-e_value = ZINVEST-ZNO.
APPEND itab.
ENDSELECT.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'E_VALUE'
dynprofield = 'A'
dynpprog = sy-cprog
dynpnr = sy-dynnr
TABLES
value_tab = itab
field_tab = field_tab
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.Hi ester,
You shud try this way. Try to use this code.
DATA: BEGIN OF it_help OCCURS 0,
zuonr TYPE zvinvoice,
kunnr TYPE kunnr,
name TYPE zvcustname,
END OF it_help.
SELECT-OPTIONS: p_zuonr FOR bsid-zuonr.
SELECT DISTINCT
zuonr
kunnr
INTO CORRESPONDING FIELDS OF TABLE it_help
FROM bsid
WHERE zuonr <> space.
SORT it_help BY zuonr kunnr.
DELETE ADJACENT DUPLICATES FROM it_help
COMPARING zuonr kunnr.
IF it_help[] IS NOT INITIAL.
SELECT kunnr
name1
name2
INTO TABLE it_kna1
FROM kna1
FOR ALL ENTRIES IN it_help
WHERE kunnr = it_help-kunnr.
SORT it_kna1 BY kunnr.
CLEAR v_tabix.
SORT it_help BY kunnr.
LOOP AT it_help.
v_tabix = sy-tabix.
READ TABLE it_kna1 WITH KEY kunnr = it_help-kunnr
BINARY SEARCH.
IF sy-subrc EQ 0.
CONCATENATE it_kna1-name1 it_kna1-name2 INTO it_help-name
SEPARATED BY space.
MODIFY it_help FROM it_help INDEX v_tabix
TRANSPORTING name.
ENDIF.
ENDLOOP.
FORM event_selscr_valreq_for_pzuonr .
***Function module to display the search help for the assignment filed****
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZUONR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_ZUONR'
window_title = text-029
value_org = 'S'
callback_program = sy-repid
TABLES
value_tab = it_help
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Reward if help ful.
Regards
Azad. -
Update a filed value with powershell script with ordery by and where condition
Hi
I have below powershell script to update list columns but how i update a field value with ordery by a column and where condition
below is the part of my script
$list = $web.Lists[$listName]
$items = $list.items
$internal_counter = 1
#Go through all items
foreach($item in $items)
if($item["CourtNO"] -eq $null)
#if($item["CourtNo"] -eq '1')
$item["CaseNo"] = $internal_counter
#how to add a column ordery by Title
# and where Title field value from 1 to 10
$internal_counter++
adilHi,
You mean that you only need to update all items with Title field value in range 1..10 and order by them before run the loop statement update?
If so, use CAML query to get the items only match the condition.
#Build Query
$spQuery = New-Object Microsoft.SharePoint.SPQuery
$query = '<Where><And><Gte><FieldRef Name="Title" /><Value Type="Text">0</Value></Gte><Lte><FieldRef Name="Title" /><Value Type="Text">10</Value></Lte></And></Where><OrderBy><FieldRef
Name="Title"/></OrderBy>'
$spQuery.Query = $query
$spQuery.RowLimit = $list.ItemCount
$items = $list.GetItems($spQuery)
Hope this help!
/Hai
Visit my blog: My Blog | Visit my forum:
SharePoint Community for Vietnamese |
Bamboo Solution Corporation
Maybe you are looking for
-
Ok. I'm REALLY sick of Apple at the moment. Sorry for the rant, but this is ridiculous..... I was running AP2 on Snow Leopard without any problems. Then I made the MAJOR mistake of trying to upgrade to AP3. Found it will not work correctly with so
-
Hello Experts, I am a newbie on HRMS.I have download 33 softwares which are under the Ebusiness suit from the oracle edivery sites of ver 12.1.1.and also have Microsoft Visual C++ 2005 and cygwin as the prerequisite. Issue: V15673-01_1of3.zip is not
-
Can applications on iphone and ipad
I have bought some applications on my ipad some months ago and I have just bought an iphone5. But I have no all the applications of my ipad which have been transfered on my iphone...just some ones. Could you help me ?
-
Comparing two List values using Oracle Business Rules
Hi all, i just need to know how to use the Oracle Business Rules to Compare 2 list types say for example list1( 10,20,30,40) and List2(10,50,60). when i compare both the list using the business rules the rule should return true if there is atleast on
-
Uninstalling and re-installing LR 4.1
I am running Lion on a MacBook Pro. I just drag LR4.1 to trash to delete and have to re-install but how do I make sure my catalog/files/pics can be reconfigured correctly? The reason I am comtemplating this is because my MAP, WEB and BOOK modules ca