Triggers for DBSequence fields

It's possible to customize the trigger generated for DBSequence fields?
Example:
Instead of:
select seqName.nextVal into :new.id from dual;
I wish
if :new.id is not null then
select seqName.nextVal into :new.id from dual;
end if;
thanks

Hi,
As you have this trigger defined in the database (on the database table), yes you can using PLSQL
Frank

Similar Messages

  • How to exclude Required Validation for some fields?

    Hi,
    I have a page in a form with some fields that are set as required like this:
    Field 1   Field 2
    table
    Field 3   Field4 "Add" button
    Field 5    Field 6
    "Submit" button
    There are two buttons in this form. The "Add" button is PPR allows adding Field 3 and Field 4 to the table. The "Submit" button is for the actual submission and processing. When "Add" button is pressed, I only want the require validation to be done for Field 3 and Field 4, but not Field 1/Field 2/Field 5/Field 6.
    Currently, if I press "Add" button, the required field validations are triggered for all six fields. How can I only limit the require validation to some required fields only for this button?
    Thanks
    -Mina

    subform is a great idea and kinna what I needed in this situation, but there is another challenge.
    In my case, I tried to put table, Field 3 and Field 4 in subform:
    Field 1 Field 2
    <af:subform>
    table
    Field 3 Field4 "Add" button
    </af:subform>
    Field 5 Field 6
    "Submit" button
    When I press "Add" button, Required validation still triggered for all fields. Only if I put Field 1 and Field 2 in another subform, and Field 5 and Field 6 in a different subform. Then it works like this:
    <af:subform>
    Field 1 Field 2
    </af:subform>
    <af:subform>
    table
    Field 3 Field4 "Add" button
    </af:subform>
    <af:subform>
    Field 5 Field 6
    "Submit" button
    </af:subform>
    But in my case, I need Field 1, Field 2, Field 5, Field 6 and "Submit" button to be in the same subform, as the "Submit" button applies to these four fields. In the UI design, Field 3 and Field 4 are between Field 1/Field 2 and Field 5/Field 6 though.
    Any other ideas?

  • NullPointerException for hidden field in table with col of type DBSequence

    All,
    I implemented the use of the DBSequence type on my entity to automatically populate my employee_id on the hr.employees table on insert. In jheadstart, I had to manually change the EmployeeId attribute java type to DBSequence to get my generated pages working. When I try to use the generated form to insert a new employee, the insert works(employeeid is populated w/a negative val and then replaced w/the next seq number) if the column is displayed in the table layout. However, when I change the Display type of the sequence field to "hidden," when I try to add an employee I receive the following error:
    - JBO-27008: Attribute set for EmployeeId in view object EmployeesView1 failed
    - java.lang.NullPointerException
    Has anyone encountered this before? This same error occurs if the table using the hidden dbsequence field is in the table layout as a stacked detail group of another group such as departments. If you click on one of the detail tabs you will receive the same error message.
    Is the use of the DBSequence type supported by jheadstart? Is this easily remedied?
    Thanks,
    Paul
    ADF Business Components     10.1.3.42.70
    JHeadstart 10.1.3.3.75
    Edited by: p.mon on Sep 3, 2008 2:31 PM

    Steven,
    The sequence field is just being used as a surrogate key and we don't want to display it to the user. However, since we're using the default display value property to populate it, I assumed it needed to be on the entry form for inserts in order to fetch the next value. Please let me know if my assumption was wrong.
    We've already found a workaround by reverting the column back to a number data type and using a managed bean to populate the field w/the same sequence.
    Thanks,
    Paul

  • Enter event not triggering for read-only checkbox

    I have some objects in a form that get "locked" when the user signs the form.  I'm not using the digital signatures.  Instead, when the user types their name into the signature text field, a script runs on the change event that makes all of the fields in the form read only.  It also unlocks the fields if the signature is deleted.
    I was worried that we would get a lot of phone calls with users that didn't understand that the form had locked ("Why doesn't this form work?!"), so I added some code to the enter event for all of the fields that would pop up a messagebox to explain to people trying to edit a signed form that the form was locked and that they would need to delete the signature to edit the form.
    This plan works perfect for my text fields and decimal fields.  It does NOT work at all for my checkboxes.  For some reason, the enter event is never triggered for read-only checkboxes.  I don't see any other events that would obviously work for me though.  Any ideas?
    Thanks

    Thanks, those are reasonable suggestions.
    In the first suggestion, I'm unclear about one aspect of how I would accomplish this.  I assume I would allow people to modify fields in the form, but that when they did, a msgbox would pop up that would inform them that, if they continued with this modification to a signed form, the signature would be removed.  I'm all good to that point.  But if they answered that they do not want to continue modifying that field and removing the signature, how can I code it to set the value back to what it was before the change?  Is there some method that will give me access to the value of the field BEFORE the attempted modification?  I went looking for something like $.previousvalue, but found nothing.
    I'd suggest that I could use a two-stage solution, in which I store the previous value on the enter event, and save it just in case they do not want to change the field when prompted by the msgbox, but since the enter event does not exist for checkboxes (my original problem), that seems like it won't work.
    As far as radio button suggestion, I like radio buttons very much except for one fatal flaw: they aren't (as far as I can tell) clearable.  That is a shame.  Clearly some people (like me) want both exclusivity AND clearability.  And we'd like the controls to have an enter event.  But I know I'm demanding   Anyway, as it is, I just end up having to use checkboxes and create a boatload of silly code to make them exclusive.
    Emily

  • PO Release Strategy not triggerred for particular Total Net Order Value

    Dear,
    I am currently facing the issue where release strategy for purchase orders is not getting triggered for a particular value or lower.
    For order value 1 INR or less, no release strategy is triggered for new created PO. And for value > 1 INR release strategy is getting triggered.
    All otehr PO characterstics are the same, I mean to say the values for other characterstics such as plant material group are identical.
    But the characterstics for release for Total net order value are <= 30000 INR. There are two system copies, where in one system the same release strategy is working as expected. But in other system the above mentioned issue occurs. There is no differnce which I can see in the release strategy setup.
    Please suggest for solution.
    Thank you.
    Warm Regards.

    Dear All,
    While looking further into the issue by going into debugging mode, we have found that in include LCLSCF2I, Internal table p_selection_criteria_tab , the value for ATFLV (Internal Floating point from) gets different values in the two systems. For example, in the affected system, for PO with 1INR tottal value, for one of the Total value chaaracterstics before INR characterstic, ATFLV value is 0,0000000000000000E+00, hence it gets out of loop and doesn't trigger release strategy.
    But in another system for same PO values and release setup, ATFLV value is 1,0000000000000000E+00 for that characterstic.
    May I know how the value for this field gets calculated.
    Thank you.
    Warm Regards.

  • Event not getting triggered for PR generated through MRP run

    Hi All,
    Could anyone let me know how to get a workflow triggered for the ReleaseStepCreated event (obj - bus2105) when the PR is created through MRP run. The MD02 control paramters have the value '1'.
    Interstingly the workflow triggers when the value is set to '2' or '3'.
    Thanks,
    Ameekar

    Thanks Aman,
    I checked field restrictions but there are none there. Actually i checked them for other object 'AOOMARA' which is being thrown as an exception when i am creating the PR through MRP run.
    Exception says -> field not maintained.
    So i guess, i need to maintain the field for Change Document but i am not sure how. COuld you please aid me with that.
    Thanks A lot !!

  • The value 4010 39 99 is not allowed for the field MARC-STEUC/BAPI_MARC-CTR

    Hi all,
    BAPI' BAPI_MATERIAL_SAVEDATA' throws error the below error while creating material.
    'The value 4010 39 99 is not allowed for the field MARC-STEUC/BAPI_MARC-CTRL_CODE'
    Any idea abt this error.
    Regards,
    Thiyagu

    Hi,
    As this BAPI is triggered from external sytem that by client in production environment , I would not be able to dig it further.
    Thats why I asked if anybody confronted the same error previously.
    Thanks for suggestion.

  • ALV_grid oo: event "data_changed" on F4 in the line only for some fields

    Hi all,
    when I add a new line in ALV_Grid and I select the search help, for some fields
    the event "data_changed" has triggered even I have not finished to fill the entire fields on the line, and I don't need this.
    Opposite I have some fields which work fine and when I choose F4 the list of the
    possible values has showed without triggering "data_changed".
    Does anyboby know how is it possible?
    Since I'm new on ALV_grid oo, could you give a detailed answer?
    I thank You in advance.
                                                              Best Regards
                                                              Paolo

    I solved the problem int this way: 
    METHODS:
          handle_data_changed
              FOR EVENT data_changed
               OF cl_gui_alv_grid
              IMPORTING er_data_changed
              <u><i>e_onf4</i></u> e_onf4_before e_onf4_after.
      METHOD handle_data_changed.
    DATA: ls_good      TYPE lvc_s_modi.
    error_in_data = space.
    IF e_onf4 IS INITIAL.
      CALL METHOD check_righe_doppie  ( er_data_changed ).
      CALL METHOD update_delta_tables ( er_data_changed ).
      CALL METHOD semantic_checks     ( er_data_changed ).
    ENDIF.
      ENDMETHOD.                                  "handle_data_changed
    Message was edited by:
            Paolo Cavallini

  • Output message type triggering for all

    Hi,
    I want the output messages to be triggered for particular Vendor and doc type with ALE config.
    Now the config is such tht whenever the PO is created for doc type, the output type gets triggered for ALE partner .
    So need guidance.
    Thanks

    hi,
    Please check whether the access sequence attached to your Condition type has a condition table with Document type and vendor field, if not then you can add one or create a new Access sequence and attach it to you condition type.
    Next you maintain the Condition Records for the doc type and vendor combination, and the system shall trigger the message type automatically.

  • More than one check table for a field in custom table

    I created a custom table , with some fields in that , and for a field i given a check table , in that same field i want another check table because for  some data i need to refer another table . whether it is possible.....

    Hi,
    If you need to perform the checks while using a maintenance view, you can do this with modification events. e.g. just implement a form that triggers your custom checks in a "before save" event... (SE55->Environment->Event)
    Kr,
    Manu.

  • Idoc not Trigerring for Change Pointers in CREMAS only for 2 fields

    Hi All,
    I am trying to trigger the Idoc for 2 fields ( Contact Person First Name & last Name) KNVK-NAMEV and KNVK-NAME1. I have maintained the fields in BD52. Whenever I change the fields, entries get created in CDHDR, CDPOS and BDCP. But the Idloc doesnt get triggerred. But if I change any other fields of LFA1 or LFB1 for the same vendor, the Idoc gets created. Can anybody please help out on this?
    Thanks,
    Geetha

    Hi,
       Just check after executing the program "RBDMIDOC" idocs getting triggered or not.
    Thanks,
    Asit Purbey.

  • LO delta for z fields not taking place

    Hi All,
    We have a problem with th one of our LO DS. We have recently added some Z feilds but then if any change is made then
    1. Delta doesnot bring these changes
    2. Full load brings these changes.
    Now since thise has gone into production , and lakhs of data are mis matching since the changes have not been ca[ptured.
    Any idea to resolve it .
    Also suggest if any workaround possible
    Regards,
    Dola
    Edited by: sushmita das on Mar 31, 2011 12:36 PM

    First of all, what is the Datasource that you have enhanced?
    And what is the CMOD Enhancement Function Exit that you are using?
    As pointed out, the Delta might not be triggering for the Z fields (whenever you change it).
    As far as the work around in concerned, i guess you're 1st level staging is a DSO (maybe Write-Optimized).
    You need to write a program to update this DSO.
    If you have any other DSO's being updated for the required Z fields, you can make use of that.
    Otherwise, you'll have to write an Extract program in R/3 for the required fields (including the Key Fields in DSO) and then update the DSO with this.
    Then update the 2nd level DSO (Standard), if any, or directly the Cube.
    I am doing the same right now as we had an issue with 2LIS_02_SCL and the Delta was not triggered due to an issue with the CMOD code.

  • Is there any BADI or any other alternate in ECC for the Field exits

    Hi guys,
    Is there any BADI or any other alternate in ECC for the Field exits:
    FIELD_EXIT_BP_VERS_Z
    FIELD_EXIT_BP_VERSION

    Hi,
    If you are aware that these are the field exit funciton modules that get created when you create a field exit for the corresponding data element.
    Hence there will not be any replacement for this FM, But you need to find where the data element is triggering(the tcode) and check in debugging if there is any BADI/Enhancement Point.
    Hence check for which data element the FM belong to using the program RSMODPRF and check if they are globally activated, then they trigger on all the screen/transactions..(Tedious to replace with BADi/Enhancemnet points everywherre)
    If the field exit is activated for screens, check to which transaction the screens belong to and then check for enhancement point or badi that trigers on the screen..
    Hope this helps
    Regards
    Shiva

  • Trigger IDOC for ADDRESS FIELDS IN DEBMAS06

    Hi
    i have extended DEBMAS06 and added two new segments:
    1) ZE1KNA1M (streetnumber2,3,4,PO_BOX_CTY,PO_BOX_REG
    2) ZE1KNVKM.(email and fax from table ADR6 and ADR3 respectively)
    now for change in the above fields IDOC has to be triggered using change pointers....may i know how to activate change pointers for these fields?

    Hi moorthy,
    sending DEBMAS IDOCs via TA BD12 ( Report RBDSEDEB ) will generate an ADRMAS IDOC.
    Have a look on the source code - inside FM MASTERIDOC_CREATE_REQ_DEBMAS there is another call of FM MASTERIDOC_CREATE_REQ_ADRMAS.
    Regards
    REA

  • Printing a PO change from me22n for z-field change  from subscreen

    I have incorporated a subscreen in PO me22n.Now I want to automatically trigger PO printing for any change done to this ztable-zfield on subscreen!
    I tried setting the customizing option where we can add our own print relevent field to trigger printing for PO.I added here my ztable-zfield .When I change this field via PO subscreen,it tries to trigger for ZNEU (my output) and fails with RED! stating no print relevant changes made to PO!
    I also tried triggering for a EKPO-Zfield by first setting the customizing and then triggering printing for a changed field...
    ANY LIGHT on this OR ANY KNOWN OSS HELP appreciated!Regards,Shankar

    Hi Jeet,
    I want the PO to automatically trigger the ZNEU output just like it successfully does for create mode.not from ME9F!
    In MM customizing > table  T166C is where we add print- relevant fields and table names -->whose value changes for any PO should trigger an output automatically.Apparently this is not recognizing change to a ztable-zfield or even ekpo-zfield  from a PO.
    Now  this field for my client's POs happens to be in my custom subscreen a ztable-zfield for line item in PO.
    Yes the messages,further data,communication method are all set proper.
    Since you mentioned,I also checked NAST and it has entry in NAST...that is why I am getting RED radio in messages..it is apparently trying to output and then it finds this field change for the PO is not print relevent field change!
    any light on how to trigger an output manually programmatically from userexit or something when ever this zfield in a PO is changed using Me22n ?

Maybe you are looking for

  • ECC-6.0 supports XA(Distributed Transactions)&WS-AT(Web Services u0096 Atomic)

    Hi 1- Does SAP ECC-6.0 support XA transactions?     XA Transactions stand for (Distributed Transactions). 2- Does SAP ECC-6.0 Web services allow participation in WS-AT?     WS-AT Stands for is Web Services – Atomic Transaction specification. If so pl

  • Problem in Collection

    HI Friends, SQL> ED Wrote file afiedt.buf 1 DECLARE 2 TYPE VARRAY_TYPE1 IS VARRAY(10) OF VARCHAR2(10); 3 V_TAB VARRAY_TYPE1; 4 BEGIN 5 V_TAB:=VARRAY_TYPE1('SANKAR','BALAJI','SANA','PADMA'); 6 DBMS_OUTPUT.PUT_LINE('No of Elements in the Lists are :' |

  • Blank space in photoshop window

    Hello, this may be obvious, but how to I use the entire height of the window to view a document?  It happens using my external monitor only, not on the laptop.

  • LR sharpening in both Develop and Print?

    LR has sharpending in both Develop and Print modules. What recommendations to people have for setting them? Do the different sliders effect different parts of the image? Any insights? Obviously the type of camera, file format and output size all have

  • Photobooth/FaceTimeE problems in mavericks

    Since I upgraded to mavericks, whenever I choose an effect in photobooth, for example sunset, it will say "please move out of the picture" or whatever... So that part works fine, but after I take the picture, the camera gets super dark, almost so dar