Schedule trigger in forms
Hi,
I 've got a multi user web based form application (unix) and I want to set a trigger that fires once I day (for example 5:00AM) to update a table.
I can't use a batch. I read something about DBMS_JOB. Can I use this and how does it work? How can I implement this in my form application?
Thanks
H!
no need to implement it in form.
DBMS_JOB is on servesr side.
create procedure abc
is
n number;
begin
dbms_job(n,'your_proc', sysdate, 'sysdate + 1');
end;
execute it once and commit.
The job is run every 24 hours coz of last parameter (sysdate + 1).
your_proc is the procedure which has the routine which u want to implement.
i think its clear now (this is sample data)
reg
Similar Messages
-
How to trigger a form based on object type and process type
Hi all,
I am new into SRM.. I have been asked to develop a form by cloning an existing standard form..
Using bbp_output_change_sf badi you can trigger the form by passing the object type but the scenario is such that depending on the object type and process type the new form should be triggered.
The parameter iv_object_type passes the object type but how could i pass the process type ?
In the badi I noticed an import parameter is_event that has a field called transction_type that carries the process type but this field never got populated when i checked using debugger.
Please help as to how i can trigger the form based on the object_type and the process_type.
Thanx in advance.Thanx again Jay Yang.. Well is there any possibility that you could get the items that were confirmed..
Let me eleborate..
Suppose in the PO u order an item for 10 nos and 5 gets confirmed and u return 2..
Well in my case it is that i need to fill up a field Qty returned / Qty confirmed..
I was able to get the number of items from the PO by passing the the passing the parameter to the FM "bbp_pd_conf_getdetaill"
but i dont know how to get the number of items been confirmed..
The quantity field in the line item structure gives me the number of items returned..
Can u tell me how to get the number of items been confirmed.... -
Can you automatically trigger a form submit (post)
Is it possible to automatically trigger a form 'action'
(re-direct) without asking the user to press a button.
I'm at the stage where the user has made some choices
(shopping basket's full) and has decided to pay (press pay button)
so I want now to do some data manipulation and data recording
before transmiting the payment request to Worldpay.
I can do this using querystrings but I'd rather do it with
hidden fields on a form..... is it possible?
I'm imagining calling a payment processing routine from the
shoping basket page which would have a form containing nothing but
hidden fields.
Regards..oO(patricktr)
>Is it possible to automatically trigger a form 'action'
(re-direct) without
>asking the user to press a button.
Not reliable, since it would require JavaScript and usually
looks like
an error in the application design. HTTP doesn't allow POST
redirects
for good reasons.
But of course you could use server-side scripts to send POST
requests to
a third site behind the scenes. The user won't notice that,
so you would
have to find another way to tell them what happen(s|ed).
> I'm at the stage where the user has made some choices
(shopping basket's full)
>and has decided to pay (press pay button) so I want now
to do some data
>manipulation and data recording before transmiting the
payment request to
>Worldpay.
>
> I can do this using querystrings but I'd rather do it
with hidden fields on a
>form..... is it possible?
Just to make it clear: User presses "pay" button, the form
submits to
your own site. Then you want to do some manipulations, before
the data
is forwarded to the payment provider. Is this correct?
I would probably do it like indicated above: User presses
"pay" button,
form submits to your own site. You do your calculations and
then let
your script forward the data to the payment provider, either
with GET or
POST. Your script receives the response and returns a result
page to the
user. That way your script would work like a proxy between
the user and
the payment provider. Of course this is just an idea, it
might work in
some cases, but might fail in others.
> I'm imagining calling a payment processing routine from
the shoping basket
>page which would have a form containing nothing but
hidden fields.
Besides the unreliability mentioned above, you should also be
aware that
_all_ informations coming from the client-side can be
manipulated. This
means that users would be able to change the data in the
hidden form
fields before it is sent to the final recipient, they just
have to know
how. It depends on the informations and the used scripts if
this can
become an issue, but it should at least be kept in mind.
Micha -
Dynamic IF statement in PL/SQL on-insert trigger in Forms 6.0
I would like to build a dynamic IF statement for the on-insert trigger in a form... Users are restricted to which "projects" they are allowed to enter into the database. These restrictions are based on a security table. The same restrictions are used to build the dynamic where clause that limits which previously inserted records the users can see when they are in the form. Since the restrictions are identical, I want to use the same logic that I use to build a where clause to build a dynamic If statement instead... If the statement is true, the user can insert the record. If its false, they can't.
I'm trying to this as follows:
declare
big_if varchar2(10000) :=' ';
begin
if :global.admin='YES'
then
insert_record;
else
declare
cursor cur1 is
select paren1, field, comparison_operator, value, paren2, and_or
from rcdb.user_project_assign2
where user_id = user;
c1_rec cur1%ROWTYPE;
begin
for c1_rec in cur1 loop
big_if:= big_if | | c1_rec.paren1 | | ':tbl_main_data.' | |c1_rec.field | |c1_rec.comparison_operator | | '''' | | c1_rec.value | | '''' | | c1_rec.paren2 | | ' '| | c1_rec.and_or | | ' ';
end loop;
end;
if big_if
then
insert_record;
else message('You are not allowed to insert this record');
end if;
end if;
end;
The problem is in the line
IF big_if
big_if is the variable that holds the text to my if statement (hense dynamic If statement) but I can't get the code to allow me to use that variable.
Can anyone do this?
nullThat code was great, but forms isn't allowing me to use the dbms_sql so I have to make a procedure out of forms and call it from the form. Both my form code and the procedure are compiling, but I"m still getting an error when the result is coming back to the form...
the code in the form is:
declare
big_if varchar2(10000) :=' ';
result varchar2(5) :=' ';
check_state varchar2(2):=:tbl_main_data.state_abr;
check_region varchar2(3):=:tbl_main_data.region_abr;
check_program varchar2(25):=:tbl_main_data.program;
begin
if :global.admin='YES'
then
insert_record;
else
declare
cursor cur1 is
select paren1, field, comparison_operator, value, paren2, and_or
from rcdb.user_project_assign2
where user_id = user;
c1_rec cur1%ROWTYPE;
begin
for c1_rec in cur1 loop
big_if:= big_if | | c1_rec.paren1;
if c1_rec.field = 'state_abr' then
big_if:=big_if | | 'check_state' | |c1_rec.comparison_operator | | '''' | | c1_rec.value | | '''' | | c1_rec.paren2 | | ' '| | c1_rec.and_or | | ' ';
elsif c1_rec.field = 'region_abr' then
big_if:=big_if | | 'check_region' | |c1_rec.comparison_operator | | '''' | | c1_rec.value | | '''' | | c1_rec.paren2 | | ' '| | c1_rec.and_or | | ' ';
elsif c1_rec.field = 'program' then
big_if:=big_if | | 'check_program' | |c1_rec.comparison_operator | | '''' | | c1_rec.value | | '''' | | c1_rec.paren2 | | ' '| | c1_rec.and_or | | ' ';
end if;
end loop;
end;
message(big_if); pause;
message(check_state); pause;
message(check_region); pause;
message(check_program); pause;
rcdb.check_if(big_if,result,check_state,check_region,check_program);
message('resulte = | |result| |');
if result = 'TRUE' then insert_record;
else
message ('you cant enter');
end if;
end if;
end;
AND THE CODE IN THE PROCEDURE IS....
create or replace procedure check_if (
big_if in varchar2,
result out varchar2,
check_state in varchar2,
check_region in varchar2,
check_program in varchar2
IS
v_indx binary_integer := 0;
v_sql_syntax varchar2(32767);
root_cursor number;
ignore integer;
your_if_statement VARCHAR2(32767);
v_check VARCHAR2(5);
BEGIN
your_if_statement := ' if '| |big_if| |' then :v_check := ''TRUE''; end if;';
v_sql_syntax := 'begin '| |your_if_statement| |' end;';
root_cursor := dbms_sql.open_cursor;
v_sql_syntax := replace(replace(REPLACE(v_sql_syntax,chr(10),' '),chr(13),' '),chr(9),' ');
dbms_sql.parse(root_cursor,v_sql_syntax,dbms_sql.v7);
dbms_sql.bind_variable( root_cursor, ':v_check',v_check,5);
ignore := dbms_sql.execute(root_cursor);
dbms_sql.variable_value(root_cursor, ':v_check', v_check);
if v_check = 'TRUE' then result:='TRUE';
else
result:='FALSE';
end if;
dbms_sql.close_cursor(root_cursor);
END check_if;
DO YOU KNOW WHATS WRONG? -
How to insert the new field to standard scheduling agreement script form.
Hi Gurus,
how to insert the new fields to standad sheduling agreement script form. its a need for me, i want to display the AEDAT field in scheduling agreement form ,
The below one is my requirement,
ex:- Itu2019s requested the change of Scheduling Agreement printout. Itu2019s requested for this type of document, the insertion, into the field u201CData Emissionu201D into the print, of the document last modify date instead of the document creation date. (This change will be done only for position change into the Scheduling Agreement). No change into the PO.
Change SAPSCRIPT printout. Introduction, into the Scheduling Agreement, of last modified
document date (field EKPO-AEDAT).
Thanks & Regards
chinnuopen TNAPR table and give the output type you need to modify.... get the print program name and check if some structure already have the date you wanted... if you have it already... then open the form in SE71 tr. and provide the strcuture name - feild in the position you want to have the date...
se71--->
&<str. name>-AEDAT& -
Question on WHEN-VALIDATE-ITEM Trigger in Forms 6i
Hi,
I am working with a form which has two different database blocks. When I enter some valid data in block 1 and hit tab, a key-nxtblk trigger navigates the cursor to the next block. Now this second block has some fields which were disabled at the design time and I have a procedure which sets the properties of these items to enabled when required during runtime. From the first run, when I run this procedure and go to one of these items which has no data filled in yet and press tab, when-validate-item trigger is fired (I am confused with this kind of behavior).
Does anyone know why is it firing when-validate-item trigger and if yes how can we fix it?
My goal is to disable Block2.Item2 only if Block2.Item1 has some value in it.
Can anyone please look into it?
Thanks for your time.Thanks Steve, Vikas and Craig for your valuable suggestions.
Craig, to answer your question, I have no "Copy Value from Item" or "Synchronize with Item" property set on these disabled fields.
To elaborate my problem, I have three non database items in a database block. I have to set the properties during the runtime. Suppose the fields are named as field1, field2, field3. Now I have to have when-validate-item triggers on each item with the following content.
WVI trigger on field1
IF field1 IS NULL
THEN
activate field2 and field3.
ELSE
Disable field2 and field3.
END IF;
WVI trigger on field2
IF field2 IS NULL
THEN
activate field1 and field3
ELSE
Disable field1 and field3.
END IF;
WVI trigger on field3
IF field3 IS NULL
THEN
activate field1 and field2
ELSE
Disable field1 and field2.
END IF;I have a procedure which is called in WHEN-NEW-BLOCK-INSTANCE trigger to assign NULL to some fields and set the properties in the block and during this process when I first run the form, the record_status is set to NEW and after setting some fields to NULL the record_status is changed to INSERT. But both the times when-validate-item trigger on each of the fields 1,2, & 3 are fired. No matter we enter any value or not.
can you help in understanding the mistake I am doing or fixing this?
Thanks for your time.
Edited by: new_user on Oct 31, 2008 1:00 PM -
Facing problem In When_Validate_Item Trigger in Forms 6i
When_Validate_Item Trigger attached to an item, fires properly when a new record is created.
But when any modification is made the following problem is faced.
Suppose there are two fields excise_ind and exc_flag.
In the when validate item trigger of the item exc_flag
it is checked that if value of excise_ind = 'Y' then
exc_flag is mandatory. It can't have a null value
otherwise if excise_ind = 'N', then exc_flag = null.
This logic works fine when a new record is added. That is the following source code gets executed in the wvi trigger of the item excise_flag.
IF :excise_ind = 'Y' AND :exc_flag IS NULL THEN
GENERAL.DISP_TEXT('Enter [A]mount or [P]ercentage ','Error');
RAISE form_trigger_failure;
END IF;
But for example there already exists a record where excise_ind = 'N' and exc_flag was null.
Now I change excise_ind from 'N' to 'Y' in the same record. Here in this case it allows me to go ahead without entering any value for exc_flag. (i.e. wvi trigger of item exc_flag does not fire at that moment unless I physically make any value changes in that item).
I can click on other items following exc_flag or can press tab key. But this trigger fires when I commit the transaction.
Kindly let me know how to force entry (causing wvi trigger to fire) for the field exc_flag when the cursor is on the item itself in case of modification of existing records. Because it fires only while commiting the trasaction, then the user have to reenter all the details again.You have more chance to find a response if you post into Forms<br>
<br>
Nicolas. -
Problem while handling When-Validate-Record Trigger in Forms 6i
I am using below mention code in when validate trigger and use go block loop in when button pressed. if Check_Date_Range gives RAISE Form_Trigger_Failure error user will enter in a loop. kindly provide me solution for below mention problem.
BEGIN
Check_Date_Range(:Experiment.Start_Date,:Experiment.End_Date);
END;
** The procedure looks like this
PROCEDURE Check_Date_Range( d1 DATE, d2 DATE ) IS
BEGIN
IF d1 > d2 THEN
Message('Your date range ends before it starts!');
RAISE Form_Trigger_Failure;
END IF;
END;You have more chance to find a response if you post into Forms<br>
<br>
Nicolas. -
Badi for PO Trigger & PO Form Name-in ICH
Hi Guru's
I need help from all, which Badi will trigger the Standard PO for Supplier View & watz the Standard PO Name, where we can find that form .HI ,
I called that Method and specified '/sca/po ' Standard PDF Form, when i execute from the front end i am getting error as No data reterival more over when i debug in the back end it raising exception as " System Error".
I am using scm 5.0 Version. If u have any idea plz help me.
[email protected] -
Block level trigger vs form level trigger
Hello.
I want to know what is better - to use block or form trigger?
I have many blocks in my form. I need to write custom code in (for example) key-crerec trigger.
Should i put trigger into each block or should i create one at form level like:
if :system.current_block = 'BLOCK1' then
create_record;
elsif...
end if;
Thanks.
Message was edited by:
DejanHHello,
If you have to handle this stuff in more than one block, it seems more generic to put the code in a form-level trigger if you don't want to duplicate it several times.
Francois -
To trigger ADOBE form from Custom Infotype
hello,
I hae create d ADOBE form and want to trigger it on "Save" record from Custom Infotype....
I need this form to be displied as User my do some changes and save it again...
I have used following code to trigger this from module pool...
Data : lv_fm_name type rs38l_fnam.
Data : gs_sfpoutputparams type SFPOUTPUTPARAMS,
gs_sfpdocparams TYPE sfpdocparams,
gs_formoutput TYPE fpformoutput.
Set output parameters and open spool job
gs_sfpoutputparams-nodialog = 'X'. " suppress printer dialog popup
gs_sfpoutputparams-GETPDF = 'X'. " launch print preview
call function 'FP_JOB_OPEN'
CHANGING
ie_outputparams = gs_sfpoutputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
others = 5.
First get name of the generated function module
call function 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'Z_ISR_FORM_Z017'
IMPORTING
e_funcname = lv_fm_name.
EXCEPTION
CX_FP_API_REPOSITORY = 1
CX_FP_API_USAGE = 2
CX_FP_API_INTERNAL = 3.
Set form language and country (->form locale)
gs_sfpdocparams-langu = 'E'.
gs_sfpdocparams-country = SY-LANGU.
gs_sfpdocparams-FILLABLE = 'X'.
Now call the generated function module
call function lv_fm_name
EXPORTING
/1bcdwb/docparams = gs_sfpdocparams
IMPORTING
/1BCDWB/FORMOUTPUT = gs_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
Close spool job
call function 'FP_JOB_CLOSE'
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
But still I'm unable to get form on "Save"..
Please help me.
Regards,
YogeshHi Yogesh,
Just to test ... can you place your code in a report and call the report with submit ... return in your module pool? For the data tables in the interface, you may export them and import them.. this will ensure that everything is good with your code and the place where you call the code from. I believe the issue is Module Pool rather than anything else. But that's just a doubt and we need to do this to confirm it.
Best Regards,
Abd-Al-Aleem -
Why Module level trigger contains "WHEN-CHECKBOX-CHANGED" trigger in Forms 6i?
Hi,
Why Module level trigger contains triggers like "WHEN-CHECKBOX-CHANGED", "WHEN-BUTTON-PRESSED" etc.? "WHEN-CHECKBOX-CHANGED" trigger is present in CheckBox & "WHEN-BUTTON-PRESSED" trigger in Button. Then why these triggers are also presnt in Module?
Can anyone please clarify my doubt?There's a lot of triggers that are present at different "scopes". Like they exist at the item level, the block level,
the module level...
The idea is if you have an action that should only occur at that one single item it can do in the item trigger. If
it's for all of them on the block, in the block level trigger. If for all of them ever, at the module level.
For example suppose you wanted it to do a next_item after the trigger executed you can put that logic in the module
level trigger. A key thing to notice here is the trigger hierarchy. That is essential to know about.
Right click on one of these triggers in the object navigator. The execution hierarchy is override, before and after.
since each of these levels of the same trigger has this execution hierarchy this is, well, potentially not easy to
understand what is going to happen. I would typically have a per-item trigger be before and a higher level trigger
be after.
And this execution hierarchy thing is something I'd love to see enhanced in the gui. I wish it was a lot easier to see
what the execution hierarchy is when editing a trigger text. I wish one could see and modify the execution hierarchy on the
same screen as the trigger text and what would be really great is some way to tell how the trigger hierarchy will sort out
at run time. For example if one is looking at an item level trigger it would be fabulous to know that as is, that trigger will be
overridden by a higher level trigger and so on. Or vice versa if one is looking at a block level or form level trigger that it is
overridden by a lower level trigger, or it will execute before or after some other trigger. I don't know what is defined to happen
with various levels of triggers that have the same execution hierarchy. Like suppose they are all override,before,after.. then
what happens? It'd be good to know. -
How can we disable Block Level Trigge using Form Personalization
Hi,
I want to disable block level trigger(WHEN-NEW-RECORD-INSTANCE) using forms personalization at responsibility level.
Can any one please give me the answer.
it's urgent
Thanks and Regards,
DhanaNo, Firefox is user choice rules over the "wants" of individual websites as far as disabling contextual menus and the keyboard commands.
Placing a transparent image over the image will keep the less technical user from saving the main image. If they do try to save it all they'll get is the transparent image overlay. -
Job Scheduling Workbench filter form customization
Hi,
The menu like
Manufacturing Scheduling - Job Scheduling Workbench
For each sales order lines there are eight or more work orders, i want to pull this all work orders, based on the sales order no,
How to customize the Filter form, pls give me pointers how to customize the job scheduling workbench.
Thanks & Regards,
Rajasekaran VHi Rajasekaran
Did you manage to find any information on customising the workbench, particularly to manage by sales order?
Thanks
Geoff -
Hi,
I am using Documaker studio 11.3 and my input file is a flat file. I need to trigger multiple occurrences of the same form in a single transaction. For e.g Form A needs to be triggered 5 times in a single transaction. The input file would have 5 occurrences of the same record (e.g FRMAREC), but each time with different variable data. Suppose Form A is a single page with 2 conditional images, IMGA and IMGB . The first occurrence, should have IMGA triggered and second occurrence of form should have IMGB triggered.
Please let me know how to implement this scenario
Thanks,
Akhil
Edited by: Akhil on Jul 25, 2011 3:28 AM
Edited by: Akhil on Jul 25, 2011 3:30 AMHi Gregg,
Thanks for the response. I tried your given inputs. I am able to create multiple occurrences of FORMA using Subform, but I am not able to get the data from corresponding record. i.e Every time the data is taken from 1st record. And also the Triggering logic is not working. It takes the image inside subform as unconditional. This is what I did.
1. Add FORMA in .GRP file (formlist) and add a manual trigger to it. (e.g, 17,FRMAREC)
2. Create FORMA with one unconditional image and 1 SubForm (SUBFRMA)
3. Add a manual trigger to SUBFRMA (17,FRMAREC)
4. Add conditional images inside this SUBFRMA with manual triggers.
I am not sure if I am missing something in doing a subform. Or should I set some Occurrence Flag or other checks.
Thanks,
Akhil
Maybe you are looking for
-
How to control invoke exe file
I use this code to call an program to run from my ABAP program:; CALL FUNCTION 'DSVAS_DOC_WS_EXECUTE_50' EXPORTING cd = 'D:' commandline = ' ' program = 'RemoteConn.BAT' EXCEPTIONS frontend_error
-
Hi, I have installed Oracle r12 on virtual machine (linux) on my laptop. I have noticed that virtual machine loses date/time. How can I keep the date/time on my virtual machine in sync with my laptop date/time so that date and time in Oracle R12 is c
-
IPhone restore through itunes in windows xp sp2 not working
Microsoft Windows XP Professional Service Pack 2 (Build 2600) Hewlett-Packard HP Compaq dx6100 MT(PQ674PC) iTunes 11.1.3.8 QuickTime 7.7.4 FairPlay 2.5.16 Apple Application Support 2.3.6 iPod Updater Library 11.1f5 CD Driver 2.2.3.0 CD Driver DLL 2.1
-
Hello, I posted this question earlier and received some helpful info., however, I am still having a problem. To quickly recap, I brought a project from Final Cut Studio, into iDVD (I have DVDSP but still new to this and have not learned to use yet).
-
Charm Status hangs while saving Confirm Successful test
Hi, I'm Unable to set the status to <Confirm successful test>...ChaRM document is hanging without getting saved. Please let me know what are the possible issues.? Sonel