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

Similar Messages

  • 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

  • ZXPADU02 - How To Stop It From Being Triggered in  a BDC Session

    I have an edit in ZXPADU02 that says if you are trying to change IT0167 you will get a POPUP Message telling you we don't want you doing that.   My problem is that I am using PA30 in a BDC session in another program to update IT167 and it is causing the User Exit to trigger the message, which gets an error because it can't display the POPUP.  Is there some way I can have this message NOT be triggered when I use PA30 in a BDC?

    Hi,
    You can one thing. When you are calling PA30 through BDC then you can populate some custom table with some value and in the exit check whether the custom table contains that value. If it contains then you can skip it. Other wise you can put keep some field vale in memory and then read the value from memory in the user exit.  Based on that you can modify your code.
    Thanks & Regards,
    Sandip

  • Regarding BDC session to run immediately after creation

    Hi Abapers,
    Please help me out from the following situation.
    I need to run the BDC session immediately after creating. I beleive using RSBDCSUB we can achieve it.
    If it so please let me know how can we use this.....
    Please let me know if any other solutions.
    Thanx in advance.
    will reward with points for the usefull answers.

    Hi Sir ,
    Please have a look below .Hope it is suitable and simpler solution for your question.
    Please do reward if useful.
    Thankx.
    If user want BDC in foreground use a CALL TRANSACTION and don't create a BDC butt fill a BDCDATA structure table and then
    codeCALL TRANSACTION 'transaction' USING itab[/code]
    You can specify the way to process in OPTIONS and MODE parameters.
    Look at
    Using CALL TRANSACTION USING for Data Transfer
    something like
    if foreground is initial.
    BDC_OPEN_GROUP
    endif.
    fill bdcdata
    if foreground is initial.
    BDC_INSERT
    BDC_CLOSE_GROUP
    SUBMIT RSBDCSUB WITH MAPPE = group_name
    else.
    CALL transaction USING data MODE mode.
    endif.
    CODE  --->
    code
    DATA : w_nom TYPE apq_grpn ,
    w_kbetr(16) ,
    w_datab(10) ,
    w_datbi(10) ,
    w_kpein(5) ,
    w_kmein(3) .
    CHECK is_data-flag EQ 'A' OR
    is_data-flag EQ 'B' OR
    is_data-flag EQ 'C'.
    REFRESH itg_bdcdata.
    Batch-input name.
    CONCATENATE 'Hauss_'
    sy-uzeit
    is_data-knumh+4(6)
    INTO w_nom.
    Open Batch-input.
    PERFORM p_open_bdc USING w_nom.
    Choix type cond.
    PERFORM p_bdc_dynpro USING 'SAPMV13A'
    '0100'.
    PERFORM p_bdc_field USING 'BDC_OKCODE'
    '=ANTA'.
    PERFORM p_bdc_field USING 'RV13A-KSCHL'
    gw_kschl.
    Choix de la clef.
    PERFORM p_bdc_dynpro USING 'SAPLV14A'
    '0100'.
    PERFORM p_bdc_field USING 'BDC_OKCODE'
    '=WEIT'.
    PERFORM p_bdc_field USING 'RV130-SELKZ(01)'
    'X'.
    Enregistre la nouvelle condition.
    PERFORM p_bdc_dynpro USING 'SAPMV13A'
    '1510'.
    PERFORM p_bdc_field USING 'BDC_OKCODE'
    '=SICH'.
    PERFORM p_bdc_field USING 'KOMG-VKORG'
    is_data-vkorg.
    PERFORM p_bdc_field USING 'KOMG-VTWEG'
    is_data-vtweg.
    PERFORM p_bdc_field USING 'KOMG-KUNNR'
    is_data-kunnr.
    PERFORM p_bdc_field USING 'KOMG-MATNR'
    is_data-matnr.
    PERFORM p_bdc_field USING 'KOMG-WERKS'
    is_data-werks.
    PERFORM p_bdc_field USING 'KOMG-AUART_SD'
    is_data-auart_sd.
    PERFORM p_bdc_field USING 'KOMG-INCO1(01)'
    is_data-inco1.
    WRITE is_data-kbetr2 TO w_kbetr.
    PERFORM p_bdc_field USING 'KONP-KBETR(01)'
    w_kbetr.
    WRITE is_data-kpein TO w_kpein.
    PERFORM p_bdc_field USING 'KONP-KPEIN(01)'
    w_kpein.
    WRITE is_data-kmein TO w_kmein.
    PERFORM p_bdc_field USING 'KONP-KMEIN(01)'
    w_kmein.
    WRITE is_data-datab TO w_datab.
    PERFORM p_bdc_field USING 'RV13A-DATAB(01)'
    w_datab.
    WRITE is_data-datbi TO w_datbi.
    PERFORM p_bdc_field USING 'RV13A-DATBI(01)'
    w_datbi.
    Save the transaction.
    PERFORM p_insert_bdc USING 'VK11'.
    Close the Batch-input..
    PERFORM p_close_bdc.
    COMMIT WORK AND WAIT.
    SUBMIT rsbdcsub WITH mappe = w_nom
    WITH von = sy-datum
    WITH bis = sy-datum
    EXPORTING LIST TO MEMORY
    AND RETURN.[/code]

  • How to create bdc for fbs1 using both call transaction and session

    Hi Friends,
    i have one problem with tcode FBS1, i need to create a bdc program for both call transaction and session method using subroutine.
    first call transaction needs to execute if there is an error sesion has to execute. if u have code please forward.
    thanks in advance.
    chandramouli pothugunta

    where as in call transaction we can do error handling explictly.those errors  are stored in one file .this file will send to the error log(session method),i.e session log.
    in the above case we use both call transaction n session method at time in one program.sample code is below ,go through it .
    data : begin of itxk01 occurs 0,
    end of itxk01.
    data : bdcdata like itbdcdata occurs 0 with header line.
    data : itbdcmsgcoll like itbdcmsgcoll occurs 0 with header line,
             itxk01 like itxk01-dup occurs 0 with header line.
    call gui-upload.
    loop at itxk01.
    refresh itxk01.
    perform bdc-dynpr0 using 'prg' 'scr'
    perform bdc-dynfld using fnam fval
    call transaction 'xk01' using bdcdata mode 'a' update 's' messages into itbdcmsgcoll.
    if sy-subrc ne 0.
    append itxk01 into  itxk01-dup.
    endif.
    endloop.
    if not itxk01-dup[] is initial.
    refresh itck01.
    call bdc_open_group
    itxk01 = itxk01-dup.
    loop at itxk01.
    refresh itxk01.
    perform bdc-dynpr0 using 'prg' 'scr'
    perform bdc-dynfld using fnam fval
    call bdc-insert.
    endloop.
    call bdc-close-group.
    form bdc-dynpr0 using pr sc
    endform .
    form bdc-field  using fnam faval
    endform.
    this will help u.
    reward points for me
    kiran

  • Creation of Material using BDC Session method & global class

    Hi
    Creation of Material using BDC Session method & global class by using oops.
    can anyone plz help me out

    Hi,
    it looks like it's not possible to call this BAPI wihtout material number. Here is a quote from BAPI documentation.
    When creating material master data, you must transfer the material
    number, the material type, and the industry sector to the method. You
    must also enter a material description and its language.
    Cheers

  • 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

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • How to overcome view changes in bdc session method  using recording ?

    how to overcome view changes in bdc session method  using recording ?
    ex-for mm01 in recording if i selected views basic data1 and basic data2.
    i seheduleded for background for after 3 days .
    if any body changes views by selecting other views also.
    how to overcome this with out programming ?
    is there any settings ?

    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

  • Please Help using BAPI_TRANSACTION_COMMIT in BDC session

    Hi,
      I am using custom transaction to create vendor invoices by using function module BAPI_INCOMINGINVOICE_CREATE and it creates the invoice and go to BAPI_TRANSACTION_COMMIT to commit the database updates. 
    The problem is when i am creating the invoice for multiple PO's using BDC session method this program executes only of one PO's and commits created invoice data and comes out of the program with out continuing to further steps after BAPI_TRANSACTION_COMMIT FM execution. Please advise me how to resolve this.
    Regards,
    Challa

    Hello Challa
    The command
    CALL TRANSACTION USING...
    has to optional addition
    OPTIONS FROM ls_options.
    where ls_options is of type CTU_PARAMS.
    In the documentation of CALL TRANSACTION is says that if RACOMMIT = 'X' then CALL TRANSACTION USING... is not completed by COMMIT.
    I guess the commit work does prematurely finish your BDC session if this option is initial.
    Regards
       Uwe

  • Executing a BDC Session using a Function Module from a Custom Z-Report

    Hello,
              I have a requirement where I need to Create a BDC Session for the given Transaction Code. But instead of executing the Session from SM35 manually, I need to Execute the Session Immediately from my Custom Z-Report itself.
             Is there any Function Module for this Activity? Please let me know.
    Thanks and Regards,
    Venkata Phani Prasad K

    1) fm job_open
    2) submit report
    3) fm job_close
    4) finally select table TBTCO
    example:
    DATA: jobcount_test LIKE tbtcjob-jobcount,
            job_released    LIKE btch0000-char1,
            rcode(2),
            strtimmed LIKE btch0000-char1 VALUE 'X'.
      DATA jobname  LIKE tbtcjob-jobname.
      CONCATENATE  'TEST_' sy-repid '_' sy-datum INTO jobname.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = jobname
           IMPORTING
                jobcount         = jobcount_test
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc NE 0.
        MESSAGE x000(yp) WITH 'JOB-START ' jobname ' failed !!!'.
      ELSE.
    *--Step insert
        SUBMIT rsbdcsub
        USER sy-uname VIA JOB jobname NUMBER jobcount_test
        WITH mappe = map
        WITH von = pdatum
        WITH z_verarb = 'X'
        AND RETURN .
        CALL FUNCTION 'JOB_CLOSE'
             EXPORTING
                  jobcount             = jobcount_test
                  jobname              = jobname
                  strtimmed            = strtimmed
                  targetsystem         = sy-host
             IMPORTING
                  job_was_released     = job_released
             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 > 1.
          MESSAGE x000(yp) WITH 'JOB-CLOSE ' jobname ' failed!!!'.
        ENDIF.
      ENDIF.

  • I am posting data for va01 and va02 using BDC session,what happens if

    Hi,
    I am posting some data for va01 and va02 using BDC session,but what happens  if i try to post same data using call transaction.

    Hi,
    That is just another method. You can post the data using Call Transaction as well.
    Just give it a try and in case you face some problem revert back with your issue.
    We will help you to solve the same.
    Hope this helps!!!
    Regards,
    Lalit

  • 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 ID from RFBIBL01

    Hi Experts,
    I have created a program to post the benefits and the claims in FI using the standard posting program RFBIBL01. The data comes from a file and accordingly gets formatted and the gets posted using the mentioned program.
    My requirement is to get the BDC session id created in the process (i.e. Queue ID). The program RFBIBL01 does not return or export any queue id. Do you guys have any solution to this?? I need to pass this Queue ID to the program RSBDCSUB to get the session processed automatically.

    Hi:
    Below points may be helpful:
    1 when running the program: RFBIBL01, choose the CALLMODE as 'B' - which will create Batch Input session.
    2 Possibly the name of the session is the program name itself or the one mentioned for the field 'GROUP', in the structure: BGR00. This session name you can check in Tcode: sm35 and also the queue ID.
    3 You can directly process the session in tcode: sm35 or you can use the program: RSBDCSUB by specifying the session name, not the Queue ID.
    Thanks,
    Murali.

  • Resubmitting a BDC session in the background

    Hi,
    How to Resubmit a BDC session in the background
    Thanks,

    Hi,
    If you need to submit a BDC session in the background you can use report RSBDCSUB. It takes the bBDC session name as input and will run it through the system again for you in the background.
    reward if helpful...
    Sowjanya.

Maybe you are looking for

  • How can I print only the emailed attachment to my ePrint enabled printer?

    I have ePrint working fine.  I was able to email an attachment to the printer from many miles away.  To prevent wasting paper, I'd like to be able to tell my printer or ePrint Center to just print the attachment, not the email it is attached to. I ha

  • How do I use Display Dialog to get back a date?

    Can anyone tell me how to use Display Dialog to get back a date? I am using the following code that does not work. It does not accept anything.  And I have searched high and low for an answer to my question and found nothing. repeat        display di

  • Upload data from excel to forms 9.0.4 using webutil 1.0.5

    Hi, can anybody provide me the code how to upload the data from excel to forms 9.0.4 using ole2 fuction. From forms to excel it is working fine. Regards

  • Resizing a TIFF File: Overwriting TIFFFields does not have any effect

    Hi, I have some TIFF files that I am receiving through a FAX server. Some of the TIFF files have an image length of *1077 pixels and a DPI of 200x98*. These images open fine in generic viewers like Microsoft Image Viewer and IrfanView and the image s

  • Using dbms_job but it can't start automatically

    I want to use dbms_job for job scheduling in Oracle 8i but got some serious problem. [Question 1] If I execute dbms_job like following, I've error : [Execute] dbms_job.submit(jobno, 'my_proc', sysdate, 'sysdate + 1/86400'); [Error] declare ERROR at l