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

Similar Messages

  • Session method back ground error

    Hi All,
    I am doing BDC for XK01 transaction it's giving error when we run the session in back ground but the same is running fine in the foreground? is there any parameter we have to pass for bdc session fun module when we run back ground?
    Thanks&Regards
    mahesh

    Hi..,
    <b>If u r populating data from presentation server file,u will get a dump obviously..</b>
    becoz it will not have any contact with presentation server while running in back ground.
    To make it run successfully, First store the file on <b>Application server</b>.. then onli it will work...
    To store a file in application server u need to use OPEN DATASET  and  CLOSE DATA SET....
    reward all helpful answer..
    aruna.

  • 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

  • Back ground job bdc session

    Hai All,
    Can any one tell me how to catch the erros in BDC session method back ground job.
    I need to update Sales orders in BDC session, back ground job.
    Finally at the end I need to generate a report which contains all the succesfull updates & errors.
    I tried this using call transaction with messtab and is working fine.
    Please tell me how to do this in Session method.
    Thanks & Regards,
    Bhaskar.

    Hi Bhaskar,
    In Session method what you need to do is before processing of hte BDC first you need to check all the data. And if any error found then populate it into the internal table. And that internal table you need to display it on the output......
    I think this is the solution but I am not to sure........
    &********Reward Point if helpful*******&

  • ERROR IN BDC SESSION BACK GROUND ( USING PP03 T.CODE)

    Hi Experts,
    When i am executing the session ( pp03 T.Code) ,it is working fine in fore ground as well as in display errors mode. But it is not working in back ground mode.
    it is raising the exception ( cntl-system-error).
    I used flat file which is in the presentation server . I accessed it by gui_upload Function Module.
    <b> I am also getting the error using data sets . After upload the presentation server data into one internal table .I sent it to application server using open data set ( transfer ) , after that i read the application server data using open dataset ( read )
    into another internal table ( i declared with same structure of flat file ) .</b>
    But this time also it is giving same error ( runtime exception).
    Please tell me how can i handle using datasets .  Its Very urgentttttttt
    Please any body help meee ( If any one worked on this (pp03 T.code) ) .
    Send the code  or Inform the full detailsss as soon as possibleeee
    regards ,
    dattu malge.

    Hi,
    Go to the transaction SM35 and select your session and then click the Process Button.
    Here you select the Processing Mode as "Background".
    It is not possible to execute the same session by more than one user at a same time.
    RSBDCSUB is used to automate the processing of Batch input session.
    Cheers,
    Hakim

  • Error in BDC Back Ground Processing

    Dear All,
    I am facing problem on while executing BDC program. First i am executing in Foreground method there it displaying errors occured,
    means it showing full discription or error.
    But when i used Back ground processing its displayig the full error discription like "No posting object defined for 1230/ / / " here i need full error discription.
    please do the need full.
    Regrads,
    Srinivas.

    Hi
    In background processing you cannot see the error message, for that you have to write logic for capturing messages.
    Use 'Format_Message' function module so that you can get the complete message and then you can display that on the screen.
    Hope it helps...

  • BACK GROUND JOB PROCESSING

    I have a report in that 4 BDCs r there. Now the requirement is in the selection screen there shoud b a button(back ground) ...if click job will be created for in SM37. Now how to do it? U can find similer options in standard programs..and where that display comes in spool ...
    PLZ ITS URGENT
    regards
    Message was edited by:
            KaushiK©Datta

    Hi..
    To create a Background Job Dynamically :
    You have to call the FMs.
    CALL FUNCTION 'JOB_OPEN'            "Creates a Job
    SUBMIT RSBDCBTC WITH QID = ....  "For processing a Session
    CALL FUNCTION 'JOB_CLOSE'         "Releases the Job
    reward if Helpful.

  • BDC is not working in back ground

    Hi all,
    I have created bdc for F-51 but it is not working in back ground (mod N)  and it is not showing any error in error tab , but  it is working fine in mod A & E .I tried  with mod P  and using CTU_PARAMS but no use..
    I have tested my recording in SHDB , in SHDB I have assigned session ,
    And I executed that session in SM35  .
    In SM35 I given processing mod foreground and error mod both are working fine but while trying in Background mod it is showing below error
    u201CThe difference is too large for clearingu201D
    How can I resolve this problem?

    Hi Rakhi,
    The error which you are getting u201CThe difference is too large for clearingu201D will come if the DEBIT AMT - CREDIT AMT <> 0. So the document which you are trying to select is either not there on the list or it is not getting selected while running in background. If it is not getting selected them the reason may be of you screen resolution, have you selected Default Size while recording ? and have you passed the same to CTU_PARAMS.
    Thanks & Regards,
    Faheem.

  • Regarding bdc back ground job

    hi,
              i want to run the bdc from the program itself  not using any transaction
              could u plz tell me the syntex clearly with comments.
          very urgent plz.

    Hi,
    The name Batch Input Session itself tells u that a batch session will be craeted and u have to run it manually.
    Automatically it will not get executed.
    Go for ''call  transaction'' to execute it immediately...
    However if u want to use Batchinput session method, then u have to capture teh session name first and then u can run that Session in the back ground by creating the 'Background job' by sm36.
    Cheers,
    Simha.

  • Any restictions on back ground job when submit the session?

    Hello friends
    below is my code part. problem is when i execute this program in back ground the data is not picking from APQI. but in fore ground it is picking . for this SESSION submission in back ground am i missing any thing here. please suggest me , any restiction is their in back ground? if possible please send a sample code to submit SESSION automatically in background.
        SUBMIT rsbdcsub AND RETURN
                        USER sy-uname
                        WITH mappe    =  p_group
                        WITH von      =  sy-datum
                        WITH bis      =  sy-datum
                        WITH z_verarb =  'X' .
          SELECT userid credate groupid qstate FROM apqi
             INTO TABLE it_apqi
             WHERE userid  = sy-uname
             AND   credate = sy-datum
             AND   groupid = p_group
             AND   qstate  = 'E'.              "Only look for 'Error' status
       DESCRIBE TABLE it_apqi[] LINES temp.

    Codes for Submitting the session through RSBDCSUB (via Job)...
    " The function module JOB_OPEN is called to create the job.
        call function 'JOB_OPEN'
             exporting
                  delanfrep        = 'X'  "Delete job after execution
                  jobname        = fv_jobname  "Job name
             importing
                  jobcount         = fv_jobcount  "Internally generated
             exceptions
                  cant_create_job  = 1
                  invalid_job_data = 2
                  jobname_missing  = 3
                  others           = 4.
        if sy-subrc = 0.
          submit rsbdcsub
                 with       mappe = v_filec
                 with            von = sy-datum      "From
                 with            bis = sy-datum      "To
                 with     z_verarb = 'X'
                 with         fehler = ' '
                 with      batchsys = space
                 with         logall = ' '
                 via  job          fv_jobname
                      number       fv_jobcount
                 and return.
          call function 'JOB_CLOSE'
               exporting
                    jobcount             = fv_jobcount
                    jobname              = fv_jobname
                    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.
    Hope this helps!
    Edited by: Vin on Jun 4, 2009 10:58 AM

  • Back ground processes, dialogue processes and Process chains

    Hai all,
               I am going through making process chains and I am struck with one thing:
    "How many background process chains and dialogue processes you have during run time"
    This is the problem. I understood everything else except this.The concept says that I have to know what is the capacity of the system, how many background and dialogue processes it could accomodate, how many are left and how many you can use for your process chain.How do we find out this? and could somebody please explain me or refer to documentation about the Back ground processes, dialogue processes and Process chains.
    Thanks.

    Hi Visu,
      You can see the number of dialog and background processes by using transaction SM51 and then double clicking on the server (we only have one but it may be different for each). Our BASIS folks take care of the number of processes as well. And, for us we have a schedule that changes the number at a certain time of day because you tend to need more dialog during the day but more batch at night.
      The transaction to look at and change the settings is RZ03. Then use the menu path Edit->Operation Modes you can select either Configuration or Timetable here. Both give information in different ways. I tend to double click around to see what it might tell me.
      I hope this helps a bit,
    Diane

  • Back ground processing of the LDAP

    Hi,
    We are on XI3.1, SP2.
    We are using LDAP authentication.
    We wants to know the  back ground processing when a using login to the deski using LDAP authentication.
    Any one please help on this.
    Thanks in advance.
    Thanks & regards,
    Collin Powell.

    When logging with client tools the LDAP logon will be sent from the client, then the username will be authorized by the CMS which will in turn send a number of queries to the LDAP server to verify group membership. The variables include, graphtimeout (set or not) version/patch of BO (this behavior is different in 3.x vs XIR2 and even different in XIR2 SP2 vs SP4.
    If you are not using SSL then all the traffic can be packet scanned using a tool like Micr4osoft netmon or wireshark.
    Regards,
    Tim

  • Does back ground jobs work process go to private mode or not

    Hi Experts,
    Can any one tell me
    Does back ground jobs work process go to private mode or not
    Thanks and Regards
    Dan !!

    Hi Dan,
    I do not think background work processes would go into PRIV mode.
    the orginal information was remove by Admin because provided by Cut and Paste from SAP Online Help.
    you will find it <a href="http://help.sap.com/saphelp_47x200/helpdata/en/7a/caa6f3bfdb11d188b30000e83539c3/frameset.htm">here</a>
    The distribution, participation in distributing or otherwise sending of this material is against the law. The material you are requesting is copyrighted material and available ONLY to customers of SAP. If you need such documents from the SAP Service Marketplace then you must have "S" user ID and login yourself to retrieve this material. If you do not have a "S" user ID then you should contact your own internal company groups responsible and request one or request them to retrieve the document for you.
    By participating and sending such documents you are at risk for legal action and a removal of your account here on SDN and BPX.
    DO NOT send material via email such as this! Further actions will result in officials within your company and your SAP Sales Account being notified and could result in legal action against you as an individual.

  • What is back ground processing

    what is difference between background and fore ground processing of a report. what are the various methods to execute a report in back ground.  and when we need schedule a report in back ground how shall we handle selection screen parameters.
    thanx in advance.

    Hi,
    <u><i>Background Processing</i></u>
    There are two ways for you to handle,
    one manually setting up the job through SM36 which is better and convinient,
    secondly through program using FM's JOB_OPEN, SUBMIT, JOB_CLOSE.
      Find below steps in doing both:
    Procedure 1:
      1. Goto Trans -> SM36
      2. Define a job with the program and variant if any
      3. Click on start condition in application tool bar
      4. In the pop-up window, click on Date/Time
      5. Below you can see a check box "Periodic Job"
      6. Next click on Period Values
      7. Select "Other Period"
      8. Now give '15' for Minutes
      9. Save the job
    In SM37 u can check the status of the jobs that u have assigned to background...
    Here u mention the job name or the report name to check the status of the job...
    After mentioning the job name or program name u just execute it.. ( without any name also u can execute then it gives u all the jobs set by your user name..
    the status colud be released,active,finished etc..
    Procedure 2 via Program:
    Below is a sample code for the same. Note the ZTEMP2 is the program i am scheduling with 15mins frequency.
    DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
          L_RELEASE(1) TYPE c.
       CALL FUNCTION 'JOB_OPEN'
         EXPORTING
           JOBNAME                = 'ZTEMP2'
        IMPORTING
          JOBCOUNT               = P_JOBCNT
        EXCEPTIONS
          CANT_CREATE_JOB        = 1
          INVALID_JOB_DATA       = 2
          JOBNAME_MISSING        = 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.
       SUBMIT ZTEMP2 VIA JOB 'ZTEMP2' NUMBER P_JOBCNT
              TO SAP-SPOOL WITHOUT SPOOL DYNPRO
              WITH DESTINATION = 'HPMISPRT'
              WITH IMMEDIATELY = SPACE
              WITH KEEP_IN_SPOOL = 'X' AND RETURN.
       CALL FUNCTION 'JOB_CLOSE'
         EXPORTING
           JOBCOUNT                          = P_JOBCNT
           JOBNAME                           = 'ZTEMP2'
           STRTIMMED                         = 'X'
           PRDMINS                          = 15
        IMPORTING
          JOB_WAS_RELEASED                  = L_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
          INVALID_TARGET                    = 8
          OTHERS                            = 9.
       IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    Hope the above helps you.
    Regards
    Reshma

  • Regarding back ground processing for excel.

    Hi,
    i want to create the Excel sheet and i want to save in Back ground Processing....
    give me some suggestionss.......................

    This can create any file (spreadsheet/plain text/ dat files). but to add workbooks to the sheet you need to use OLE Object concepts.
    PARAMETERS:    p_terms(256) TYPE c OBLIGATORY,
                p_del(1)     TYPE c OBLIGATORY DEFAULT cl_abap_char_utilities=>horizontal_tab.
    DATA:       lv_str       TYPE string,
          lv_char(256) TYPE c,
          lr_descrref  TYPE REF TO cl_abap_typedescr.
    FIELD-SYMBOLS: <comp> TYPE ANY.
      IF itab IS NOT INITIAL.
        OPEN DATASET p_terms FOR OUTPUT IN LEGACY TEXT MODE .
        IF sy-subrc EQ 0.
          CLEAR : lv_str.
    Header of the file
          CONCATENATE
            'Action'
            'Name'
            'EE User ID'
            'Termination Date'
            'Last Day Worked'
            'End Of Notice'
            'Employee Type'
            'Department'
            'Department_type'
            'Office Location'
            'Manager Name'
            'Has Cellphone'
            'Has Home Office'
            'VP and Above'
           cl_abap_char_utilities=>cr_lf
          INTO lv_str SEPARATED BY p_del.
          LOOP AT itab INTO ls_terms.
            WHILE sy-subrc EQ 0.
              ASSIGN COMPONENT sy-index  OF STRUCTURE ls_terms TO <comp>.
              IF sy-subrc NE 0.
                EXIT.
              ENDIF.
              lr_descrref = cl_abap_typedescr=>describe_by_data( <comp> ).
              IF lr_descrref->type_kind = 'P'.
                WRITE <comp> TO lv_char DECIMALS 2.
              ELSE.
                WRITE <comp> TO lv_char.
              ENDIF.
              SHIFT lv_char LEFT DELETING LEADING space.
              IF sy-index NE 1.
                CONCATENATE lv_str lv_char INTO lv_str SEPARATED BY p_del.
              ELSE.
                CONCATENATE lv_str lv_char INTO lv_str.
              ENDIF.
              CLEAR: lv_char.
            ENDWHILE.
            TRY.
    This statement passes the content of data object to the file specified
                TRANSFER lv_str TO p_terms.
              CATCH cx_sy_file_authority .
                FORMAT COLOR 6 ON.
                WRITE:/ 'No authorization to access the Term file'.
            ENDTRY.
            CLEAR lv_str.
          ENDLOOP.
          CLOSE DATASET p_terms.
        ENDIF.
      ENDIF.

Maybe you are looking for

  • Black ink cartridge does not print

    C4385 will not print from Black ink cartridge - have tried 2 new cartridges ink level is full Any ideas on a cause? and Fic?

  • Safari quits all the time and will not relaunch! Any suggestions?

    I can't Launch safari on my imac!  Every time i try I keep getting this error message.... Can anyone help?

  • HT2506 How to print the cropped version of a pdf

    Hello, I have successfully cropped a document in preview (OS 10.8 ) and it displays perfectly on the screen. My problem is that when I print it, Preview prints the uncropped version, and I can't find a way telling it to do otherwise. I even tried pri

  • PS font in windows 7

    Anybody know anything about: CS3 - on windows 7 (working in XP mode) - Font server: Universal Font. Trouble is that PS font don't work in the Adobe CS 3 all applikations. Any soloution?

  • Saving a CS3 file to edit in Photoshop 6

    I'm working in Photoshop CS3 and sending files to a client who has Photoshop 6. She is able to open - but not edit the files. (On her end, the layers appear as one flattened layer) On my end, Photoshop/Preferences/File Handling/"Maximize PSD Compatib