Guidence needed for Custom Trigger

I have an ADDT Dynamic List and Form. (I love these things!) When I add/edit/delete a record using the form, I would like to update another (unrelated) database table and would like to know if that is possible using a Custom Trigger. I have read Ch. 16 of the ADDT Help manual and am a bit lost with the jargon  as I am not a power-php person.
Here is what I need to do: Select from a different table a record by a value in a field and update another field in it. Then return to the Dynamic List page.
The other solution which is an easy cop-out is once the transactions have been completed on the Form page, go to an intermediate PHP script that carries out the Select and Update process then return to the Dynamic List page.
Any suggestions/comments welcome. Thanks.

Hi Albert. Thanks for pointing out yet another hidden gem in ADDT.
The help for this SB is a little vague.
As a result I have no idea on how this will help.
Here is the situation in a bit more detail.
Lets say the Dynamic Form is used to enter News items. These are kept in a table for News Items. These Items are presented on a News page in the site. This page gets its content from the Pages table as well as the News table.
There is no relationship between the two tables. However, the Pages table includes a field called updated which contains the date the "page" was last updated. Each News item also has an Updated field, but when the news item is updated I also want to update the updated field for the News Page.
My first thought was to add a custom trigger to the News Items Form page that could grab the News Page record from the Pages table and update its updated field.
So the Pages Table looks like this:
Table name:pages_pag
Columns:
id_pag  - the primary key
idpag_pag - the self foreign key
menulabel_pag - the menu label
template_pag - the template file used to display the page.
pageheading_pag - the page heading
content_pag - the page content
updated_pag - the date created/updated
etc etc......
The News Table looks like this:
Table name: news_nws
Columns:
id_nws
heading_nws
summary_nws
details_nws
updated_nws
etc...
Hope this explains what I am trying to achieve.

Similar Messages

  • Sample values needed for Customer Number And Sales Organisation in BAPI

    Hi Experts,
        I want to execute the Bapi BAPI_SALESORDER_GETLIST with mandatory parameters such as Customer Number & Sales Organisation .
        How would I come to know what values to enter for Customer Number & Sales Organisation inorder to get some Output in the form of table SALES_ORDER.
        Can you ll help me with some sample values which I can enter to get some useful output.
        And what is the logical way to go inorder to test such BAPIs in future.
    Thanks in Advance,
    Pavanmeet Singh

    Hi,
    CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
    EXPORTING
    customer_number = cust
    sales_organization = sorg
    MATERIAL =
    DOCUMENT_DATE =
    DOCUMENT_DATE_TO =
    PURCHASE_ORDER =
    TRANSACTION_GROUP = 0
    PURCHASE_ORDER_NUMBER =
    IMPORTING
    return = it_return
    TABLES
    sales_orders = salesorder_itab.
    Regards
    Sudheer

  • Function module needed for customer exit variable need to use in Bex report

    Hi Experts,
    I have a requirement where i need to get Cummulative result between two interval periods.
    If user gives single mandatory input value - 002-2009
    for one Scenario:-
    Project start Date   untill Pervious year i.e  December 2008
    Where project start date will get from one of the field in my BW CUBE
    can anyone help for the customer exit function code for this scenario. As i am into BI i dont have idea in ABAP.
    Please help sample cod for this .
    Thanks,
    Anil.

    I had created one customer exit which had fullfill my requirement.

  • Jar files need for Custom connector API app

    hi all,
    I am doing an application regarding "Custom connector API", for doing the application I need "jdom,rome-0.6" jar files. kindly send these jar files it will be helpful to me. To do such custom connector API application any plugins must be added to  it, if so please let me know???
    thanks in advance,
    Aravind.

    Hi,
    You can find the jdom.jar file from the plugins/com.sap.km.rfwirad_7.1.5/lib/jdom.jar.
    If you add classlocator to your studio you can find the required jar file for your imported classes very easily. To add the classlocator to your studio go to the below blog
    Using JAR Class Finder
    Regards
    Suresh

  • Need for customer exit code to go to previous date

    In the ODS there is a date which is a user entry on my report. I need to write a customer exit which goes to previous date.
    In other words let's say user entered 07/07/07 at the user entry, and there is no activity for the entered date. The previous activity date in ODS data is 07/05/07. The report should run based on the previous date. ( Date is the key by the way )
    I will appreciate any help with points,
    Regards,
    Mike

    I just wrote this quickly and I limited to 10 loops because something is wrong if it is further back than that and I think another solution should be done.  This is also assuming the volume of data is not too large.  If so you may want to take the year off the date and add that to the select statement.
    Can the previous date be any date?  So lets say the user entered 07/07/07 and the last activity was 01/01/07?  Is date the only key? 
    If so you can do something like this.
    date_ 1 like <date_ field in ODS>
    date_ 2 like <date_ field in ODS>
    counter(2) type n
      DATA:    BEGIN OF data_all OCCURS 0,
                 Date_ 3 like date_ 1
               END OF data_all
    date_ 1 = user enter
    counter = 10
    Select <date_ field> from <ods backend table> into data_all
    Sort ascending
    While counter > 0
       Read data all where data_all-date_3 = date_1
    If sy-subrc <> 0
      Date_ 1 = date_ 1 – 1
    Counter = counter - 1
    Continue.
    Else
    date_2 = date_1
    Exit.
    Endif
    End loop
    Return date_2

  • Need for Custom Container

    Hi all,
    I have read that you use Custom container class for oops alv. But i have not found an answer as to  why do we have to use the class.
    Can't we just use ALV class only (Cl_gui_alv_grid) ?.
    Regards
    Varun

    You can only create a grid display in a container...while creating the object for grid contol you have to pass the object reference of the custom container...check out the following for details...
    *& Report  ZTEST_DEMO_ALV
    report  ztest_demo_alv.
    class cl_event_reciever definition deferred.
    data:
    wa_vbak type vbak.
    data:
    i_vbak type standard table of vbak,
    i_vbap type standard table of vbap.
    data:
    v_container1 type scrfname value 'CONT1',
    v_grid1      type ref to cl_gui_alv_grid,
    v_custom_container1 type ref to cl_gui_custom_container,
    v_container2 type scrfname value 'CONT2',
    v_grid2      type ref to cl_gui_alv_grid,
    v_custom_container2 type ref to cl_gui_custom_container,
    ok_code type syucomm,
    v_event_reciever type ref to cl_event_reciever.
    *       CLASS cl_event_reciever DEFINITION
    class cl_event_reciever definition.
      public section.
        methods:
          handle_double_click for event double_click of cl_gui_alv_grid
            importing e_row e_column.
    endclass.                    "cl_event_reciever DEFINITION
    *       CLASS cl_event_reciever IMPLEMENTATION
    class cl_event_reciever implementation.
      method handle_double_click.
        read table i_vbak
        into wa_vbak
        index e_row.
        if sy-subrc = 0.
          select * from vbap
            into table i_vbap
            where vbeln = wa_vbak-vbeln.
          if sy-subrc = 0.
            set screen 00.
            leave to screen 100.
          endif.
        endif.
      endmethod.                    "handle_double_click
    endclass.                    "cl_event_reciever IMPLEMENTATION
    select-options:
    s_vbeln for  wa_vbak-vbeln.
    start-of-selection.
      select * from  vbak
        into table i_vbak
        up to 50 rows
        where vbeln in s_vbeln.
      if sy-subrc <> 0.
        message i000(z_zzz_ca_messages)  with 'No data found!'.
        leave list-processing.
      endif.
    end-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
      set pf-status '100'.
    *  SET TITLEBAR 'xxx'.
      if v_custom_container1 is not bound.
        create object v_custom_container1
        exporting container_name = v_container1.
        create object v_grid1
          exporting i_parent = v_custom_container1.
        call method v_grid1->set_table_for_first_display
           exporting
    *       i_buffer_active               =
    *       i_bypassing_buffer            =
    *       i_consistency_check           =
             i_structure_name              = 'VBAK'
    *       is_variant                    =
    *       i_save                        =
    *       i_default                     = 'X'
    *       is_layout                     =
    *       is_print                      =
    *       it_special_groups             =
    *       it_toolbar_excluding          =
    *       it_hyperlink                  =
    *       it_alv_graphics               =
    *       it_except_qinfo               =
    *       ir_salv_adapter               =
          changing
            it_outtab                     = i_vbak
    *       it_fieldcatalog               =
    *       it_sort                       =
    *       it_filter                     =
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
        create object v_event_reciever.
        set handler v_event_reciever->handle_double_click for v_grid1.
      endif.
      if v_custom_container2 is not bound
        and i_vbap is not initial.
        create object v_custom_container2
        exporting container_name = v_container2.
        create object v_grid2
          exporting i_parent = v_custom_container2.
        call method v_grid2->set_table_for_first_display
           exporting
    *       i_buffer_active               =
    *       i_bypassing_buffer            =
    *       i_consistency_check           =
             i_structure_name              = 'VBAP'
    *       is_variant                    =
    *       i_save                        =
    *       i_default                     = 'X'
    *       is_layout                     =
    *       is_print                      =
    *       it_special_groups             =
    *       it_toolbar_excluding          =
    *       it_hyperlink                  =
    *       it_alv_graphics               =
    *       it_except_qinfo               =
    *       ir_salv_adapter               =
          changing
            it_outtab                     = i_vbap
    *       it_fieldcatalog               =
    *       it_sort                       =
    *       it_filter                     =
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4
      endif.
      if v_custom_container2 is bound.
        call method v_grid2->refresh_table_display.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      case ok_code.
        when 'BACK'.
          if v_grid1 is bound.
            call method v_grid1->free.
          endif.
          if v_grid2 is bound.
            call method v_grid2->free.
          endif.
          set screen 00.
          leave screen.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT

  • Guidence needed for SAP Carrer (IS Retail+SD)

    Hi All,
    I am planning to change my Career path from IT Analyst to SAP IS RETAIL Consultant. I am Currently working in retail company (UK Retailer) from last 4 years as IT Analyst involved in Mapping business requirements and Implementing new systems etc.
    I don't have any experience in SAP, I am planning to join Certification course for SD+ISRETAIL and I Checked with one of  SAP Authorized training Center and got overview of IS RETAIL.
    Retail industry is booming accross the world (including India) i think there will be enough opportunities for SAP IS Retail Consultants(this is one of the reason for changing Career path) . I believe experience i have gained in retail domain from last four years will be useful in implementing SAP IS Retail  to suit client requirements.
    I would request your guidence and suggestion on this.
    Regards
    Natraj

    Hi,
    I feel you have made a genuine plan. As you have good industry knowledge you should be able to grasp the concepts easily. You experience in Retail industry can help you in your job search.
    In india you can target cos like IBM, Accenture which have big SAP Teams.
    I feel you should go for IS Retail certification, not sure why you wanna do SD.
    Cheers
    Barry

  • Help neede for customer exit

    Hi,
    Please let me know as to how can i derive the 1st day and last day of the fiscal week. I have the fiscal week data eg: 201004 in the cube
    Also how can i derive the  1st day and last day of the fiscal year quarter. I have the fiscal quarter data eg: 20101 in the cube
    any function module to get the 1st day and the last day of this week and the quarter?
    regards,
    Mahesh

    Hi Mahesh,
    Use Function Module WEEK_GET_FIRST_DAY to get the first day of the given week.
    You can get the last day of the week by Adding 6 to it OR y using Same function module for next week and get first day of the next week. and Make it  - 1.
    Regards,
    Pratap Sone

  • AR table needed for customer payment terms specified by sales areas

    Hi Experts,
    What table can I use to see the payment terms of specific customers by sales areas? I have tried T052 and TVZBT but it is not possible to view or filter by sales areas and customers in those sales areas.
    Any help will be appreciated!
    Thanks,
    David

    Hi,
    check the  VBKD: To get sales related Business data like Payment terms etc.(VBELN, ZTERM)
    Regards
    Pramod

  • Help needed for Custom Trusted Reconciliatin API uses

    Hi Experts,
    I have created Resource Object, One Process Definition and One Reconciliation Rule.
    I have mapped FirstName,lastname,username,UserType(End-User),Type(EMP to Role),organization,email .
    After that after calling createReconciliationEvent() API, I am getting the following error:
    +<Dec 22, 2011 7:49:54 AM CET> <Error> <oracle.iam.reconciliation.impl> <IAM-5010000> <Generic Information: {0}+
    oracle.iam.reconciliation.exception.ReconciliationException: Exception occurred while inserting data into table RA_TESTRECONFLATFILE74 due to RA_TESTRECONFLATFILE74
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.reconEvent(ReconOperationsServiceImpl.java:285)
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.createReconciliationEvent(ReconOperationsServiceImpl.java:189)
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.createReconciliationEvent(ReconOperationsServiceImpl.java:212)
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.createReconciliationEvent(ReconOperationsServiceImpl.java:201)
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.createReconciliationEvent(ReconOperationsServiceImpl.java:197)
    at oracle.iam.reconciliation.api.ReconOperationsServiceEJB.createReconciliationEventx(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    Please help.
    Regards,
    J

    http://docs.oracle.com/cd/E17904_01/doc.1111/e14308/recon_service.htm#BABGIIIA
    -Bikash

  • Custom Trigger help needed

    How do I include values from existing recordsets in a SQL statement
    within a Custom Trigger?
    For example, my page has a few recordsets. Assume one of the recordsets
    tells me what state the current user lives in. $row_rsCurUsr['state']
    There is an Insert form on the page with a Custom Trigger (after)
    attached. I need the Custom Trigger to perform another action (insert,
    update, delete, whatever) but it needs to use the $row_rsCurUsr['state']
    value. How can I do this?
    I've tried something similar to:
    $triggerSql = "INSERT INTO anothertable (id, state) VALUES
    ({SESSION.kt_login_id},{rsCurUsr.state})";
    and
    $triggerSql = "INSERT INTO anothertable (id, state) VALUES
    (".$_SESSION['kt_login_id'].",".$row_rsCurUsr['state'].")";
    but neither seems to work.
    Alec
    Adobe Community Expert

    Ok. How about executing a SELECT inside a Custom Trigger and accessing
    the resulting rows to use in PHP code also in the trigger?
    Example - within the Custom Trigger execute:
    $sql="SELECT * FROM table";
    How do I execute it? With the regular DW code like:
    mysql_select_db($database_conWV, $conWV);
    $sql="SELECT * FROM table";
    $result = mysql_query($sql, $conWV) or die(mysql_error());
    $row_result = mysql_fetch_assoc($result);
    $totalRows_result = mysql_num_rows($result);
    or with some ADDT code like:
    $result = $tNG->connection->execute($sql);
    If I do the "ADDT" way, how do I access the rows?
    $result['column'] or something?
    Alec
    Adobe Community Expert

  • Need table for customer and vendor carry forward balance

    Hi,
    I need to fetch the carry forward(opening) balance for GL, customer and vendor account for my report.
    I have table which contains c/f balance for GL accounts which is "GLT0" and now looking for a table for customer and vendor accounts.
    Please let me know if anyone have idea in which table i can get the c/f balance for customer and vendor accounts.
    Thanks in advance.
    Regards,
    Swati

    Hi Gurus
    The requirement from the client side in my case is to have opening balance in Tr code ZFBL1n, ZFBL3N and ZFBL5N.
    Now, from the above thread i got the Tables where i could find the Vendor and Customer Opening Balance but i also want Opening Balance for GL.
    and my 2nd query is how to get these opening balance in Z report, at Header Level.
    Thanks and Regards
    Dnyanesh

  • Help needed for translation of custom objects

    Hi All,
    We are currently in the process of upgrading from 11i to R12.1.3. We have a lot of custom reports and forms which needs to be translated based on language preference set at user level. The approach we have taken is as follows:
    1. Created one unique look up type for each of the custom objects.
    2. Each lookup code is mapped to a field of the custom object (report or form).
    3. Entered the translation for each of the lookup codes using Globe icon (Translation Form) available on the lookup form.
    4. When the user logs into his account, we are filterting out the record specific to user environment language using the condition:
    language of fnd_lookup_values = usernev('lang') and getting the translated labels for each of the fields in the custom object.
    Now what we would like to understand is if there is any other better way of doing translation based on user preferred language.
    We have heard about Oracle Translation Manager (OTM) but not sure how the same can be used in our case. Also we would like to know how Oracle does translation for the languages that are enabled in a particular instance. We would like to know if a similar approach can be followed for custom objects as well.
    Thanks & Regards,
    Sreenivasa M

    Implode wrote:
    We had the arrayList/collections lecture today.
    I asked the teacher about sorting objects and he started explaining hashmaps and then he mentioned another thing which we will only be learning next term, I'm sure we must only use what we have learned.
    How exactly can this be done. I have asked a few questions in the post already.
    ThanksWell, there was probably a gap in the communication. Hash maps (or hash tables, etc.) are instance of Map. Those are used to locate a value by its unique key. Generally, to speed up access, you implement a hashing function (this will be explained hopefully in class). Think of name-value pairs that are stored where the name is unique.
    Contrast this with items that are sorted. Any List can be sorted because its elements are ordered. An ArrayList is ordered, generally, by the order you inserted the elements. However, any List can be given its own ordering via Comparable or Comparator. You can't do this with an ordinary Map. The purpose of a Map is speedy access to the name-value pairs, not sorting. The List likewise has different purposes, advantages, disadvantages, etc. List can be sorted.
    A Map is generally similar to a Set. A Set is a vanilla collection that guarnatees uniqueness of each element (note, not name-value pairs, but simple elements). There is one concrete class of Map that can be sorted, TreeMap, but I doubt your professor was referring to that. The values or the keys can be returned from the Map and sorted separately, but again, I doubt he was referring to that.
    Take a look at the Collections tutorial here on this site or Google one. It is fairly straightforward. Just keep in mind that things (generally) break down into Set, Map and List. There are combinations of these and different flavors (e.g., Queue, LinkedHashMap, etc.) But if you can learn how those three differ, you will go a long way towards understanding collections.
    (Oh, and be sure to study up on iterators.)
    - Saish

  • Transformation: Need for calling a custom function module on source system

    Hi Gurus,
    I need to use a custom FM residing on source system within the transformation to determine the type (e.g. posting type) of a document item. The logic is quite complex with many exceptions (many if statements) and 2 customizing & few transparent tables are in use as well in the FM.
    From my point of view, there are few options for achieving the outcome:
    1. Copy the FM logic 1:1 in transformation
    2. Transport the FM from ERP to BW system
    3. Source system delivers the info (e.g. with an extra field "posting_type")
    4. Access the FM directly via RFC/BAPI
    However, there are pros and cons for each of the alternatives:
    *Option 1*
    pros:
    cons: consistency problem, need for importing customizing tables & source tables, high maintenance effort
    *Option 2*
    pros: better consistency compared to Option 1
    cons: need for importing tables, administrative efforts
    *Option 3*
    pros: no logic is needed at BW side, no transformations means no impact on performance, high consistency, no administrative effort
    cons: structure in source system has to be changed, impact on historical records
    *Option 4*
    pros: best consistency (better than Option 3 as FM might change), no administrative effort
    cons: impact on performance during transformation
    Could you please verify my assumptions and give suggestions on solving the problem?
    Thanks a lot!
    Regards,
    Meng

    Hi Joon,
    According to me.
    If Historical data amount is so high, historical data is available in BW(at PSA level or acquisition layer or corporate memory layer) and headache to load history data(because of overload on ECC due to huge amount of data) from ECC then I will suggest combination of 3 and 4 steps.
    If fetching history data from ECC is not headache for you then go for step 3.
    Step 3 is most common approach in BW, which is easy for implementation and support.
    Regards,
    Ashish

  • Reg: mail need to be trigger for salary change

    Hi gurus,
    I have one requirement.
    If any one does the changes in salary I mean in infotype 0008 then one mail need to be trigger.
    Can any one tell me the procedure how to do this requirement?
    Regards
    Ramesh

    HI Soumya,
    Thank you very much .
    I have found one BOR for this workflow
    BOR name  : BSAICPAY
    if any changes happen in infotype 0008 then changes event will tiger in this bor.
    I completed this requirement trough simple workflow
    Thank you all
    Thank you for your support
    Regards
    RameshG

Maybe you are looking for

  • Airport Express - Multiple speakers

    I have 3 airport express connected to 3 different stereo systems. When I use only one speaker, everything is ok. When I use 2 speakers, the signal stops for 2 seconds about every minute. When I use 3 speakers, signal stops for 2 seconds very frequent

  • Archiveing entourage emails as pdf with applescript

    Hello, I would like to archive all my emails in a flexible format that doesnt need entourage to read them. I would like to save all my emails in entourage to PDF. does anyone have a script that can do this? I can do this individaully by just selectin

  • Can't write to NTFS partition [RESOLVED]

    I want to use an NTFS partition to contain all of my data. I created a directory in ~ and mounted the NTFS partition to that directory. I can read it but I can't write to it.  How do I get NTFS write support?  Do I have to manually load a kernel modu

  • LSM still available in 9.2

    Is Legato Storage Manager (limited version) still available in 9.2? TIA

  • Estimation for SAP or ABAP Maintenance Requests

    I'm currently searching for effort estimation tools which will be suitable for SAP & ABAP enhancements or modifications. It'd be helpful if anyone can recommend an appropriate effort estimation tool/method which we can adopt for SAP maintenance proje