Displaying report error back to calling form
Hi
We are running 10g reports and forms on Red Hat.
The forms are run using a run_report_object command to generate pdf output and then displayed using web.show_document. The parameters are entered into a form and sometimes are validated and sometimes not.
On the whole it all works well. However, if a bad parameter is passed to a report, the report will not run and an error will be held in the report server for that report. Is there an easy way to programmatically detect in forms, that the report has errored and then to bring that error message back and display it in the form?
TIA
Thanks
Tony
Sorry
i found a way.
if <my item is changed> then
set_block_property(BLOCK,default_where,'initial where conditions + current displayed row conditions');
Clear_Block (No_Validate);
execute_query;
set_block_property(BLOCK,default_where,'initial where conditions');
end if;
Similar Messages
-
What event fires when form focus comes back to calling form
Hi,
I need to capture the event when form focus comes back to calling form.
I am using KFF in my custom form and want to perform a set activities when users presses "Cancel" button of KFF instead of "OK" button.
I guess KFF screen is an another form which is being called from my custom form.
Regards,
KuldeepI posted my question here and got answer
Re: Event to capture when form focus comes back to calling form
Edited by: rawat75 on Feb 6, 2013 12:54 AM -
Verify_function doesn't display the error messge in oracle forms
We are planning to use the verify_function to validate the password when user password is expires.
The users are using Forms 6i on web.
When I set the profile to user verify_fucntion and then try to change the password with the default password change window , it doesn't display the error message if the crieteria doesn't match. Instead it just clears the screen. So the user doesn't get any idea what's going on.
has anybody seen this. We are trying to utilize the default password change functionality instead of coding our own.....in forms
Thanks,
DjIt can be that the spry:content does not support the function::<syntax> or that your impelementation is wrong. You can try this:
spry:content="function::FormatDate"
Like you would implement the function statement in the spry:if statements.
If that doesn't do the trick you need to modify the SpryData.js if you need this kind of support. -
Pass date value back from called form
I have a form that allows the user to select a date from a calendar canvas. I can call this form from another from and now want to pass the selected date on the called form back to the calling form. I'm new to multi-form applications so I'm looking for some guidence here. I am thinking a parameter list would be better than a global variable since globals only support char values. I've never done this before so any advice or examples would be helpful.
Thanks in advance,
JeffChander,
Thanks for your reply. I think this is the .olb I am using. I created my calendar form using it or a similar .olb. The form runs OK, just lacks the means to pass the "date picked" to the calling form. This is where my inexperience is making things difficult. Assuming we are talking about the same olb, how do I pass the date back?
Jeff -
Automatically displaying the error text for a form field when the validator fails?
Hi,
Flex 2 has a very nice feature to display custom text next to
a form field whose validation failed. But the user has to move the
mouse over the form field to display the text. Is there a way to
invoke this feature programmatically?
What I would like to do is validate form fields on submit and
- if validation fails for a form field - set focus on that form
field and automatically display the custom error text in the red
blurb. Focusing works fine but I cant' get the text to render...
MarkusThanks Bregent.
Weirdest thing...I just tried a Google search for a solution to this problem and came across another thread on this forum. By the time I got to the bottom of it I realised one of those taking part was myself from years ago! Jeesh, been here before or what!
Changed my recordset to...
<%
Dim rsPROP__MMColParam
rsPROP__MMColParam = "0"
If (Request.Form("categoryID") <> "") Then
rsPROP__MMColParam = Request.Form("categoryID")
End If
%>
<%
Dim rsPROP__MMColParam1
rsPROP__MMColParam1 = "1"
If (Request.Form("categoryID") <> "") Then
rsPROP__MMColParam1 = Request.Form("categoryID")
End If
%>
<%
Dim rsPROP
Dim rsPROP_cmd
Dim rsPROP_numRows
Set rsPROP_cmd = Server.CreateObject ("ADODB.Command")
rsPROP_cmd.ActiveConnection = MM_cs_STRING
rsPROP_cmd.CommandText = "SELECT prodid, product, categoryID FROM dbo.products WHERE ISNULL(?,0) = 0 OR categoryID = ?"
rsPROP_cmd.Prepared = true
rsPROP_cmd.Parameters.Append rsPROP_cmd.CreateParameter("param1", 5, 1, -1, rsPROP__MMColParam) ' adDouble
rsPROP_cmd.Parameters.Append rsPROP_cmd.CreateParameter("param2", 5, 1, -1, rsPROP__MMColParam) ' adDouble
Set rsPROP = rsPROP_cmd.Execute
rsPROP_numRows = 0
%>
...and it works fine.
Appreciate the help. I would have taken your advice and done an If Else on the WHERE clause to acheive the same.
Thank you.
NJ -
Report error with the input form using the VC BI integration wizard
Hello All,
I've created a report using the BI integration wizard in visual composer. I've configured the query with the 'Free Form' query template also I've defined the filters there. This is working fine and giving me the report output. When I deploy this , I could see
a start point for the data service.
But instead of the start point with the default values for the filters , I want to have an input form for the users to enter the field values. I added the input form in place of start point. But it's not working even though it doesn't give any error while deploying this report. It gives the following error when I run this report.
" Data service error occurred,cannot execute OLAP queryCannot get data set: Cannot get data set".
Could anybody help on this.
Thanks
AlokHi Sandeep,
I'm already draging it from the query input port. Are you referring a different way? How I could have the input variables in the query which I'm creating using the BI integration wizard. To get this input variable I'm trying to add the input form.
Am I doing anything wrong here ?
Pls help.
Thanks
Alok -
Reporting errors or exceptions back to the caller
I'm u sing OracleAS 10.1.3 and I'm exposing some of my PL/SQL procedures as web services. I was wondering what the convention is for reporting errors back to the caller. I read a little bit about Soap faults and some lack of support in the current JDev release.
Are soap faults the standard way of reporting handled exceptions? What about returning a record like:
type r_ws_response_string is record (
result varchar2 (4000),
return_code number,
error_message varchar2 (4000)
);... and having the caller check the return_code. Bad idea?
Any resources you can point is is appreciated (books/sites).
-Vahid PazirandehHi Toby,
Yes, I've come up with a working solution.
Essentially, I've made use of PL/SQL's OUT parameters and always reporting a status to the caller. At minimum, any procedure or function that I expose as a web service will have two out parameters: status, error_msg. The benefit of having a status being returned is that the caller can build logic based on different problems encountered, rather than just saying "an error occured". The error strings that you define are textual error codes, so they shouldn't change once you decide on an API.
The caller will always check for the value of status, if it is not 'SUCCESSFUL', then something is wrong. They can then log the value of error_msg so that their developers can figure out what went wrong later.
What's also nice is that the XML that's generated by JDeveloper looks clean when we're using one or more OUT params.
I don't know what the best way is to deal with this problem, but this works for me. :) Here's an example:
g_status_success := 'SUCCESSFUL';
g_status_bad_password := 'ERROR_INVALID_PASSWORD';
g_status_file_not_found := 'ERROR_FILE_NOT_FOUND';
g_status_unknown_error := 'ERROR_UNKNOWN_EXCEPTION';
procedure give_me_file(password varchar2,
status out varchar2,
error_msg out varchar2,
file out blob)
is
begin
if bad_password(password) then
status := g_status_bad_password;
error_msg := 'You entered the wrong password friend!';
return;
end if;
file := get_top_secret();
if file is null then
status := g_file_not_found;
error_msg := 'Your file could not be found';
return;
end if;
status := g_status_success;
exception
when others then
status := g_status_unknown_error;
error_msg := 'An unknown error occured. Please file a ticket.';
end;Regards,
Vahid Pazirandeh -
After displaying result of report, my report goes back to source code edito
Hello experts,
I am currently having a big problem with my report. Here is the problem, after displaying the
result(write), when I press BACK button it is not going back to my selection-screen which is the
usual for reports. Now, what happens is that it goes back to the source code or worse, to the main menu of SAP.
What I want to do is that when I press BACK button it should go to either selection-screen 500 or
selection-screen 1500.
Here's a rough flow of what is happening in my report:
start report -> fetch records based on user input -> display results(not in ALV) ->
after displaying report, click 'BACK' button -> it goes back to source code
Now, here's what I want to do:
start report -> fetch records based on user input -> display results(not in ALV) ->
after displaying report, click 'BACK' button -> go back to either selection-screen 500 or 1500
or call again the transaction of my report.
Help would be greatly appreciated here.Hi guys,
Thanks again for the quick replies.Here is the source code:
REPORT zdealer_contacts NO STANDARD PAGE HEADING
LINE-COUNT 0
LINE-SIZE 255
MESSAGE-ID zz.
TYPE-POOLS: slis.
Data Dictionary Tables
TABLES: zts0001,
zsoemailid,
kna1,
zts_stpgeoloc.
Includes
*INCLUDE zun_globe_header. " Globe Telecom Report Header
Structures, internal tables and data declarations
TYPES: BEGIN OF t_upload,
kunnr LIKE zts0001-kunnr,
zaddress(100),
zcperson(30),
zcnumber(18),
END OF t_upload.
TYPES: BEGIN OF t_error,
kunnr LIKE zts0001-kunnr,
zaddress(100),
zcperson(30),
zcnumber(18),
END OF t_error.
TYPES: BEGIN OF t_kna1,
name1 LIKE kna1-name1,
END OF t_kna1.
TYPES: BEGIN OF t_zts0001,
kunnr LIKE zts0001-kunnr,
cdseq LIKE zts0001-cdseq,
zaddress LIKE zts0001-zaddress,
zcperson LIKE zts0001-zcperson,
zcnumber LIKE zts0001-zcnumber,
zactivated LIKE zts0001-zactivated,
name1 LIKE kna1-name1,
END OF t_zts0001.
DATA: it_upload TYPE STANDARD TABLE OF t_upload WITH HEADER LINE,
it_error TYPE STANDARD TABLE OF t_error WITH HEADER LINE,
it_kna1 TYPE STANDARD TABLE OF t_kna1 WITH HEADER LINE,
it_zts0001 TYPE STANDARD TABLE OF t_zts0001 WITH HEADER LINE.
DATA: it_ztstemp LIKE zts0001 OCCURS 100 WITH HEADER LINE,
it_ztstemp_gloc LIKE zts_stpgeoloc OCCURS 100 WITH HEADER LINE.
*AVH - start of insertion - 04/18/06
FIELD-SYMBOLS: <fs_zts0001> LIKE LINE OF it_zts0001.
**ALV Declarations
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
g_repid LIKE sy-repid,
gs_layout TYPE slis_layout_alv,
gt_list_top_of_page TYPE slis_t_listheader,
gt_events TYPE slis_t_event WITH HEADER LINE,
gt_print TYPE slis_print_alv.
CONSTANTS: gc_top TYPE slis_formname VALUE 'TOP_OF_PAGE',
gc_topsum TYPE slis_formname VALUE 'TOP_OF_LIST',
gc_ucomm TYPE slis_formname VALUE 'USER_COMMAND'.
*AVH - end of insertion
Variables
DATA: v_kunnr LIKE zts0001-kunnr,
v_title(100) TYPE c,
gc_kunnr(06) TYPE c,
v_compflag(1) TYPE c,
v_flag(1).
Selection Screen
*AVH - start of modification - 06/27/06
*if user is controller, selection-screen 500 will be called else,
*selection-scren 1500 will be called.
*selection-screen for controllers
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_upld RADIOBUTTON GROUP grp2 USER-COMMAND ucomm1.
SELECTION-SCREEN COMMENT 2(20) text-007 FOR FIELD pr_upld.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 03(15) text-a11 FOR FIELD p_flnme.
PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:\'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_list1 RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 500.
*selection-screen for non-controllers.
SELECTION-SCREEN BEGIN OF SCREEN 1500.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(22) text-002 FOR FIELD p_dcode.
PARAMETERS: p_dcode LIKE vbak-kunnr,
p_name1 LIKE kna1-name1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_list2 RADIOBUTTON GROUP grp USER-COMMAND ucomm2.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_add RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(3) text-005 FOR FIELD pr_add.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_edit RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(4) text-006 FOR FIELD pr_edit.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 03(20) text-a12 FOR FIELD p_code.
PARAMETERS: p_code LIKE zts0001-cdseq.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 1500.
INITIALIZATION.
SELECT SINGLE kunnr comp_flag INTO (gc_kunnr,v_compflag)
FROM zsoemailid
WHERE bname = sy-uname.
IF sy-subrc <> 0.
MESSAGE i000 WITH
'You are not authorised to use this transaction'.
LEAVE PROGRAM.
ENDIF.
IF v_compflag = 'X'.
CALL SCREEN 500.
ELSE.
CALL SCREEN 1500.
ENDIF.
*AVH - end of modification
AT SELECTION-SCREEN OUTPUT.
PERFORM authority_check.
added by derick 050125
**-changed by weng rulloda 06012005
*AVH - start of insertion - 05/22/06
*no need to get value of kunnr from global memory
*since gc_kunnr would be filled via the select statement below
GET PARAMETER ID 'KUN' FIELD gc_kunnr.
*AVH - end of insertion
p_dcode = gc_kunnr.
*AVH - start of insertion - 05/22/06
**fetch the respective description of dealer based from p_dcode
**and put in parameter p_name1
SELECT SINGLE name1 FROM kna1
INTO p_name1
WHERE kunnr = p_dcode.
*AVH - end of insertion
*AVH - start of insertion - 05/22/06
**selection-screen parameters is based if user is controller or not.
**created new selection-screen conditions based from orig. code
v_kunnr = gc_kunnr.
LOOP AT SCREEN.
IF screen-name = 'P_DCODE'.
screen-input = '0'.
screen-output = '1'.
MODIFY SCREEN.
ELSEIF screen-name = 'P_NAME1'.
screen-input = '0'.
screen-output = '1'.
MODIFY SCREEN.
ELSEIF screen-name = 'P_CODE'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
IF pr_list2 = 'X' OR pr_add = 'X'.
LOOP AT SCREEN.
IF screen-name = 'P_CODE'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF pr_edit = 'X'.
LOOP AT SCREEN.
IF screen-name = 'P_CODE'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF pr_list1 = 'X'.
LOOP AT SCREEN.
IF screen-name = 'P_FLNME'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*AVH - end of modification
AT SELECTION-SCREEN.
CHECK sy-ucomm = 'UCOMM1' OR sy-ucomm = 'UCOMM2'.
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnme.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnme.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
mask = ',.,..'
mode = 'O'
title = 'File Selection'
IMPORTING
filename = p_flnme
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_code.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_code.
DATA : BEGIN OF itab_list OCCURS 0,
kunnr LIKE zts0001-kunnr,
cdseq LIKE zts0001-cdseq,
zaddress LIKE zts0001-zaddress,
zcperson LIKE zts0001-zcperson,
zcnumber LIKE zts0001-zcnumber,
END OF itab_list.
DATA: tab_fields LIKE dfies OCCURS 0 WITH HEADER LINE,
tab_valuetab(100) TYPE c OCCURS 0 WITH HEADER LINE.
DATA: tab_dynnr TYPE sy-dynnr.
DATA: BEGIN OF tab_return_tab OCCURS 0.
INCLUDE STRUCTURE ddshretval.
DATA: END OF tab_return_tab.
DATA: progname LIKE sy-repid.
CLEAR: tab_valuetab[], tab_fields[].
SELECT kunnr cdseq zaddress zcperson zcnumber
INTO CORRESPONDING FIELDS OF TABLE itab_list
FROM zts0001
WHERE kunnr = v_kunnr.
tab_dynnr = sy-dynnr.
tab_fields-tabname = 'ZTS0001'.
tab_fields-fieldname = 'KUNNR'.
APPEND tab_fields.
tab_dynnr = sy-dynnr.
tab_fields-tabname = 'ZTS0001'.
tab_fields-fieldname = 'CDSEQ'.
APPEND tab_fields.
tab_fields-tabname = 'ZTS0001'.
tab_fields-fieldname = 'ZADDRESS'.
APPEND tab_fields.
tab_fields-tabname = 'ZTS0001'.
tab_fields-fieldname = 'ZCPERSON'.
APPEND tab_fields.
tab_fields-tabname = 'ZTS0001'.
tab_fields-fieldname = 'ZCNUMBER'.
APPEND tab_fields.
LOOP AT itab_list.
tab_valuetab = itab_list-kunnr.
APPEND tab_valuetab.
tab_valuetab = itab_list-cdseq.
APPEND tab_valuetab.
tab_valuetab = itab_list-zaddress.
APPEND tab_valuetab.
tab_valuetab = itab_list-zcperson.
APPEND tab_valuetab.
tab_valuetab = itab_list-zcnumber.
APPEND tab_valuetab.
ENDLOOP.
progname = sy-repid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CDSEQ'
dynpprog = progname
dynpnr = '1000'
dynprofield = 'P_CODE'
TABLES
value_tab = tab_valuetab
field_tab = tab_fields
return_tab = tab_return_tab
EXCEPTIONS
OTHERS = 0.
START-OF-SELECTION.
IF pr_edit = 'X' AND p_code IS INITIAL.
MESSAGE i008 WITH 'Please specify a ship-to code.'.
LEAVE TO TRANSACTION 'ZDCONTACT'.
ENDIF.
PERFORM get_data.
IF pr_upld = 'X'.
PERFORM upload_file.
ELSEIF pr_add = 'X'.
PERFORM add_record.
ELSEIF pr_edit = 'X'.
PERFORM edit_record.
ELSEIF pr_list1 = 'X' OR pr_list2 = 'X'.
PERFORM display_alv.
ENDIF.
END-OF-SELECTION.
based from ALV PF-STATUS
IF sy-ucomm = '&F03'. "BACK
LEAVE TO TRANSACTION 'ZDCONTACT'.
ELSEIF sy-ucomm = '&F15'. "EXIT
LEAVE TO TRANSACTION 'ZDCONTACT'.
ELSEIF sy-ucomm = '&F12'. "CANCEL
LEAVE TO TRANSACTION 'ZDCONTACT'.
ENDIF.
*& Form authority_check
FORM authority_check.
CALL FUNCTION 'AUTHORITY_CHECK'
EXPORTING
field1 = 'TCD' "MDM
object = 'S_TCODE'
user = sy-uname
value1 = 'ZMEN'
VALUE3 = '01' MDM
EXCEPTIONS
user_dont_exist = 1
user_is_authorized = 2
user_not_authorized = 3
user_is_locked = 4
OTHERS = 5.
IF sy-subrc NE 2.
**-added by weng 04/28/2006
**-if user is not authorized to use dealer portal check if he is
**- authorized to use the tcode ZDCONTACT
CALL FUNCTION 'AUTHORITY_CHECK'
EXPORTING
field1 = 'TCD' "MDM
object = 'S_TCODE'
user = sy-uname
value1 = 'ZDCONTACT'
VALUE3 = '01' MDM
EXCEPTIONS
user_dont_exist = 1
user_is_authorized = 2
user_not_authorized = 3
user_is_locked = 4
OTHERS = 5.
**-weng
IF sy-subrc NE 2.
MESSAGE i000 WITH
'You are not authorised to use this transaction'.
LEAVE PROGRAM.
ENDIF.
ENDIF.
ENDFORM. " AUTHORITY_CHECK
*& Form get_data
FORM get_data.
*AVH - start of insertion - 04/19/06
**records selected from table zts0001 that has been marked as
**activated will be fetched otherwise, ignore.
IF v_kunnr IS INITIAL.
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_zts0001
FROM zts0001.
ELSEIF v_compflag = 'X'.
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_zts0001
FROM zts0001.
ELSE.
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_zts0001
FROM zts0001
WHERE kunnr = v_kunnr.
ENDIF.
*AVH - start of insertion - 05/24/06
**fetch name based from kunnr and put in itab
LOOP AT it_zts0001 ASSIGNING <fs_zts0001>.
SELECT SINGLE name1 FROM kna1
INTO <fs_zts0001>-name1
WHERE kunnr = <fs_zts0001>-kunnr.
ENDLOOP.
*AVH - end of insertion
ENDFORM. " get_data
*& Form Upload_file
FORM upload_file.
DATA: lv_seq(5) TYPE n,
lv_ctr(5) TYPE c,
lv_kunnr LIKE it_upload-kunnr.
v_title = 'Upload from File'.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_flnme
filetype = 'DAT'
TABLES
data_tab = it_upload
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE i008 WITH 'File does not exist.'.
IF v_compflag IS INITIAL.
LEAVE TO TRANSACTION 'ZDCONTACT'.
ELSE.
LEAVE TO TRANSACTION 'ZDCONTACT'.
ENDIF.
ENDIF.
CHECK sy-subrc EQ 0.
DELETE it_upload
WHERE zaddress EQ space
AND zcperson EQ space
AND zcnumber EQ space.
SORT it_zts0001 BY kunnr ASCENDING cdseq DESCENDING.
SORT it_upload BY kunnr ASCENDING.
LOOP AT it_upload.
lv_kunnr = it_upload-kunnr.
AT NEW kunnr.
AVH - start of insertion - 06/30/06
SELECT SINGLE kunnr FROM zsoemailid
INTO lv_kunnr
WHERE kunnr = it_upload-kunnr.
if it_upload-kunnr is not found in table ZSOEMAILID, it will
not be included in the upload.
IF sy-subrc <> 0.
DELETE it_upload.
CLEAR it_upload.
CONTINUE.
ENDIF.
AVH - end of insertion
READ TABLE it_zts0001 WITH KEY kunnr = lv_kunnr.
IF sy-subrc EQ 0.
lv_seq = it_zts0001-cdseq.
ELSE.
CLEAR lv_seq.
ENDIF.
ENDAT.
IF it_upload-zaddress IS INITIAL.
MOVE-CORRESPONDING it_upload TO it_error.
APPEND it_error.
CLEAR it_error.
ELSE.
REPLACE '"' WITH '' INTO it_upload-zaddress.
REPLACE '"' WITH '' INTO it_upload-zaddress.
REPLACE '"' WITH '' INTO it_upload-zcperson.
REPLACE '"' WITH '' INTO it_upload-zcperson.
CONDENSE it_upload-zaddress.
CONDENSE it_upload-zcperson
ADD 1 TO lv_seq.
MOVE: it_upload-kunnr TO it_ztstemp-kunnr,
lv_seq TO it_ztstemp-cdseq,
it_upload-zaddress TO it_ztstemp-zaddress,
it_upload-zcperson TO it_ztstemp-zcperson,
it_upload-zcnumber TO it_ztstemp-zcnumber,
'X' TO it_ztstemp-zactivated,
sy-uname TO it_ztstemp-zcreated_by,
sy-datum TO it_ztstemp-zchanged_date.
MOVE-CORRESPONDING it_ztstemp TO it_ztstemp_gloc.
APPEND: it_ztstemp, it_ztstemp_gloc.
CLEAR: it_ztstemp, it_ztstemp_gloc.
ENDIF.
ENDLOOP.
IF NOT it_ztstemp[] IS INITIAL.
INSERT zts0001 FROM TABLE it_ztstemp.
INSERT zts_stpgeoloc FROM TABLE it_ztstemp_gloc.
WRITE:/ 'List of Records Uploaded.' COLOR 1 INTENSIFIED ON.
FORMAT COLOR 1 INTENSIFIED OFF.
WRITE:/(020) 'Dealer Code' CENTERED,
(007) 'Code' CENTERED,
(100) 'Address',
(030) 'Contact Person' CENTERED,
(018) 'Contact Number' CENTERED.
FORMAT COLOR OFF.
WRITE:/(179) sy-uline.
DESCRIBE TABLE it_ztstemp LINES lv_ctr.
SORT it_ztstemp BY kunnr cdseq.
LOOP AT it_ztstemp.
WRITE:/(020) it_ztstemp-kunnr,
(007) it_ztstemp-cdseq,
(100) it_ztstemp-zaddress,
(030) it_ztstemp-zcperson,
(018) it_ztstemp-zcnumber.
ENDLOOP.
SKIP 1.
WRITE:/ 'TOTAL :', lv_ctr.
ENDIF.
IF NOT it_error[] IS INITIAL.
SKIP 2.
FORMAT COLOR 1 INTENSIFIED OFF.
WRITE:/(020) 'Dealer Code' CENTERED,
(030) 'Contact Person' CENTERED,
(018) 'Contact Number' CENTERED.
FORMAT COLOR OFF.
WRITE:/(070) sy-uline.
DESCRIBE TABLE it_error LINES lv_ctr.
SORT it_error BY kunnr zcperson.
LOOP AT it_error.
WRITE:/ 'With No Address.' COLOR 6 INTENSIFIED ON.
WRITE:/(020) it_error-kunnr,
(030) it_error-zcperson,
(018) it_error-zcnumber.
ENDLOOP.
SKIP 1.
WRITE:/ 'TOTAL :', lv_ctr.
ENDIF.
ENDFORM. " Upload_file
*& Form add_record
FORM add_record.
v_title = ''.
IF NOT v_kunnr IS INITIAL.
SUBMIT zdealer_contacts_add_edit AND RETURN
WITH p_kunnr = v_kunnr
WITH p_name1 = p_name1 "AVH
WITH p_cdseq = space
WITH p_flag = 'A'
WITH p_addr = it_zts0001-zaddress
WITH p_pers = it_zts0001-zcperson
WITH p_numb = it_zts0001-zcnumber
VIA SELECTION-SCREEN.
ENDIF.
LEAVE TO TRANSACTION 'ZDCONTACT'.
ENDFORM. " add_record
*& Form edit_record
FORM edit_record.
v_title = ''.
READ TABLE it_zts0001 WITH KEY kunnr = v_kunnr
cdseq = p_code.
IF sy-subrc EQ 0.
SUBMIT zdealer_contacts_add_edit AND RETURN
WITH p_kunnr = v_kunnr
WITH p_name1 = p_name1 "AVH
WITH p_cdseq = p_code
WITH p_flag = 'E'
WITH p_addr = it_zts0001-zaddress
WITH p_pers = it_zts0001-zcperson
WITH p_numb = it_zts0001-zcnumber
WITH v_controller = v_compflag
VIA SELECTION-SCREEN.
ELSE.
MESSAGE i008 WITH 'No record found.'.
CALL TRANSACTION 'ZDCONTACT'.
ENDIF.
LEAVE TO TRANSACTION 'ZDCONTACT'.
ENDFORM. " edit_record
*& Form display_records
*FORM display_records.
IF NOT it_zts0001[] IS INITIAL.
v_title = 'List of Dealer Contacts'.
FORMAT COLOR 1 INTENSIFIED OFF.
WRITE:/(020) 'Customer Number' CENTERED,
(007) 'Code' CENTERED,
(100) 'Address',
(030) 'Contact Person' CENTERED,
(018) 'Contact Number' CENTERED.
FORMAT COLOR OFF.
WRITE:/(179) sy-uline.
SORT it_zts0001 BY kunnr cdseq.
LOOP AT it_zts0001.
WRITE:/(020) it_zts0001-kunnr,
(007) it_zts0001-cdseq,
(100) it_zts0001-zaddress,
(030) it_zts0001-zcperson,
(018) it_zts0001-zcnumber.
ENDLOOP.
ELSE.
MESSAGE i008 WITH 'No records to display.'.
ENDIF.
*ENDFORM. " display_records
*& Form display_alv
FORM display_alv.
SORT it_zts0001 BY kunnr cdseq.
PERFORM f_build_layout USING gs_layout.
PERFORM f_init_fieldcat USING gt_fieldcat[].
PERFORM f_init_events USING 'BACK' gt_events[].
g_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
i_callback_user_command = 'USER_COMMAND'
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
i_save = 'X'
it_sort = gt_sort
TABLES
t_outtab = it_zts0001[]
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. " DISPLAY_ALV
FORM top_of_page *
FORM top_of_page.
*ALV Header declarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
lv_title(60),
lv_user(60),
lv_date(10),
lv_time(10),
lv_time_n_date(30),
lv_dcode_n_name(150),
lv_dlr_n_desc(100),
ld_lines TYPE i,
ld_linesc(10) TYPE c.
Title
CLEAR: lv_title, wa_header.
MOVE sy-title TO lv_title.
wa_header-typ = 'H'.
wa_header-info = lv_title.
APPEND wa_header TO t_header.
CLEAR wa_header.
User
CLEAR: lv_user, wa_header.
CONCATENATE: 'Generated by:' sy-uname
INTO lv_user SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = lv_user.
APPEND wa_header TO t_header.
CLEAR wa_header.
*Date and time
CLEAR: lv_date, lv_time.
WRITE: sy-datum TO lv_date MM/DD/YYYY,
sy-uzeit TO lv_time USING EDIT MASK '__:__:__'.
CONCATENATE: 'Generated on:' lv_date lv_time
INTO lv_time_n_date SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = lv_time_n_date.
APPEND wa_header TO t_header.
CLEAR wa_header.
IF NOT v_kunnr IS INITIAL AND v_compflag IS INITIAL.
*Dealer code and name
CONCATENATE: 'Dealer:' p_dcode p_name1
INTO lv_dcode_n_name SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = lv_dcode_n_name.
APPEND wa_header TO t_header.
CLEAR wa_header.
ENDIF.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM. " TOP_OF_PAGE
FORM f_build_layout *
--> %LAYOUT *
FORM f_build_layout USING %layout TYPE slis_layout_alv.
%layout-zebra = 'X'.
%layout-colwidth_optimize = 'X'.
ENDFORM. " F_BUILD_LAYOUT
FORM f_init_fieldcat *
--> %FIELDCAT *
FORM f_init_fieldcat USING %fieldcat TYPE slis_t_fieldcat_alv.
DATA: lc_fieldcat TYPE slis_fieldcat_alv.
CLEAR lc_fieldcat.
DEFINE m_field.
add 1 to lc_fieldcat-col_pos.
lc_fieldcat-fieldname = &1.
lc_fieldcat-outputlen = &2.
lc_fieldcat-seltext_l = &3.
lc_fieldcat-do_sum = &4.
lc_fieldcat-inttype = &5.
lc_fieldcat-hotspot = &6.
lc_fieldcat-fix_column = &7.
lc_fieldcat-ddictxt = 'L'.
lc_fieldcat-no_zero = 'X'.
append lc_fieldcat to %fieldcat.
END-OF-DEFINITION.
IF v_kunnr IS INITIAL.
m_field 'KUNNR' '5' 'Dealer Code' '' '' '' ''.
ENDIF.
IF v_compflag = 'X'.
m_field 'KUNNR' '5' 'Dealer Code' '' '' '' ''.
ENDIF.
IF v_compflag = 'X'.
m_field 'NAME1' '40' 'Dealer Name' '' '' '' ''.
ENDIF.
m_field 'CDSEQ' '05' 'Ship-To Code' '' '' '' ''.
m_field 'ZADDRESS' '100' 'Address' '' '' '' ''.
m_field 'ZCPERSON' '30' 'Contact Person' '' '' '' ''.
m_field 'ZCNUMBER' '18' 'Contact Number' '' '' '' ''.
IF v_kunnr IS INITIAL.
m_field 'NAME1' '40' 'Dealer Name' '' '' '' ''.
ENDIF.
m_field 'ZACTIVATED' '1' 'Activated' '' '' '' ''.
ENDFORM. " f_init_fieldcat
FORM f_init_events *
--> P_TYPE *
--> %EVENTS *
FORM f_init_events USING p_type CHANGING %events TYPE slis_t_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = %events
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc = 0.
PERFORM f_build_events USING: slis_ev_user_command.
IF p_type = 'TOP'.
PERFORM f_build_events USING: gc_top.
ELSEIF p_type = 'SUM'.
PERFORM f_build_events_sum USING: gc_topsum.
ENDIF.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " F_INIT_EVENTS
FORM user_command *
--> P_UCOMM *
--> P_SELFIELD *
FORM user_command USING p_ucomm LIKE sy-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN 'E'.
CALL SELECTION-SCREEN 500.
ENDCASE.
ENDFORM.
FORM f_build_events *
--> %EVENT *
FORM f_build_events USING %event.
READ TABLE gt_events WITH KEY name = %event.
IF sy-subrc = 0.
MOVE: %event TO gt_events-form.
MOVE 'USER_COMMAND' TO gt_events-form.
MODIFY gt_events INDEX sy-tabix.
ENDIF.
ENDFORM. " F_BUILD_EVENTS -
Raise_application_error is not displaying error message in my form
Hi,
I have created one procedure in order to display the error message in front end forms.But which is not display the error message in my form when call the procedure.
Please refer the code.
BEGIN
IF C_ERR%ISOPEN THEN
CLOSE C_ERR;
END IF;
OPEN C_ERR;
FETCH C_ERR INTO M_ERR_ARB_DESC;
CLOSE C_ERR;
RAISE_APPLICATION_ERROR(-20001,P_ERROR_CODE||' - '||M_ERR_ARB_DESC);
END;
Thanks & advance
Regards
MaranHi,
-------form program unit------
PROCEDURE RAISE_APP_ERR(P_ERR_CODE NUMBER) IS
alert_button NUMBER;
Raise_Exception EXCEPTION;
PRAGMA EXCEPTION_INIT(Raise_Exception, -20001);
BEGIN
--- called backend procedure
PRC_RAISE_APPLICATION(P_ERR_CODE);
EXCEPTION
WHEN Raise_Exception THEN
alert_button := SHOW_ALERT('raise_alert');
If alert_button = ALERT_BUTTON1 Then
Raise FORM_TRIGGER_FAILURE;
End If;
END;
---------- db proc----
CREATE OR REPLACE PROCEDURE PRC_RAISE_APPLICATION(P_ERROR_CODE IN HRM_ERR_CODE.HEC_ERR_CODE%TYPE
) AS
CURSOR C_ERR IS
SELECT HEC_ERR_ARB_DESC
FROM HRM_ERR_CODE
WHERE HEC_ERR_CODE = P_ERROR_CODE;
M_ERR_ARB_DESC HRM_ERR_CODE.HEC_ERR_ARB_DESC%TYPE;
BEGIN
IF C_ERR%ISOPEN THEN
CLOSE C_ERR;
END IF;
OPEN C_ERR;
FETCH C_ERR INTO M_ERR_ARB_DESC;
IF C_ERR%NOTFOUND THEN
M_ERR_ARB_DESC := 'UNKNOWN ERROR ';
END IF;
CLOSE C_ERR;
RAISE_APPLICATION_ERROR (-20001, P_ERROR_CODE||' - '||M_ERR_ARB_DESC);
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE_APPLICATION_ERROR (-20001, P_ERROR_CODE||'-'||'UNKNOWN ERROR ');
END ;
I tried the same but still i am not getting error message in Forms. -
Display error messages in Call transaction
Hi Gurus,
I have donme BDC using call transaction..can anybody help me in displaying the error messages in call transaction..
A detailed code wud be very much helpful..
full marks wud given
regards
Sahilhi check this,
PERFORM Z11_BDC_VA02.
ELSE.
MESSAGE I013 WITH TEXT-013.
ENDIF.
ELSE.
CLEAR V_FLAG.
MESSAGE E012 WITH TEXT-012.
ENDIF.
FORM z11_bdc_va02 .
*COVER 1
perform bdc_dynpro using 'SAPMV45A' '0102'.
perform bdc_field using 'BDC_CURSOR'
'VBAK-VBELN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'VBAK-VBELN'
wa_head_detail-vbeln.
*COVER 2
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=T\03'.
perform bdc_field using 'BDC_CURSOR'
'RV45A-MABNR(01)'.
*COVER 3
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=ITNE'.
perform bdc_field using 'BDC_CURSOR'
'RV45A-MABNR(01)'.
*COVER 4
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform bdc_field using 'BDC_CURSOR'
'RV45A-KWMENG'.
perform bdc_field using 'VBAP-MATNR'
wa_head_detail-matnr.
perform bdc_field using 'RV45A-KWMENG'
v_kwmeng.
perform bdc_field using 'VBAP-VRKME'
wa_head_detail-meins.
*COVER 5
perform bdc_dynpro using 'SAPLSPO2' '0101'.
perform bdc_field using 'BDC_OKCODE'
'=OPT1'.
call transaction 'VA02' using it_tab1 mode 'A' UPDATE 'S' MESSAGES INTO
IT_TAB_ERROR.
"CAlling transaction with all screen
Loop at it_tab_error.
if it_tab_ERROR-MSGTYP = 'E' .
clear v_flag.
message I014 with TEXT-014.
else.
clear v_flag.
message I019 with TEXT-019.
endif.
endloop.
refresh it_tab1.
clear V_KWMENG.
ENDFORM. " z11_bdc_va02
Reward if helpful,
Gaurav J.
Edited by: GAURAV on Feb 4, 2008 9:10 AM -
Hi all...
iam facing a problem while calling a form.
iam opening a form,inserting data in empty columns of an existing record and with out saving iam calling another form.Inserting and updating data
in the called form and again coming back to old form and then saving the form.
while doing this, when i am trying to save on the called form its giving an error FRM-40403 CALLING FORM HAS UNAPPLIED CHANGES,SAVE NOT ALLOWED.
please help
thanks in advance.Really thank you very much Mr. Now after adding post; before call_form has solved the problem of inserting and committing the called form.
but before moving on to called form its showing message FRM-40404:DATABASE APPLY COMPLETE:2 records applied.
when the called form is saved and when the calling form is saved,it is not updating the existing record but inserting new record.
how to avoid this message and insertion of new record..
thanks a lot again. -
Back to parameter form when report is executed
Hi
Is it possible to be back to the parameter form when the report is executed?
E.g. 1 - Enter information in the parameter form,
2 - Execute the report
3 - Back to parameter form
4 - ....
5 - When all the reports processed, exit the report.
Thank you allDon't know if you can do this in reports, but we have a similar requirement on our system, and we developed a form based parameter form, rather than using the reports own. We could then run as many reports as we need from the one parameter form.
-
Propagating message to calling form
We are converting forms from 5.0 to 6i and in one of our Master-Detail forms, the "FRM-40400: n Transaction saved" is stubbornly showing up on the message queue on the bottom of the form and is also being propagated to back the calling form. Note: The calling form does not have any base-table items and just calls all the forms needed for the application. The message is so stubborn that, when you go to an item that has a hint, the hint is displayed, but when you go to an item that does not have a hint, the FRM 40400 message is put back up. How do you prevent this? No other forms do this and they are all being called the same way via an OPEN_FORM command from the calling form. The called form in question is an auto-query type form (i.e. the form is placed in query mode at when-new-form-instance, and a query executed given a passed-in parameter.) If you save via exiting though, the message is disposed of properly. Or, if you save, click out of the form, click back, and then exit, the message is also appropriately discarded. Your input is greatly appreciated.
I tried issuing an explicit CLEAR_MESSAGE followed by an EXIT_FORM command in the KEY-EXIT trigger of the called form a few days ago without changing the behavior of the offending message. What I am finding is that the called form passes the message onto the queue of the calling form--thus a CLEAR_MESSAGE in the said trigger only clears the message queue in the called form. The calling form still has the FRM-40400 message. Also, I forgot to mention, it was working properly before the conversion from 5.0 to 6i as well as the deployment of the Oracle GUI web look-and-feel. Any other suggestions?
-
Oracle Forms in R11i apps Q how to requery when called form is closed
Scenario:
I have formA. I am calling another formB from FormA. When I do update on Form B and close the control needs to come back to formA and requery (so I can see changes to the updates done in formB).
Issue:
I’m successfully launching formB (using fnd_function.execute) and able to update but when I close formB, I’m not able to requery as the control is not coming back to formA.
Which event should i use when i close the FormB so i can navigate back to called FormA and Requery. ( i tried exit_form, key-exit, the formB is only closing but unable to go to formA)
Thank you.I'm not 100% sure, but I believe ZOOM should work in your case. A slightly dated but valid explanation is here - http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/zoom05.htm#codezoom
Pl see the Application Developer Guide for your release of EBS at http://www.oracle.com/technetwork/documentation/applications-167706.html
HTH
Srini -
Display system error through a mail
We have a BPM scenario in which XI sends a msg to Backend system.If the
message couldnot reach ,that displays system error at the call adapter level in SXMB_MONI.If we want this error message to be displayed in the failure mail
to the concerned person,it has to be pushed into a message type or datatype.how
to do that?Is there any other way... through alerts?Hi;
You can use alerts to send out error mails to the recepients.
Refer these weblogs for more details
transaction handling in XI
/people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
Auto triggering of alerts
transaction handling in XI
SCOT
not sending email from alert inbox
Mudit
Award points if it helps
Maybe you are looking for
-
How to get "fast user switching" and network shares playing nice
I've been alternating between banging my head against a wall and reading every forum I could find to try and get a reasonable compromise between using "Fast user switching" and sharing a folder from a file server. It baffles me how the network share
-
Ipod nano does not turn on.
My ipod nano appears to be dead. Nothing is on the screen. When I press Menu and select and hold down, nothing happens. When I charge it, nothing happens. Any ideas?
-
Production order reversal in closed period
Hi Experts, I am having a iisue related to Production order This production order is in closed period ie 2 months back from this order i want to reject the material order is of 300 qty out of which 59 qty is rejected and now i want to reverse the pro
-
Dear All; Why I can use wireless client which use WPA2-Enter with AES in laptop(HP+Vista) connect to the WRT54G which use WPA2-Enterprise+TKIP? The AES does not match the TKIP which set in router. Is it reasonable?
-
How do I color a grayscale TIF file?
I remember it being easy to do in Quark... But now I can't get it done in ID (CS6).... The TIF file is not transparent (all layers flattened). I tried searching, but still don't have an answer.... Thanks.......