How can I do change Order Status field.
For example ; I want do if the data name "AÇIK" change name "OPEN". How can I do.
<td><%#DataBinder.Eval(Container.DataItem,"OrderStatus") %></td>
<%#(DataBinder.Eval(Container, "OrderStatus").ToString()=="AÇIK") ?
"OPEN":DataBinder.Eval(Container, "OrderStatus")%>
Related
I have a table with a column that has a default value:
this.Create.Table("msgqueue")
.WithColumn("id")
.AsInt32()
.Identity()
.PrimaryKey()
.WithColumn("queueddt")
.AsDateTime()
.Nullable()
.WithDefaultValue(SystemMethods.CurrentDateTime)
;
I want to change this from datetime to datetime2:
this.Alter.Table("msgqueue")
.AlterColumn("queueddt")
.AsCustom("datetime2")
.Nullable()
.WithDefaultValue(SystemMethods.CurrentDateTime)
;
This gives me errors:
The error was The object 'DF_msgqueue_queueddt' is dependent on column 'queueddt'.
I did some googling around, and discovered Delete.DefaultConstraint(), so I tried that, first:
this.Delete.DefaultConstraint()
.OnTable("msgqueue")
.OnColumn("msgqueue")
;
And I still see the same problem.
Before your Alter Table statement try dropping the default constraint using Execute.Sql:
Execute.Sql(#"ALTER TABLE msgqueue DROP CONSTRAINT DF_msgqueue_queueddt")
Also, your column name is wrong in your last statement. It should be:
this.Delete.DefaultConstraint()
.OnTable("msgqueue")
.OnColumn("queueddt");
TABLES: mara, marc.
"marc is N
"mara is 1
SELECTION-SCREEN PUSHBUTTON 15(10) text-001 USER-COMMAND press.
DATA: lt_mara TYPE TABLE OF mara WITH HEADER LINE,
ls_mara TYPE mara.
DATA: lt_marc TYPE TABLE OF marc WITH HEADER LINE,
ls_marc TYPE marc,
Sum type P length 8 DECIMALS 2.
PARAMETERS: p_mtart TYPE mara-mtart.
SELECT-OPTIONS: so_werks FOR marc-werks.
SELECT * FROM mara INTO TABLE lt_mara
WHERE mtart = p_mtart.
IF sy-subrc = 0.
SELECT * FROM marc INTO TABLE lt_marc
FOR ALL ENTRIES IN lt_mara
WHERE matnr = lt_mara-matnr
AND werks IN so_werks.
LOOP AT lt_marc INTO ls_marc.
READ TABLE lt_mara INTO ls_mara
WITH KEY matnr = ls_marc-matnr.
sum = ls_mara-brgew + ls_mara-ntgew .
WRITE:/ ls_mara-mtart, ls_marc-matnr , ls_marc-werks , ls_mara-brgew, ls_mara-ntgew,sum.
ENDLOOP.
ELSE.
MESSAGE TEXT-e02 TYPE 'E' .
ENDIF.
How Can make this happen:I want that on click of the button to show the table.Please the code to be as simple as possible and as easy to understand as possible.if you can't make it with a button make it with a radiobutton or smth else.
Thanks in advance!
If you want to keep it simple, you can use "sy-ucomm" which stores your last triggered action. With your button, it'd look like this:
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'PRESS'.
*code for displaying your table via ALV or WRITE goes here*
ENDCASE.
The most common way to display internal tables like this is with an ALV, a simple example of how to build up an ALV can be found here:
https://archive.sap.com/discussions/thread/873601
If you'd like it to do the WRITE: to screen under one circumstance, and display the ALV Grid in another, you should use Select Options and parameters.
Your code needs the addition of EVENTS, please take a look here on what they are and how to use them:
http://www.erpworkbench.com/abap/abap-events.htm
I'm need to count user input length in simple form.
I'm tried this:
Template.index.created ->
#symbols = new ReactiveVar
#symbols.set($('#whatsnew').val().length)
return
And in template(jade):
//index.jade
.small-9.columns
input(type='text', placeholder='whats new?', name='whatsnew', id='whatsnew')
...
#{sybmols}
...
But this not working
I'm need to count characters of user input. How to make it?
Your code isn't reactive. There's no reason for your ReactiveVar to rerun. You can try adding an event for every onkeyup event in your input field. When this happens you can get the length of the entered text and set it in your symbols ReactiveVar.
Then every reatice context dependent on symbols will rerun.
I have a drop down list that I am binding to a record that clearly sets value=0, text=''
the dropdownlist looks fine, i do not see any text in the control BUT when i try to validate in the code behind it says the dropdownlist.text = 0
i do not know why the control shows no text on the form but holds a value in its .text property, it doesn't make any sense. can anyone help? Thanks.
I fixed the issue I was having by inserting a null value along with the text of '' and now the dropdownlist.text is = '' intead of 0.
I am getting nil value when I tried to update the data for below code :
local update_statement =db:prepare[[ UPDATE list SET :name :icon WHERE :id]]
update_statement:bind_names{ name = aName, icon = aIcon, id = aId }
update_statement:step()
update_statement:reset()
And also I need the syntax for delete operation in lua program.
Please help me
Thank you,
Madan mohan.
You need to learn SQL's syntax.
Basically, you're not telling which columns you want to update, you're only giving their values.
local update_statement = db:prepare[[ UPDATE list SET name = :name, icon = :icon WHERE id = :id]]
Here's the syntax for the DELETE statement:
local delete_statement = db:prepare[[ DELETE FROM list WHERE id = :id]]