BDC session problem

hi,
i am posting the FB01  orders
my validations are
if z<table>-G/ L account =  flat file (G/L account).
then proccess FB01.
else.
message i000 ' G/l account are not matched'.
proccess FB01.( here bdc need to submitted by "Incorrect" , but it is processed in FB01 ).
can you any one tell,how will incorrect this process the FB01. 
ASAP.
by kumar.

Hi Prathap,
Could you be more specific, I don't undertand what do your problem is.
Regards,
Eric

Similar Messages

  • Problem in bdc session method for tcode FS00

    Hi Experts,
    problem in bdc session method, when i run this program no output is shown.
    Even it is not calling the transaction.
    code as follows.
    *& Report  Z_GL_MASTER
    *& CATEGORY         =  BDC.
    *& DESCRIPTION      =  UPLOADING G/L MASTER RECORDS.
    *& TECHNICAL CONST  =  FRANCIS REDDY.
    *& FUNTIONAL CONST  =  FICO.
    REPORT  Z_GL_MASTER.
    *& Internal  Table
    DATA : BEGIN OF IT_UPLOAD OCCURS 0,
           SAKNR LIKE  GLACCOUNT_SCREEN_KEY-SAKNR,          " ACCOUNT NUMBER.
           BUKRS LIKE  GLACCOUNT_SCREEN_KEY-BUKRS,          " COMPANY CODE.
           KTOKS LIKE GLACCOUNT_SCREEN_COA-KTOKS,           " ACCOUNT GROUP.
           XPLACCT LIKE GLACCOUNT_SCREEN_COA-XPLACCT,       " P&L STATEMEMENT.
           GVTYP LIKE  GLACCOUNT_SCREEN_COA-GVTYP,          " P&L STATEMENT TYPE.
           XBILK LIKE GLACCOUNT_SCREEN_COA-XBILK,           " BALANCE SHEET STATEMENT
           SHORT LIKE GLACCOUNT_SCREEN_COA-TXT20_ML,        " SHORT TEXT.
           LONG LIKE GLACCOUNT_SCREEN_COA-TXT50_ML,         " LONG TEXT.
           WAERS LIKE GLACCOUNT_SCREEN_CCODE-WAERS,         " ACCOUNT CURRENCY.
           XSALH LIKE GLACCOUNT_SCREEN_CCODE-XSALH,         " ONLY BALANCES IN LOCAL CURRENCY.
           MITKZ LIKE GLACCOUNT_SCREEN_CCODE-MITKZ,         " RECONCILATION ACCOUNT FOR ACCOUNT TYPEGLACCOUNT_SCREEN_CCODE-MITKZ
           XOPVW LIKE GLACCOUNT_SCREEN_CCODE-XOPVW,         " OPEN ITEM MANAGEMENT.
           XKRES LIKE GLACCOUNT_SCREEN_CCODE-XKRES,         " LINE ITEM DISPLAY.
           ZUAWA LIKE GLACCOUNT_SCREEN_CCODE-ZUAWA,         " SORT KEY.
           FSTAG LIKE GLACCOUNT_SCREEN_CCODE-FSTAG,         " FIELD STATUS GROUP.
           XGKON LIKE GLACCOUNT_SCREEN_CCODE-XGKON,         " RELAVENT CASH FLOW.
           END OF IT_UPLOAD.
    *& Internal  Table FOR BDC DATA.
    DATA : IT_BDCDATA TYPE  BDCDATA OCCURS 0  WITH HEADER LINE.
    *& DATA DECLARATIONS.
    DATA : V_FILE LIKE RLGRAP-FILENAME.
    *&  SELECTION SCREEN.
    PARAMETER : P_FILE LIKE V_FILE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
         PERFORM GET_FILENAME.
    START-OF-SELECTION.
          PERFORM UPLOAD_DATA.
          PERFORM BDCDATA_OPEN.
          PERFORM BDC_POPULATE.
          PERFORM BDC_CLOSE.
    *&      Form  GET_FILENAME
    form GET_FILENAME .
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         PROGRAM_NAME        = SYST-CPROG
         DYNPRO_NUMBER       = SYST-DYNNR
         FIELD_NAME          = 'P_FILE'
       IMPORTING
         FILE_NAME           = P_FILE.
    endform.                    " GET_FILENAME
    *&      Form  UPLOAD_DATA
    form UPLOAD_DATA .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      =  P_FILE
       FILETYPE                      = 'DAT'
      TABLES
        data_tab                     = IT_UPLOAD.
    endform.                    " UPLOAD_DATA
    *&      Form  BDCDATA_OPEN
       FORM FOR BDC_OPEN_GROUP.
    form BDCDATA_OPEN .
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
       CLIENT                    = SY-MANDT
       GROUP                     = 'GLMASTER'
       HOLDDATE                  = SY-DATUM
       KEEP                      = 'X'
       USER                      = SY-UNAME.
    endform.                    " BDCDATA_OPEN
    *&      Form  BDC_POPULATE
      POPULATING BDC DATA .
    form BDC_POPULATE .
    loop at it_upload.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=ACC_CRE'.
    PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_KEY-SAKNR'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_KEY-SAKNR'    IT_UPLOAD-SAKNR.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_KEY-BUKRS'    IT_UPLOAD-BUKRS.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=2102_GROUP'.
    PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_COA-KTOKS'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-KTOKS'    IT_UPLOAD-KTOKS.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-XPLACCT'  IT_UPLOAD-XPLACCT.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=2102_BS_PL'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-GVTYP'    IT_UPLOAD-GVTYP.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-XBILK'    IT_UPLOAD-XBILK.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_COA-TXT20_ML'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-TXT20_ML' IT_UPLOAD-SHORT.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-TXT50_ML' IT_UPLOAD-LONG.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING  'BDC_OKCODE' '=TAB02'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-WAERS'  IT_UPLOAD-WAERS.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XSALH'  IT_UPLOAD-XSALH.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'  IT_UPLOAD-MITKZ.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'  IT_UPLOAD-XOPVW.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XKRES'  IT_UPLOAD-XKRES.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'  IT_UPLOAD-ZUAWA.
    PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=TAB03'.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-FSTAG' IT_UPLOAD-FSTAG.
    PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XGKON' IT_UPLOAD-XGKON.
    CALL FUNCTION 'BDC_INSERT'
      EXPORTING
        TCODE                  = 'FS00'
       TABLES
         dynprotab              = IT_BDCDATA.
    endloop.
    endform.                    " BDC_POPULATE
    *&      Form  BDC_CLOSE
    FORM FOR CLOSING BDC_GROUP
    form BDC_CLOSE .
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
    endform.                    " BDC_CLOSE
    *&      Form  BDC_SUB1
       FORM FOR BDCDATA.
    form BDC_SUB1   USING  A  B  C.
    CLEAR  IT_BDCDATA.
    IT_BDCDATA-DYNBEGIN = A.
    IT_BDCDATA-PROGRAM =  B.
    IT_BDCDATA-DYNPRO =   C.
    APPEND IT_BDCDATA.
    endform.                    " BDC_SUB1
    *&      Form  BDC_SUB2
          text
    form BDC_SUB2   USING  A  B.
    CLEAR  IT_BDCDATA.
      IT_BDCDATA-FNAM = A.
      IT_BDCDATA-FVAL = B.
      APPEND IT_BDCDATA.
    endform.                    " BDC_SUB2
    Points will be  rewarded.
    Thanks in advance.
    Francis.

    Hi,
    Once the program is executed..It will a BDC session..
    THen you have to use the transaction SM35..To process the BDC session..
    Thanks,
    Naren

  • Session problem in BDC

    Hello Experts,
       I am doing BDC Session but it gives the error ' BDC_OPEN_GROUP ,  Create session ABC . NOT Allowed , as last session is still active '.
      Actually the BDC i m using and upload the data by Call transaction successfully upload the data . But with session i got this error' BDC_OPEN_GROUP ,  Create session ABC . NOT Allowed , as last session is still active '.
    please tell me how to solve this error.
    regards
    kamal

    Yeah , this is my program .
    report ZSESSION111
                 no standard page heading line-size 255.
    data: begin of it_edu occurs 0,
            id like zedudata-subid,
            name like zedudata-name,
          end of it_edu.
    data: bdcdata1 like bdcdata occurs 0 with header line.
          CALL FUNCTION 'UPLOAD'
           EXPORTING
            CODEPAGE                      = ' '
             FILENAME                      = ' '
             FILETYPE                      = 'DAT'
            ITEM                          = ' '
            FILEMASK_MASK                 = ' '
            FILEMASK_TEXT                 = ' '
            FILETYPE_NO_CHANGE            = ' '
            FILEMASK_ALL                  = ' '
            FILETYPE_NO_SHOW              = ' '
            LINE_EXIT                     = ' '
            USER_FORM                     = ' '
            USER_PROG                     = ' '
            SILENT                        = 'S'
          IMPORTING
            FILESIZE                      =
            CANCEL                        =
            ACT_FILENAME                  =
            ACT_FILETYPE                  =
            TABLES
              DATA_TAB                      = it_edu
          EXCEPTIONS
            CONVERSION_ERROR              = 1
            INVALID_TABLE_WIDTH           = 2
            INVALID_TYPE                  = 3
            NO_BATCH                      = 4
            UNKNOWN_ERROR                 = 5
            GUI_REFUSE_FILETRANSFER       = 6
            OTHERS                        = 7
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
            CLIENT                    = SY-MANDT
            DEST                      = FILLER8
             GROUP                     = 'zsession111'
            HOLDDATE                  = FILLER8
             KEEP                      = 'X'
             USER                      = sy-uname
            RECORD                    = FILLER1
            PROG                      = sy-cprog
            DCPFM                     = '%'
            DATFM                     = '%'
          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
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    loop at it_edu.
      refresh bdcdata1.
      perform mapping.
      CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         TCODE                  = 'SE11'
        POST_LOCAL             = NOVBLOCAL
        PRINTING               = NOPRINT
        SIMUBATCH              = ' '
        CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = bdcdata1
      EXCEPTIONS
        INTERNAL_ERROR         = 1
        NOT_OPEN               = 2
        QUEUE_ERROR            = 3
        TCODE_INVALID          = 4
        PRINTING_INVALID       = 5
        POSTING_INVALID        = 6
        OTHERS                 = 7
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      endloop.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
      EXCEPTIONS
        NOT_OPEN          = 1
        QUEUE_ERROR       = 2
        OTHERS            = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    include bdcrecx1.
    start-of-selection.
    form mapping.
      perform open_group.
    perform bdc_dynpro      using 'SAPMSRD0' '0102'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSRD1-TBMA_VAL'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=EDIT'.
    perform bdc_field       using 'RSRD1-TBMA'
                                  'X'.
    perform bdc_field       using 'RSRD1-TBMA_VAL'
                                  'ZEDUDATA'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'DD02D-TABCLTEXT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WB_DISP_EDIT_TOGGLE'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'DD02D-TABCLTEXT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WB_DISP_EDIT_TOGGLE'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'DD02D-DDTEXT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TDED'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'educational data'.
    loop at it_edu.
    perform bdc_dynpro      using '/1BCDWB/DBZEDUDATA' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ZEDUDATA-NAME'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'ZEDUDATA-SUBID'
                                  it_edu-id.
    perform bdc_field       using 'ZEDUDATA-NAME'
                                  it_edu-name.
    endloop.
    perform bdc_dynpro      using '/1BCDWB/DBZEDUDATA' '0101'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ZEDUDATA-SUBID'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'DD02D-DDTEXT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WB_BACK'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'educational data'.
    perform bdc_dynpro      using 'SAPMSRD0' '0102'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSRD1-TBMA_VAL'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'RSRD1-TBMA'
                                  'X'.
    perform bdc_field       using 'RSRD1-TBMA_VAL'
                                  'ZEDUDATA'.
    perform bdc_transaction using 'SE11'.
    perform close_group.
    endform.

  • Bdc transaction problem

    hi,
    i am create a programm for f-27 type DG by bdc session method
    when i execute it on 3rd screen of execution it ask for the values for PAYMENT TERMS but in manual entry OF F-27 it does not TAKE ANY PAYMENT TERMS. plz check my code and tell me where is the problem in coding.
    CODES:
    REPORT zcrdtdgupld
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    *INCLUDE zdata_declarations.
              I N T E R N A L  T A B L E                           *
    DATA: BEGIN OF wa_data,
           bldat     TYPE  BDC_FVAL, "Document Date10
           blart     TYPE  BDC_FVAL, "Document Type
           bukrs     TYPE  BDC_FVAL, "Company Code
           budat     TYPE  BDC_FVAL, "Posting Date10
           monat     TYPE  BDC_FVAL, "Period
           waers     TYPE  BDC_FVAL, "Currency
           xblnr     TYPE  BDC_FVAL, "Reference Field
           docid     TYPE  BDC_FVAL, "Document ID
           newbs     TYPE  BDC_FVAL, "Posting  Key
           newko     TYPE  BDC_FVAL, "Account Code
           wrbtr     TYPE  BDC_FVAL, "Amount in Documentcurrency
           zfbdt     TYPE  BDC_FVAL, "Baseline Date10
           newbs2    TYPE  BDC_FVAL, "Account Key2
           newko2    TYPE  BDC_FVAL, "Account code2
           wrbtr2    TYPE  BDC_FVAL, "bseg-wrbtr,"Amount2
           kostl     TYPE  BDC_FVAL, " cost center
           prctr     TYPE  BDC_FVAL, " profit center
           END OF wa_data.
                          D A T A                                     *
    DATA: it_data    LIKE TABLE OF wa_data.
    DATA: it_bdcdata TYPE TABLE OF bdcdata.
    DATA: wa_bdcdata LIKE LINE OF it_bdcdata.
    DATA: v_file     TYPE string.
                 S E L E C T I O N  S C R E E N                       *
    SELECTION-SCREEN BEGIN OF BLOCK b.
    PARAMETERS : pa_file LIKE fc03tab-pl00_file OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b.
                    AT SELECTION-SCREEN                               *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_file.
      PERFORM get_file USING pa_file.
               S T A R T  O F  S E L E C T I O N                      *
    START-OF-SELECTION.
      v_file = pa_file.
    *uploading flat file into internal table
      PERFORM upload_file USING v_file CHANGING it_data.
    *open the session
      PERFORM open_session.
    *POPULATING THE BDCDATA
      LOOP AT it_data INTO wa_data.
        REFRESH it_bdcdata.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0100' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_field       USING 'BKPF-BLDAT'  wa_data-bldat.
        PERFORM bdc_field       USING 'BKPF-BLART'  wa_data-blart.
        PERFORM bdc_field       USING 'BKPF-BUKRS'  wa_data-bukrs.
        PERFORM bdc_field       USING 'BKPF-BUDAT'  wa_data-budat.
        PERFORM bdc_field       USING 'BKPF-MONAT'  wa_data-monat.
        PERFORM bdc_field       USING 'BKPF-WAERS'  wa_data-waers.
        PERFORM bdc_field       USING 'BKPF-XBLNR'  wa_data-xblnr.
        PERFORM bdc_field       USING 'FS006-DOCID' wa_data-docid.
        PERFORM bdc_field       USING 'RF05A-NEWBS' wa_data-newbs.
        PERFORM bdc_field       USING 'RF05A-NEWKO' wa_data-newko.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0301' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'BSEG-WRBTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'  wa_data-wrbtr.
        PERFORM bdc_field       USING 'BSEG-ZFBDT'  wa_data-zfbdt.
        PERFORM bdc_field       USING 'RF05A-NEWBS' wa_data-newbs2.
        PERFORM bdc_field       USING 'RF05A-NEWKO' wa_data-newko2.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'BSEG-WRBTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '=BU'.
        PERFORM bdc_field       USING 'BSEG-WRBTR' wa_data-wrbtr2.
        PERFORM bdc_dynpro      USING 'SAPLKACB' '0002' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'COBL-PRCTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '=ENTE'.
       PERFORM bdc_field       USING 'COBL-KOSTL' wa_data-kostl. "'101902'
        PERFORM bdc_field       USING 'COBL-PRCTR' wa_data-prctr.
        PERFORM bdc_insert USING 'F-27' it_bdcdata.
      ENDLOOP.
    *close the session
      PERFORM close_session.
    *&      Form  get_file
          text
         -->P_PA_FILE  text
    FORM get_file  USING    p_pa_file.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          program_name = syst-repid
          field_name   = 'PA_FILE'
        CHANGING
          file_name    = pa_file.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " get_file
    *&      Form  upload_file
          text
         -->P_V_FILE  text
         <--P_IT_DATA  text
    FORM upload_file  USING    p_v_file
                      CHANGING p_it_data LIKE it_data.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = p_v_file
       filetype                      = 'DAT'
        has_field_separator           = '#'
        TABLES
          data_tab                      = p_it_data.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " upload_file
    *&      Form  open_session
          text
    -->  p1        text
    <--  p2        text
    FORM open_session .
      CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
         client                    = sy-mandt
      DEST                      = FILLER8
         group                     = 'JAYANT'
      HOLDDATE                  = FILLER8
         keep                      = 'X'
         user                      = sy-uname.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " open_session
    *&      Form  bdc_dynpro
          text
         -->P_0043   text
         -->P_0044   text
    FORM bdc_dynpro  USING  program TYPE BDC_PROG
                            dynpro  TYPE BDC_DYNR
                            dynbegin TYPE BDC_START.
      wa_bdcdata-program  = program.
      wa_bdcdata-dynpro   = dynpro.
      wa_bdcdata-dynbegin = dynbegin.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
          text
         -->P_0048   text
         -->P_0049   text
    FORM bdc_field  USING  fnam TYPE FNAM_____4
                           fval TYPE BDC_FVAL.
      wa_bdcdata-fnam = fnam.
      wa_bdcdata-fval = fval.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
    ENDFORM.                    " bdc_field
    *&      Form  bdc_insert
          text
         -->P_0183   text
         -->P_IT_BDCDATA  text
    FORM bdc_insert  USING    p_tcode TYPE sytcode
                              p_it_bdcdata LIKE it_bdcdata.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          tcode     = p_tcode
        TABLES
          dynprotab = p_it_bdcdata.
    ENDFORM.                    " bdc_insert
    *&      Form  close_session
          text
    -->  p1        text
    <--  p2        text
    FORM close_session .
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
    ENDFORM.                    "close_session
    plz help me in this programm
    thanks
    jayant.

    why not post this in the ABAP forum?
    You expect Basis people to help you on this one?

  • 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

  • Program To Update BDC Session Status in SM35

    Existing Process : Currently we create orders using a function module which internally uses BDC Session method for transaction VA01. If the session ran successfully then we check the status and use SAVE_TEXT to upload the long text for the order. But in some cases the order fails. Then the session will be errored out in SM35 and user runs the session manually and fixes the problem and post order. So the text cannot be uploaded now as the user ran the session manually. So I wrote a Z program to run the session using program RSBDCCTU which the runs the session in forground and get the text from memory which I exported to memory while initial transaction and upload it using SAVE_TEXT after the session ran successfully. This program works fine.
    Problem : After running my Z program the order is posted and text is uploaded but the session is still in error status in SM35. The standard program RSBDCCTU just runs the session in foreground but does not update the status.
    Is there any other way we can do this or any other standard programs available to update the status of the session.
    Any help will be appreciated.

    How are you importing text in the z program, which is exported in the function module? they are totally unrelated internal sessions.
    You can as well import text and use SAVE_TEXT using user exit USEREXIT_SAVE_DOCUMENT_PREPARE in include MV45AFZZ after executing the error session in SM35, you don't need a Z program.
    Use condition SY-BINPT = 'X' and  T180-TRTYP = 'H' in the user exit to process SAVE_TEXT.
    Regards
    Sridhar

  • VA01 BDC Session - Purchase requisition wiew not shown

    Hello Forum,
    I've a problem with a BDC session in ECC 6.0 about VA01. When I try to change the purchasing requisition data from the shcedule tab using the button identified from the BDC with the code "EIBB"  (the last one) the subsequent screen is not shown from the system. If I try to create manually a new sales order I'm able to view the screen.
    I tried to remake the recording in 4.6C and the screen is shown correctly.
    I'm in a mock conversion and in UAT but I wasn't able to find the problem.
    Can you suggest something << Moderator message - Everyone's problem is important >>?
    Many Thanks.
    Regards.
    Edited by: Rob Burbank on Oct 19, 2010 3:20 PM

    Thanks Anyway, but with an additional search I've found the solution Here.
    Batch input VA01 problem

  • 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

  • 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

  • Mass reversal of GL docs created by BDC session

    I need to mass reverse GL documents posted in BDC session. I tried to record a BDC for F.80 but there is a problem with dynamic selections (the session name I want to reverse is in dynamic selections). The screen fields in dynamic selections have dynamic names (e.g. %%DYN001) and filling them from BDC does not work. If I replay the record created by SDHC I get the error than the field does not exist on the main program selection screen. How can I pass the session name to the BDC?
    Or, is there any alternative (e.g. BAPI/FM for mass reverse that can read the session name too)?
    thanks to all

    Hi Jan,
    I don't know this object type, so maybe there's a BAPI as you suggest.
    If you don't find one, you may pre-fill the LDB selection screen parameters by creating a little custom program, that will call the report behind F-80 using SUBMIT ... WITH FREE-SELECTIONS ... Then you may either create a Z transaction to launch this custom program, or simply use SA38/SE38 if the user is authorized to it in the productive system. Then you'll call this transaction using batch input.
    BR
    Sandra

  • 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

  • BDC  RECORDING PROBLEM

    HI all,
    i am  uploading the customer master data  by using  bdc session method.
    Tcode XD01 contain customizing  tab and subscreen with four Z fields .
    When i am recording Tcode XD01 that tab and subscreen with fields not appearing  how i can write code for that four fields .please give me code sample following are details.
    standard program: sapmf02d.
    subscreen program: ztab_scr(sub screen designed for four fields program name)
    screen number : 5000
    ok _code = ok-code-5000.
    Please give ur suggestions... asap
    thanks&Regards,
    rao.

    Tale a look at OSS note <a href="https://websmp101.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=105244&_NLANG=E">Note 105244 - LSMW 1.0: known problems, tips and tricks</a>
    Extract :
    <i>Situation:
    You added separate fields to table KNA1 and want to fill these fields when you transfer data.
    Tip:
    Make sure that your own fields are also supplemented in the structure BKNA1 and on standard screens. Then these fields are also supplied by the standard batch input program RFBIDE00.</i>
    Regards

  • 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 Sessions says it is locked.....

    Hi All,
    We were running two BDC Sessions at the same time updating the table. Suddenly the SAP got shut down. After few minutes i could see both BDC Sessions are "still under processing" status but the postings got stopped. When i entered SM12 and could see the First BDC session is locked. So both the BDC sessions are still pending. But the next BDC sessions after these two, got processed succesfully. My problem is two BDC sessions half of the postings were done, so couldn't delete the sessions.
    Kindly help me out in this issue.
    Thanks
    Srikanth.

    Hi,
    Check with your Basis, they can help you.
    Rgds,
    Sreeni

  • Retain BDC Session

    Hi,
    The standard SAP functionality (in Oil&Gas-SAPLOIAI) is creating a session with Deletion indicator.
    The standard SAP functionality is not using KEEP parameter (BDC_OPEN_GROUP)
    Once the session is processed, it is getting deleted.
    We want to retain the session, even after processing the session.
    All our bdc sessions start with NET*
    Is there a program that we can run that will modify the delete indicator to 'KEEP'.
    SAP an option to modify the delete indicator manually. But many sessions will be created each day and our users don't want to go with this option.
    Can you please suggest if a custom program can be written to modify the delete indicator.
    Thanks in Advance.
    -Vidya

    Hi Anil,
    call tranction may solve your problem in genral to create our own erron log we will use call tranction. i will update you if i got more information.

Maybe you are looking for

  • C5500 - printing from net

    How can I print in black and white only when color is not needed (coupons etc.)? Thanks

  • Am I supposed to be excited?

    Am I supposed to be excited by the 2014 release? Did I do something wrong. Very little of what took me two years to setup in premire and photoshop gone using this version. everything is start from scratch. who idea was that GRRRRR. Or, am I missing s

  • Trigger idoc for returns document using transaction O3O_RT01, O3O_RT02.

    Hi All, There is an requirement to trigger an IDOC with the details of returns documents. I am building a custom IDOC for this purpose. But the problem is i need to trigger the IDOC when i click on 'RETURN' button in the transactions O3O_RT01, O3O_RT

  • Brush size won't change with bracket keys?

    Hey - I'm having an issue with Photoshop CC that I haven't encountered with previous versions of Photoshop (I've searched for solutions first - no luck). My shortcut keys for Brush size '[ & ]' stop working after choosing a different brush (even the

  • Best Autorun software for making digital portfolio?

    Best Autorun software for making digital portfolio?