Error in BDC when executed in back ground

Hi All,
We are working on a BDC interface for Material Master Basic Data Add or Change using SAP 4.7. The interface is working fine with CALL TRANSACTION (N,A screen modes), BDC foreground and Display error modes.
When the same session is executed in background mode it is not getting processed.
The error is caused while calling screen 2031 which uses a  control. The diagnosis we received is given below
Control Framework: Fatal error - GUI cannot be reached
Message no. DC006
Diagnosis
When the Control Framework is started, the system checks whether the installed GUI supports frontend components such as controls. This check failed; the causes may be as follows:
1.) The program is running in the background
2.) A transaction was called using CALL TRANSACTION ... STARTING IN BACKGROUND TASK.
Procedure
Programs that run in the background cannot address controls on the frontend. In this case, the application must either include a fallback that does not depend on the user interface, or the program or transaction must detect for itself that is running in the background and terminate itself.
Is there any alternate method available for running the session in background with the controls?
Please help us in this regard.
Thanks in advance.
Kathirvel Balakrishnan

Hi Kathirvel!
In description of error: 'In this case, the application must either include a fallback that does not depend on the user interface, or the program or transaction must detect for itself that is running in the background and terminate itself.'
Obviously in material master only second option was implemented - termination.
Alternative: using IDOCs or BAPIs like BAPI_MATERIAL_SAVEDATA, BAPI_MATERIAL_MAINTAINDATA_RT.
Regards,
Christian

Similar Messages

  • Execute in Back ground when push button clicked on alv output

    Hi Friends,
    I have a alv list display report with check boxes and a 'Detail' Push button in output
    when i check the check boxes and click on the 'Detail' Push button detail report is
    displayed using 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'. My requirement is if I click on 'Detail'
    push button the code should also execute in back ground creating the spool. Request you
    to help with sample code. I tried with below but not working.
    WHEN 'DETAIL'.
          call function 'START_OF_BACKGROUNDTASK'
          exporting
           startdate = sy-datum
           starttime = sy-uzeit
          exceptions
          others    = 1.
          if sy-subrc = 1.
           exit.
          ELSE.
           PERFORM determine_table_from_output CHANGING rs_selfield.
           PERFORM call_alv_detail.
          endif.
         commit work.
    Thanks,
    Neetha.

    You could encapsulate the detail display in a separate report and call it in your 'DETAIL'-section like this:
    DATA: lv_number TYPE tbtcjob-jobcount,
               lv_name   TYPE tbtcjob-jobname,
               ls_rsparams TYPE rsparams,
               lt_rsparams LIKE STANDARD TABLE OF ls_rsparams.
    *           Get free job number
                 CALL FUNCTION 'JOB_OPEN'
                   EXPORTING
                     jobname          = lv_name
                   IMPORTING
                     jobcount         = lv_number
                   EXCEPTIONS
                     cant_create_job  = 1
                     invalid_job_data = 2
                     jobname_missing  = 3
                     OTHERS           = 4.
                 IF sy-subrc = 0.
                   SUBMIT 'ZDISPLAY_DETAIL'
                   VIA JOB lv_name NUMBER lv_number
                   WITH SELECTION-TABLE lt_rsparams
                   AND RETURN.
                   IF sy-subrc = 0.
    *                Submit
                     CALL FUNCTION 'JOB_CLOSE'
                       EXPORTING
                         jobcount             = lv_number
                         jobname              = lv_name
                         strtimmed            = 'X'
                       EXCEPTIONS
                         cant_start_immediate = 1
                         invalid_startdate    = 2
                         jobname_missing      = 3
                         job_close_failed     = 4
                         job_nosteps          = 5
                         job_notex            = 6
                         lock_failed          = 7
                         OTHERS               = 8.
                  ENDIF.
    Regards,
    Ulrich

  • SQL error 3113 occurred when executing EXEC SQL.

    Hi,
    We are facing one typical problem, One background is failing regularly with
    below dump. as we now got all notes giving information, if database  restarted
    taking backup, these type of failures occur, but our database is only down for backup once in a week, but it is failing with frequenly.
    in this two servers are located in different place, in this job tries to connect
    another server to get material statistics.
    It is giving some error message in sm21 with
    SQL error 3113 occurred when executing EXEC SQL.
    work procees in reconnect mode.
    all notes saying these types of dump occur when database restared, but this dump
    even though database is up.
    below is short dump, please can anyone help me from this problem.
    ABAP runtime errors    DBIF_DSQL2_SQL_ERROR
          Occurred on    08.01.2007 at 00:30:28
    >> Short dump has not been completely stored. It is too big.
    SQL error 3113 occurred when executing EXEC SQL.
    What happened?
    The error occurred in the current database connection "AZ1".
    What can you do?
    Note the actions and input that caused the error.
    Inform your SAP system administrator.
    You can print out this message by choosing "Print". Transaction ST22
    allows you to display and manage termination messages, including keeping
    them beyond their normal deletion date.
    Error analysis
    How to correct the error
    Database error text........: "ORA-03113: end-of-file on communication channel#"
    Triggering SQL statement...: "select mara.groes, mara.brgew, mara.ntgew,
    mara.gewei, mara.volum, mara.voleh, mara.mstae, mara.mstde, mara.prdha,
    marc.matnr, marc.werks, marc.mmsta, marc.mmstd from sapr3.mara, sapr3.m
    where sapr3.mara.mandt = sapr3.marc.mandt and sapr3.mara.matnr =
    Internal call code.........: "[DBDS/NEW DSQL]"
    Please check the entries in the system log (Transaction SM21).
    If the error occurred in a non-modified SAP program, you may be
    able to find a solution in the SAP note system.
    If you have access to the note system yourself, use the following
    search criteria:
    "DBIF_DSQL2_SQL_ERROR"
    "ZM2431216 " or "ZM2431216 "
    "EXTRACT_GENERAL_DATA"
    If you cannot solve the problem yourself, please send the
    following documents to SAP:
    1. A hard copy print describing the problem.
      To obtain this, select the "Print" function on the current screen.
    2. A suitable hardcopy prinout of the system log.
      To obtain this, call the system log with Transaction SM21
      and select the "Print" function to print out the relevant
      part.
    3. If the programs are your own programs or modified SAP programs,
      supply the source code.
      To do this, you can either use the "PRINT" command in th
      print the programs using the report RSINCL00.
    4. Details regarding the conditions under which the error o
      or which actions and input led to the error.
    System environment
    SAP Release.............. "46C"
    Application server....... "essceu3"
    Network address.......... "172.19.119.198"
    Operating system......... "AIX"
    Release.................. "5.3"
    Hardware type............ "00C7ADBD4C00"
    Database server.......... "ukblx176"
    Database type............ "ORACLE"
    Database name............ "EU3"
    Database owner........... "SAPR3"
    Character set............ "es_ES.ISO8859-1"
    SAP kernel............... "46D"
    Created on............... "Jul 9 2006 20:26:33"
    Created in............... "AIX 1 5 00447C4A4C00"
    Database version......... "OCI_920__OCI_7_API "
    Patch level.............. "2257"
    Patch text............... " "
    Supported environment....
    Database................. "ORACLE 8.0.5.., ORACLE 8.0.6.., ORACLE
    8.1.6.., ORACLE 8.1.7.., ORACLE 9.2.0.., ORACLE 10.2.0.."
    SAP database version..... "46D"
    Operating system......... "AIX 1 4, AIX 2 4, AIX 3 4, AIX 1 5, AIX 2 5, AIX 3
    5, , System build information:,                                      , LCHN :
    841480"
    User, transaction...
    Client.............. 600
    User................ "MPZMMES"
    Language key........ "S"
    Transaction......... " "
    Program............. "ZM2431216 "
    Screen.............. "SAPMSSY0 1000"
    Screen line......... 6
    Information on where termination occurred
    The termination occurred in the ABAP/4 program "ZM2431216 " in
    "EXTRACT_GENERAL_DATA".
    The main program was "ZM2431216 ".
    The termination occurred in line 980
    of the source code of program "ZM2431216 " (when callin
    The program "ZM2431216 " was started as a background jo
    Source code extract
    009500              mara.ntgew,
    009510              mara.gewei,
    009520              mara.volum,
    009530              mara.voleh,
    009540              mara.mstae,
    009550              mara.mstde,
    009560              mara.prdha,
    009570              marc.matnr,
    009580              marc.werks,
    009590              marc.mmsta,
    009600              marc.mmstd
    009610        into :w_ops-groes,
    009620              :w_ops-brgew,
    009630              :w_ops-ntgew,
    009640              :w_ops-gewei,
    009650              :w_ops-volum,
    009660              :w_ops-voleh,
    009670              :w_ops-mstae,
    009680              :w_ops-mstde,
    009690              :w_ops-prdha,
    009700              :w_ops-matnr,
    009710              :w_ops-werks,
    009720              :w_ops-mmsta,
    009730              :w_ops-mmstd
    009740        from sapr3.mara, sapr3.marc
    009750        where sapr3.mara.mandt = sapr3.marc.mandt
    009760          and sapr3.mara.matnr = sapr3.marc.matnr
    009770          and sapr3.mara.mandt = :p_mandt
    009780          and sapr3.mara.matnr = :w_ebs-matnr
    009790          and sapr3.marc.werks = :p_owerks
        >    ENDEXEC.
    009810  endform.                    " extract_general_data
    009820  *&
    009830  *&      Form  append_i_ops
    009840  *&
    009850  *      Appends W_OPS to I_OPS
    009860  *
    009870  form append_i_ops.
    009880    append w_ops to i_ops.
    009890  endform.                    " append_i_ops
    009900  *&
    009910  *&      Form  extract_material_description
    009920  *&
    009930  *      Extracts a Material Description from the remote database an
    009940  *      modifies the current record in I_OPS.
    009950  *
    009960  *        >P_SPRAS  Language Key
    009970  *
    009980  form extract_material_description using    p_spras.
    009990    EXEC sql performing set_langauge.
    Contents of system fields
    SY field contents..................... SY field contents............
    SY-SUBRC 0                            SY-INDEX 0
    SY-TABIX 1                            SY-DBCNT 1
    SY-FDPOS 18                            SY-LSIND 0
    SY-PAGNO 0                            SY-LINNO 1
    SY-COLNO 1
    Chosen variables
    Name.......................... Contents.1........2........3....+..
    W_EBS-PRAT4
                                  2
                                  0
    W_OPS-GROES
                                  22222222222222222222222222222222
                                  00000000000000000000000000000000
    W_OPS-BRGEW                    #######
                                  0000000
                                  000000C
    W_OPS-NTGEW                    #######
                                  0000000
                                  000000C
    regards,
    krishnaiah.

    Hi,
    This is usually a SERVER SIDE DATABASE PROBLEM or SQLNET LISTENER (server side) PROBLEM.  The client side should initially be ignored and instead the server should be investigated. In rare cases, this can be caused by client
    side memory or other resource problem, or a DLL version mismatch, but this is
    unlikely.
    Enlist the assistance of your DBA.  Then reproduce the ORA-3113 error on your
    client application.  Ask your DBA to look at the database side Alert.log and
    trace files and look for ANY activity.  Any activity that coincides with your
    ORA-3113 will be a clue.
    REgards
    Vinod

  • Error in sxmb_moni when executing

    hi all,
    i get error in sxmb_moni  when executing (monitor for processed xml messages)
    the messages states that "system error occured during persist".how to clear this error message.

    Hi Allen
    Did you configure the right interface mapping in the interface determination? Did you activate your interface mapping? Plz have a look to transaction SXI_CACHE.
    this error is beacuse your mapping progrm might be wrong, just check the interface mapping test with mapping program ( it will be error) and with out mapping program ( no error will be there)
    cross check your mapping program any madt fields are you missing?
    Thanks!

  • Differebce between session and Execute in back ground

    Hi Gurus,
    Can any one explain me what is the Differebce between session and Execute in back ground.
    Thanks in advance!!!!!
    Thanks and Regards,
    Boppana
    Moderator: Please, search before posting and use relevant forums

    Hi, back ground works 'directly on server'. So it needs less resources

  • HTTP Error: 401 unauthorized when executing a costcenter report.

    Hi.
    I get this HTTP error when executing an costcenter report.
    The steps I do is following.
    Call upp the report Y_D02_77000xxx
    Under the "kostenstellen:Selection I Fill in this values.
    Controlling area
    Fiscal Year
    From Period
    To     Period
    Plan version
    and finally i enter the "Cost Center group"
    Then i press "execute" and get the result for differrent Cost Element, i get 2 lines "*Total" and
    "**Over/underabsorption"
    Now i doubleclick Over/underabsorption and select report "Cost Centers: Actual Line Items"
    Now i Should get a new window woth results but instead i get a blank screen with the errormessage:
    "HTTP error: 401 unauthorized"
    This procedure worked fine until a couple of weeks ago.
    Anyone have any ideas about what could be the problem?
    Regards Johan

    You might want to check all of your connections in SM59. When you get the 401 error, this is sometimes due to a connection failure (bad password and so on) in the RFC connections (this can also happen if you are using the Content Manager).
    Hope that helps.
    J. Haynes

  • Execute in back ground!!

    Hi,
    I am executing my program in background and sending mail for the output produced on  the screen ...
    in foreground as well as in case of back ground but in background the excel file is going blank
    any pointers?
    Regards
    Gunjan

    Hi,
    Gothroygh the below link ..
    http://www.sap-img.com/abap/sending-mail-with-attachment-report-in-background.htm
    Regards
    Sudheer

  • Oracle error message 1445 when executing a SAP query

    Hello experts,
    We are running a ECC6.0 DEV and ACC system on an Oracle database (release 10.2.0.2.0).
    When I execute a query in SQ01 on our acceptance system, a database error occurs (ORA-1445). However, when I execute the same query on our DEV system, this error does not occur.
    I managed to find that this error might be due to a bug in Oracle and that this bug occurs when executing a query with many joins (more than 6), which indeed I am doing. What I do not understand is that this query does run on DEV without errors but not on ACC.
    Does anyone have a suggestion?
    Thanks and regards,
    Alfio Esposito

    Check if note "1126517 - ORA-1445 or incorrect values with 10.2" applies and also check if you have the same patches on DEV + PRD installed (using opatch lsinventory)
    Markus

  • Oracle error -6508 returned when executing JSP

    The JSP program executes a stored procedure from a package. I've recompiled the package after some changes. The JSP returns -6508 error when it is executing the procedure. The error is returned only after recompiling the stored package. What could be the problem?

    Hi,
    ORA-6508 error is returned when the stored procedure cannot be found.
    ORA-06508 PL/SQL: could not find program unit being called
    Cause: An attempt was made to call a stored program that could not be found. The program may have been dropped or incompatibly modified, or have compiled with errors.
    Action: Check that all referenced programs, including their package bodies, exist and are compatible.
    Please check the package signature and the specifications.
    Thanks,
    Rashmi.

  • Error SG 105 when executing transaction KKAK

    Hi,
    When executing transaction KKAK (Results Analysis) for month end processing we get the following error for a especific sales order:
    "E SG105 Enter rate CAD/USD rate type P for 01/01/2010 in the system settings"
    My question will be: why is the system asking to enter that rate which we never use. We use rate M but not P. Is that really necessary?
    We are using release 470, level 003, Support Package SAPKH47031.
    Thanks for your help.

    HI,
    in the year-depending parameters of the controlling area version definition, the ex.rate type (P) and the valid-from-date is defined, thats why P is used.
    Best regards, Christian

  • LE-TRM: Error message LTRM023 when executing LROUT

    Dear all,
    When executing the transaction LROUT, I get the error message LTRM023 "Site is not defined". I checked table LROUT and it is actually empty.
    However, I created appropriate settings in maintenance views V_T340DT, V_T347A, V_LLOCT and all other SPRO entries related to my TRM site. Futhermore, I implemented all OSS notes related to LROUT or TRM route.
    Then, I activated debug mode.
    > Issue 1:
    Main program SAPLLTRM
    Source code LLTRMU09
    Function LTRM_LLOCT_READ
    IF    ss_lloct IS INITIAL                        
       OR ss_lloct-locat <> i_locat.                 
      SELECT SINGLE * FROM lloct INTO ss_lloct       
        WHERE locat = i_locat.                       
    The issue is that settings of table LLOCT are not red. I had to manually set i_locat = "site" to process further.
    > Issue 2:
    Main program SAPLLTRS_SERVICES
    Source code LLTRS_SERVICESU08
    Function LTRS_LRSTY_READ
    SELECT * FROM lrsty INTO TABLE it_lrsty
           WHERE locat = i_locat.          
    IF sy-subrc <> 0.                      
      RAISE table_lrsty_not_maintained.    
    ENDIF.                                 
    But sy-subrc = 4..., so system raise error message table_lrsty_not_maintained. However, table LRSTY is maintened.
    Did you already have this issue? How did you solve it?
    In advance, thx a lot for your help.
    PS: I play with ECC 5.0, Release 500, SP SAPKGPAC05. With nearly equivalent settings in ECC 6.0, Release 604, SP SAPK-60402INEADFPS, I don't have any trouble running LROUT...

    Hi,
    Have you found the answer at your problem.
    I know you posted it one year ago but I am in the same case.
    So, if you have found the solution, I would be very pleased if you could help me.
    Edited by: FlorianFFF on Aug 26, 2011 3:03 PM

  • Error ORA-03113 when execute procedure via OEM

    Hi All,
    I got error messages
    ORA-03113: end-of-file on communication channel
    ERROR at line 1:
    ORA-03114: not connected to ORACLE
    when execute procedure via Oracle Enterprise Manager
    Who do you know what 's the problem and how can I resolves ?
    Thanks,
    Mcka

    Solution Description:
    =====================
    The ORA-3113 error is a general error reported by Oracle client tools,
    which signifies that they cannot communicate with the oracle shadow
    process. As it is such a general error more information must be collected
    to help determine what has happened.
    This short article describes what information to collect for an
    ORA-3113 error when the Oracle server is on a Unix platform.
    General Issues:
    ===============
    1) Is it only one tool that encounters the error or
    do you get an ORA-3113 from any tool doing a similar operation?
    If the problem reproduces in SQL*Plus, use this in all tests
    below.
    2) Check if the problem is just restricted to:
    [ ] One particular UNIX user,
    [ ] Any UNIX user
    or [ ] Any UNIX user EXCEPT as the Oracle user.
    3) Check if the problem is just restricted to:
    [ ] One particular ORACLE logon
    or [ ] Any ORACLE logon that has access to the
    relevant tables.
    4) If you have a client-server configuration does this occur from:
    [ ] Any client
    [ ] Just one particular client
    or [ ] Just one group of clients ?
    If so what do these clients have in common ?
    Eg: Software release .
    5) Do you have a second server or database version where the
    same operation works correctly?

  • BDC-Process session in back ground

    HI to all,
    Is there any FM to call session in back ground
    i am using RSBDCSUB apart form this if there is any FM please tell me.
    regarda
    raadha

    Hi,
    Use this sample code
    DATA:    RUNTIME        TYPE I.             "Runtime
    DATA:    GROUP          LIKE APQI-GROUPID,     " Mappenname
             BDCIMMED       LIKE RFIPI-BDCIMMED,   " nur BDC: sof. Abspielen
             BDCSTRTDT      LIKE TBTCJOB-SDLSTRTDT,  "nur BDC: Startdatum
             BDCSTRTTM      LIKE TBTCJOB-SDLSTRTTM.  "nur BDC: Startzeit
    form mappe_abspielen_im_batch.
      GET RUN TIME FIELD RUNTIME.
      JOBNAME    = 'RFEBFD00-FIEB'.
      JOBNAME+14 = RUNTIME.
    eak-point.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                JOBNAME          = JOBNAME
                JOBGROUP         = 'FIEB'
           IMPORTING
                JOBCOUNT         = JOBCOUNT
           EXCEPTIONS
                CANT_CREATE_JOB  = 01
                INVALID_JOB_DATA = 02
                JOBNAME_MISSING  = 03.
      IF SY-SUBRC NE 0.
        MESSAGE E015  RAISING SESSION_NOT_PROCESSABLE.
      ENDIF.
      SUBMIT RSBDCSUB AND RETURN
                      USER SY-UNAME
                      VIA JOB JOBNAME NUMBER JOBCOUNT
                    with mappe    =  group
                      WITH MAPPE    =  BI-NAME
                      WITH VON      =  SY-DATUM
                      WITH BIS      =  SY-DATUM
                      WITH Z_VERARB =  'X'.
        BDCSTRTDT =  SY-DATUM.
        BDCSTRTDT =  SPACE.
        BDCSTRTTM =  SPACE.
        BDCIMMED  =  'X'.
      bdcstrttm =  runtime.
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                JOBNAME              = JOBNAME
                JOBCOUNT             = JOBCOUNT
                STRTIMMED            = BDCIMMED
                SDLSTRTDT            = BDCSTRTDT
                SDLSTRTTM            = BDCSTRTTM
           EXCEPTIONS
                CANT_START_IMMEDIATE = 01
                JOBNAME_MISSING      = 02
                JOB_CLOSE_FAILED     = 03
                JOB_NOSTEPS          = 04
                JOB_NOTEX            = 05
                LOCK_FAILED          = 06.
      IF SY-SUBRC NE 0.
        MESSAGE E015  RAISING SESSION_NOT_PROCESSABLE.
      ENDIF.
      CLEAR  BDCIMMED.
      BDCSTRTDT = SPACE.
      BDCSTRTTM = SPACE.
    Regards
    Krishna

  • Error "Mutating table" when execute a trigger

    Hi all,
    I'm a newbie in oracle. Recently i do some database migration from sql server 2005 to oracle 11g. Some of my table are using trigger which is not running in oracle. It has error "mutating table" when i'm trying to update some table. According to some information i got from the internet this can be solve by creating 1 packages and 3 trigger, but i found this article http://www.oracle.com/technetwork/issue-archive/2008/08-sep/o58asktom-101055.html which confuse me much. It says that the trigger is not allowed to be used for multiple user, meanwhile my application was for multiple user. What should i do then ?
    *sorry for my bad english                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    Sorry for my late reply, below is one of my trigger that causes error. This trigger was automatically created when im doing the migration.
    create or replace
    TRIGGER "DBO_ORACLE_240312".tgrRwyPktUpd
    -- =============================================
    -- Author:          Debora Farah Rasul
    -- Create date: 09.02.2012
    -- Description:     Update Riwayat Pangkat untuk data SKCPNS/SKPNS
    -- =============================================
    AFTER UPDATE
    ON RiwayatPangkat
    FOR EACH ROW
    DECLARE
    v_temp NUMBER(1, 0) := 0;
    BEGIN
    IF NULL/*TODO:TRIGGER_NESTLEVEL()*/ > 2 THEN
    RETURN;
    END IF;
    --SQL Server BEGIN TRANSACTION;
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE ( ( SELECT :NEW.isTrigger
    FROM DUAL ) = -1 );
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    BEGIN
    MERGE INTO SKCPNS
    USING (SELECT :NEW.PegawaiID AS PegawaiID, :NEW.NoNota AS NoNota, :NEW.NoSK AS NoSK, :NEW.TglSK AS TglSK, :NEW.TMTPangkat AS TMTPangkat, :NEW.PangkatID AS PangkatID
    FROM dual) src
    ON (SKCPNS.PegawaiID = src.PegawaiID )
    WHEN MATCHED THEN UPDATE SET NoNota = src.NoNota,
    NoSK = src.NoSK,
    TglSK = src.TglSK,
    TMTCPNS = src.TMTPangkat,
    PangkatID = src.PangkatID;
    END;
    ELSE
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE ( ( SELECT :NEW.isTrigger
    FROM DUAL ) = -2 );
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    BEGIN
    MERGE INTO SKPNS
    USING (SELECT :NEW.PegawaiID AS PegawaiID, :NEW.NoSK AS NoSK, :NEW.TglSK AS TglSK, :NEW.TMTPangkat AS TMTPangkat, :NEW.PangkatID AS PangkatID
    FROM dual) src
    ON ( SKPNS.PegawaiID = src.PegawaiID )
    WHEN MATCHED THEN UPDATE SET NoSK = src.NoSK,
    TglSK = src.TglSK,
    TMTPNS = src.TMTPangkat,
    PangkatID = src.PangkatID;
    END;
    END IF;
    END IF;
    MERGE INTO RiwayatGaji
    USING (SELECT :NEW.PegawaiID AS PegawaiID, :NEW.NoUrut AS NoUrut, :NEW.NoSK AS NoSK, :NEW.TglSK AS TglSK, :NEW.TMTPangkat AS TMTPangkat, :NEW.PejabatPenetap AS PejabatPenetap, :NEW.MasaKerjaTh AS MasaKerjaTh, :NEW.MasaKerjaBl AS MasaKerjaBl, :NEW.PangkatID AS PangkatID, :NEW.JenisKP AS JenisKP
    FROM dual) src
    ON ( RiwayatGaji.PegawaiID = :NEW.PegawaiID
    AND RiwayatGaji.isTrigger = :NEW.NoUrut)
    WHEN MATCHED THEN UPDATE SET NoSK = src.NoSK,
    TglSK = src.TglSK,
    TMTSK = src.TMTPangkat,
    PejabatPenetap = src.PejabatPenetap,
    MasaKerjaTh = src.MasaKerjaTh,
    MasaKerjaBl = src.MasaKerjaBl,
    PangkatID = src.PangkatID,
    JenisKenaikan = src.JenisKP;
    END;
    *Btw thank u for the reply :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error in report when executing pl/sql function body returning sql query.

    Hi,
    I have used the pl/sql function body returning sql query for creating a report. I have created a datepicker(
    P10_TASK_DATE) which can be submitted.The code is as below
    DECLARE
    v_sql varchar2(3000);
    BEGIN
    if :P10_TASK_DATE is not null THEN
    v_sql:='select
          * from tasks';
    return v_sql;
    else
    v_sql:='select * from discovery';
    return v_sql;
    END IF;
    END;if the date field is empty "select * from discovery" is executed and report is getting generated. But when we give a
    date using date picker the page is submitted and i get "report error: ORA-01403: no data found" even
    though the "tasks" table has data in it. Plz help
    Thanks,
    TJ

    hi
    Please try this
    1. Create 2 region
    1st region source=
    select * from tasks'
    go to the tab -> condition =
    item NOT NULL
    EXpression1 =:P10_TASK_DATE
    this will run whenever the item have any date
    2. open your 2 nd region source code= select * from discovery
    put the condition
    item is  NULL
    EXpression1 =:P10_TASK_DATE
    thanks
    Mark Wyatt

Maybe you are looking for