How to display error messages for Standard validators
I am designing a simple login application.I have two input text-fields,say,email and password.
In my JSF page i have following,
<h:inputText id="email" value="#{User.email}" >
<f:validateLength minimum="1" maximum="6"/>
</h:inputText>
<P><BR>
<B>Password: </B>
<h:inputSecret id="password" value="#{User.password}" required="true">
<f:validateLength minimum="1" maximum="5"/>
</h:inputSecret></P>
Now if the user does not enter anything in one or both of the text boxes i.e if null value is transfered to the server,
I want the JSF to display some error message to the user that he has not filled up all the fields correctly.
Even i tried with something like,
<B><h:message for="email"/></B>
but still it does not work.
I am using JSF1.0 Final.
Well this problem was dam simple with JSF1.0 beta beacause of the existence of <h:output_errors>.
Is there any such facility with JSF1.0 final?
Your h:inputText does not contain required="true". I guess, it should. Otherwize, validateLength will not work.
Similar Messages
-
How to display error message ??
Hi,
I have a BDC program to upload data from an excel sheet. I could see that some records of data fail to pass and hence after my bdc run i would like to display error message for the failed records as follows:
costcenter:
cost element:
fiscal year:
etc etc
is it possible ?? how to do that ? please explain in detail.
for ur reference my program is pasted below.
thanks
*& Report ZBDC_BUDGET_UPLOAD
REPORT ZBDC_BUDGET_UPLOAD.
types: begin of tdata,
rec(150) type c,
end of tdata,
begin of tmtgp,
costcent LIKE CCSS-KOSTL,
costelem LIKE CCSS-KSTAR,
fisyear LIKE CCSS-GJAHR,
jan(10),
feb(10),
mar(10),
apr(10),
may(10),
jun(10),
jul(10),
aug(10),
sep(10),
oct(10),
nov(10),
dec(10),
end of tmtgp.
data: idata type table of tdata with header line.
data: imtgp type table of tmtgp with header line.
Data : fieldval(10) type c.
selection-screen begin of block b1 with frame title text-001.
parameters: p_file type localfile default 'C:\budget_data_csv.csv'.
selection-screen end of block b1.
include zbdcrecx1.
at selection-screen on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting static = 'X'
changing file_name = p_file.
start-of-selection.
perform upload_data.
loop at imtgp.
Write imtgp-fisyear to fieldval.
perform open_group.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(04)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KPP0B-VALUE(04)'
fieldval.
Write imtgp-costcent to fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KPP0B-VALUE(06)'
fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-costelem to fieldval.
perform bdc_field using 'KPP0B-VALUE(09)'
fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(04)'.
perform bdc_field using 'BDC_OKCODE'
'=CSPB'.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jan to fieldval.
perform bdc_field using 'Z-BDC03(01)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(02)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-feb to fieldval.
perform bdc_field using 'Z-BDC03(02)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(03)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-mar to fieldval.
perform bdc_field using 'Z-BDC03(03)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(04)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-apr to fieldval.
perform bdc_field using 'Z-BDC03(04)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(05)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-may to fieldval.
perform bdc_field using 'Z-BDC03(05)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jun to fieldval.
perform bdc_field using 'Z-BDC03(06)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(07)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jul to fieldval.
perform bdc_field using 'Z-BDC03(07)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(08)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-aug to fieldval.
perform bdc_field using 'Z-BDC03(08)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-sep to fieldval.
perform bdc_field using 'Z-BDC03(09)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(10)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-oct to fieldval.
perform bdc_field using 'Z-BDC03(10)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(11)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-nov to fieldval.
perform bdc_field using 'Z-BDC03(11)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(12)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-dec to fieldval.
perform bdc_field using 'Z-BDC03(12)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(12)'.
perform bdc_field using 'BDC_OKCODE'
'=CBUC'.
perform bdc_transaction using 'KP06'.
perform close_group.
endloop.
form upload_data.
data: filename type string.
clear idata.
refresh idata.
filename = p_file.
call function 'GUI_UPLOAD'
exporting filename = filename
filetype = 'ASC'
tables data_tab = idata
exceptions file_open_error = 1
file_read_error = 2
no_authority = 6
others = 17.
check sy-subrc = 0.
loop at idata.
clear imtgp.
split idata at ',' into imtgp-costcent imtgp-costelem imtgp-fisyear
imtgp-jan imtgp-feb imtgp-mar imtgp-apr imtgp-may imtgp-jun imtgp-jul
imtgp-aug imtgp-sep imtgp-oct imtgp-nov imtgp-dec.
append imtgp.
endloop.
endform.check the below code,.,
DATA : t_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
CALL TRANSACTION '<DELIVERYTRANSACTION>' USING t_bdctab
mode 'N'
MESSAGES INTO t_bdcmsgcoll.
DESCRIBE TABLE t_bdcmsgcoll LINES g_lines.
READ TABLE t_bdcmsgcoll INDEX g_lines.
IF t_bdcmsgcoll-msgtyp = 'S' AND
t_bdcmsgcoll-msgid = <Msg id> AND
t_bdcmsgcoll-msgnr = <Msg number>.
* Trap your Call Transaction messages
t_success-deliverynumber = t_bdcmsgcoll-msgv1.
* You can format the message returned by call transaction using function 'FORMAT_MESSAGE' which will return g_mesg
t_success-message = g_mesg.
APPEND t_success.
CLEAR t_success.
ELSE.
* If there an Error-Do this..
READ TABLE t_bdcmsgcoll WITH KEY msgtyp = 'E'.
IF sy-subrc = 0.
* Format your message using FORMAT_MESSAGE "FM
CLEAR g_mesg.
t_error-msg = g_mesg_incl.
APPEND t_error.
CLEAR t_error.
ENDIF.
ENDIF.
* Clear for next run
CLEAR: t_bdcmsgcoll,
t_bdctab.
REFRESH: t_bdcmsgcoll[],
t_bdctab[]. -
How to give error message for the screen element text field when wrong i/p
How to give error message for the screen element text field when wrong i/p
when wrong input given
eg.
I have a text box with SBOOK-CARRID
so when user give wrong entry in text box i.e LG
then I should give some error stating that the the input is invalid or not available ,
now it showing the error of standard messages,
i want manual message to be displayed when error comes.
Thank you,
Regards,
Jagrut Bharatkumar ShuklaHi all,
Thank you for your valuable reply,
but the thing is that its a screen field,
i.e text box not a selection screen
i created in screen layout
with name sbook-carrid
now i want to get error message display if wrong i/p is given
thank you.
Regards,
Jagrut bharatkumar Shukla, -
Dear Experts,
I have a requirement for making material description as non mandetory in change request view of mdg material screen.
I have done that using field usage in get data method of feeder classes, but still message is displaying.
This message 'Material description is mandatory is displaying with check action only, but not with save or submit after i anhance field property as not mandetory.
How to prevent error message for material description in MDG material detail screen, when user click on check action.
Thanks
SukumarHello Sukumar
In IMG activity "Configure Properties of Change Request Step", you can completely deactivate the reuse area checks (but will then loose all other checks of the backend business logic as well).
You can also set the error severity of the checks from Error to Warning (per CR type, not per check).
Or you provide a default value for the material description, e.g. by implementing the BAdI USMD_RULE_SERVICE.
Regards, Ingo Bruß -
How to display error message in Shopping Cart?
How to display error message in Shopping Cart and stop the shopping cart for further processing? I try MESSAGE w001(zshop) or MESSAGE e001(zshop). But it is causing run-time error.
Hi Paul,
In the DOC_CHECK or DOC_SAVE BADI, you have a global internal table named et_messages. The structure of this table is 'bbp_smessages_badi'. You can append your error message here by inputting the message type, ID and number. The message type is either 'E' for error or 'W' for warning and the number would depend on your message class(ID). You will be able to see the error message on top of the screen, can be a red or yellow highlight depending on your appended message. I don't think creating the error message via the MESSAGE syntax will be successful, maybe this is why you are getting a runtime error.
Regards,
Noel -
How to write Error message for select options?
Hi
i have this select option statement
SELECT-OPTIONS: s_fevor FOR afko-fevor.
how to write error message for this?
Regards
SmithaError messages are displayed for Select-options mostly on two conditions:
1) You needs to check wether a value is entered or not its done by:
a)
Select-options:SELECT-OPTIONS: s_fevor FOR afko-fevor Obligatory.
In this case error message is automatically throwed by system.
b) You can do this in Selection Screen events.
Ex:
AT SELECTION-SCREEN./AT SELECTION-SCREEN ON S_FEVOR.
IF S_FEVOR-LOW IS INITIAL.
MESSAGE 'XXXXX' TYPE 'E'.
ENDIF.
2) You need to Validate the entered value:
You can do this in Selection Screen events.
Ex:
AT SELECTION-SCREEN./AT SELECTION-SCREEN ON S_FEVOR.
SELECT FEVOR
FROM AFKO
INTO AFKO-FEVOR
UP TO 1 ROWS
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE 'XXXXX' TYPE 'E'.
ENDIF.
Regards,
Gurpreet -
How to display error message in Billing Output Type (VF03).
Hi,
could anyone suggest how do i display error message via billing (VF03) output type?i want to display an error message from my sapscript program.
*determine discount
it_zmas-discount = it_zmas-gross_value - zkwert.
MODIFY it_zmas.
ELSE.
MESSAGE ID 'Z0' TYPE 'S' NUMBER '999' WITH 'Please maintain cust pricing grp 34 for ' wa_zmas-matnr.
p_proc_screen = 'X'.
ENDIF.
when user enter billing doc no in vf03, user will click 'issue output type' and select their output type to be printed out.
if there's an error in the print program, it should promt out an error message and do not allowed user to print preview and print the form out.
what i had did previously, i prompt the error message and disable the print preview button. i think its not a good solution and i am not sure how to stop the form from not printing it out.
i was wondering is there any user exit of the output type, vofm (which i had this solutions from my previous question, but unsure how to use it) or any other solutions.
please help. -
How to display error message in abap
How to dispaly error message in report?
i have to check the range bewteen two days and if it is not in range have to display error message only once.
next time if i press the execute button report will get executed without showing the warning message.
i am calculating the days between two dates, i am displaying the error message but if i press the execute button i will not allow me to execute the report.it again shows me the error message.i have to skip this in 2nd time.
can any one suggest what to do with this?hello suman,
i am using select-option in my report. And i have to check the difference between two dates in select option input box( low-value and high-value). if it is greater then suppose 10 then i have to display warning message at once and then if click on execute button , the report should get executed without showing any warning messages in report.
here i am attaching my source code.please take a close look and tell me where should i have to make change.
SELECT-OPTIONS :s_bedat FOR ekko-bedat.
AT SELECTION-SCREEN ON s_bedat.
IF NOT s_bedat IS INITIAL.
PERFORM bedat_validate. " Perform for Purchasing Document Date Validation
ENDIF.
FORM bedat_validate . " Form for Purchasing Document Date Validation
DATA : diffr TYPE i.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = s_bedat-high
i_datum_von = s_bedat-low
I_KZ_EXCL_VON = '0'
I_KZ_INCL_BIS = '0'
I_KZ_ULT_BIS = ' '
I_KZ_ULT_VON = ' '
I_STGMETH = '0'
I_SZBMETH = '1'
IMPORTING
e_tage = diffr
EXCEPTIONS
DAYS_METHOD_NOT_DEFINED = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF diffr GT 31.
MESSAGE s009(zerrormsg) WITH text-000 DISPLAY LIKE 'W'.
LEAVE TO LIST-PROCESSING.
ENDIF.
ENDIF.
ENDFORM. " BEDAT_VALIDATE -
How to display error message in case of function module ?
In the report i was using " message-id " to display error message....
how to use in function module ?Hi,
Messages in Function Modules and Methods
Messages have two different functions in function modules and methods:
Normal Messages
If you use messages in function modules and methods without the RAISING addition in the MESSAGE statement, and the caller does not catch the message, the message is handled
normally according to the context in which it is called within the function module or method.
Triggering Exceptions with Messages
If you use messages in function modules and methods with the addition
... RAISING <exc>
the way in which the message is handled depends on whether the calling program handles the exception <exc> or not.
If the calling program does not handle the exception, the message is displayed and handled according to the context in which it occurs in the function module or method from which it
was called.
If the calling program handles the exception, the message is not displayed. Instead, the procedure is interrupted in accordance with the message type, and processing returns to the calling program. The contents of the message are placed in the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
Catching Message in the Calling Program
You can catch messages from function modules that are not sent using the RAISING addition in the MESSAGE statement by including the implicit exception ERROR_MESSAGE in the
EXCEPTIONS list of the CALL FUNCTION statement. The following conditions apply:
Type S, I, and W messages are ignored (but logged during background processing)
Type E and A messages trigger the exception ERROR_MESSAGE
Type X messages trigger the usual runtime error and short dump.
Catching messages is not currently supported for methods.
Regards,
Bhaskar -
Display error messages for each material
Hi All,
I am using a BAPI which gives errors in return table.I am executing this BAPI for several materials in a LOOP.I need to display the error messages for each of these materials as shown below:
Material 1:
error1
error2
Material 2:
error 1
error 2.
What is the best way to display this?Also plz let me know how to use REUSE_ALV_HIERSEQ_LIST_DISPLAY?
Thanks,
Rakesh.I did the same thing in the below code, go thru it and check it.
* calling the BAPI to update the Asset Master AS02
loop at it_final into is_final.
* If updating of floor area only
if p_farea = 'X'.
* passing new area value to the BAPI
is_realestate-area = is_final-grufl.
is_realestatex-area = 'X'.
call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = is_final-bukrs
asset = is_final-anln1
subnumber = is_final-anln2
realestate = is_realestate
realestatex = is_realestatex
importing
return = it_return.
* If Asset Master is changed with out any errors
read table it_return with key type = 'E'.
if sy-subrc = 0.
flag = ' '.
else.
flag = 'X'.
* Call the COMMIT BAPI
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wait up to 2 seconds.
endif.
* If the Asset Master is changed with out any errors
if flag = 'X'.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_green.
is_output-grufl_n = is_final-grufl.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting grufl_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
elseif flag = ' '.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_red.
is_output-grufl_n = is_realestate-area.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting grufl_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
endif.
endif.
* If updating of lease commencement date only
if p_ldate = 'X'.
* Passing new lease start date value to the BAPI
is_leasing-start_date = is_final-leabg.
is_leasingx-start_date = 'X'.
* Call the BAPI to change the Asset Master
call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = is_final-bukrs
asset = is_final-anln1
subnumber = is_final-anln2
leasing = is_leasing
leasingx = is_leasingx
importing
return = it_return.
* If Asset Master is changed with out any errors
read table it_return with key type = 'E'.
if sy-subrc = 0.
flag = ' '.
else.
flag = 'X'.
* Call the COMMIT BAPI
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wait up to 2 seconds.
endif.
* If the Asset Master is changed with out any errors
if flag = 'X'.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_green.
is_output-leabg_n = is_final-leabg.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting leabg_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
elseif flag = ' '.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_red.
is_output-leabg_n = is_leasing-start_date.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting leabg_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
endif.
endif.
clear : is_final, is_realestate, is_leasing,
it_return, flag , is_output.
endloop.
* Display the report out with old and new values
PERFORM output_report.
*& Form output_report
* text
* --> p1 text
* <-- p2 text
*FORM output_report.
* DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
* is_layout TYPE slis_layout_alv.
** Sub routine for filling the field catalog
* IF it_fieldcat[] IS INITIAL.
* PERFORM field_fill USING it_fieldcat.
* ENDIF.
** Sub routine to set the layout
* PERFORM set_layout USING is_layout.
** Function module to display the data in ALV format
* CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
* EXPORTING
* i_callback_program = l_repid
* it_fieldcat = it_fieldcat
* is_layout = is_layout
* TABLES
* t_outtab = it_output
* EXCEPTIONS
* program_error = 1
* OTHERS = 2.
* IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
* ENDIF.
*ENDFORM. " output_report
*& Form field_fill
* text
* -->P_IT_FIELDCAT text
*FORM field_fill USING pt_fieldcat TYPE slis_t_fieldcat_alv.
* DATA : ls_fieldcat TYPE slis_fieldcat_alv,
* pos TYPE i VALUE 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'C_ICON'.
* ls_fieldcat-seltext_m = 'Change Status'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'BUKRS'.
* ls_fieldcat-ref_fieldname = 'BUKRS'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'ANLN1'.
* ls_fieldcat-ref_fieldname = 'ANLN1'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'ANLN2'.
* ls_fieldcat-ref_fieldname = 'ANLN2'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* IF p_farea = 'X'.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'GRUFL'.
* ls_fieldcat-ref_fieldname = 'GRUFL'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'GRUFL_N'.
* ls_fieldcat-seltext_l = 'New Floor Area'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ENDIF.
* IF p_ldate = 'X'.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'LEABG'.
* ls_fieldcat-ref_fieldname = 'LEABG'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'LEABG_N'.
* ls_fieldcat-seltext_l = 'New Lease St.Date'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ENDIF.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'MESSAGE'.
* ls_fieldcat-seltext_l = 'Status Message'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
*ENDFORM. " field_fill
Regards
Gopi -
How To Display Error Message In Self Service Page
Dear All,
I am using 11.5.10 Oracle HRMS self Service ,,,
How can I display error message on the top of the self service page if some action happen ?
Best RegardsTime entry rules maybe?
-
DISPLAYING ERROR MESSAGE FOR TABLE
How can I dispaly error message for table havong input fields from message pools,so that when I clicks on that message,that should point to that particular field having error
Thanks
FahadHi Fahad,
From Message pool retrive data using text accessor
IWDTextAccessor textYesAccessor = wdComponentAPI.getTextAccessor();
String tempYes = textYesAccessor.getText(IMessageSample.<YES>);
You can report error message like.
if(tempYes !=null)
reportException(String message, boolean cancelNavigation);
See this link for Webdynpro API..
https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/index.html
Regards
Suresh -
How to capture error message from standard function module
Dear friends
when i execute standard function module in finance , i am getting error message , pls check the below screen shot,
how to capture the below error message so that i have display in my webdynpro component
Thanks
VijayaHello Vijaya,
Incase of BAPI's they have a return table parameter T_RETURN. Just read that return table to get the error message.
Incase of normal function modules, there will be exceptions raised for the message used inside the function module. Just read the sy-subrc after the FM and based on the sy-subrc value find the respective exception raised.
May be you can try like this, whenever the message is raised it will be stored in the system variable.
CALL FM.
check for the system variables.
sy-msgid = Message ID of the latest message raised.
sy-msgno = message number of the latest message raised.
sy-msgty = message type of the latest message raised.
sy-msgv1 = variable1 of the latest message raised.
sy-msgv2 = variable2 of the latest message raised.
sy-msgv3 = variable3 of the latest message raised.
sy-msgv4 = variable4 of the latest message raised.
Regards,
TP -
How to extract error message for each output type.
Hi All,
Need your advice on the problem that I have.
Expected Solution:
1. Create an extra column for displaying header output error message from VF02 into a report program.
Steps that i have did:
1. Go to transaction VF02.
2. Enter a billing document number.
3. Hit enter. Click "Goto" > Header> Output
4. Click on the status that is red colour. Click on "processing log".
5. Press "F1" on the red colour message type. (Found out that it is a structure).
Need your advice on the question that I have:
1) How do we know that which "not successfully" process output type belong to which error message class?Hi Brad Bohn,
Thanks for your advice. I am so sorry about that. Thanks so much for your advice. And i have follow your advices and steps given by you. Appreciate it very much.
But for this issue about how to extract message for each output type. I have follow your steps by using SE30 to trace VF03 and I managed to found out that they are using this function module "WFMC_PROTOCOL_SHOW". Need your advice on this, how do we know each different output type with different error message is pulled from?
From my further research and in depth debugging into this function module, i manage to find this global internal table "PROTO_TAB" which stores all the text messages for each output. How does this internal table is populated?
Thanks in advance.
Regards
Shawn -
How to display error message with some variable
Hi
I want to display errror message along with material number which is thr in d LOOP .
Basically i want some variable to display along with error message .
Can anybody suggest me how can i go about it?
Edited by: sonal musale on Apr 14, 2009 12:06 PMHi,
In the message class, suppose you use 001 for invalid material message.
So keep it like:-
Invalid Material : &1
in the message class for 001.
Now in loop use as:-
loop at itab into wa.
"perform validations
"if validation fails for current material
MESSAGE e001 WITH wa-matnr.
endloop.
Similary you can use more variables:-
Invalid Material : &1 &2 &3
MESSAGE e001 WITH <variable1> <variable2> <variable3>.
Hope this helps you.
Regards,
Tarun
Maybe you are looking for
-
How can I delete my credit card info from the apps store?
Ever since I put my credit card info into the system it won't let me download anything even if it's free. It keeps saying to verify card info and when I do it ask for the card security number but when I put it in then it says it's not right. I don't
-
Problem with "Home Network" in hub manager
Hi everyone, I had a bit of an issue with my homehub this week where some prolonged decorating caused the hub to be unplugged for most of the day. When the hub was plugged in again it appeared to have performed a factory reset. Now over the past day
-
How to dublicate the movieclip in as3.0
Flash actionscript3.0 How to dublicate the movieclip and attach the movieclip in stage. Thanks in Advance.
-
How do i copy The iMovie video from Mac, to iPad mini?
How do i copy The iMovie video from Mac, to iPad mini?
-
Backup-restore vs running the same SSIS datacopy project twice
I have 2 different applications which need the same source data which is copied from a production database. The 2 applications run on different servers, so they can not use the same source database. The way I see it, I have the following two options: