How to check Field Value in Controller
Hi All,
I have a requirement to check if the field entered in invAmount is null or zero. The vo.getinvAmount() returns a Number.
How can I check it to see if it has a 0.00 ? My code is in Controller.
I tried some conversions using Number inv = (Number)vo.getInvAmount(); and doubleValue() methods
but no luck.
if (inv = 0)
but this gives errors.
Thanks
Shankar
Hi,
It works fine when I use the inv.compareTo(0) method but I get a NullPointerException at line evaluating the IF clause when I try the following code :
My controller code snippet is :
Number InvAmt = (Number)vo.getAttribute("FunctionalInvAmt");
MessageToken[] tokens = { new MessageToken("AMT", InvAmt)};
if ((!currencyCode.equals("EUR")) && ((InvAmt==null) | (InvAmt.intValue() == 0)))
throw new OAException("XX","XX_VALIDATE_FUNCTIONAL_AMT",tokens);
## Detail 0 ##
java.lang.NullPointerException
at xx.oracle.apps.ap.xx.webui.XxCustomReviewCO.processFormRequest(XxCustomReviewCO.java:388)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:734)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:943)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1546)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:373)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:340)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2392)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
Any ideas why the (invAmt.intValue()==0) does not work ?
Thanks
Shankar
Similar Messages
-
How to check field values of Extractor in Extractor Checker???
Hi Gurus,
I am looking for field values being extracted by extractor, for a given selection criterion. For that I run transaction RSA3 in debug mode. Now I am stuck. Can you please tell me the exact steps to check the field values? Please spoon feed me. I am stupid.
Thanks and Regards,
RajHi Raj,
After you Extraction in RSA3 Transaction ,You Press "Disply list".
Then It will disply Datapackage and Records.Double click on each package to see the fields.
Hope this helps,
<i>Sudh</i>
Assign points if this helps. -
How to update field values in a database table using module pool prg?
hi
how to update field values in a database table using module pool prg?
we created a customized table, and we put 2 push buttons in screen painter update and display.
but update is not working?
data is enter into screen fields and to internal table, but it is not updated in database table.
thanks in adv
vidyaHI,
we already used the update statement. but its not working.
plz check this.
*& Module Pool ZCUST_CALL_REC
PROGRAM ZCUST_CALL_REC.
TABLES: ZCUST_CALL_REC,ZREMARKS.
data: v_kun_low like ZCUST_CALL_REC-kunnr ,
v_kun_high like ZCUST_CALL_REC-kunnr,
v_bud_low like ZCUST_CALL_REC-budat,
v_bud_high like ZCUST_CALL_REC-budat.
ranges r_kunnr for ZCUST_CALL_REC-kunnr .
ranges r_budat for zcust_call_rec-budat.
DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
*data:begin of itab occurs 0,
MANDT LIKE ZCUST_CALL_REC-MANDT,
kunnr like ZCUST_CALL_REC-kunnr,
budat like ZCUST_CALL_REC-budat,
code like ZCUST_CALL_REC-code,
remarks like ZCUST_CALL_REC-remarks,
end of itab.
*data:begin of Jtab occurs 0,
MANDT LIKE ZCUST_CALL_REC-MANDT,
kunnr like ZCUST_CALL_REC-kunnr,
budat like ZCUST_CALL_REC-budat,
code like ZCUST_CALL_REC-code,
remarks like ZCUST_CALL_REC-remarks,
end of Jtab.
CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
*start-of-selection.
*& Module USER_COMMAND_9000 INPUT
text
MODULE USER_COMMAND_9000 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
WHEN 'ENQUIRY'.
perform multiple_selection.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9001'.
WHEN 'UPDATE'.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9002'.
perform update on commit.
WHEN 'DELETE'.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9002'.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*& Module STATUS_9000 OUTPUT
text
MODULE STATUS_9000 OUTPUT.
SET PF-STATUS 'ZCUSTOMER'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9001 INPUT
text
MODULE USER_COMMAND_9001 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
endcase.
ENDMODULE. " USER_COMMAND_9001 INPUT
*& Module STATUS_9001 OUTPUT
text
MODULE STATUS_9001 OUTPUT.
SET PF-STATUS 'ZCUSTOMER'.
SET TITLEBAR 'xxx'.
move itab-MANDT to zcust_call_rec-MANDT.
move itab-kunnr to zcust_call_rec-kunnr.
move itab-budat to zcust_call_rec-budat.
move itab-code to zcust_call_rec-code.
move itab-remarks to zcust_call_rec-remarks.
vcontrol-lines = sy-dbcnt.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module USER_COMMAND_9002 INPUT
text
module USER_COMMAND_9002 input.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
WHEN 'UPDATE'.
perform move_data.
UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
ELSE.
MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
ENDIF.
WHEN 'DELETE'.
perform move_data.
DELETE ZCUST_CALL_REC FROM TABLE ITAB.
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
ELSE.
MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
ENDIF.
endcase.
endmodule. " USER_COMMAND_9002 INPUT
*& Module STATUS_9002 OUTPUT
text
module STATUS_9002 output.
SET PF-STATUS 'ZCUSTOMER1'.
SET TITLEBAR 'xxx'.
endmodule. " STATUS_9002 OUTPUT
*& Module update_table OUTPUT
text
module update_table output.
move itab-MANDT to zcust_call_rec-MANDT.
move itab-kunnr to zcust_call_rec-kunnr.
move itab-budat to zcust_call_rec-budat.
move itab-code to zcust_call_rec-code.
move itab-remarks to zcust_call_rec-remarks.
vcontrol-lines = sy-dbcnt.
endmodule. " update_table OUTPUT
***Selection Data
FORM SELECT_DATA.
SELECT mandt kunnr budat code remarks FROM zcust_call_rec INTO
table itab
WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
ENDFORM.
****append vendor code
FORM APPEND_CUSTOMER_CODE.
clear r_kunnr.
clear itab.
clear r_budat.
refresh r_kunnr.
refresh itab.
refresh r_kunnr.
IF r_kunnr IS INITIAL
AND NOT v_kun_low IS INITIAL
AND NOT v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_high
IMPORTING
OUTPUT = r_kunnr-high.
r_kunnr-option = 'BT'.
r_kunnr-sign = 'I'.
append r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND NOT v_kun_low IS INITIAL
AND v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
r_kunnr-SIGN = 'I'.
r_kunnr-OPTION = 'EQ'.
APPEND r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND v_kun_low IS INITIAL
AND NOT v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
r_kunnr-SIGN = 'I'.
r_kunnr-OPTION = 'EQ'.
APPEND r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND v_kun_low IS INITIAL
AND v_kun_high IS INITIAL.
IF SY-SUBRC = 0.
MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
CALL SCREEN '9000'.
ENDIF.
PERFORM V_BUDAT.
ENDIF.
ENDFORM.
FORM V_BUDAT.
IF R_BUDAT IS INITIAL
AND NOT v_BUD_low IS INITIAL
AND NOT v_BUD_high IS INITIAL.
r_budat-low = v_bud_low.
r_budat-high = v_bud_high.
r_budat-option = 'BT'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND NOT v_BUD_low IS INITIAL
AND v_BUD_high IS INITIAL.
r_budat-low = v_bud_low.
r_budat-high = v_bud_high.
r_budat-option = 'EQ'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND v_BUD_low IS INITIAL
AND NOT v_BUD_high IS INITIAL.
r_budat-HIGH = v_bud_HIGH.
r_budat-option = 'EQ'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND v_BUD_low IS INITIAL
AND v_BUD_high IS INITIAL.
IF SY-SUBRC = 0.
MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
CALL SCREEN '9000'.
r_budat-low = ''.
r_budat-option = ''.
r_budat-sign = ''.
ENDIF.
ENDIF.
ENDFORM.
*& Form update
text
--> p1 text
<-- p2 text
form update .
commit work.
endform. " update
*& Form move_data
text
--> p1 text
<-- p2 text
form move_data .
clear itab.
refresh itab.
move-corresponding zcust_call_rec to itab.
MOVE ZCUST_CALL_REC-MANDT TO ITAB-MANDT.
MOVE ZCUST_CALL_REC-KUNNR TO ITAB-KUNNR.
MOVE ZCUST_CALL_REC-BUDAT TO ITAB-BUDAT.
MOVE ZCUST_CALL_REC-CODE TO ITAB-CODE.
MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
APPEND ITAB.
delete itab where kunnr is initial.
endform. " move_data
thanks in adv
vidya -
How to check the value in Table CDPOS
Mostly I can't see the following fields value in the table CDPOS,
(1) CDPOS-VALUE_NEW
(2) CDPOS-VALUE_OLD
In fact, it should have values, so how to check the values, is there any special method needed?
Thanks and best regards.Ferry Lianto,
Thank you very much for your expertise.
It's helpful to get some contents via FM:CHANGEDOCUMENT_READ_POSITIONS, the problem is, to some kind of DELETION operation, the log in table CDPOS is very simple, I still don't know which contents were deleted even though I found records in table CDPOS.
Is there any other suggestions?
Thanks and best regards. -
How To Print Field Value in TOP-OF-PAGE During Line Selection.
How To Print Field Value in TOP-OF-PAGE During Line Selection when double click on field.
(If my memory serves me well (not used for long time ago)
Assign values to system fields sy-tvar0 - sy-tvar9, they will replace the placeholders "&0" through "&9" in the list headers and column headers.
TOP-OF-PAGE DURING LINE-SELECTION.
WRITE: / 'Interactive Report &3'.
WRITE record-vbeln TO sy-tvar3.
Regards,
Raymond -
How to add field value to the standard table
Hi,
How to add field value to the standard table?
for example:
when we go to TCODE SE16-> VBAK table -> on the selection screen if we press F4 against VBTYP we get all the available values for that field. How to add a new document Category value to this field so that it shows up in F4 help for that field.Hi Asif,
I don't think it is possible and feasible for adding new field value to the field VBTYP because it is not possible through SPRO.
If u see the domain of this field VBTYP we have fixed values provided by SAP. There is no value table for this. If u have value table then it will be updated through SPRO. But still if u really want to add some value u can do that by getting access key and add the value in the fixed values of the domain. But of no use other than simply displaying in F4. Because for what ever value u created here there will be no documents in VBAK or any table using this domain.
Hope this is clear for u.
Thanks,
Vinod. -
How to check a value for paramter query
I am passing a paramter value from my text box to my sql statement and I would like to check if the value is entered into a text box. If you have any idea please share it with me, i have been struggling with this for many days.Code below is how i try to check if the value is entered but I do not know how to check the value in the :VendorName
thanks
If Not txtVendorName.Text = "" Then
Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
End IfSorry guys english is not my first language and i will try to be clear and specific.
I have a search page where customeres can do searching either using a text box or two dropdowns i have on my page. they have the option of doing search either using a text box or dropdowns or both.Everything seems to work fine but if users does not leave the text box blank. but they leave the text box blank and do searching using the two dropdowns then the page comes up empty and i checked my query and i should get a value. Attacehed my code for you to look at it.
<pre>
Sub VendorSearch()
gvSearch.Visible = True
Dim MinPDate As String = drPur.SelectedItem.ToString
Dim MaxMDate As String = drPurM.SelectedItem.ToString
Dim liThisOne As ListItem
Dim strState As String = ""
For Each liThisOne In lstState.Items
If liThisOne.Selected Then
strState = strState & "'" & liThisOne.Value & "'" & ","
End If
Next
Dim Sql As String = " SELECT distinct V.VENDOR ""Vendor Id"",R.ADDRNUM,V.VNAMEL ""Vendor Name"",R.AADDR1,R.ACITY,R.VASST1, "
Sql = Sql & "R.ASTATE State,R.AZIPCODE, to_char(Max(P.DATEPUR),'YYYY/DD/MM') ""Plan Purchased Date"" , "
Sql = Sql & "TRIM (r.aaddr1 || decode(trim(r.aaddr2),null,'',' - ') || r.aaddr2) Address,"
Sql = Sql & " substr(decode(trim(r.vasst1),null, 'N/A','000/000-0000?','N/A','000/000-0000','N/A', r.vasst1),1,12) Fax, "
Sql = Sql & " substr(decode(trim(r.aphone),null, 'N/A','000/000-0000?','N/A', r.aphone),1,12)Phone "
Sql = Sql & "FROM VENDOR V,VENDADDR R, PLANHOLD P "
Sql = Sql & "WHERE V.VENDOR = R.VENDOR AND P.VENDOR = R.VENDOR "
Sql = Sql & " AND (P.DATEPUR >= TO_DATE('1999-01-01','YYYY-MM-DD')) "
Sql = Sql & "AND P.DATEPUR In ( select Max(P.DATEPUR) from PLANHOLD P where P.vendor = R.VENDOR) "
'If txtVendorName.Text <> "" Then
' Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
'End If
If (strState.Length > 0 And lstState.SelectedIndex <> 0) Then
strState = Left(strState, strState.Length - 1)
strState = "(" & strState & ")"
Sql = Sql & "AND R.ASTATE IN " & strState
End If
If (drPur.SelectedIndex <> 0 And drPurM.SelectedIndex <> 0) Then
Sql = Sql & " AND to_number(to_char(p.datepur, 'YYYY')) between " & "'" & MinPDate & "'" & " AND " & "'" & MaxMDate & "'"
End If
' Dim Para As String
' SqlDataSource1.SelectParameters.
If Not txtVendorName.Text = "" Then
Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
End If
'If Not IsDBNull(SqlDataSource1.SelectParameters(":VendorName")).val Then
' Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
'End If
Sql = Sql & " AND V.VOBSOLET = 'N' "
Sql = Sql & "GROUP BY V.VENDOR, R.ADDRNUM,V.VNAMEL,R.AADDR1,R.AADDR2,R.ACITY,R.ASTATE, R.AZIPCODE, R.APHONE, R.VASST1, P.DATEPUR "
Sql = Sql & "ORDER BY V.VENDOR "
Response.Write("Sql " & "<br/>" & Sql & "<hr/>")
SqlDataSource1.SelectCommand = Sql
End Sub
</pre> -
How to set field value in workflow SPD2013?
Hi All,
how to set field value in workflow SPD2013? Actually using Infopath, i need to update a field value through workflow.(Little differnt from SPD2010). How to do this?As Amit says, some elaboration here would be good. You can use InfoPath as a form for either a list or a library and then set it to trigger a workflow upon item creation. The workflow will consist a number of actions, one of which is the Update
Field Item.
More information on the available steps can be seen here.
http://msdn.microsoft.com/en-us/library/office/jj164026.aspx
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem. -
How to pass field value from popup window to oninput processing of other pg
Hi,
I want to pass a field value from the popup window to oninput processing of main page ( from where popup window is triggered). and need to close the popup window. How to do it ?
In the popup window's oninputprocessing, im doing some validation checks. If it passes all the validations, then only the control shd come to main page ..else it should stay in popup window only .
Regards,
Jothi.Hi Jothi,
you can use java script to pass the value and close your popup window. use the following code.
in your popup window:
function passData(h1)
window.opener.document.getElementById('var1').value = h1 ;
window.close();
then call this function when you finish your validations.
in your main page layout create an input field with id as passed in the function above "var1".
In the value attribute give it your variable as follow:
<htmlb:inputField id = "var1"
value = "<%= var2 %>"
visible = "false" />
"var2" will be assigned the value from your popup window.
I hope this will help you..
Regards,
Husain -
How to display field value only once in REUSE_ALV_GRID_DISPLAY
hi experts,
i am using REUSE_ALV_GRID_DISPLAY, for alv outpur display.but i want one of the field in output ,not to display the value which is of same, it have to be displayed only once, I mean i have a number which contains multiple line items corresponding, here i want to display the field value only once when it is repeating , for the same header number, how can i achieve itHi,
check the sample code,
REPORT Z_ALV.
Database table declaration
TABLES:
sflight.
Typepool declaration
TYPE-POOLS:
slis.
Selection screen elements
SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME TITLE text-000.
SELECT-OPTIONS:
s_carrid FOR sflight-carrid.
SELECTION-SCREEN END OF BLOCK blk_1.
Field string to hold sflight data
DATA:
BEGIN OF fs_sflight ,
carrid TYPE sflight-carrid, " Carrier Id
connid TYPE sflight-connid, " Connection No
fldate TYPE sflight-fldate, " Flight date
seatsmax TYPE sflight-seatsmax, " Maximum seats
seatsocc TYPE sflight-seatsocc, " Occupied seats
END OF fs_sflight.
Internal table to hold sflight data
DATA:
t_sflight LIKE
STANDARD TABLE
OF fs_sflight .
Work variables
DATA:
t_fieldcat TYPE slis_t_fieldcat_alv,
fs_fieldcat LIKE
LINE OF t_fieldcat.
*START-OF-SELECTION
START-OF-SELECTION.
PERFORM get_data_sflight. " Getting data for display
PERFORM create_field_cat. " Create field catalog
PERFORM alv_display.
*& Form create_field_cat
Subroutine to create field catalog
There is no interface paramete
FORM create_field_cat .
PERFORM fill_fieldcat USING 'Carrier Id' 'CARRID' '2'.
PERFORM fill_fieldcat USING 'Connection No' 'CONNID' '1'.
PERFORM fill_fieldcat USING 'Flight Date' 'FLDATE' '3'.
PERFORM fill_fieldcat USING 'Maxm.Seats' 'SEATSMAX' '4'.
PERFORM fill_fieldcat USING 'Seats Occ' 'SEATSOCC' '5'.
ENDFORM. "create_field_cat
*& Form fill_fieldcat
Subroutine to fill data to field column
-->p_seltext Column label
-->p_fieldname Fieldname of database table
-->p_col_pos Column position
FORM fill_fieldcat USING
p_seltext LIKE fs_fieldcat-seltext_m
p_fieldname LIKE fs_fieldcat-fieldname
p_col_pos LIKE fs_fieldcat-col_pos.
fs_fieldcat-seltext_m = p_seltext.
fs_fieldcat-fieldname = p_fieldname.
fs_fieldcat-col_pos = p_col_pos.
APPEND fs_fieldcat TO t_fieldcat.
CLEAR fs_fieldcat.
ENDFORM. " fill_fieldcat
*& Form get_data_sflight
Subroutine to fetch data from database table
There is no interface parameter
FORM get_data_sflight .
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO TABLE t_sflight
WHERE carrid IN s_carrid.
ENDFORM. " get_data_sflight
*& Form alv_display
Subroutine for ALV display
There is no interface parameter
FORM alv_display .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = t_fieldcat
TABLES
t_outtab = t_sflight
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " alv_display
End of code -
Hi everyone,
I'm working on a template in wad and I have to check whether the user has choosen values in different dropdown boxes or not. How do I do this? I tried different things with the command wizzard and javascript but don't know how to implement this.
Thanks for your help!
Regards
Tim JaschikHi,
thank's for your answers, but my problem won't be solved by a customer exit in cmod. I will explain the situation a little bit more detailed:
- the user starts a web template (I created this in bex web application designer)
- in this template, there are five queries, each one shows the masterdata of an attribute in an dropdown field (0material, 0customer, ...
- after the user has choosen all five values, he clicks on a button, this button starts a planning function...
BUT before the planning function starts, I wan't to check, whether all dropdown fields are filled or not. If the user has forgotten to choose a value from one ore more fields, the planning function should not start and the template should give the user a message, which dropdown box has the be filled.
So I'm not in the sap-context, this is a simple javascript problem. But I don't know how to implement this javascript solution in wad, to check the values of the dropdown boxes and give back a message to the user...
Regards
Tim Jaschik -
How to copy fields values between same class objects with filtering ?
Hi I'm facing a problem.
It started when thinking to the clone method for cloning objects.
And developed into a problem when trying to making something more complicate that just cloning.
Suppose you have two JPanels and one is a copy of the other suppose that u feed the copy to some methods for processing.
These methods modify simple data (ints,Strings, CustomClasses) and swing components too.
Now when I get the object back I want to copy all of the fields values to the original JPanel except for those who represent swing components or the like.
I want to do this automatically by writing some few rows of code.
How can I do this using reflection ?
How can I filter the Fields objects that I get from jpanelInstance.getClass().getDeclaredFields(); ? Which metod should I use then to check if is a subclass of java.awt.Component ?
I've read about many things on using reflection to invoke methods, constructors and so on.
But how do I get the fields values as I get the fields objects ?
Thanks for the attention, hope what is written is clear enough,
Estades.Are you targeting a "worst design award"? What kind of "processing" would take place on a UI component?
I am sure from what you write that you missed to seperate your model from your view. Read about MVC and retry designing your application.
Edited by: stefan.schulz on Sep 15, 2007 7:30 PM -
How to display field values in long text of messages....
Hi,
Currently iam doing an userexit. In that i want to display error messages. and if we click on message it will display the long text. My question is i want to display field values in the long text. Under the long text's &system_response& i want to display a field value.
Regards
chinnaHi Chinna,
Within short and long texts, you can use placeholders, which can be replaced with the content of data objects using the MESSAGE statement. A maximum of four character-type placeholders are permitted; they are indicated by #&i# in short texts, and by #&Vi&# in long texts, where i = [1, 4]. If #&# itself is to be displayed as part of the text, it must be specified as #&&# in short texts and as "&" in long texts.
To add some detail on how to create variables in Long text, you have to go to 'commands' and in symbol option provide the variables like
&V1& &V2& and so on.
Hope this helps you.
revert for further clarification.
<b>Alwyas reward Points to useful suggestions.</b>
Regards,
Vikas
Message was edited by:
Vikas Taneja -
How to check 1000+ values comming as In parameter in plsql code.
Hi,
For a PLSQL procedure
I am geting in all 5 parameters from front end. One of which is a comma separated list of 1000+ values. Now I need to check these values to retrieve from the database.
eg. create procedure sp1(param1 date, param2 varchar2,param3.....,param5 varchar2)
as
begin
select col1,col2,col3 from tab1
where param1 = to_date(date)
and param2 = 'abcd'
and param5 = (list coming from front end)
How should I pass this list to param5 for selection criteria so that each time single value is retrieved and row is returned to the front end
Also How should I return this resultset to front end. Should I use OUT parameter as sysrefcursor?
it will really help me if I get any example on above problem.
Thanks in advance.
Edited by: 954825 on Aug 24, 2012 7:39 AMSolomon Yakobson wrote:
Bad design. Fifth parameter should be collection. Anyway:
and ',' || list-coming-from-front-end || ',' like '%,' || param5 || ',%'SY.Unfortunatly there is a high chance that this fails because of the 4000 characters limitation in sql.
If there are truely 1000+ values. Lets assume 1100.
This means: 1100 characters just for the comma + at least 1100 characters for single char values.
Single chars of cause do not make sense. Most languages don't have so much different characters, this means the list would have repeating values.
If we assume that all values are different, this means we are speaking about a minimum of 3 chars.
Therefore 1100 + 3* 1100 = 4400 chars. SQL limit broken.
I think the only solid solution would be to build a collection/array/temp table structure and then work with that. -
How to check the value of "The Interrupt Status Flag"?
Hi, thank you for reading this post!
Invoking Thread.interrupt() sets the value of the Interrupt Status Flag.
Just wondering if there is a Java method to check the value of this flag? Or is using isInterrupted() or interrupted() the only way to check?
http://download.oracle.com/javase/tutorial/essential/concurrency/interrupt.html
Thank you in advance for your help!
EricBelow is the full code. As soon as the Thread.sleep() is taken out in main(), the interrupt is detected in the child thread. But if the sleep() stays, then the child thread goes into an infinite loop. It's not detected the interrupt.
//ParentInterruptChildThreadCatchedDemo.java
//Program function: This program demonstrates the parent thread (main()) interrupting a child thread (thread1).
//Threaded class
class TryThread extends Thread {
//fields
private String threadname;
private long aWhile;
//Constructor
public TryThread(String tname, long delay) {
threadname = tname;
aWhile = delay;
//run() method
public void run() {
while(!Thread.interrupted()) {
//Do work
try {
System.out.println(Thread.currentThread().getName() + " was just interrupted!");
throw new InterruptedException();
} catch(InterruptedException e) {
//System.exit(1);
return;
public class ParentInterruptChildThreadCatchedDemo {
public static void main(String[] args) {
Thread thread1 = new TryThread("thread1", 2000L);
thread1.start();
try {
System.out.println("main() goes to sleep for 10 second.");
Thread.sleep(10000);
System.out.println("Statement after main() sleep().");
} catch(InterruptedException e) {
e.printStackTrace();
//Interrupt thread1
int interruptFlag = 5;
for(int i=0; i<11; i++) {
if(i == interruptFlag) {
System.out.println("Condition met, going to interrupt thread1 ...");
thread1.interrupt();
System.out.println("Thread1 interrupted!");
System.out.println("Ending main()");
/*Output:
main() goes to sleep for 10 second.
Statement after main() sleep().
Condition met, going to interrupt thread1 ...
Thread1 interrupted!
Ending main()
INFINITION LOOP
*/
Maybe you are looking for
-
Not all the photos in an event sync
I have an event in iphoto with 311 photos but only 27 sync. There is enough room on my phone, itouch and the events meet my sync criteria. Any suggestions on why certain pictures are being omitted?
-
Latest update 10.10.2 wifi issues
Hi Folks, I need your assistance. I recently did the update to 10.10.2. I am having issues with connecting via wifi to my printer. My printer is an HP laserjet pro 200 M251nw. I worked fine before update. Is there any fixes?
-
How do I show a Waveform using the Labview Report Generation Toolkit?
I am using LV 6.0.2 & have charts that consist of Waveform array type data - how do I break this down properly to using in Easy Graph.vi for the report generation tool kit which accepts on 2D arrays ?
-
Is it possible to use WMI in Java
hi, Is it possible to use WMI in java.We can use C# code to fetch Windows information using WMI,but is it possible to do the same in Java?
-
only recently has my finder gone weird and now looks like this... http://img5.imageshack.us/img5/849/picture3cw1.png recently installed: yahoo messenger it's not always like this, just sometimes. cheers