Triggers in forms

when form builder is opened, which trigger will fire first and last?

ok, just kidding.
You mean forms runtime, not form builder.
First there are triggers like PRE-FORM, ON-LOGON, WHEN-NEW-FORM-INSTANCE
Last there are POST-FORM, maybe KEY-EXIT (when you close the form per shortcut)

Similar Messages

  • Key triggers in forms

    How at add key triggers in Forms.For example : When users click function key "F2" then it should save the record.
    Thanks
    Saritha

    hi,
    there are two ways to do it,
    one is to re-map function keys using oracle terminal,
    other is to use triggers that are already associated to the operations that
    are performed by pressing these keys e.g.
    F1 ---> Help
    F9 ---> List of values
    F4 ---> Duplicate record
    you can use these triggers to redefine the function/operation of keys
    by their associated triggers, like if you want 'F4' to save the data,
    you will write 'COMMIT_FORM' or any code you want, on trigger
    KEY-DUPLICATE-RECORD which is fired while 'F4' key is pressed,
    since this trigger is associated with 'Duplicate record' event.
    once you write the code on this trigger at form level, it will perform
    the required operation on activation.
    regards,
    aamir.

  • Smart Form: Which Action triggered the form?

    Hi all,
    we are using a Smart Form that should show information depending on which action triggered it. The Smart From is called by one class that does some preparation logic (Parent CL_SF_PROCESSING_PPF, Method EXEC_SMART_FORM). This class is started by several actions.
    I know I could have several classes, one per action. But in case of changes, I would have to change all classes.
    Is there a way to determine in the class which action was used to call it?
    Thanks for your help,
    Timo
    Message was edited by:
            Timo Koch (rephrased question)

    Hi,
    I'm facing the same issue, for the moment the best answer is to read the value of the GUID from PARAMETER values.
    DATA: para TYPE tpara-paramid VALUE 'TRIGGERGUID'.
    GET PARAMETER ID para FIELD wv_ppf_guid.
    IF sy-subrc <> 0.
      MESSAGE 'Parameter not found' TYPE 'I'.
    ENDIF.
    SELECT SINGLE * FROM ppfttrigg INTO ws_ppfttrigg
    WHERE os_guid = wv_ppf_guid.
    The problem is on creation mode, the guid is filled but the table is not, I'm trying to get info through class cl_manager_ppf but I haven't found yet ...
    Regards,
    Guillaume Mackowiak.

  • Use of transactional triggers in Forms 4.5.

    Hi All,
    Can any body help me in using transactional triggers?
    It 'll be best if anybody send me a text version (.fmt) of
    ttrig.fmb**, which is a demo provided by Oracle, with D2K
    release 1.x. This form 'll solve my purpose, since it
    demonstrates all the functionality of transactional
    triggers.
    Help 'll be greatly appreciated.
    Regards,
    Vimal Kaushik
    null

    Mr. Duncan Mills and other Oracle experts,
    I am currently working on an upgrade of numerous SQL*Forms version 2.3 to 6i.
    I have a few questions:
    Is there a detailed checklist to follow for the migration from SQL*Forms 2.x to 6i?
    Do you have any examples that show the proper syntax to follow for this conversion?
    Some of our colleagues have stated that a migration from SQL*Forms version 2.3 to 3.0 is required?
    Just to verify, if migrating from SQL*Forms v.2.3 to 6i - I need to first migrate the SQL*Forms v.2.3 .inp file to
    version 4.5 using the F45GEN program of Developer 2000, this will generate a version 4.5 .fmb file which I then need to
    migrate to 6i using the IF60CMP program of Developer6i
    Please let me know if there are any additional undocumented steps that I need to follow.
    Does anyone have an electronic copy of the Duncan Mills presentation 'Migrating Character Mode Applications
    to the Web '? If so, Can you email me a copy?
    Thank you, in advance, for your assistance.

  • The ideal knowledge of creating triggers in form

    its very easy to design a form but the matters is creating triggers so since i am a beginner i need ur guidance how to create triggers in form

    Hi,
    There are 3 types of triggers Form Level, Block Level and Item level triggers.
    First you have to decide which level you are going to create a trigger.
    Suppose you need to create Item level trigger, for a push button there is a trigger called When-Button-Presed. Like wise for each item,block and form has specific/general triggers for each event.
    you should check forms documentation or fellow online help/examples
    http://www.oracle.com/webapps/online-help/forms/10g/state?navSetId=_&navId=3&vtTopicFile=designing_forms/trig/dg0701.html&vtTopicId=
    Nilaksha.

  • Transaction  for triggering  of  form through print program for FI

    Hi,
    I went in table T001F. Now I see couple of programs and forms asscoaited with it.
    Now lets say program RFKQST20 and associated form is F_RFKQST20_CO_02. Now how do I know what transaction I can test the triggering i.e printing of this form thorugh its print program  ?

    Mostly in FI the print programs themself are driver programs for printing outputs. You can directly execute print programs such as RFKQST20 to issue outputs. If you want to find out trnsaction associated, do a where used for trnsactions and find out.
    Thanks,
    Shashi Reddy

  • Creating database triggers  from forms

    what we can create a data base trigger from from .if yes plzzz tell me its procedure.

    Yes, and have a look here, It show how is possible
    [url http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.designing_forms%7Cstoredpr%7Cf50crdbtr%7Ehtml/]Creating a Database Trigger

  • Authorisation Needed to Fire Triggers in Forms 10G???

    Hi everybody,
    I have a Linux Red Hat AS 3.0 server with an Oracle 10g Database and Application Server. I have deployed the FMX-files there and when I enter the URL the form starts, but not one single trigger is firing.
    Is this a patch problem? Is this an operating system problem?
    Does anybody have any ideas?
    Thank you in advance.
    Hans van Baal

    Hans - did you re-generate the FMX files on the Linux platform? FMX files are platform dependand.
    Regards
    Grant Ronald
    Forms Product Management

  • Mouse Related Triggers - 10g Forms

    Hi All,
    How to achieve mouse related trigger functionality to work with ORACLE Forms 10g. We have seen few links in blog from Francois. i.e
    http://sheikyerbouti.developpez.com/forms-pjc-bean/menu/. But our requirement is to enable hyperlink for few labels in Forms.
    We have enabled this in 6i forms by set_application_property(cursor_style,hand). But how to enable the same in 10g Forms.
    Request forum users to share with us some good links or use ful to stuff to enable this.
    Thanks

    <<...But i find only forms 6i related links in OTN..>> ???
    - Go to:
    http://www.oracle.com/technology/products/forms/index.html
    - Then click the "Sample code" in tha right side "Ressource" box
    - Finally, click the Oracle Forms 10gR2 Demos link:
    http://download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip
    Francois

  • Triggering program form(subroutine)  from MIGO using output types gives lock issue with Bapi_sag_change

    Hi,
    On creating the GR from MIGO tcode, based on the quantity check i am updating the field ELIKZ using BAPI_SAG_CHANGE.
    And updation logic is written in a zprogram using with in FORM XXXXX...ENDFORM XXXXX. ( FORM XXXXX is configured in the output type ).
    So the problem i am facing is on creation of the first GR with scheduling agreement number GR is posted successfully and under the output tab the i can see the green icon.
    But on creation of the second GR with same scheduling agreement its showing red icon. The following is the error message " User locked the scheduling agreement ...."
    I even tried using dequeue fm and transaction commit, but it didnt work. Please let me know how to over come the lock issue.
    Thanks & regards,
    Manojkumar K

    Solved it myself....
    Regards,
    Manoj

  • Related to Triggers exists in the form

    Hi All,
    I am working on forms customization.I just want to know the sequence of the firing triggers exists in the form.(Form Level,Block Level,Item Level)
    Could you please let me know the sequence.
    Thanks & Regards,
    Dhanasurya

    Normally the order of the trigger firing is
    1st Item level triggers
    2nd Block level triggers
    3rd Form level triggers
    You need to specify the event* and existing triggers, if u need to know the names of triggers that fires for that event.

  • Using ANSI sql in forms 9i triggers

    hi,
    could use some help here please!
    I am getting errors when trying to compile triggers in forms 9i against a 9i DB which include cursors or sql select's which are written using the ANSI join syntax.
    example:
    declare
    cursor cur_test is
    select dual1.dummy "dual1", dual2.dummy "dual2"
    from (dual dual1 inner join dual dual2 on dual1.dummy = dual2.dummy);
    begin
         null;
    end;
    when I try and compile I get error message "103" which seems to think that the SQL is not valid. If I put the same statements into recordgroups they will compile, and they run via SQL*Plus OK.
    versions are:
    Forms [32 Bit] Version 9.0.2.9.0 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Oracle Toolkit Version 9.0.4.0.23 (Production)
    PL/SQL Version 9.0.1.3.1 (Production)
    Oracle Procedure Builder V9.0.2.0.7 Build #1022 - Production
    database: 9.2.0.1.0
    Any ideas?!
    thanks,
    Pete

    If you remember that Sybase and MS worked together on SQLServer. Version 6.5 was pretty much the same database server. MS then built version 7.0 leaving Sybase behind. They added ANSI standard joins to their db. What did they get? PROBLEMS. Every patch contained fixes for ANSI standard joins. Even SQLServer 2000 has problems with it.
    Oracle now trys to follow MS and add ANSI joins to their database. What did it give them? BUGS. Remember this one?
    select * from sys.role$ cross join dual
    http://otn.oracle.com/deploy/security/pdf/sql_joins_alert.pdf
    Use standard joins and not ANSI joins. That will solve this problem.

  • Error "Job already started" when calling a adobe form in Z function module

    Hi All,
    I have a error when calling a adobe form in a custom function module.
    I am using FP_FUNCTION_MODULE_NAME to get the adobe form function module and then i am using FP_JOB_OPEN function module to control the printing parameters such as no print preview or no dialog ..etc.. I dont have any exceptions during the call of FP_JOB_OPEN function module ..
    Later I am calling my function module which was generated for the adobe form and i am getting the error called " JOB ALREADY STARTED".
    I tried executing the same function module in se37 and the PDF form output was generated, and also by commenting FP_JOB_OPEN function module the PDF form output was generated.
    But i need the FP_JOB_OPEN function module to control the output based on the output type which triggers the form output such as the medium from nast record which says print or email or fax.. etc
    Please let me know how to handling this error.

    Just as a followup note. If you are testing a function module from SE37 and the test button you will get a value in SY-CPROG. You must override this value for everything to work.
    If you override the value of SY-CPROG with the main program that will be calling the function module you have no problem.
    John W.

  • Error in generating form with 6i

    I have installed designer 6i rel 2 with form developer 6i on NT
    4.0.
    When in design editor, I want to generate the form with generate
    module, the system generate "CDR-21600: A running Generator or
    Utility has failed."
    Also in action column writes: " It is possible that the internal
    cache is now in an inconsistent state. You are therefore
    recommended to close and restart the application."
    Could anyone tell me what is the problem and how to solve it.
    thanks

    Here is an document which describes some known causes of CDR-
    21600 errors. I hope it will help you.
    PURPOSE
    To describe some known causes of CDI-21600 errors and to
    suggest possible solutions and workarounds.
    SCOPE & APPLICATION
    This note was written for users of Oracle Designer releases 2.1.x
    and 6.0.
    CDI-21600 errors occur most frequently during Design Capture and
    when generating forms with the Forms and WebServer generators.
    Investigating CDI-21600 errors
    In Oracle Designer Release 2.1.2 and Release 6.0, this error has
    the form:
    CDI-21600 'A running generator or utility has failed'
    The Release 2.1.1 error message was: 'Generator or Utility throw
    an Exception'
    The CDI-21600 error message means that the generator is hitting
    an unhandled exception, also known as a GPF (general protection
    fault). The CDI-21600 error masks the underlying exception error.
    To see the real error do the following:
    1. Go into the Registry Editor (REGEDIT).
    2. Navigate to HKEY_LOCAL_MACHINE\software\oracle\des2_70
    3. Set EXCEPT_HANDLING to 0 (by default it is 1).
    Repeat the action that resulted in the error.
    Known Causes of CDI-21600 Errors and Possible Solutions
    Some of the reasons why CDI-21600 errors occur are listed below.
    1. A common cause of CDI-21600 errors is failure to install the
    necessary
    Developer patches.
    See [NOTE:64630.1] Developer Patches required to run
    Designer with Developer
    2. Check that Designer is running on a supported database. Also
    check that the
    TNS connection is correct.
    See [NOTE:60705.1] Designer Certification Matrix (HTML)
    3. Check for 'dangling' foreign keys, in other words FKs no longer
    owned by any
    table in the repository. Delete all invalid constraints.
    Invalid constraints may be created if you use the repository
    dump utility to
    dump and restore external foreign keys referencing tables
    shared into the
    application system, without dumping and restoring the tables
    that own them.
    If you restore a complete dump (rather than a 'skeleton' one),
    and then use
    the 'Reconnect Share Links' option when restoring, you may be
    able to
    resolve this problem.
    To get a complete list of 'dangling' constraints in your
    repository, connect
    using SQL*Plus and use the following query:
    SELECT app.name, key.name
    FROM ci_application_systems app, ci_constraints key
    WHERE key.table_reference IS NULL
    AND key.application_system_owned_by = app.id;
    You can also run CKAZANAL.ANAL_REFERENCES on your
    repository and delete all
    the invalid constraints that it finds. You can run the Repository
    Analyzer
    from: Front Panel -> Repository Administration Utility -> Utilities.
    NOTE: There may be inconsistencies in the repository that the
    Repository
    Analyzer cannot fix. You might solve such problems by
    dropping all the
    tables of your application, recreate them from the ERD,
    then use the
    DDT and recreate your modules.
    [BUG:847190] CDI-21600 during forms generation: 'dangling'
    foreign key
    "Since the generator is running on a repository that contains
    invalid
    constraints and the Repository Analyzer solves the problem,
    bug closed as
    unfeasible to fix."
    4. Check your modules for invalid or missing references such as
    missing window
    placements.
    5. Try generating your module against default templates and
    object libraries.
    6. When capturing forms or libraries, try capturing the form or
    library without
    application logic, then capture the application logic on its own.
    See [NOTE:1064690.6] CDI-21600 when capturing design of
    form with
    application logic
    [BUG:757541] DESCAP: CDI-21600 error reported when
    capturing with
    application logic
    Fixed In Ver: 6.0
    [BUG:926383] Duplicate of [BUG:757541] This has been fixed in
    2.1.2 patch
    779559. However you would be advised to apply a later patch
    such as 855635
    which fixes more bugs in this area.
    7. Make sure that all objects that are referenced by the form have
    been
    captured into the repository before capturing the form.
    8. A CDI-21600 will occur if a lookup usage displays only one
    column of
    datatype DATE or if the column of datatype DATE is displayed
    as the first
    item in the block.
    Workaround
    Add more column usages to the lookup block and do not
    display the DATE data
    type column usage as the first item in the block.
    9. [BUG:810472] CDI-21600 when 'Argument in Caller' is set
    Fixed In Ver: 6.5.3.0
    Workaround
    Make sure that you have an argument in the called module that
    is mapped to
    the "Argument Passed Value" in the calling module. The only
    way to get this
    mapping back once the APV has the <Module Argument> label
    is to delete it
    and recreate it.
    10. [BUG:801736] CDI-21600 on design capture of a form with
    subclassed object
    Fixed In Ver: 6.0.3.1.0 (backport)
    Fixed In Ver: 6.5
    You have an item that has been subclassed to an object.
    Checking the Design
    Capture option 'Capture Control Blocks' causes the CDI-21600
    error. Uncheck
    'Capture Control Blocks' and the problem does not occur. Open
    the FMB in
    Forms*Builder and look at Data Blocks -> Items. Break the link
    to the
    object, save the FMB, and the form will capture (similar to
    [BUG:794872]).
    Alternatively, ensure the link can be established.
    11. [BUG:850436] CDI-21600 on generation of a form with template
    having
    subclassed object group
    You try to generate a form out of Designer that uses a user-
    defined
    template. If a collection of objects in the template is grouped
    into an
    object group, dragged into the object library and then either
    copied or
    subclassed into a form, when the form is generated you get a
    CDI-21600
    error.
    12. [BUG:822659] Module generation fails (CDI-21600) with multi-
    column PK having
    long prompt text
    Fixed In Ver: 6.5.3.2
    Module generation with multi-column primary key having long
    prompt text
    causes CDI-21600 with preference MSGSFT set.
    Workaround
    Shorten the prompt text of PKs may not be not applicable. You
    may loose end
    user information.
    You may have the same problem with a mandatory compound
    FK. CASEOFG tries to
    generate a message '<P1> must be entered', where <P1>
    contains all the
    prompts of the bound items from the FK. If you reduce the
    length of the
    prompts, or set MSGSFT = NULL or WEDI = S or property
    Mandatory?=No, it
    works correctly.
    13. [BUG:792542] Capturing application logic causes CDI-21600
    (V2 style
    triggers)
    Fixed In Ver: 6.5.5
    After removal of the v2 triggers, the form captures/merges OK
    on 5.0.24.8,
    provided patch 875027 has not been applied.
    14. [BUG:790877] CDI-21600 if the primary/foreign keys have no
    key components
    Fixed In Ver: 6.5.11
    Generating a module with tables having a primary key not
    correctly defined
    (no PK component) will cause a CDI-21600 error. This can
    occur when
    unloading a module from the RON. If you pick up the module
    (and only the
    module) in the unload set, the table and its PK are unloaded as
    a skeleton.
    Loading the .DAT file into a new application will create a PK
    without a
    component.
    15. [BUG:771549] CDI-21600 if cannot connect to the DB with
    connect string in
    Options (Compile)
    Fixed In Ver: 6.5.13
    If you cannot connect to the DB with the connect string
    specified in options
    (Compile), the forms generator will fail with CDI-21600.
    This problem occurs when you cannot connect to the DB
    because:
    - the username or password is wrong;
    - or the SQL*Net alias is not defined in the TNSNAMES.ORA
    file;
    - or the SQL*Net listener is not started;
    - or the DB is down.
    16. [BUG:785106] CDI-21600 when generate master detail form
    with preserve layout
    [BUG:855812] is a duplicate of this bug.
    Fixed In Ver: 5.0.24.6.0 (Bug:860426 Backport request for 2.1.2)
    Fixed In Ver: 6.0
    Fixed In Ver: 6.5.3
    You have a master-detail Form with the Master having items
    partly on a TAB
    Canvas. Generate Module works OK. You enter Forms Builder
    and move some
    items on the tabs (just small changes, items are still on the
    same tabs).
    You change the look of the Detail and change Records
    Displayed. Now in
    Designer you generate the Module with Preserve Layout. You
    get a CDI-21600
    error. The problem might reproduce without doing any changes
    in Forms
    Builder, just by generating with Preserve Layout.
    17. [BUG:891306] If primary key column of lookup in check
    constraint comment of
    base table
    Fixed In Ver: 6.5.5
    Workaround
    Do not use the name of the bound item that is based on the
    primary key
    column of the lookup table in a check constraint comment of
    the base table.
    18. [BUG:896026] Forms gen throws assertion failure in
    CVINI/BUILDACTIONITEM@/CV/CVI/CVIBNI.CPP
    Fixed In Ver: 6.5.7
    A problem is caused by a PL/SQL definition (function, package,
    procedure)
    being defined as a called module for the module you are trying
    to generate.
    To resolve the problem and enable the module to be generated,
    remove all
    Called Modules that are PL/SQL definitions (functions,
    procedures or
    packages).
    See [NOTE:2107207.6] CDI-21600 during generation of module
    or Assertion
    Failure \cv\cvi\cvibni.cpp
    19. [BUG:812333] CDI-21600 generating a web module after
    adding an unbound item
    Fixed In Ver: 6.5.3.0
    Backport [BUG:1280667] raised to fix by 6.0.3.9
    You add an unbound item (SQL expression) to a Web module.
    When you try to
    generate the module you get a CDI-21600 error. If you delete the
    unbound
    item the Web module generates correctly.
    In a test case the problem occurred during validation of the
    derivation
    text, if the master module component was in a different module.
    A workaround
    was to rearrange module components so that this was not the
    case.
    20. [BUG:1627963] CCVDIAG::TRACEGENERATORMESSAGE
    WHEN GENERATING INCORRECT
    DERIVATION EXPRESSION
    Message
    CDR-21605: Failed while processing Module <mod> in function
    CCVDiag::TraceGeneratorMessage BOF
    Cause
    The generator failed due to an unexpected error - the
    error indicates the object the generator was processing
    when it failed.
    Helena

  • Problem generating Adobe form in ABAP

    Hi Experts,
    I have just written a function module that calls a form that I created, which is meant to generate a pdf form and email it to a specific email address. However, I have the problem where the pdf is not being generated properly and is actually empty.
    I tried to debug the program and sy-subrc returns a usage error when calling the function module generated at runtime from my form. The end result is a pdf attachment that is 1K in size and contains nothing. I get an error when I try to open the attachment, with the message being the document type is not supported or the document is corrupted or something is wrong with the coding.
    Would anyone be able to shed some light on this? Its quite urgent, so any help will be appreciated and rewarded. I have also pasted my code below:
    FUNCTION z_vip_vendor_survey_01.
    ""Local Interface:
    *"  TABLES
    *"      I_INPUT TYPE  ZZVENDOR_MATNR
    *"  CHANGING
    *"     VALUE(ET_TLINE) TYPE  TLINE
    *---- Line of Table
      DATA: lt_vendor_matnr  LIKE LINE OF it_vendor_matnr,
      fp_outputparams TYPE sfpoutputparams,
      fm_name TYPE funcname,
      fp_docparams TYPE sfpdocparams,
      fp_formoutput TYPE fpformoutput,
      pdf TYPE fpformoutput-pdf,
      lt_att_content_hex TYPE solix_tab.
      TABLES: tvarvc.
      it_vendor_matnr[] = i_input[].
      fp_outputparams-nodialog = 'X'.
      fp_outputparams-getpdf   = 'X'.
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = 'Z_VENDOR_ADOBE_FORMS_FORM'
        IMPORTING
          e_funcname = fm_name.
        E_INTERFACE_TYPE           =
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = fp_outputparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      fp_docparams-langu = 'E'.
      fp_docparams-country = 'AU'.
      fp_docparams-fillable = 'X'.
    fp_docparams-dynamic = 'X'.
      CALL FUNCTION fm_name
        EXPORTING
          /1bcdwb/docparams  = fp_docparams
         vendornumber       = '123'
         vendordesc         = 'test vendor'
         materialnumber     = '456'
         materialdesc       = 'test material'
        IMPORTING
          /1bcdwb/formoutput = fp_formoutput
        EXCEPTIONS
          usage_error        = 1
          system_error       = 2
          internal_error     = 3
          OTHERS             = 4.
      pdf = fp_formoutput-pdf.
      CALL FUNCTION 'FP_JOB_CLOSE'
    IMPORTING
      E_RESULT             =
       EXCEPTIONS
         usage_error          = 1
         system_error         = 2
         internal_error       = 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.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
       EXPORTING
         buffer                = fp_formoutput-pdf
      APPEND_TO_TABLE       = ' '
    IMPORTING
      OUTPUT_LENGTH         =
       TABLES
         binary_tab            = lt_att_content_hex
      CLASS cl_bcs DEFINITION LOAD.
      DATA:
      lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
      DATA:
      lt_message_body TYPE bcsy_text VALUE IS INITIAL,
      lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
    LOOP AT it_vendor_matnr INTO lt_vendor_matnr.
      SELECT SINGLE * FROM  tvarvc INTO tvarvc
                      WHERE name = 'ZZTEST'
                      AND   type = 'P'.
       tvarvc-low  = lt_vendor_matnr-lifnr.
       tvarvc-high = lt_vendor_matnr-SMTP_ADDR.
       MODIFY tvarvc.
      APPEND 'Dear ' TO lt_message_body.
      APPEND lt_vendor_matnr-lifnr TO lt_message_body.
      APPEND ',' TO lt_message_body.
      APPEND '' TO lt_message_body.
      APPEND 'Please fill in the attached form and send it back to the email address in the sender field.' TO lt_message_body.
      APPEND '' TO lt_message_body.
      APPEND 'Thank you.' TO lt_message_body.
      lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Test Survey - Please complete' ).
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL,
      attdoctype TYPE soodk-objtp,
      atttitle TYPE sood-objdes,
      attsize TYPE sood-objlen.
      attdoctype = 'PDF'.
      atttitle = 'test survey'.
      attsize = XSTRLEN( pdf ).
      lt_att_content_hex = cl_document_bcs=>xstring_to_solix(
         ip_xstring = pdf ).
      TRY.
          lo_document->add_attachment(
          EXPORTING
             i_attachment_type = attdoctype
             i_attachment_subject = atttitle
             i_attachment_size = attsize
             i_attachment_language = sy-langu
             i_att_content_hex = lt_att_content_hex ).
        CATCH cx_document_bcs INTO lx_document_bcs.
      ENDTRY.
      lo_send_request->set_document( lo_document ).
      DATA:
      lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
      lo_send TYPE adr6-smtp_addr VALUE <senderemail>.
      lo_sender = cl_cam_address_bcs=>create_internet_address( lo_send ).
      lo_send_request->set_sender(
      EXPORTING
         i_sender = lo_sender ).
      DATA:
      lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL,
      lo_rec TYPE adr6-smtp_addr VALUE <recipientemail>.
      lo_recipient = cl_cam_address_bcs=>create_internet_address( lo_rec ).
      lo_send_request->add_recipient(
      EXPORTING
         i_recipient = lo_recipient
         i_express = 'X' ).
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
      lo_send_request->send(
      EXPORTING
         i_with_error_screen = 'X'
         RECEIVING
         result = lv_sent_to_all ).
      COMMIT WORK.
    ENDLOOP.
    et_tline-tdformat = 'S'.
    CONCATENATE 'Triggered the Forms successfully for'
    lt_vendor_matnr-lifnr
    INTO
    et_tline-tdline .
    ENDFUNCTION.

    Check your ADS configuration.
    Raja T

Maybe you are looking for