Hi all   bdc session

hi all expert please
i want to know how to trap error in session method??
enduser do not want to go to sm35 ..
please note:  bdcmsgcoll is for call transaction method only, so pl do not answer releted to call transaction.
is there any way i can trap through coding or using FM or reading table???
thanx
rocky

You see if u are using session method to upload, then u might have to use SM35 to check for errors. but if u are using call transaction, u can do one thing..
BDC_OPEN.
loop.
   perform statments.
   call transaction....
  if sy-subrc NE 0.
      BDC_insert.
  endif.
endloop.
BDC_CLOSE
here u have inserted only  error records into session.
you could get a return parameter from BDC_OPEN which contains the que ID.
use this que ID... and call transaction SM35 by skipping screen or smting like that.
i hope it solves your problem.
C H E E R S

Similar Messages

  • URGENT - HOW TO PROCESS A BDC SESSION (IN BACKGROUND) FROM INSIDE A REPORT

    Hi All,
    I have a requirement wherein I need to create a BDC session for mass update(from file) of one transaction and check if at all that update has taken place and proceed with the same session for another transaction.
    For this I need to know how to process the session in background in a report, so that if the processing is done, the next set of data to update a different transaction can happen.
    All inputs are welcome and highly valuable to me.
    If someone is unable to intrepret this, I'll detail it again.
    Thanks in advance,
    Vaishnavi Varadarajan

    Hi,
    1.Use RSBDCDRU is an exe pg.With this u can download the logs into local file.
    2.It will create the spool request .from there u can download or print.
    OtherWise:
    Use the code from the link below. U need to provide the session queue id as input and it will download the log to an excel file. U can change it to  ur reqmt.
    Re: BDC
    regards
    kiran

  • Is possible to skip first screen in BDC Session

    Hi all,
    Is it possible like  in call transaction method to skip first screen in Batch input session?
    Syntax----
    call transaction MM01 and skip first screen.
    I want same result By using Batch input session.
    Suggess..........
    Thanks
    Sanket sethi

    Actually i am open transaction SE38 and execute an Standard Report.In the selectiion screen I am changing something in layout.
    I recorded it by BDC.
    And use batch input session.
    Now i want to skip the se38 window i want to drop user on the execution of the report.
    I also do it by submit report but i want to know that is there any possibilities to use with BDC session.
    Thanks
    Sanket

  • Creating Sales order texts while using BDC session method is not working

    Hi All,
    I have an existing program which creates sales order using BDC session method.( Actual program uses BAPI to create sales order and in case if any error occurs during creation of sales order BDC session is generated so that user can process it later and i am facing issues in this part of code where it uses BDC)
    I wanted to modify this BDC sesion  to update the sales order text also. I tried recording VA01 for creationg sales order text unfortunatly it is not capturing the data i am entering in the text fields.
    Please suggest if there is any way to create sales order using BDC.
    Regards
    Sheeba

    Hi Madhu,
    '=TP_CREATE' is the OK code i am getting for creating TEXTS. But the text entered are not captured in BDC.
    Part of BDC program generated for cretaing sales order texts.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=%_GC 128 22'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=%_GC 128 22'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    Regards,
    Sheeba

  • Storing of log file in A/P Server while running BDC session in SM35

    Hi All,
    I have issue when running BDC session in SM35.
    The actual issue is
    I need to store of log file generated while running BDC session in <b>SM35</b> in <b>Application/Presentation</b> Server path.
    When ever we run single session the Log file regarding that session we need to store in Application/Presentation Server.
    Can anybody have solution for this issue.
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    Hi
    See the std report RSBDC_ANALYSE, here you can know how to find out the log of B.I..
    You can create a program like that to load the log into file instead of showing it.
    Max

  • How to handle the errors in BDC Session method

    Hi All,
    I am uploading Material Master (MM01) records using BDC Session Method.my problem is when i am running the program, all the error records are going to flat file.how can i correcting the error records and after correction how can i re-process the error records.tell me with example.
    i have around 70,000 records in my flat file.

    Hi,
    I am attaching few threads.Hope these will help you.
    If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
    We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
    and refer the link.
    error correction in bdc session
    regards
    Madhu

  • How to handle screen resolution in bdc session method.

    hi all,
    how to handle screen resolution in bdc session method.

    Hello,
    Why do need that for? Is it to add rows on a table control??
    If it does, add new rows by using the add button instead of adding into the table control directly to each row.
    Bye
    Gabriel.

  • Error in BDC session processing

    hi all,
    I am running the BDC session method. while running the session the interface throws warning message. If it gives more than one warning message in background the session goes into error. is there any way to skip these and still continue the processing of session in background

    Praveen,
    By default all the warnings are suppressed irrespective of the number of warnings.
    You must be encountering a error not a warning
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • 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*******&

  • BDC Session Saves Data Only in Foreground

    I have created a bdc program to create an SM35 session of CA02.  The wierd thing is that the session will run in background with no errors, but the data is not updated.  If I run the session in foreground the data is updated.  Have I overlooked something simple?

    To see what is going on, I commented out the save at the end to force it to error out.  If I run the session in foreground the data is changed.  If I run it in display errors only mode, the data is not changed.  So it seems not to have anything to do with the save at the end.  Perhaps it is now appropriate to post some of the code.
    After the data file is uploaded into the itab and the bdc group has been created, for each routing group I do the following:
      PERFORM dynpro USING:
    * ***   Initial Screen   ***
          'X'   'SAPLCPDI'       '1010',
          ' '   'RC271-PLNNR'    gk_rec-groupnum,
          ' '   'BDC_OKCODE'     '/00',
    * *** Header Overview  ***
          'X'   'SAPLCPDI'       '1200',
          ' '   'BDC_OKCODE'     'MTUE'.     "open material allocation screen
    Then for each material allocation the data file says to delete:
      PERFORM dynpro USING:
    * *** Material Allocation ***
          'X'   'SAPLCZDI'         '1010',
          ' '   'RC27X-ENTRY_ACT'  gv_entry,   "gv_entry holds row number to delete
          ' '   'BDC_OKCODE'       'ENT1',       "position button
          'X'   'SAPLCZDI'         '1010',
          ' '   'BDC_CURSOR'       'MAPL-MATNR(01)',  "place cursor on the line to delete
          ' '   'BDC_OKCODE'       'LOE',                      "delete line
          'X'   'SAPLSPO1'         '0100',
          ' '   'BDC_OKCODE'       'YES'.                      "confirm dialog
    then at the end of the session:
      PERFORM dynpro USING:
            'X'   'SAPLCZDI'       '1010',
            ' '   'BDC_OKCODE'     'BACK', "leave material allocation screen
            'X'   'SAPLCPDI'       '1200',
            ' '   'BDC_OKCODE'     'BU'.  "save
    Then, I insert into the bdc session using tcode ca02.  All this given the following subroutine:
    FORM dynpro USING p_dynbegin TYPE any p_name TYPE any p_value TYPE any.
      CLEAR gk_bdc_tab.
      IF p_dynbegin = 'X'.
        MOVE:  p_name  TO gk_bdc_tab-program,
               p_value TO gk_bdc_tab-dynpro,
               'X'   TO gk_bdc_tab-dynbegin.
      ELSE.
        MOVE:  p_name  TO gk_bdc_tab-fnam,
               p_value TO gk_bdc_tab-fval.
      ENDIF.
      APPEND gk_bdc_tab TO gt_bdc_tab.
    ENDFORM.
    It seems that the cursor isn't specifying the line to delete when run in background.

  • About using rsbdcsub to run BDC session .

    Hi all,
    I use rsbdcsub to run a bdc session ,
    But the job created by the program is always in "ready" status and never run(complete) .
    How can I solve the problem?
    Thanks
    Pole
    Message was edited by: gw gw

    Hi Srinivas,
    Thanks very much.You understood what I meant exectly.
    Because the files provided by the several banks systems are not the same format,so we can not use the report RFEBKA00.And now we are developing the system connecting to the bank system directly,we can get the data from the bank and upload them to the sap system without creating a file.
    So we use the FF67 BDC
    The program like this:
    "it_data" is the internal table containing the data from the bank system.
    "l_mnam1" is the session name created by the program.
    PERFORM fill_bdcdata USING:
                      'SAPMF40K'            '0110'           'X',
                      'FEBMKA-FDIS_SEL'     'X'              ' ',
                      'FEBMKA-VARI_START'   'TKL01'          ' ',
                      'FEBMKA-DEBI_MID'     'D'              ' ',
                      'FEBMKA-KRED_MID'     'K'              ' ',
                      'FEBMKA-WVAR_ART'     '2'              ' ',
                      'FEBMKA-BUCH_VAL'     'X'              ' ',
                      'BDC_OKCODE'          '=ENTE'          ' ',
                      'SAPMF40K'            '0102'           'X',
                      'FEBMKA-BANKL'        t012-bankl       ' ',
                      'FEBMKA-BANKN'        t012k-bankn      ' ',
                      'FEBMKA-WAERS'        'CNY'            ' ',
                      'FEBMKA-AZNUM'        febko-aznum      ' ',
                      'FEBMKA-AZDAT'        l_azdat          ' ',
                      'FEBMKA-SSALD'        l_esbtr          ' ',
                      'FEBMKA-ESALD'        l_ssbtr          ' ',
                      'FEBMKA-BUDTM'        l_BUDTM          ' ',
                      'FEBMKA-MNAM1'        l_mnam1          ' ',
                      'BDC_OKCODE'          '/00'            ' ',
                      'SAPMF40K'            '8000'           'X'.
      SORT it_data BY valut.
      LOOP AT it_data.
        WRITE it_data-kwbtr TO l_kwbtr CURRENCY 'CNY'.
        l_zuonr = it_data-zuonr.
        PERFORM fill_bdcdata USING:
                      'FEBMKA-VGMAN(01)'    it_data-vgman    ' ',
                      'FEBEP-VALUT(01)'     it_data-valut    ' ',
                      'FEBMKA-KWBTR(01)'    l_kwbtr          ' ',
                      'FEBMKK-ZUONR_KF(01)' it_data-zuonr    ' ',
                      'FEBMKK-SGTXT_KF(01)' l_zuonr          ' ',
                      'BDC_OKCODE'          '=ZINS'          ' ',
                      'SAPMF40K'            '8000'           'X'.
        AT LAST.
          PERFORM fill_bdcdata USING:
                      'BDC_OKCODE'          '=SICH'          ' '.
        ENDAT.
      ENDLOOP.
      PERFORM fill_bdcdata USING:
                    'SAPMF40K'            '0102'           'X',
                    'BDC_OKCODE'          '=BUCH'          ' ',
                    'SAPMF40K'            '0102'           'X',
                    'BDC_OKCODE'          '/EENDE'         ' '.
      l_mode = 'N'.
      CALL TRANSACTION 'FF67' USING t_bdcdata MODE l_mode
                              UPDATE 'S'
                              MESSAGES INTO t_msg_tab.
    Thanks again for your help.
    Pole

  • BDC session release

    Hello All,
    I have a question in BDC session method. I am using BDC insert for calling ME11, ME12 and ME15 (create, change and delete) transaction for creating purchase info records. I have a specific situation where I am looping thru an internal table and calling BDC_insert (Create, change or delete) for each record . Finally, after looping all records, submitting 'rsbdcsub' program to release the bdc sessions. Only the first record in the internal table is committed and all others are ignored. Why is this happening? Do I need to explicitly call BDC_release after every insert.
    I cannot release the session until the entire records are successfully inserted. So please suggest some solution for achieving this
    Thanks
    Ricky

    Hi All,
    Here is the code.
        CALL FUNCTION 'BDC_OPEN_GROUP'
          EXPORTING
            client                    = sy-mandt
          DEST                      = FILLER8
            group                     = l_group
          HOLDDATE                  = FILLER8
            keep                      = 'X'
            user                      = sy-uname
          RECORD                    = FILLER1
          PROG                      = SY-CPROG
        IMPORTING
          QID                       =
       EXCEPTIONS
         client_invalid            = 1
         destination_invalid       = 2
         group_invalid             = 3
         group_is_locked           = 4
         holddate_invalid          = 5
         internal_error            = 6
         queue_error               = 7
         running                   = 8
         system_lock_error         = 9
         user_invalid              = 10
         OTHERS                    = 11
    itab is an internal table which contain the input data to be processed.
    wa_tab is a work area.
    Loop at itab into wa_tab.
        if wa_tab-flag = 'A'. "Create info record
    PERFORM bdc_dynpro_start USING 'SAPMM06I' '0100'.
    PERFORM bdc_insert_field.  "This is recording program to create info record 
        call function bdc_insert
          exporting
                tcode = ME11
         tables
              dynprotab = t_bdc_table.
      elseif wa_tab-flag = 'C'. "Change info record
    PERFORM bdc_dynpro_start USING 'SAPMM06I' '0100'.
    PERFORM bdc_insert_field.  "This is recording program to change info record 
          call function bdc_insert
          exporting
                tcode = ME12
         tables
              dynprotab = t_bdc_table.
      else.   "Delete info record
    PERFORM bdc_dynpro_start USING 'SAPMM06I' '0100'.
    PERFORM bdc_insert_field.  "This is recording program to delete info record 
               call function bdc_insert
          exporting
                tcode = ME15
         tables
              dynprotab = t_bdc_table.
    Endloop.
    FORM bdc_insert_field USING f_name f_value.
      IF f_value <> space.
        CLEAR t_bdc_table.
        t_bdc_table-fnam = f_name.
        t_bdc_table-fval = f_value.
        APPEND t_bdc_table.
      ENDIF.
    ENDFORM.                    "bdc_insert_field
    form bdc_dynpro_start  using  p_g_program_1
                                  p_g_screen.
      CLEAR t_bdc_table.
      t_bdc_table-program  = p_g_program_1.
      t_bdc_table-dynpro   = p_g_screen.
      t_bdc_table-dynbegin = 'X'.
      APPEND t_bdc_table.
    endform.                    " bdc_dynpro_start
    Call function bdc_close_group.
        SUBMIT rsbdcsub WITH mappe EQ l_group
                         WITH von EQ sy-datum
                         WITH bis EQ sy-datum
                         WITH fehler EQ '.'
                         EXPORTING LIST TO MEMORY
                         AND RETURN.
    I want to call this submit only once in the program and if all records are successfully processed. Otherwise,  I need to delete the session to give it a roll back.
    Hope it is clear now. Any other approach is also welcomed. Thanks!
    Thanks
    Ricky

  • Bdc session method

    Hi all ,
    where BDC_OK  fields  will store  in which table .
    and also how to reslove the screen resolution  in bdc session method .
    Regards ,
    Kiran .

    hi
    to maintain Screen Resolution just try this
    in the BDC Program source code u will find
    include BDCRECX1 just double click on it,u can see the selection screen of BDC
    and form definitions for Open_Group ,BdcTransaction & CloseGroup,since it is a std include program
    u cannot change it so copy this to a Z include and use that Z include instead of BDCRECX1
    Then go to form BDCTRANSACTION using TCODE
    in that form Declare a workarea(eg: opt) of structure type CTU_PARAMS
    data:   messtab like bdcmsgcoll occurs 0 with header line.
    data : opt type ctu_params.
    pass the values to it
    dismode-> Processing mode (A,E,N,P)
    updmode-> Update mode (L,S,A)
    defsize-> Default Screen Size (X) to maintain Screen Resolution
      opt-dismode = ctumode.
      opt-updmode = cupdate.
      opt-defsize = 'X'.
    if session = 'X'.
        call function 'BDC_INSERT'
         exporting
           tcode                  = tcode
           ctuparams              = 'OPT'
          tables
            dynprotab              = bdcdata.
    else.
        refresh messtab.
        call transaction tcode using bdcdata options from opt messages into messtab.
    endif.
    Regards

  • Problem in BDC Sessions

    Hi SAP Gurus,
    A program creates 4000 sessions with similar name like 'SESSION_NAME' each having 200 records.This BDC updates same Transaction.
    I have a another program with parameter as Session name. With this session name i will get all the QUEUE ID's of 4000 sessions and using this ID i submit RSBDCBTC.
    Now the problem is that all the sessions run at the same time .
    The consequence was that all session ran on errors because they lock each other.
    I have used WAIT UPTO 2 SESONDS..But this doesn't work.
    Please suggest how to overcome this problem.
    Thanks in Advance.
    Regards,
    Dinakaran.R

    Hi Dinakaran
      use:
    SUBMIT rsbdcsub
                      WITH mappe    EQ 'MIG_LISTING'                      " Session Name
                      WITH von      EQ sy-datum                           " Starting Interval date
                      WITH bis      EQ sy-datum                           " Closing Interval Date
                      WITH z_verarb EQ 'X'
                      WITH logall   EQ 'X'                                " Log Info
                      AND RETURN .
    here even though session name is same by mentioning the Starting Interval Date and Closing Interval date, we can process the 2 created pool sessions successfully.
    Feel free to ask any queries regarding this.
    Regards,
    Kumar

  • Can anybody pls tell me  limitations of BDC Session & Call transaction?

    hi, Guys, this is srinivas.
    How can we deside which method is to(BDC session/ Call transaction)
    use to upload data to SAP database?
    Can we run Call Transaction in Background?
    Which is preferable for bulk data? and Why?
    how can we restart Session if any error occurs?
    Thanku?

    Hi,
    Hope it helps this......
    SAP BDC INTERVIEW QUESTIONS  & ANSWERS
    1.       What is full form of BDC Session?
    Batch Data Communication Session.
    2.       What are the steps in a BDC session?
    The first step in a BDC session is to identify the screens of the transaction that the program will process.  Next step is to write a program to build the BDC table that will be used to submit the data to SAP.  The final step is to submit the BDC table to the system in the batch mode or as a single transaction by the CALL TRANSACTION command.
    3.       How do you find the information on the current screen?
    The information on the current screen can be found by SYSTEM à STATUS command from any menu.
    4.       How do you save data in BDC tables?
    The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of ‘/11’.
    5.       What is the last entry in all BDC tables?
    In all BDC tables the last entry is to save the data by using the field name BDC_OKCODE and a field value of ‘/11’.
    6.       What is a multiple line field?
    A multiple line field is a special kind of field which allows the user to enter multiple lines of data into it.
    7.       How do you populate data into a multiple line field?
    To populate data into a multiple line field, an index is added to the field name to indicate which line is to be populated by the BDC session (Line index).
    8.       Write the BDC table structure.
    BDC table structure
    FIELD                     TYPE                            DESCRIPTION
    Program                CHAR (8)                      Program name of transaction.
    DynPro                 CHAR (4)                      Screen number of transaction.
    DynBegin              CHAR (1)                      Indicator for new screen.
    Fnam                    CHAR (35)                     Name of database field from screen.
    Fval                      CHAR (80)                     Value to submit to field.
    9.       Does the CALL TRANSACTION method allow multiple transactions to be processed by SAP?
    No.  The CALL TRANSACTION method allows only a single transaction to be processed by SAP.
    10.    Does the BDC-INSERT function allow multiple transactions to be processed by SAP?
    Yes.
    11.    What is the syntax for ‘CALL TRANSACTION’?
    CALL TRANSACTION trans .
    Three possible entries are there for MODE.
                      A          -           Show all screens.
                      E          -           Show only screens with errors.
                      N          -           Show no screens.
    Regards,
    V.Balaji
    Reward if usefull

Maybe you are looking for

  • Processor max. for K7T Turbo Limited Edition

    What is the max. processor this board will support? I've seen 1800+ posted, but is this correct?

  • How to get comparable Oracle JDBC performance using Java 1.4 vs 1.1.7?

    Our application makes extensive use of JDBC to access an Oracle database. We wrote it a number of years ago using java 1.1.7 and we have been unable to move to new versions of java because of the performance degradation. I traced the problem to JDBC

  • How to open a new SESSION in another SESSION

    Hi! I would like to start a transaction in the current session (session 1); I want to open a new session (session 2), execute some updates, do the COMMIT (without commiting the data of the session 1) and close the session 2. I'm using JSPs and Data W

  • Scroll bar stuck on Thumbnail view

    Whenever I am using the scroll bar to scroll in the thumbnail view ,which is set to large, the scroll bar gets stuck. When I place my mouse on the bar and move it up and down it does not stop and jumps to different places in the thumbnail view - I ca

  • Adobe Files .pdf is not printing in Citrix Session

    We open a .pdf files and tried to print in my citrix session but nothing happens. Not showing the file is printing and no printed pdf in my printer. Adobe Reader - version 9.4.1