Not able to display javascript alert message from within a pl/sql block
Hello,
Can anyone please help me out with this issue. I wanted to display an javascript alert message from within a pl/sql block for an update button. Below is sample code which i am using. P1_ITEM is my hidden item on the report.
begin
if :P1_ITEM IS NOT NULL then
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
HTP.p ('</script>');
end if;
end;
and I have made this code to be executed conditionally when request = Expression1
Expression1: SUBMIT
The thing is I am not able to display an alert message when the update button is clicked.
Can anyone please help me with this one.
Thanks,
Orton
varad but I also have an update statement within that block for the update button something like this i want to achieve.
begin
if :P1_ITEM IS NULL THEN
update sample_tbl
set col1 =:APP_USER,
col2 = 'Y'
where pk_col = ---;
commit;
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Successfully assigned an item!'');');
HTP.p ('</script>');
end if;
if :P1_ITEM IS NOT NULL then
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
HTP.p ('</script>');
end if;
end;
thanks,
Orton
Similar Messages
-
Display an Alert message from PL/SQL block in APEX
Hi,
we are getting an oracle exception while inserting a new row. As it is having the unique constaint on a coulumn.
Now the problem iis we need to Display an "Alert message" based on the input field validation. That java script code for alert has to be embeded nside a PL/SQL block in Oracle APEX Application.
we tried doing this with below code:
Begin
INSERT INTO <<table name>>(ID,NAME) VALUES (s1,:TXT_s2);
exception when others then
htp.p('<script language="javascript">');
htp.p('alert("Exception");');
htp.p('</script>');
end;
If anybody knows .... please reply.
Thanks,
SubarnaIf your end goal is showing a pretty error message instead of the message that the tables unique constraint raises try the following. This logic will show a nice message and not try to insert non-unique data.
(1) Create a validation of type "Function Returning Error Text".
(2) Place similar code like the following in your validation. Notice that if the unique name does not exist the no_data_found returns null allowing the validation to pass.
DECLARE
v_error varchar2(100);
BEGIN
SELECT 'A person by this name already exists.'
INTO v_error
FROM your_table
WHERE your_name = :P1_YOUR_NAME;
RETURN v_error;
EXCEPTION
WHEN no_data_found THEN
RETURN NULL;
END; -
MQAdapters Not able to push or pull message from Bpel
Hi All,
Presently i am working on a Bpel Module which is receiving a jms message and has to push them onto an IBM message Queue. Under the flow I am receiving the error as given,please suggest some solution.
Exception occured when binding was invoked.
Exception occured during invocation of JCA binding:
"JCA Binding execute of Reference operation 'Enqueue' failed due to:
JCA Binding Component connection issue.
JCA Binding Component is unable to create an outbound JCA (CCI) connection.
GetApprovedSupplierDetails_IMR:SAPPIMQRequest [ Enqueue_ptt::Enqueue(body) ] :
The JCA Binding Component was unable to establish an outbound JCA CCI connection due to the following issue:
BINDING.JCA-00001 java.util.MissingResourceException java.util.MissingResourceException
java.util.MissingResourceException java.util.MissingResourceException
Please make sure that the JCA connection factory and any dependent connection factories
have been configured with a sufficient limit for max connections.
Please also make sure that the physical connection to the backend EIS is available and the backend itself
is accepting connections. ". The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolutionThanks for the reply though JMS is not being used out here .
I am configuring IBM MQ and trying to push messages inside those queues. Both SOA11g and IBM Websphere are installed in my machine and the BPEL 11g just wants to trigger the event to store the message inside the Queue.
Earlier on i was not able to send across the message to queue and presently i am stuck up with this error. -
Encountering transaction statement from within a PL/SQL block
Hi All,
i would like to know what will be the transaction status if we use an commit or a rollback statement inside a PL/SQL procedure called from within an PL/SQL package.
For example
BEGIN
select statement
insert statement 1
.... call to <xyz> procedure
end;
xyz procedure
insert statement 2
commit/rollback
end of procedure
will the insert statement 1 be commited/rollbacked when the session encounters the transaction statement inside the procedure.Welcome to the forum!
Unless the procedure xyz is an autonomous transaction, then yes Insert statement 1 will be committed. -
I've tried all the suggestions including deleting the inbox.msf etc. I have also tried uninstalling and reinstalling Thunderbird, but none of them seem to work.
Is it hanging on the same message each time? If so go to your email providers web mail site and log into your account there. Read and delete the problem message and see if the remaining messages download.
-
OAF page is not able to display the custom error messages
Hi,
I have extended a seeded CO and trying to throw few custom error messages.
It was working fine, but suddenly it is not able to display the error messages(but checked that the error messages are still present in application) and saying "Message not found. Application: PER, Message Name: ...."
Is there any profile option which enables the custom messages?
Thanks,
RanitaHi,
There is no profile to enable the Custom error Messages, u will use the diagnostistics for showing the messages in the custom page
use the following syntax for writing a msg in Jdeveloper
pageContext.writeDiagnostics(strClassName, "Initializing the vo....", OAWebBeanConstants.STATEMENT);
and enable the following profile option to yes
Fnd:Diagnostics
Regards
Chanu -
Hi All
I am working on IBase scenario for my client, I am new to the IBase scenario. Here we are creating installation base for two to five levels of product.
Once we create IBase for lower level then this IBase is inserted in upper level IBase. Like this we assign all levels based on product.In some cases we need to unassign any of IBase from its upper level IBase. When it is unassigned we are not able to display the IBase which unassigned. When it is unassigned from upper level how come system not able to display this IBase. If we speak functionally the part (IBase) which is unassigned should be valid to assign in any other upper level IBase in feature.
The error I am getting for above is
Serial number XXXXXXX for material XXXXXXX does not exist in any IBase
Message no. IQ122
Diagnosis
Serial number BMF3000106 for material S24-D5022-C100-6 does not exist in any installed base on 31.03.2015 at 10:22:09.
System Response
The system cancels processing.
Hi experts please suggest.
Regards
KesavaHello Kesava
Can you please explain in detail what exactly you are trying to do while assigning and unassigning Ibase.
Regards
Naresh -
How displaying an alert message called from a database procedure
Hi,
How can I display an alert message that is called from a database procedure.
I've tried the following code:
l_al_button NUMBER;
l_al_message VARCHAR2(80);
l_al_id ALERT;
Set_Alert_Property(l_al_id, alert_message_text,l_al_message);
l_al_Button := show_alert(l_al_id);
When trying I receive an error that says that the word ALERT need to be declared.
Any suggestions?
ThanksHi,
leave the procedure without error handling.
This is what you can do:
1.Inside the database procedure-
BEGIN
RAISE_APPLICATION_ERROR (-20001, 'The chosen length of the Public Key Exponent ....');
END;
2.Into your Form -
BEGIN
EXCEPTION
WHEN OTHERS THEN
IF sqlcode = '-20001' THEN
Display Your Messages.
END IF;
Monica
END; -
Not able to display error message in PR creation.
HI Experts,
In PR creation process i am not able to display error message.
BADI: ME_PROCESS_REQ_CUST
method : PROCESS_ACCOUNT, PROCESS_ITEM
I have used Include mm_messages_mac for handling error .
MESSAGE e112(XXX) WITH XX-XX. this is my error message.
even tried this also mmpur_message 'W' 'ZMM_PUR' '001' '' '' '' ''.
Please provide solution for this.
Regards,
JayantHi,
In devepoment system im able to display the message but not in quality,code is 100% algined with quality.
In quality system error message is being executed but not displayed,i mean control is comming out after the error message.
i am using
message EXXX(XXX).
regards,
Jayant. -
How to verify JavaScript alert message display on page with C#?
Hi All,
I have a question about verify the JavaScript alert message on page. For example, I input the script in browser address like: "javascript:onmouseover=alert('popup windows')" . How to verify there's a alert message displayed on page with C#?
ThanksAre you trying to use some automation or ? What the previous solution is they have put the text in the dom for you to pull out with C# or other languages.
if you are trying to automate this through a browser maybe look into WebDriver
WebDriverWait wait = new WebDriverWait(driver, 2);
wait.until(ExpectedConditions.alertIsPresent());
Alert alert = driver.switchTo().alert(); var alertText = alert.Text;
alert.accept(); -
Display an alert message through javascript when report column item is null
Hello,
I have a report column item which is an select list item and now i want to display an alert message when value is null, I mean no value is selected, this alert message should be fired when update button is clicked.
Can anyone please help me with this issue.
Thanks,
OrtonYou could try something like this:
declare
x INTEGER;
err_ct INTEGER := 0;
begin
x := 5; -- number of rows displayed
for i in 1 ... x (
IF wwv_flow.g_f08(i)) IS NULL THEN err_ct := err_ct + 1;
END IF;
end loop;
IF err_ct = 0 THEN
RETURN NULL;
ELSE
RETURN 'Nice error message: you must supply a value.';
END IF;This would be used with a PL/SQL validation: Function Returning Error Text. -
Not able to display alert on arrival of new mail in inbox
Hi ,
I am using ajax to constantly check for new mail arrival on my inbox and pop up message.I am not able to pop up the message.
Following is the code:
try{
if(mailSession == null)
mailSession =(Session)PortableRemoteObject.narrow(new InitialContext().lookup("java:XXX"),Session.class);
* Get the Mail store
if (store == null || !store.isConnected()) {
store = (IMAPStore) mailSession.getStore("imaps");
store.connect();
folder = (IMAPFolder) store.getFolder("INBOX");
int cnt= 0;
try {
folder.open(IMAPFolder.READ_ONLY);
cnt = folder.getNewMessageCount();
} catch (MessagingException e1) {
e1.printStackTrace();
String result = "New message =" + cnt;
System.out.println("result:"+result);
log.info("Writing request object to servlet..." + result);
ServletOutputStream sos = response.getOutputStream();
DataOutputStream dos = new DataOutputStream(sos);
if(cnt > 0){
dos.writeBytes(result);
} else {
dos.write("".getBytes());
dos.flush();
dos.close();
log.info("Response sent!" );
if(folder.isOpen()){
folder.close(true);
if(store != null || store.isConnected()){
store.close();
folder = null;
store = null;
}catch (Exception e) {
e.printStackTrace();
Any help is appreciableFollowing is the exception i am getting.It is not able to listen for new message arrival...
11:02:52,843 INFO [STDOUT] * CAPABILITY IMAP4 IMAP4REV1 ACL NAMESPACE UIDPLUS IDLE LITERAL+ QUOTA ID MULTIAPPEND LISTEXT CHILDREN BINA
Y LOGIN-REFERRALS UNSELECT AUTH=LOGIN AUTH=PLAIN AUTH=CRAM-MD5 AUTH=DIGEST-MD5 AUTH=GSSAPI
A0 OK completed
11:02:52,843 INFO [STDOUT] IMAP DEBUG: AUTH: LOGIN
11:02:52,843 INFO [STDOUT] IMAP DEBUG: AUTH: PLAIN
11:02:52,843 INFO [STDOUT] IMAP DEBUG: AUTH: CRAM-MD5
11:02:52,843 INFO [STDOUT] IMAP DEBUG: AUTH: DIGEST-MD5
11:02:52,843 INFO [STDOUT] IMAP DEBUG: AUTH: GSSAPI
11:02:52,843 INFO [STDOUT] DEBUG: protocolConnect login, host=192.168.xx.xxx, user=xxxxx, password=<non-null>
11:02:52,843 INFO [STDOUT] A1 AUTHENTICATE PLAIN
11:02:54,093 INFO [STDOUT] +
11:02:54,093 INFO [STDOUT] YmhhdmFuaQBiaGF2YW5pAGRlYzA3MDU=
11:02:54,328 INFO [STDOUT] A1 OK completed
11:02:54,328 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:54,328 INFO [STDOUT] A2 NOOP
11:02:54,578 INFO [STDOUT] A2 OK completed
11:02:54,578 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:54,578 INFO [STDOUT] A6 NOOP
11:02:54,578 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:54,578 INFO [STDOUT] A3 NOOP
11:02:54,828 INFO [STDOUT] A3 OK completed
11:02:54,828 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:54,828 INFO [STDOUT] A4 NOOP
11:02:54,843 INFO [STDOUT] A6 OK completed
11:02:54,843 INFO [STDOUT] result:New message =0
11:02:54,843 INFO [MailCheckAjaxServlet] Writing request object to servlet...New message =0
11:02:54,843 INFO [MailCheckAjaxServlet] Response sent!
11:02:57,671 INFO [STDOUT] A4 OK completed
11:02:57,671 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:57,671 INFO [STDOUT] A5 NOOP
11:02:57,937 INFO [STDOUT] A5 OK completed
11:02:57,937 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:57,937 INFO [STDOUT] A6 NOOP
11:02:58,187 INFO [STDOUT] A6 OK completed
11:02:58,187 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:58,187 INFO [STDOUT] A7 NOOP
11:02:59,187 INFO [STDOUT] A7 OK completed
11:02:59,187 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:59,187 INFO [STDOUT] A8 NOOP
11:02:59,437 INFO [STDOUT] A8 OK completed
11:02:59,437 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:59,437 INFO [STDOUT] A9 NOOP
11:02:59,687 INFO [STDOUT] A9 OK completed
11:02:59,687 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:59,687 INFO [STDOUT] A10 NOOP
11:02:59,937 INFO [STDOUT] A10 OK completed
11:02:59,937 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:02:59,937 INFO [STDOUT] A11 NOOP
11:03:00,187 INFO [STDOUT] A11 OK completed
11:03:00,187 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:03:00,187 INFO [STDOUT] A12 NOOP
11:03:00,437 INFO [STDOUT] A12 OK completed
11:03:00,437 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:03:00,437 INFO [STDOUT] A13 NOOP
11:03:00,671 INFO [STDOUT] A13 OK completed
11:03:00,671 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:03:00,671 INFO [STDOUT] A14 NOOP
11:03:00,921 INFO [STDOUT] A14 OK completed
11:03:00,921 INFO [STDOUT] IMAP DEBUG: IMAPProtocol noop
11:03:00,921 INFO [STDOUT] A15 NOOP
Edited by: bhavna84 on Mar 24, 2009 10:48 PM -
Not able to display flat file's error line in output
The below Source Code is BDC for XD01 (update Customer Master Record) in CALL TRANSACTION method. This program is written in call transaction method cause as per users requirement, user wants error log to be printed as soon as the BDC process finished in the background mode.
When you execute this below program it will show a selection screen from where you can select your flat file from system.
After executing this code show output like below as soon as it finished processing the FLAT file.
1. Customer Update Summary
2. Successful record with customer number and name.
3. Error Records with 'record number' and 'reason for error'
(For testing you just have to copy-paste-save-active the source code)
And I have encountered an issue over here in 3rd section-Record Number of Error Records.
The Record Number is for display the line number of that flat file line which in which error has occurred.
The Record Number Entries showing only 0 instead of showing line number of error entry .
I have used Function Module FORMAT_MESSAGE to capture the errors. But not able to display line number of that flat file which is containing error.
So please suggest me what changes I should make in below source code to get proper output.
Flat file for your R&D
1000 1000 10 10 0001 Company Chobey & Group1N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
1000 1000 10 10 0001 Company Chobey & Group2N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
1000 1000 10 10 0001 Company Chobey & Group3N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS . A 10 1
1000 1000 10 10 0001 Company Chobey & Group4N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A .. 1
1000 1000 10 10 0001 Company Chobey & Group5N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
And Source Code
*& Report Z_TEST_SAI *
REPORT Z_TEST_SAI no standard page heading line-size 255.
TYPES: BEGIN OF t_cust,
bukrs like rf02d-bukrs,
vkorg like rf02d-vkorg,
vtweg like rf02d-vtweg,
spart like rf02d-spart,
ktokd like rf02d-ktokd,
anred like kna1-anred,
name1 like kna1-name1,
sortl like kna1-sortl,
name2 like kna1-name2,
name3 like kna1-name3,
name4 like kna1-name4,
stras like kna1-stras,
pfach like kna1-pfach,
ort01 like kna1-ort01,
pstlz like kna1-pstlz,
ort02 like kna1-ort02,
pfort like kna1-pfort,
pstl2 like kna1-pstl2,
land1 like kna1-land1,
regio like kna1-regio,
telx1 like kna1-telx1,
telf1 like kna1-telf1,
telfx like kna1-telfx,
telf2 like kna1-telf2,
teltx like kna1-teltx,
stceg like kna1-stceg,
cityc like kna1-cityc,
lzone like kna1-lzone,
niels like kna1-niels,
kukla like kna1-kukla,
akont like knb1-akont,
fdgrv like knb1-fdgrv,
vzskz like knb1-vzskz,
zterm like knb1-zterm,
vkbur like knvv-vkbur,
versg like knvv-versg,
vsbed like knvv-vsbed,
ktgrd like knvv-ktgrd,
taxkd like knvi-taxkd,
END OF t_cust.
TYPES: BEGIN OF t_sucrec,
cnum TYPE kna1-kunnr, "Customer Number
cnam TYPE kna1-name1, "Customer Name
END OF t_sucrec.
TYPES: BEGIN OF t_errrec,
* lineno TYPE i, "Line Number
lineno TYPE string,
message TYPE string, "Error Message
END OF t_errrec.
DATA: v_file TYPE string, "Variable for storing flat file
it_cust TYPE STANDARD TABLE OF t_cust, "Internal table of Customer
wa_cust LIKE LINE OF it_cust, "Workarea of Internal table it_cust
it_sucrec TYPE STANDARD TABLE OF t_sucrec, "Internal table of Success records
wa_sucrec LIKE LINE OF it_sucrec, "Workarea of Internal table it_sucrec
it_errrec TYPE STANDARD TABLE OF t_errrec,
wa_errrec LIKE LINE OF it_errrec,
it_bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE, "Internal table structure of BDCDATA
it_messagetab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE, "Tracing Error Messages
v_date LIKE sy-datum, "Controlling of session date
v_index LIKE sy-index, "Index Number
v_totrec TYPE i, "Total Records
v_errrec TYPE i, "Error Records
v_sucrec TYPE i, "Success Records
v_sesschk TYPE c. "Session maintenance
*& SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 NO INTERVALS.
PARAMETERS: p_file TYPE rlgrap-filename. "rlgrap-filename is a predefined structure
SELECTION-SCREEN: END OF BLOCK blk1.
SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002 NO INTERVALS.
PARAMETERS: p_mode LIKE ctu_params-dismode DEFAULT 'N',
p_update LIKE ctu_params-updmode DEFAULT 'A'.
SELECTION-SCREEN END OF BLOCK blk2.
*& INITIALIZATION
INITIALIZATION.
v_date = sy-datum - 1.
*& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
IMPORTING
file_name = p_file.
*& START-OF-SELECTION
START-OF-SELECTION.
v_file = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = it_cust
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc = 0.
*MESSAGE ID sy-msgid
*TYPE sy-msgty
*NUMBER sy-msgno
*WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*& END-OF-SELECTION
END-OF-SELECTION.
v_index = sy-index.
LOOP AT it_cust INTO wa_cust.
perform bdc_dynpro using 'SAPMF02D' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-BUKRS'
wa_cust-bukrs.
perform bdc_field using 'RF02D-VKORG'
wa_cust-vkorg.
perform bdc_field using 'RF02D-VTWEG'
wa_cust-vtweg.
perform bdc_field using 'RF02D-SPART'
wa_cust-spart.
perform bdc_field using 'RF02D-KTOKD'
wa_cust-ktokd.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-TELTX'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-ANRED'
wa_cust-anred.
perform bdc_field using 'KNA1-NAME1'
wa_cust-name1.
perform bdc_field using 'KNA1-SORTL'
wa_cust-sortl.
perform bdc_field using 'KNA1-NAME2'
wa_cust-name2.
perform bdc_field using 'KNA1-NAME3'
wa_cust-name3.
perform bdc_field using 'KNA1-NAME4'
wa_cust-name4.
perform bdc_field using 'KNA1-STRAS'
wa_cust-stras.
perform bdc_field using 'KNA1-PFACH'
wa_cust-pfach.
perform bdc_field using 'KNA1-ORT01'
wa_cust-ort01.
perform bdc_field using 'KNA1-PSTLZ'
wa_cust-pstlz.
perform bdc_field using 'KNA1-ORT02'
wa_cust-ort02.
perform bdc_field using 'KNA1-PFORT'
wa_cust-pfort.
perform bdc_field using 'KNA1-PSTL2'
wa_cust-pstl2.
perform bdc_field using 'KNA1-LAND1'
wa_cust-land1.
perform bdc_field using 'KNA1-REGIO'
wa_cust-regio.
perform bdc_field using 'KNA1-SPRAS'
'EN'.
perform bdc_field using 'KNA1-TELX1'
wa_cust-telx1.
perform bdc_field using 'KNA1-TELF1'
wa_cust-telf1.
perform bdc_field using 'KNA1-TELFX'
wa_cust-telfx.
perform bdc_field using 'KNA1-TELF2'
wa_cust-telf2.
perform bdc_field using 'KNA1-TELTX'
wa_cust-teltx.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-CITYC'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-STCEG'
wa_cust-stceg.
perform bdc_field using 'KNA1-CITYC'
wa_cust-cityc.
perform bdc_field using 'KNA1-LZONE'
wa_cust-lzone.
perform bdc_dynpro using 'SAPMF02D' '0125'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-KUKLA'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-NIELS'
wa_cust-niels.
perform bdc_field using 'KNA1-KUKLA'
wa_cust-kukla.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VZSKZ'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNB1-AKONT'
wa_cust-akont.
perform bdc_field using 'KNB1-FDGRV'
wa_cust-fdgrv.
perform bdc_field using 'KNB1-VZSKZ'
wa_cust-vzskz.
perform bdc_dynpro using 'SAPMF02D' '0215'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNB1-ZTERM'
wa_cust-zterm.
perform bdc_dynpro using 'SAPMF02D' '0220'.
perform bdc_field using 'BDC_CURSOR'
'KNB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0230'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VRSNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0610'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-AWAHR'
'100'.
perform bdc_field using 'KNVV-VKBUR'
wa_cust-vkbur.
perform bdc_field using 'KNVV-WAERS'
'INR'.
perform bdc_field using 'KNVV-KALKS'
'1'.
perform bdc_field using 'KNVV-VERSG'
wa_cust-versg.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VSBED'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-LPRIO'
perform bdc_field using 'KNVV-KZAZU'
'X'.
perform bdc_field using 'KNVV-VSBED'
wa_cust-vsbed.
perform bdc_field using 'KNVV-ANTLF'
'9'.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-KTGRD'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-BOKRE'
'X'.
perform bdc_field using 'KNVV-KTGRD'
wa_cust-ktgrd.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'KNVI-TAXKD(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVI-TAXKD(01)'
wa_cust-taxkd.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
CALL TRANSACTION 'XD01' USING it_bdctab
MODE p_mode
UPDATE p_update
MESSAGES INTO it_messagetab.
IF sy-subrc = 0.
*& reading success records to corresponding internal table
READ TABLE it_messagetab WITH KEY msgtyp = 'S'.
IF sy-subrc = 0.
wa_sucrec-cnum = it_messagetab-msgv1.
wa_sucrec-cnam = wa_cust-name1.
APPEND wa_sucrec TO it_sucrec.
CLEAR wa_sucrec.
ENDIF.
ELSE.
*& reading error records to corresponding internal table
READ TABLE it_messagetab WITH KEY msgtyp = 'E'.
IF sy-subrc = 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
no = it_messagetab-msgnr
v1 = it_messagetab-msgv1
v2 = it_messagetab-msgv2
v3 = it_messagetab-msgv3
v4 = it_messagetab-msgv4
IMPORTING
msg = wa_errrec-message.
wa_errrec-lineno = v_index.
*******wa_errrec-lineno = v_index.
*******wa_errrec-message = it_messagetab-msgv1.
APPEND wa_errrec TO it_errrec.
CLEAR wa_errrec.
ENDIF.
ENDIF.
CLEAR : it_bdctab, it_messagetab.
REFRESH: it_bdctab, it_messagetab.
ENDLOOP.
DESCRIBE TABLE it_cust LINES v_totrec.
DESCRIBE TABLE it_errrec LINES v_errrec.
DESCRIBE TABLE it_sucrec LINES v_sucrec.
PERFORM disp_data.
SKIP 2.
IF v_sucrec > 0.
PERFORM disp_success_data.
ENDIF.
SKIP 2.
IF v_errrec > 0.
PERFORM disp_error_data.
ENDIF.
*& Form bdc_dynpro
*# text
*# -->P_0104 text
*# -->P_0105 text
FORM bdc_dynpro USING program
dynpro.
CLEAR it_bdctab.
it_bdctab-program = program.
it_bdctab-dynpro = dynpro.
it_bdctab-dynbegin = 'X'.
APPEND it_bdctab.
ENDFORM. " bdc_dynpro
*& Form bdc_field
*# text
*# -->P_0109 text
*# -->P_IT_cust_LIFNR text
FORM bdc_field USING fnam
fval.
CLEAR it_bdctab.
it_bdctab-fnam = fnam.
it_bdctab-fval = fval.
APPEND it_bdctab.
ENDFORM. " bdc_field
*& Form disp_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_data .
ULINE (45).
WRITE : / sy-vline,
12 'FAMD CUSTOMER UPDATE SUMMARY'(004) COLOR 1,
45 sy-vline.
ULINE /(45).
WRITE : / sy-vline,
'Total Records Processed'(007),
28 '=',
30 v_totrec,
45 sy-vline,
/ sy-vline,
'Error Records'(005),
28 '=',
30 v_errrec,
45 sy-vline,
/ sy-vline,
'Successful Records'(006),
28 '=',
30 v_sucrec,
45 sy-vline.
ULINE /(45).
ENDFORM. " disp_data
*& Form disp_success_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_success_data .
ULINE (45).
WRITE : / sy-vline,
14 'Successful Records'(012) COLOR 1,
45 sy-vline.
ULINE /(45).
WRITE : / sy-vline ,
'Customer Number'(010) COLOR 2,
17 sy-vline,
25 'Customer Name'(011) COLOR 2,
45 sy-vline.
ULINE /(45).
LOOP AT it_sucrec INTO wa_sucrec.
WRITE: / sy-vline ,
wa_sucrec-cnum,
17 sy-vline,
19 wa_sucrec-cnam,
45 sy-vline.
ENDLOOP.
ULINE /(45).
ENDFORM. " disp_success_data
*& Form disp_error_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_error_data .
ULINE (85).
WRITE : / sy-vline,
35 'Error Records'(013) COLOR 1,
85 sy-vline.
ULINE /(85).
WRITE : / sy-vline,
'Record Number'(008) COLOR 2,
sy-vline,
37 'Reason for error'(009) COLOR 2,
85 sy-vline.
ULINE /(85).
LOOP AT it_errrec INTO wa_errrec.
WRITE : / sy-vline,
wa_errrec-lineno,
17 sy-vline,
wa_errrec-message,
85 sy-vline.
ENDLOOP.
ULINE /(85).
ENDFORM. " disp_error_dataWorked out n found the solution
-
Not able to display logo on alv grid output
hi
can anybody guide me.
i have written code for displaying logo on alv grid report.
i uploaded bmp image using OAER
but even then i am not able to display logo on the report please help me
i am using 4.7 version..
code...
REPORT ZALVLOGO .
type-pools: slis.
data: i_sflight type table of sflight.
*data: begin of i_sflight occurs 10.
*include structure sflight.
*data: end of i_sflight.
data: it_events type slis_t_event,
wa_events type slis_alv_event.
select * from sflight into table i_sflight.
perform form_fill_table.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_TOP_OF_PAGE = 'top-of-page'
I_STRUCTURE_NAME = 'sflight'
TABLES
T_OUTTAB = i_sflight
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.
*& Form top_of_page
text
--> p1 text
<-- p2 text
FORM top-of-page .
data: t_header type slis_t_listheader,
wa_header type slis_listheader.
wa_header-typ = 'h'.
wa_header-info = 'FLIGHT DETAILS'.
APPEND wa_header to t_header.
CLEAR WA_HEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = t_header
I_LOGO = 'ENJOY'.
I_END_OF_LIST_GRID =.
ENDFORM. " top_of_page
*& Form form_fill_table
text
--> p1 text
<-- p2 text
FORM form_fill_table .
clear wa_events.
wa_events-name = 'top-op-page1'.
wa_events-form = 'top-of-page'.
append wa_events to it_events.
ENDFORM. " form_fill_tablehi ,
First upload images in SAP using transaction se78
http://www.howforge.com/step-by-step-upload-bitmap-images-to-sap
Then use that Image name to call using function module
in top of -page
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = 'KAL1_LOGO'
it_list_commentary = lt_top_of_page_no_sel.
Regards
Deepak. -
Display an Alert message in PL/SQL block in APEX
Hi,
we are getting an oracle exception while inserting a new row. As it is having the unique constaint on a coulumn.
Now the problem iis we need to Display an "Alert message" based on the input field validation. That java script code for alert has to be embeded nside a PL/SQL block in Oracle APEX Application.
we tried doing this with below code:
Begin
INSERT INTO <<table name>>(ID,NAME) VALUES (s1,:TXT_s2);
exception when others then
htp.p('<script language="javascript">');
htp.p('alert("Exception");');
htp.p('</script>');
end;
If anybody knows .... please reply.
Thanks,
Subarna
Edited by: user9955252 on Apr 21, 2010 1:47 AMHello,
APEX Forum is here : Oracle Application Express (APEX)
Regards
Maybe you are looking for
-
I went in to my settings and worked and worked with it to no avail. So I decided to delete that account and try to re-add it. Forget it. I have worked for 2 days now or more and tried everything under the sun. I am not a computer geek but I am no du
-
Report shows "No data found" when validation fails
Hi folks, I'm new to the OTN and have a short question regarding validations/report pagination. We are using Apex 4.0.2.00.07. I have a page containing a report with three columns. First column is a checkbox (f30), the second one a date picker and th
-
I want a clean fresh instal of mountain lion
Is there anyway of getting mountin lion back? MBP was ruinng a bit slow so upgraded to mavricks then decided i want a fresh start so i wiped it and went to reinstal but only mavricks is there,I do have a time machine back up of Mountain Lion but stil
-
R12 update_vendor_site return status
I am trying to update an existing supplier site and making this call : pos_vendor_pub_pkg.update_vendor_site( p_vendor_site_rec => vendor_site_rec, x_return_status => l_return_status, x_msg_count => l_msg_count, x_msg_data => l_msg_data); The return
-
Prepopulating Child Form fields
Hi all, I am provisioning a user to AD based on some access policies.I also need to decide the group DN of that user based on user profiles attributes.For this I have created a pre-populate adapter but it is not working ( may be because Group Name is