BDC problem in background?

Hi,
I am running the BDC on t code FB05  and its running fine in foreground mode , but in background it throws the error Screen not Found.
After passig the screen also , then it says that for line item 2 G?l is mandatory. Now how to select the second line item.
I recored the BDc and for that '=PI' ok code is there that slect second line item. but in background its not doning that?

Hi, It its a line control the fill the items as below:
  LOOP AT IT_WBS.
    CLEAR : L_FNAM.
    L_COUNT = L_COUNT + 1.
    PERFORM BDC_DYNPRO USING 'SAPLCJSS' '0901'.
    PERFORM BDC_FIELD  USING 'BDC_OKCODE' '/00'.
    PERFORM BDC_FIELD  USING 'BDC_SUBSCR' 'SAPLCJSS                                0902LISTE'.
    L_CTR = L_CTR + 1.
    CONDENSE L_CTR.
    IF L_CTR < 10.
      CONCATENATE '0' L_CTR INTO L_CTR.
    ENDIF.
    CONCATENATE 'PRPS-FAKKZ(' L_CTR ')' INTO L_FNAM.
Endloop.
For each line item increas the Counter to +1.
Also use p+ code once u fill all the lines in screen to scroll the data into next screen.
PERFORM BDC_FIELD  USING 'BDC_OKCODE'            '=P+'.
Thanks
Piyush

Similar Messages

  • BDC problem with F-30

    Hi All,
    I want to record a BDC for F-30 to clear the deduction line items for a Document. These deduction line items have a "Reason code" with it... When I select a Document Number in F-30, it displays all the line items in a table control.. I need to select and clear only those items with "Reason code" in that...
    How can I select a line item from the table control and clear it based on the reason code in a BDC?
    I have looked at the previous posts... I have seen a solution provided by filling the structure BSELP. How this can be included in the program and how to fill the values... Is there any limit for the values to get it filled?.. Because I could see
    FELDN_1 to FELDN_18 in BSELP structure.....
    BDC problem in F-30
    BSELP-FELDN_1 = "BELNR"
    BSELP-SLVON_1 = "00002222221997003"
    How the rfbibl00 program works?
    Thanks for the help,
    Asha

    Hi,
        Use BAPI_PAYIT_POST_CLEARING
    or  FM POSTING_INTERFACE_CLEARING
    or
    try this code for transaction fb05:
    DATA: BEGIN OF bkey OCCURS   0,
            belnr LIKE bseg-belnr,
            gjahr LIKE bseg-gjahr,
            buzei LIKE bseg-buzei,
          END OF bkey.
    *Dynpro 122 - Header
        PERFORM bdc_dynpro USING 'SAPMF05A' '0122'.
        PERFORM bdc_field USING 'BKPF-BLDAT' agz-datum.
        PERFORM bdc_field USING 'BKPF-BLART' augblart.
        PERFORM bdc_field USING 'BKPF-BUKRS' htab-bukrs.
        PERFORM bdc_field USING 'BKPF-BUDAT' agz-datum.
        PERFORM bdc_field USING 'BKPF-WAERS' t001-waers.
        IF t003-xmref = 'X'.
          IF htab-xblnr <> space.
            PERFORM bdc_field USING 'BKPF-XBLNR' htab-xblnr.
          ELSE.
            PERFORM bdc_field USING 'BKPF-XBLNR' text-aag.
          ENDIF.
        ENDIF.
        UNPACK vorgang TO zeile.
        PERFORM bdc_field_loop USING zeile 'RF05A-XPOS1' 'X'.
        PERFORM bdc_field USING 'BDC_OKCODE'     'SL'.
        LOOP AT itab WHERE marked = 'X'.
    *Dynpro 0710 -
          PERFORM bdc_dynpro USING 'SAPMF05A' '0710'.
          PERFORM bdc_field USING 'RF05A-AGKON' agku-kunnr.
          PERFORM bdc_field USING 'RF05A-AGBUK' agku-bukrs.
          PERFORM bdc_field USING 'BDC_OKCODE'     'SLB'.         "ins
    *Dynpro 0733 - insert fi-document-nr.
          PERFORM bdc_dynpro USING 'SAPMF05A' '0733'.
          CLEAR:   zeile, cnt.
          LOOP AT htab WHERE agzif = agc-nr AND xfeld = 'X'
                        AND bukrs = agku-bukrs AND kunnr = agku-kunnr.
            CLEAR bkey.
            cnt = cnt + 1.
            UNPACK cnt TO zeile.
            PERFORM bdc_field_loop USING zeile 'RF05A-FELDN' 'BELNR'.
            MOVE-CORRESPONDING tab TO bkey.
            PERFORM bdc_field_loop USING zeile 'RF05A-SEL01'  bkey.
          ENDLOOP.
    <b>Reward points</b>
    Regards

  • Problem in Background Job. Job Completed Successfully but data not Posted

    Hi All,
    There is a problem in Background Job in Production server (600).
    The job completed successfully but data not posted.
    The same Job was working perfectly till the starting of the May month.
    but now it is not working and rebate has not been posted.
    Where to check and what to check
    Pls suggest.
    Regards,
    P Kamal

    Hi ,
    Please first check the status of the Job , ifs successfully completed then debug it (tcode JDBG) and 
    check out,  whether the values passed (might be using Import-export ,set-get parameter Ids) to the Job are getting passed properly or not. These values might not be getting passed properly.
    If it has some error in Job Log then let me know the error.
    Regards,
    Uma

  • BDC Problem : Tcode : F-30

    Hi All,
    BDC Problem :
    Iam working with Tcode : F-30.
    Iam able to post the the document in  All (A) screen mode
    But Iam unable to post the  document in  No (N) screen mode
    Please let me know how to solve this issue
    Thanks
    Sunil

    HI,
    R u getting any errors while creating using 'A'.
    If not then use commit work after BDC.
    Thanks

  • How to schedule BDC program in background when we use GUI_UPLOAD

    Hi,
    I need to run the BDC program in the back ground. But my flat file is in presentation server and i am using GUI_UPLOAD F.M to upload data into I.T. How to schedule BDC program in background.
    Will anybody help me in this regards.
    Thanks in advance,
    Mythily

    You will either have to put your data file on the application server or make the directory of the presentation server available as part of the file system so that the background job will have access to it via OPEN DATASET... TRANSFER... CLOSE DATASET.

  • Problem with background formatting in pivot table

    Hello,
    I have a problem with background formatting in pivot table. I can't change background (light blue rectangular in upper left corner). Do you have any idea how to do it?
    Here is the link to the picture of the pivot table:
    http://img163.imageshack.us/img163/110/unledfyq.png
    I would be grateful for any help.
    Regards,

    Hey,
    Check this link once, you will need java script to acheive this:
    http://everythingoracle.com/obieehdom.htm
    scroll down to this topic: Parsing using HTML DOM
    Please award points if helpful.
    Thanks,
    -Amith.

  • After running a BDC program in background, next

    After running a BDC program in background, next
    day morning when you see the results, few records
    are not updated(error records). What will you do
    then?
    plx explain clearly

    In that BDC u have to process like this .
    1.call transaction
    if sy-subrc ne 0.
    get the records.
    endif.
    2.Create a new Session with Failed records , So u can process there after.
    Regards
    Prabhu

  • Re: Problem using Background Images

    Newbie is trying to use a background image inside a table. It seems that if the table size is larger that the original image itself; then the table has a blank space where the image does not show; and if the table is smaller than the image; then the background image has a cropped appearance. What do we have to do to correct this problem?

    Background images do not stretch to fill their container.  At least they don't do this yet (reliably).  That's just the way it is.  Most people will fill the remaining space with a color similar to the overall image color, when the image is too small to fill the background.  When it's too large?  Well, that's just the way it is.

  • While using a BDC in the background for some documents its hanging.

    Hi All,
    I had used BDC call transaction program and i am scheduling the program in the background. Normally it works fine but for some quotes it hangs and takes a long time. So its not going to other quote. Any solution how to kill the hanged quote and goto next one?

    Well, then you need to determine why (for which orders), the process is hanging. Compare with other orders, do a performance check, etc. There is no way for us to determine what the problem in this particular case is. We just don't have enough information to help you out here.

  • Problem in background session processing

    Hi Experts,
    I am performing BDC by batch input session method.
    I acheved BDC by traditional recording method and able to create batch input session in SM35.
    Whenever I process batch input session in FOREGROUND it processes successfully.But whenever I processes it in BACKGROUND it throws an exception
    runtime error.
    This recording is for transaction CK74.this transaction screen contains some table controls.Error is "Control Framework: fatal error: GUI cannot be reached".
    Please let me know if anybody has solution for this.
    Thanks,
    Yogesh.

    Hi yogesh,
        I think u might be using the function module upload or ws_upload to upload the data to the internal table. Try to use GUI_UPLOAD, while processing the session on background.
    I think it will solve ur problem.
    Regards...
    Arun.
    Reward points if useful.

  • VF01 BDC PROBLEM

    Hi.
    I have a BDC code which runs fine using call transaction VF01 and Mode = 'A'.
    But when I run it in Mode = N, its not executed. Invoice is not created.
    Any idea?
    I tried with other options like Update = 'S' and 'A' and 'L'.
    My code is as below ::
    FORM GET_OPENORDERS.
    SELECT VBELN ERDAT VKORG LFART FROM LIKP INTO TABLE ITAB_LIKP WHERE VKORG = '3010'.
      SELECT VBELN XBLNR FROM VBAK INTO TABLE ITAB_VBAK WHERE
      VBELN = '0000000483'.
                                             AUART = 'ZCKD' OR
                                             AUART = 'ZEXS' OR
                                             AUART = 'ZCLM' OR
                                             AUART = 'ZISO' OR
                                             VKORG = '3010' AND
                                             VTWEG = '30'  AND
                                             SPART = '30' AND
                                             ERDAT = SY-DATUM.
        IF NOT ITAB_VBAK[] IS INITIAL.
          SELECT VBELN VBTYP FROM VBUK INTO TABLE ITAB_VBUK FOR ALL ENTRIES IN ITAB_VBAK
                                                            WHERE
                                                            VBELN = ITAB_VBAK-VBELN AND
                                                            LFSTK = 'C' AND    " DELIVERY STATUS : COMPLETED
                                                            LFGSK = 'C' AND    " OVER ALLDELIVERY STATUS : COMPLETED
                                                            FKSAK NE 'C' AND   " BILLING STATUS ORDER : NOT COMPLETED
                                                            VBTYP = 'C'.       " DOC TYPE = ORDERS
        ENDIF.
      ENDFORM.                    " GET_OPENORDERS
    *&      Form  CREATE_INVOICE
          text
    -->  p1        text
    <--  p2        text
    FORM CREATE_INVOICE .
      LOOP AT ITAB_VBUK.
    DO.
       READ DATASET DATASET INTO RECORD.
       IF SY-SUBRC <> 0. EXIT. ENDIF.
        PERFORM BDC_DYNPRO      USING 'SAPMV60A' '0102'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                     '0000000464'.
                                       ITAB_VBUK-VBELN.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'KOMFK-VBELN(01)'
                                      ITAB_VBUK-VBELN.
                                     RECORD-VBELN_01_001.
        PERFORM BDC_DYNPRO      USING 'SAPMV60A' '0104'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'ZESO'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=SICH'.
       PERFORM BDC_TRANSACTION USING 'VF01'.
    ENDDO.
      WAIT UP TO 1 SECONDS.
        CALL TRANSACTION 'VF01' USING BDCDATA MODE 'N'
                                       UPDATE 'S'
                                       MESSAGES INTO MESSTAB.
        COMMIT WORK AND WAIT.
        CLEAR: BDCDATA, MESSTAB.
        REFRESH: BDCDATA, MESSTAB.
      ENDLOOP.
    PERFORM CLOSE_GROUP.
    PERFORM CLOSE_DATASET USING DATASET.
    loop at MESSTAB.
    write : Messtab.
    endloop.
    ENDFORM.                    " CREATE_INVOICE
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> SPACE.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    "BDC_FIELD

    Hi All,
    Thanks for the replies.
    Just adding my comments here.
    We need to do the saperate recording for this problem.
    In SHDB, we have to select "Simulate Background Mode"
    My problem is solved.
    Adding here so that it will appear in teh search results for others....
    May be.. cheers,

  • BDC VA01 in background mode error

    Hi ,
    I am psoting data into VA01 using BDC call transaction in background mode for two cases.
    For one it is running successfully and for the other it is not.
    I have compared the data in the table BDCDATA for both the cases and it is same.
    Then I tried debugging in foreground mode and the same case which was not running earlier is running in foreground mode.
    Please advice what could be the problem?

    >
    ABHI wrote:
    > I am getting the following messages:
    >
    >
    >
    > TCODE     DYNAME     DYNUMB     MSGTYP     MSGID     MSGNR     MSGV1     MSGV2     MSGV3     ENV
    > VA01     SAPMV45A     4001     W     VU     1          Purchase order date          CTU
    > VA01     SAPMV45A     4001     W     V1     221     5/27/2010               CTU
    > VA01     SAPMV45A     103     I     V1     81                    CD
    > VA01     SAPMSSY3     131     S     0     344     SAPMSSY3     131          CTU
    Hello ABHI,
    The problem is because of some breakpoints created by you. So it is entering it to debugger in the background mode which cannot be handled by the BDC. Delete all your breakpoints before testing or open a new logon session to test it in background.
    Hope this solves your problem.
    Regards,
    Karthik D

  • Problems creating background job for program (job open, submit and close)

    Hi gurus,
    im trying to start a background job using the FM BP_START_DATE_EDITOR to show the start date to the job or if it's imediate. this FM it's working fine, after call it im opening a job, submiting it and call the job close FM and the job close FM creates me the job.
    The problem it's when i go to the sm37 to see the job status the job has been canceled, and the job log says that i have to give a start date to the job.
    What i dont understand it's either the job is imediate or i choose a date to start the job always gives me this error...
    Below goes my code,
    any ideas will be rewarded
      CLEAR: stdt_modify_type, stdt_output.
      CALL FUNCTION 'BP_START_DATE_EDITOR'
           EXPORTING
                stdt_dialog                    = 'Y'
                stdt_input                     = stdt_input
                stdt_opcode                    = 14
           IMPORTING
                stdt_modify_type               = stdt_modify_type
                stdt_output                    = stdt_output
           EXCEPTIONS
                fcal_id_not_defined            = 1
                incomplete_last_startdate      = 2
                incomplete_startdate           = 3
                invalid_dialog_type            = 4
                invalid_eventid                = 5
                invalid_opcode                 = 6
                invalid_opmode_name            = 7
                invalid_periodbehaviour        = 8
                invalid_predecessor_jobname    = 9
                last_startdate_in_the_past     = 10
                no_period_data_given           = 11
                no_startdate_given             = 12
                period_and_predjob_no_way      = 13
                period_too_small_for_limit     = 14
                predecessor_jobname_not_unique = 15
                startdate_interval_too_large   = 16
                startdate_in_the_past          = 17
                startdate_is_a_holiday         = 18
                startdate_out_of_fcal_range    = 19
                stdt_before_holiday_in_past    = 20
                unknown_fcal_error_occured     = 21
                no_workday_nr_given            = 22
                invalid_workday_countdir       = 23
                invalid_workday_nr             = 24
                notbefore_stdt_missing         = 25
                workday_starttime_missing      = 26
                no_eventid_given               = 27
                OTHERS                         = 28.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        MOVE 'X' TO gv_flag.
      ENDIF.
      DATA jobname LIKE tbtcjob-jobname.
      DATA jobcount LIKE tbtcjob-jobcount.
      DATA job_release LIKE  btch0000-char1.
      DATA job_imediate TYPE c.
      CLEAR: jobname, jobcount, job_release.
      CONCATENATE 'MAPAEXEC' sy-uname sy-datum
                   INTO jobname SEPARATED BY space.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = jobname
           IMPORTING
                jobcount         = jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc <> 0.
        MESSAGE i003(zmapas).
        EXIT.
      ENDIF.
      SUBMIT z_mapa_execucao_orcamental
             VIA JOB jobname NUMBER jobcount
             WITH ano EQ ano
             WITH so_perio IN so_perio
             WITH so_date IN so_date
             WITH so_org EQ so_org
             WITH so_num IN so_num
             AND RETURN.
      IF stdt_output-startdttyp EQ 'I'.
        CLEAR job_imediate.
        job_imediate = 'X'.
      ENDIF.
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                calendar_id                 = stdt_output-calendarid
                event_id                    = stdt_output-eventid
                event_param                 = stdt_output-eventparm
                event_periodic              = stdt_output-periodic  "?
                jobcount                    = jobcount
                jobname                     = jobname
                laststrtdt                  = stdt_output-laststrtdt
                laststrttm                  = stdt_output-laststrttm
                prddays                     = stdt_output-prddays  "??
                prdhours                    = stdt_output-prdhours  "?
                prdmins                     = stdt_output-prdmins  "??
                prdmonths                   = stdt_output-prdmonths
                prdweeks                    = stdt_output-prdweeks  "?
                predjob_checkstat           = stdt_output-checkstat
                pred_jobcount               = stdt_output-predjobcnt
                pred_jobname                = stdt_output-predjob
                sdlstrtdt                   = stdt_output-sdlstrtdt
                sdlstrttm                   = stdt_output-sdlstrttm
                strtimmed                   = job_imediate
                targetsystem                = stdt_output-instname
                start_on_workday_not_before = stdt_output-notbefore
                start_on_workday_nr         = stdt_output-wdayno
                workday_count_direction     = stdt_output-wdaycdir
           IMPORTING
                job_was_released            = job_release
           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.
      IF sy-subrc <> 0.
        MESSAGE i003(zmapas).
        EXIT.
      ELSE.
        MESSAGE i004(zmapas) WITH jobname.
      ENDIF.
    Thanks in advance,
    Best Regards
    João Martins

    Hello João.
    In debug mode, check the value of variables you passed to parameters sdlstrtdt and sdlstrttm.
    As aditional info, I usually achieve your goal without FM BP_START_DATE_EDITOR.
    Check this code:
    CALL FUNCTION 'JOB_OPEN'
          EXPORTING
               jobname          = w_jobname
          IMPORTING
               jobcount         = w_jobcount
          EXCEPTIONS
               cant_create_job  = 1
               invalid_job_data = 2
               jobname_missing  = 3
               OTHERS           = 4.
    CHECK sy-subrc = 0.
    CLEAR seltab_wa.
    MOVE: t_jobs-param TO seltab_wa-selname,
    t_processar-line+34 TO seltab_wa-low.
    APPEND seltab_wa TO seltab.
    seltab_wa-selname = 'P_LOJA'.
    seltab_wa-low = t_processar-ficheiro+7(4).
    APPEND seltab_wa TO seltab.
    *** Submete o programa para o JOB
    SUBMIT (t_jobs-repid)
      WITH  SELECTION-TABLE seltab
      USER sy-uname
       VIA JOB w_jobname NUMBER w_jobcount
       AND RETURN.
    *** Encerra o JOB
      l_hora = sy-uzeit.
      ADD 60 TO l_hora.
    CALL FUNCTION 'JOB_CLOSE'
       EXPORTING
          jobcount           = w_jobcount
          jobname           = w_jobname
          sdlstrtdt            = sy-datum
          sdlstrttm           = l_hora
          targetserver       = w_servidor
       IMPORTING
          job_was_released     = l_liberado
       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.
    Regards.
    Valter Oliveira.

  • Problem with Background image and JFrame

    Hi there!
    I've the following problem:
    I created a JFrame with an integrated JPanel. In this JFrame I display a background image. Therefore I've used my own contentPane:
    public class MContentPane extends JComponent{
    private Image backgroundImage = null;
    public MContentPane() {
    super();
    * Returns the background image
    * @return Background image
    public Image getBackgroundImage() {
    return backgroundImage;
    * Sets the background image
    * @param backgroundImage Background image
    public void setBackgroundImage(Image backgroundImage) {
    this.backgroundImage = backgroundImage;
    * Overrides the painting to display a background image
    protected void paintComponent(Graphics g) {
    if (isOpaque()) {
    g.setColor(getBackground());
    g.fillRect(0, 0, getWidth(), getHeight());
    if (backgroundImage != null) {
    g.drawImage(backgroundImage,0,0,this);
    super.paintComponent(g);
    Now the background image displays correct. But as soon as I click on some combobox that is placed within the integrated JPanel I see fractals of the opened combobox on the background. When I minimize
    the Frame they disappear. Sometimes though I get also some fractals when resizing the JFrame.
    It seems there is some problem with the redrawing of the background e.g. it doesn't get redrawn as often as it should be!?
    Could anyone give me some hint, on how to achieve a clear background after clicking some combobox?
    Thx in advance

    I still prefer using a border to draw a background image:
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.border.*;
    public class CentredBackgroundBorder implements Border {
        private final BufferedImage image;
        public CentredBackgroundBorder(BufferedImage image) {
            this.image = image;
        public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
            int x0 = x + (width-image.getWidth())/2;
            int y0 = y + (height-image.getHeight())/2;
            g. drawImage(image, x0, y0, null);
        public Insets getBorderInsets(Component c) {
            return new Insets(0,0,0,0);
        public boolean isBorderOpaque() {
            return true;
    }And here is a demo where I load the background image asynchronously, so that I can launch the GUI before the image is done loading. Warning: you may find the image disturbing...
    import java.awt.*;
    import java.io.*;
    import java.net.URL;
    import javax.imageio.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class BackgroundBorderExample {
        public static void main(String[] args) throws IOException {
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame f = new JFrame("BackgroundBorderExample");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JTextArea area = new JTextArea(24,80);
            area.setForeground(Color.WHITE);
            area.setOpaque(false);
            area.read(new FileReader(new File("BackgroundBorderExample.java")), null);
            final JScrollPane sp = new JScrollPane(area);
            sp.setBackground(Color.BLACK);
            sp.getViewport().setOpaque(false);
            f.getContentPane().add(sp);
            f.setSize(600,400);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
            String url = "http://today.java.net/jag/bio/JagHeadshot.jpg";
            final Border bkgrnd = new CentredBackgroundBorder(ImageIO.read(new URL(url)));
            Runnable r = new Runnable() {
                public void run() {
                    sp.setViewportBorder(bkgrnd);
                    sp.repaint();
            SwingUtilities.invokeLater(r);
    }

  • Problems with background job

    Hi,
    I have problems when creating a job that is supposed to be run once in background. I use the common steps as described below. My problem is that the report is executed twice.
    - First it is executed synchronously when the job is created
    - Then it is executed in the normal job step as I want it to do
    I don't want it to be executed the first time because it creates data!!!
    Code:
    CALL FUNCTION 'JOB_OPEN'
         EXPORTING
              jobname  = w_jobid
         IMPORTING
              jobcount = w_jobnr
              sdlstrtdt = sy-datum
              sdlstrttm = sy-uzeit.
    SUBMIT (p_prog)
    WITH p_idocnr = p_idocno
               USER            p_user
               VIA   JOB       w_jobid
                     NUMBER  w_jobnr
                     AND       RETURN.
    CALL FUNCTION 'JOB_CLOSE'
         EXPORTING
              jobcount         = w_jobnr
              jobname          = w_jobid
              strtimmed        = 'X'
         IMPORTING
              job_was_released = w_jobrel.
    Does anyone have a clue of what I should do to prevent this?
    //  Regards  Hans

    Hi again,
    1. U are right.
    2. It will happen if we use SUBMIT.
    3. As per the help documentation,
        it will run the program in separate session,
       ( as soon as submit statement comes)
    4. and run the INITIALIZATION event.
    The VIA JOB addition also loads the program accessed in a separate internal mode when the SUBMIT statement is executed and the system performs all the steps specified before START-OF-SELECTION. This means the events LOAD-OF-PROGRAM and INITIALIZATION are triggered and selection screen processing is performed. If the selection screen is not processed in the background when VIA SELECTION-SCREEN is specified, the user of the calling program can eidit it and schedule the program accessed in the background request using the function Place in Job. If the user cancels selection screen processing, the program is not scheduled in the background job. In both cases, execution of the program executed is completed after selection screen processing and the system returns to the calling program due to the AND RETURN statement.
    regards,
    amit m.

Maybe you are looking for

  • What is new in Enhancement Package 2 and 3

    Hi all, The [ERP Solution Browser|http://solutionbrowser.erp.sap.fmpmedia.com/] is an excellent tool to find out, what's new. However I did not find any means to get a list of new features in ERP 6.0 enhancement packages 2 and 3. Any hint (especially

  • Approve Working Time Error

    Hi We are on EP7 with ECC6.0 as backend. We are trying to use the Approve Working Time iview in MSS but it gives the following error: Critical Error A critical error has occured. Processing of the service had to be terminated. Unsaved data has been l

  • The new ios7 is blocking my call

    Anybody else having issues with your phone blocking calls after first call?

  • Auto-login issues since Restoring to new iPod Touch

    I recently purchased the new iPod Touch 32GB and restored all of my settings from my previous iPod onto this one. My previous Touch was also on 3.0. Since the upgrade I have had constant issues with the auto-login web feature at my local Starbucks. I

  • Add time to a Date field

    Hi, I have a problem where in my Database I have a date & time field. when i query this field in mysql, it looks like this 2009-05-22 11:17:52.000 year 2009 month may date 22nd time 11:17  (52.000 seconds) I want to be able to add an hour to this fie