Rename Batch input session name

I am generating  a BIM after executing the depreciation  run with a name "RAB" instead of "NL2Z".
But i am unable to process the wrong named BIM,
How can i change the Batch input session name to new one.

Hi,
@Andreas 1) Batch Name is an Authorisation Object
You will have to contact your BASIS people to get the authorisation to process the file.
Kind regards

Similar Messages

  • How to see the Batch input session name in SM35 with User name.

    Hi
    Yesterday,User has created one Batch input session from FBWE and selected process button after that display errors only tick mark in SM35. Then the system displayed one error message"No Batch input data for screen SAPMF05A 0700".After that he came out from the screen. He dont know what happened.
    Today we have verified in SM35. But there is no batch input session with his name. We have verified in incorrect screens and every thing in SM35.
    We have verified in Table 'T045DTA'. There are some entries are there.
    We dont know the session name also.
    How we can find the session name created by the User.
    We have not deleted any thing.
    Please help me
    Thanks
    Ravi.

    Hi Ravi,
    Yes, you should be able to create a new batch job for FBWE. You can see your own batch sessions from SYSTEM ==> OWN JOBS
    Regards,
    Mike

  • Regarding document type in  batch input session

    Hi,
        when i run int.cal. (f.16) it is calculating perfect and posting also perfect using TC FB01 when i run batch input session but the deflaut values i.e.. doument type is assigned DA but now the client want to change the document type from DA to DG. How to change the document type in batch input session name RFDZIS00
                          Advance thanks
    Dinesh

    try to change table t033e ANWND = 5 with tcode se11
    A.

  • Batch input session is not generating In BRS

    Hello,
    I am uploading bank statement through ZFF67 program manual bank statement, after entering all the line items in the file, batch input session is not generating in SM35.
    Please give advice.
    Thanks,
    Ratnam

    Hi,
    Go to environment - specification-  here you need to maintain settings for batch input processing in T.code FF67.
    I am not exactly remembering the menu option name. The sub option name is Specification, these settings you need to change with your user id.
    Check and revert back still the same problem exists.
    Regards,
    Sankar

  • BDC programming using Batch input Session.

    Hello Experts.
    I'm an ABAP beginner. I've benn practicing BDC programming using Batch input Session
    at the moment.
    This is the program that upload Local file which has plural records, and put the records into a Session.
    These are the records.
    413459,KIM EI HWAN121                ,19810607,MIADONG1234
    423459,KIM EI HWAN122                ,19810607,MIADONG1235
    433459,KIM EI HWAN123                ,19810607,MIADONG1236
    443459,KIM EI HWAN124                ,19810607,MIADONG1237
    453459,KIM EI HWAN125                ,19810607,MIADONG1238
    463459,KIM EI HWAN126                ,19810607,MIADONG1239
    I succeeded making Session.
    However, for some reaseon, every record in the Session has got the same, value which is the first record.
    Why is this happening? And How can I correct the code below?
    REPORT ZBCUSER002_BATCH NO STANDARD PAGE HEADING
                            LINE-SIZE 255
                            MESSAGE-ID ZBATCH.
    = Types definition ===================================================
    TYPES: BEGIN OF TYP_LOCAL,               "For Local file upload
             RECORD(200) TYPE C,
           END   OF TYP_LOCAL.
    = Internal table definition ==============================================
    DATA: BEGIN OF BDC_TAB OCCURS 0.        "BDCDATA itab
            INCLUDE STRUCTURE BDCDATA.
    DATA: END   OF BDC_TAB.
    DATA: BEGIN OF MESSAGE_BDC OCCURS 0.    "Message itab
            INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END   OF MESSAGE_BDC.
    DATA: TBL_LOCAL TYPE STANDARD TABLE OF TYP_LOCAL,  "Local file itab
          F_TBL     TYPE FILETABLE.                    "FILETABLE fot local
    = Structure table definition =========================================
    DATA: STR_F_TBL LIKE LINE OF F_TBL,                "FILETABLE structure
          STR_LOCAL TYPE TYP_LOCAL.                    "Local file structure
    = Variable definition ================================================
    DATA: LV_RC     TYPE I,                            "Method parameter
          ENUMBER   TYPE ZT601-ENUMBER,                "Employee number
          NAME      TYPE ZT601-NAME,                   "Employee name
          BIRTH     TYPE ZT601-BIRTH,                           "Birthday
          HOMETOWN  TYPE ZT601-HOMETOWN,                        "Hometown
          SYSVAL    TYPE SY-SUBRC.                     "System valuible
    = Constants definition ===============================================
    CONSTANTS: TBL_NAME(10) TYPE C VALUE 'ZT601'.      "Table name ZT601
    = Parameters definition ==============================================
    PARAMETERS: F_NAME      TYPE RLGRAP-FILENAME OBLIGATORY,    "File path
                EXECMODE(1) TYPE C.                    "Execute mode
    INITIALIZATION
    *----- Initialize all valuables, structures and internal tables
    CLEAR: LV_RC,
           STR_F_TBL,
           STR_LOCAL,
           ENUMBER,
           NAME,
           BIRTH,
           HOMETOWN.
    REFRESH: F_TBL,
             TBL_LOCAL.
    AT SELECTION-SCREEN
    *----- When the button next to Parameter 'F_NAME',
    *----- File dialog open.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR F_NAME.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
        EXPORTING
          WINDOW_TITLE            = 'SELECT FILE'
          DEFAULT_FILENAME        = '*.TXT'
       CHANGING
         FILE_TABLE               = F_TBL
         RC                       = LV_RC
        EXCEPTIONS
          FILE_OPEN_DIALOG_FAILED = 1
          CNTL_ERROR              = 2
          OTHERS                  = 3
    *----- system valiable check.
    *----- If done properly,
    *----- Put the path into the File path parameter
      IF SY-SUBRC = 0.
        READ TABLE F_TBL INTO STR_F_TBL INDEX 1.
        F_NAME = STR_F_TBL.
    *----- If not done properly, show message
    *----- An error occured while getting file path then end program
      ELSE.
        MESSAGE E000.
      ENDIF.
    *----- Execute code can only be A or N.
    AT SELECTION-SCREEN ON EXECMODE.
      IF EXECMODE <> 'A' AND EXECMODE <> 'N'.
        MESSAGE E001.
      ENDIF.
    START-OF-SELECTION
    START-OF-SELECTION.
    *----- Upload Local file of file path parameter.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                FILENAME                = F_NAME
                FILETYPE                = 'ASC'
           TABLES
                DATA_TAB                = TBL_LOCAL
           EXCEPTIONS
                FILE_OPEN_ERROR         = 1
                FILE_READ_ERROR         = 2
                NO_BATCH                = 3
                GUI_REFUSE_FILETRANSFER = 4
                INVALID_TYPE            = 5
                OTHERS                  = 6.
    *----- System valiable check.
    *----- If not done properly, show an error message
    *----- An error occured while uploading local file then end program
      IF SY-SUBRC <> 0.
        MESSAGE E002.
      ENDIF.
      PERFORM BDC_OPEN.
    *----- Loop Internal table
      LOOP AT TBL_LOCAL INTO STR_LOCAL.
    *----- Spilt the file record and put them into each valiable.
        SPLIT STR_LOCAL AT ',' INTO  ENUMBER
                                     NAME
                                     BIRTH
                                     HOMETOWN.
    *----- Data check Function module
        CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
             EXPORTING
                  DATE                      = BIRTH
             EXCEPTIONS
                  PLAUSIBILITY_CHECK_FAILED = 1
                  OTHERS                    = 2.
    *----- When error occurs while checking date, show an error message.
    *----- (&1) is not date
        IF SY-SUBRC <> 0.
          MESSAGE E003 WITH BIRTH.
        ENDIF.
    *-- The first screen of SE11
    *----- Screen number 0102 of program id SAPMSRD0
        PERFORM BDC_DYNPRO      USING 'SAPMSRD0' '0102'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RSRD1-TBMA_VAL'. "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=SHOW'.          "Display button
        PERFORM BDC_FIELD       USING 'RSRD1-TBMA'
                                      'X'.
        PERFORM BDC_FIELD       USING 'RSRD1-TBMA_VAL'
                                       TBL_NAME.                "ZT601
    *-- Table definition screen
    *----- Screen number 2000 of program id SAPLSD02
        PERFORM BDC_DYNPRO      USING 'SAPLSD02' '2000'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'DD02D-TABCLTEXT'.  "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=TDED'.            "Create entry
        PERFORM BDC_FIELD       USING 'BDC_SUBSCR'
                                      'SAPLSD02'.
        PERFORM BDC_FIELD       USING 'BDC_SUBSCR'
                                      'SAPLSED5'.
    *-- Data input screen
    *----- Screen number 0101 of program /1BCDWB/DBZT601
        PERFORM BDC_DYNPRO      USING '/1BCDWB/DBZT601' '0101'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'ZT601-CRUSER'.    "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=SAVE'.                  "Save
        PERFORM BDC_FIELD       USING 'ZT601-MANDT'
                                      SY-MANDT.                 "Client
        PERFORM BDC_FIELD       USING 'ZT601-ENUMBER'
                                      ENUMBER.           "Employee number
        PERFORM BDC_FIELD       USING 'ZT601-NAME'
                                      NAME.              "Employee name
        PERFORM BDC_FIELD       USING 'ZT601-BIRTH'
                                      BIRTH.                    "Birthday
        PERFORM BDC_FIELD       USING 'ZT601-HOMETOWN'
                                      HOMETOWN.                 "Hometown
        PERFORM BDC_FIELD       USING 'ZT601-CRDATE'
                                      SY-DATUM.          "System date
        PERFORM BDC_FIELD       USING 'ZT601-CRTIME'
                                      SY-UZEIT.          "System time
        PERFORM BDC_FIELD       USING 'ZT601-CRUSER'
                                      SY-UNAME.          "System user
    *-- Data input screen (After input)
    *----- Screen number 0101 of program /1BCDWB/DBZT601
        PERFORM BDC_DYNPRO      USING '/1BCDWB/DBZT601' '0101'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/EBACK'.                 "Back
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'ZT601-CRUSER'.    "Field on Cursor
    *-- Table definition screen]
    *----- Screen number 2000 of program SAPLSD02
        PERFORM BDC_DYNPRO      USING 'SAPLSD02' '2000'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'DD02D-TABCLTEXT'.  "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=WB_BACK'.               "Back
    *-- The first screen of SE11
    *----- Screen number 0102 of program SAPMSRD0
        PERFORM BDC_DYNPRO      USING 'SAPMSRD0' '0102'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RSRD1-TBMA_VAL'.   "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=BACK'.
        PERFORM BDC_FIELD       USING 'RSRD1-TBMA'
                                      'X'.
        PERFORM BDC_FIELD       USING 'RSRD1-TBMA_VAL'
                                      TBL_NAME.
        PERFORM BDC_INSERT.
      ENDLOOP.
      PERFORM BDC_CLOSE.
          FORM BDC_DYNPRO                                               *
          Put Program-Id, Dynpro screen number, Start point
          into DBCDATA
    -->  PROGRAM                                                       *
    -->  DYNPRO                                                        *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDC_TAB.
      BDC_TAB-PROGRAM  = PROGRAM.
      BDC_TAB-DYNPRO   = DYNPRO.
      BDC_TAB-DYNBEGIN = 'X'.
      APPEND BDC_TAB.
    ENDFORM.
          FORM BDC_FIELD                                                *
          Put Field Name and Value into BDCDATA
    -->  FNAM                                                          *
    -->  FVAL                                                          *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDC_TAB.
      BDC_TAB-FNAM = FNAM.
      BDC_TAB-FVAL = FVAL.
      APPEND BDC_TAB.
    ENDFORM.
          FORM bdc_process                                              *
    FORM BDC_OPEN.
      CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
                CLIENT = SY-MANDT
                GROUP  = 'Testsession'
                KEEP   = 'X'
                USER   = SY-UNAME.
      IF SY-SUBRC <> 0.
        MESSAGE E006 WITH SY-SUBRC.
      ENDIF.
    ENDFORM.
          FORM bdc_insert                                               *
    FORM BDC_INSERT.
      CALL FUNCTION 'BDC_INSERT'
           EXPORTING
                TCODE            = 'SE11'
           TABLES
                DYNPROTAB        = BDC_TAB
           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 E007 WITH SY-SUBRC.
      ENDIF.
      CLEAR: BDC_TAB.
    ENDFORM.
          FORM bdc_close                                                *
    FORM BDC_CLOSE.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                NOT_OPEN    = 1
                QUEUE_ERROR = 2
                OTHERS      = 3.
      IF SY-SUBRC <> 0.
        MESSAGE E008 WITH SY-SUBRC.
      ENDIF.
    ENDFORM.

    God I forgot to refresh Internal table after putting record into Session.
    Now I'm done.
    You guys be careful too.

  • SM35 - manual processing of the batch input session

    Hello,
    In SM35 I see that some batch input sessions were processed by user XXX-XXXX (user type:System) (in our case INT-3528) in N mode. The question is: how to determine the exact user who has really processed that session? We need to stop that - I guess - automatic processing of the sessions and process them manually.
    Thanks for help,
    Slawek

    Hi,
    also, you can check the logs directly in SM35. So if any documents were posted (or anyting updated in the system) information about what happened should be shown there.
    If there were acounting documents (table BKPF), I think the user name will be the same system user "who" has processed the sessions.
    I think that your basis team has set up the system in a way that batch input sessions are processed automatically. This is simialr when scheduled jobs are running under a pseudo user name (system user, IT user, not a real person behind). You can ask the basis team to switch off this automatic processing competely or only for selected sessions.
    Hope that helps, points welcome
    Csaba

  • How to process batch input session through program

    Hi Friends,
    I am getting 5 batch input sessions in SM35,but  I want to process these all sessions through program without going to SM35.
    How it is possible through Program?
    Please Guide me!
    Thanks,
    Yogesh

    Hi,
    It's the report to run the batchinput sessions.
    When you create to B.I. session, you can execute it by transaction SM35 (but it uses rsbdcsub) or rsbdcsub.
    For example you can use it in the same program where you create B.I.:
    Here the code to fill the structures of FI batch input
    standard....
    ...here it creates session...
    SUBMIT RFBIBL00 WITH DS_NAME = VA_FILE
    WITH CALLMODE = CALLMODE AND RETURN.
    ....here it runs session....
    SUBMIT RSBDCSUB WITH MAPPE = P_NAME
    WITH VON = SY-DATUM
    WITH BIS = SY-DATUM
    WITH FEHLER = ' '
    TO SAP-SPOOL
    LIST NAME P_NAME
    LIST DATASET P_NAME
    COVER TEXT P_NAME
    NEW LIST IDENTIFICATION ' '
    EXPORTING LIST TO MEMORY
    AND RETURN.
    regards,
    Shiva.

  • LSMW - Error in Inventory - Create batch input session

    Hello good day.
    I'm trying to create a batch input session for inventory upload (Standard Batch Input program - RM07MMBL) and when I select the Name of logical file = "MM_INVENTORY_MANAGEMENT_GOODS_MOVEMENT" and press F8, the following error occurs:
    <b>Sequential file mmgoods cannot be opened
    Message no. M7 850</b>
    Now as the legend says.... I've contacted my system administrator and he keeps telling me everything is ok, but the error keeps appearing, where can I see if I have authorization for this "file" ???
    Where is it created ??
    I need more info on this.
    Your help is very much appreciated.
    Thank you.
    Juan

    go to file transaction n check for the logical file path and logical file weather it is defined correctly r not?
    if it is correctly defined check for the file, weather the flat file is defined at the correct location which is defined in the logical file path
    u can refer the below link also
    Re: Logical file
    Regards,
    Naveen

  • Security authorizations - batch input session - deleting your own session

    I know that S_BDC_MONI will allow you to delete Batch Input sessions (SM35), but it looks like it will allow you to delete whatever you put in BDCGROUPID, irrespective of whether it's your session or some one elses.
    Is there anything in security, which will allow you to only delete your own sessions, other than having different session names for different people.

    Hi,
    Execute the session in error mode only. If you are still facing the problem, you will have to execute it in foreground.
    Regards,
    Amit

  • Please help  me with some questions with batch input session?

    hello everyone.
      I come to some questions  like
    1 What is a batch input session ,
    2  What is the alternative to batch input session?
    3  An ABAP program creates a batch input session.   We need to submit the program and the batch session in back ground. How to do it? 
       would you please help me with the questions, couldn't thank you more.
       Best regards
                                                                          Frank

    Hi
    Batch Input Session:
    BATCH INPUT SESSION is an intermediate step between internal table
    and database table. Data along with the action is stored in session
    ie data for screen fields, to which screen it is passed, program
    name behind it, and how next screen is processed.
    Three processing modes of executing Batch Input Session :-
    Run Visibly : You can correct faulty transactions online & work step-by-step through  the transactions not yet executed.
    Display Errors only : You can correct faulty transactions online.   Transactions not yet executed, but without error, run in the background.
    Run in Background .
    2) What is the alternative to batch input session?
    Call transaction.
    3) An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it?
    go to SM36 and create background job by giving
         job name,job class and job steps (JOB SCHEDULING)

  • Batch Input Session for Errors

    Hello
    I'm running a Batch Input (in a FM) and I want to create a session for records with errors. In case of error (output parameter of the FM subrc NE 0) I send it to that session for later running.
    Can you explain how do I do this? Thanks!

    hi,
    Look at the sample program
    REPORT Z_BDC_CUSTOMER_R07
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    INCLUDE Z_CUSTOMER_BDC_R02.
    *-----AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
      IF SY-UCOMM = 'ONLI'.
    *-----group and user must be filled to create a session
        IF SESSION = 'X' AND
           GROUP = SPACE OR USER = SPACE.
          MESSAGE E613(MS).
        ENDIF.
    *----Presentation File name should be entered
        IF SESSION = 'X' AND RB_PRE = 'X'
                         AND P_FILE = '' .
          MESSAGE E004(ZROJA).
        ELSEIF CTU = 'X' AND RB_PRE = 'X'
                         AND P_FILE = '' .
          MESSAGE E004(ZROJA).
        ENDIF.
    *----Application File name should be entered
        IF SESSION = 'X' AND RB_APP   = 'X'
                         AND P_FILE_A = '' .
          MESSAGE E004(ZROJA).
        ELSEIF CTU = 'X' AND RB_APP = 'X'
                   AND P_FILE_A = '' .
          MESSAGE E004(ZROJA).
        ENDIF.
      ENDIF.
    *-----AT SELECTION-SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
    *----When file from Presentation server is selected
      IF RB_PRE = 'X'.
    *----To make the application server inactive
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'AAA'.
            SCREEN-ACTIVE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
    *----When file from Presentation server is selected
        RB_APP = 'X'.
    *----To make the application server inactive
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'BBB'.
            SCREEN-ACTIVE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *-----AT SELECTION-SCREEN ON VALUE-REQUEST
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE_A.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
        EXPORTING
          I_LOCATION_FLAG = 'A'
          I_SERVER        = ' '
          FILEOPERATION   = 'R'
        IMPORTING
          O_PATH          = P_FILE_A
        EXCEPTIONS
          RFC_ERROR       = 1
          ERROR_WITH_GUI  = 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.
    *-----AT SELECTION-SCREEN ON VALUE-REQUEST
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    *-----Function module for value-request
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = ' '
        IMPORTING
          FILE_NAME     = V_FILE_NAME.
    *----Assigning the flatfile to parameter
      P_FILE        = V_FILE_NAME.
    *-----START-OF-SELECTION
    START-OF-SELECTION.
      DATA: FILENAME TYPE STRING.
    *----When file from Presentation Server is selected
      IF RB_PRE = 'X'.
        FILENAME = P_FILE.
    *-----Function module to upload data from the presentation server
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            FILENAME                = FILENAME
            FILETYPE                = 'ASC'
            HAS_FIELD_SEPARATOR     = 'X'
          TABLES
            DATA_TAB                = IT_KNA1
          EXCEPTIONS
            FILE_OPEN_ERROR         = 1
            FILE_READ_ERROR         = 2
            NO_BATCH                = 3
            GUI_REFUSE_FILETRANSFER = 4
            INVALID_TYPE            = 5
            NO_AUTHORITY            = 6
            UNKNOWN_ERROR           = 7
            BAD_DATA_FORMAT         = 8
            HEADER_NOT_ALLOWED      = 9
            SEPARATOR_NOT_ALLOWED   = 10
            HEADER_TOO_LONG         = 11
            UNKNOWN_DP_ERROR        = 12
            ACCESS_DENIED           = 13
            DP_OUT_OF_MEMORY        = 14
            DISK_FULL               = 15
            DP_TIMEOUT              = 16
            OTHERS                  = 17.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ELSE.
    *----Upload the File from Application Server
        OPEN DATASET P_FILE_A FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    *-----to display an error if the file is not in application server
        IF SY-SUBRC NE 0.
          MESSAGE E006(ZROJA).
        ELSE.
          DO.
            READ DATASET P_FILE_A INTO X_KNA1.
            IF SY-SUBRC EQ 0.
              APPEND X_KNA1 TO IT_KNA1.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
        ENDIF.
        CLOSE DATASET P_FILE_A.
      ENDIF.
    *-----To open a batchinput session
      IF SESSION = 'X'.
        CALL FUNCTION 'BDC_OPEN_GROUP'
          EXPORTING
            CLIENT              = SY-MANDT
            GROUP               = GROUP
            KEEP                = KEEP
            USER                = USER
            PROG                = SY-CPROG
          EXCEPTIONS
            CLIENT_INVALID      = 1
            DESTINATION_INVALID = 2
            GROUP_INVALID       = 3
            GROUP_IS_LOCKED     = 4
            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.
      ENDIF.
    *-----Filling the BDCDATA using the Internal Table
      LOOP AT IT_KNA1 INTO X_KNA1.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0100'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RF02D-KTOKD'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'RF02D-KUNNR'
                                      X_KNA1-KUNNR.
        PERFORM BDC_FIELD       USING 'RF02D-KTOKD'
                                      X_KNA1-KTOKD.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0110'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-SPRAS'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'KNA1-NAME1'
                                      X_KNA1-NAME1.
        PERFORM BDC_FIELD       USING 'KNA1-SORTL'
                                      X_KNA1-SORTL.
        PERFORM BDC_FIELD       USING 'KNA1-ORT01'
                                      X_KNA1-ORT01.
        PERFORM BDC_FIELD       USING 'KNA1-PSTLZ'
                                      X_KNA1-PSTLZ.
        PERFORM BDC_FIELD       USING 'KNA1-LAND1'
                                      X_KNA1-LAND1.
        PERFORM BDC_FIELD       USING 'KNA1-SPRAS'
                                      X_KNA1-SPRAS.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0120'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-LZONE'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'KNA1-LZONE'
                                      X_KNA1-LZONE.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0125'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNA1-NIELS'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0130'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNBK-BANKS(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0340'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RF02D-KUNNR'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0370'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RF02D-KUNNR'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING 'KNA1-CIVVE'
                                      'X'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02D' '0360'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'KNVK-NAMEV(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
    *----If Session is selected
        IF SESSION = 'X'.
    *----To insert data into batch input session
          CALL FUNCTION 'BDC_INSERT'
            EXPORTING
              TCODE     = 'XD01'
            TABLES
              DYNPROTAB = IT_BDCDATA.
          REFRESH IT_BDCDATA.
          AT LAST.
            SKIP.
            WRITE:/ TEXT-001.
          ENDAT.
        ELSE.
    *----Calling the transaction
          CALL TRANSACTION 'XD01' USING IT_BDCDATA
                                  MODE     CTUMODE
                                  UPDATE   CUPDATE
                                MESSAGES INTO IT_BDCMSGCOLL.
          CLEAR IT_BDCDATA.
          REFRESH IT_BDCDATA.
        ENDIF.
      ENDLOOP.
    *----If Session is Selected
      IF SESSION = 'X'.
    *----To close the session
        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.
      ENDIF.
    *-----END-OF-SELECTION
    END-OF-SELECTION.
    *----To display the success messages
      LOOP AT IT_BDCMSGCOLL INTO X_BDCMSGCOLL WHERE MSGTYP = 'S' .
    *-----If Message Type Differs
        ON CHANGE OF X_BDCMSGCOLL-MSGTYP.
          WRITE:/ TEXT-002.
          SKIP.
          ULINE (58).
          WRITE:/01 SY-VLINE,02 TEXT-003,
                 14 SY-VLINE,15 TEXT-004,
                 21 SY-VLINE,22 TEXT-005,
                 35 SY-VLINE,36 TEXT-006,
                 58 SY-VLINE,/01 SY-ULINE(58).
        ENDON.
        WRITE:/01 SY-VLINE,02 X_BDCMSGCOLL-MSGTYP,
               14 SY-VLINE,15 X_BDCMSGCOLL-TCODE,
               21 SY-VLINE,22 X_BDCMSGCOLL-MSGV1,
               35 SY-VLINE,36 TEXT-007,
               58 SY-VLINE,/01 SY-ULINE(58).
      ENDLOOP.
      SKIP 2.
    *----To display the error messages
      LOOP AT IT_BDCMSGCOLL INTO X_BDCMSGCOLL WHERE MSGTYP = 'E'.
    *-----If Message Type Differs
        ON CHANGE OF X_BDCMSGCOLL-MSGTYP.
          WRITE:/ TEXT-008.
          SKIP.
          ULINE (58).
          WRITE:/01 SY-VLINE,02 TEXT-003,
                 14 SY-VLINE,15 TEXT-004,
                 21 SY-VLINE,22 TEXT-005,
                 35 SY-VLINE,36 TEXT-006,
                 58 SY-VLINE,/01 SY-ULINE(58).
        ENDON.
        WRITE:/01 SY-VLINE,02 X_BDCMSGCOLL-MSGTYP,
               14 SY-VLINE,15 X_BDCMSGCOLL-TCODE,
               21 SY-VLINE,22 X_BDCMSGCOLL-MSGV1,
               35 SY-VLINE,36 'Customer Already Exits',
               58 SY-VLINE,/01 SY-ULINE(58).
      ENDLOOP.
    *-----FORM fill_bdcdata
    FORM FILL_BDCDATA USING L_DYNPRO TYPE ANY
                            L_FNAME  TYPE ANY
                            L_FVALUE TYPE ANY.
      CLEAR X_BDCDATA.
      IF L_DYNPRO = 'X'.
        X_BDCDATA-DYNBEGIN = 'X'.
        X_BDCDATA-PROGRAM  = L_FNAME.
        X_BDCDATA-DYNPRO   = L_FVALUE.
      ELSE.
        X_BDCDATA-FNAM = L_FNAME.
        X_BDCDATA-FVAL = L_FVALUE.
      ENDIF.
      APPEND X_BDCDATA TO IT_BDCDATA.
    ENDFORM.                    "BDC_FIELD
    *-----Start new screen
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM  = PROGRAM.
      IT_BDCDATA-DYNPRO   = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
    *-----Insert field
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> SPACE.
        CLEAR IT_BDCDATA.
        IT_BDCDATA-FNAM = FNAM.
        IT_BDCDATA-FVAL = FVAL.
        APPEND IT_BDCDATA.
      ENDIF.
    ENDFORM.                    "BDC_FIELD

  • Batch Input Session Overview

    Happy new year everyone!
    I am writing a piece of ABAP code which creates a batch input session.
    In the code I have the following statement:
      PERFORM session_insert USING 'F-02'.
    However, when I run SM35 and look and display the log, in the transaction
    column FB01 appears. There is no reference to F-02.
    Does anybody know why this is?
    Thanks
    Andy

    Hi andy,
    1. in your subroutine session_insert,
        (or before that, when u open the session),
      the session name must be going as FB01.
    (the session name and tcode can be different)
    regards,
    amit m.

  • Batch input session in background BDC

    Hi to all,
    Please clarify me about below BDC point.
    Call to the transaction should be in background through batch input session. does It mean that we have to use session method and call this in back ground through RSBDCSUB, is this approach is correct or some thing else i  nend to do.Please tell me briefley.
    I want to track all the errors, how to track the errrors with out using call tranaction.
    could any one help me on this issue please.
    Regards
    Raadha

    Hi,
    as per your approach is correct in BDC session method ,in session method generally you want run the bdc in backgroung using in RSBDCSUB is used for scheduling .
    in program after writing bdc_close_group ,just use submit statement and schedule the background.
    and generally in session method  execute the program and going to the sm35 selcting particular session name manually processing that session,when schedule rsbdcsub it is directly going to the background screen ,then give the session name and run the program.
    Regards,
    Madhu

  • Batch input session in background

    hai guys,
    Can we execute Batch input session in background scheduling thru jobs.
    i tried with sm37. but there is not option i guess.
    could you pls guide us.
    ambichan.

    Hi Ambi,
    As Anand and Wolfgang suggested, what you need to do in your ZFB05 program is as follows. Insert this after you create the sessions.
    Add parameters to your ZFB05 program for the session background processing like date, session name etc.
    Then after you create your sessions, insert the following code
    *-- run in the background
          CALL FUNCTION 'JOB_OPEN'
               EXPORTING
                    jobname          = 'YOURJOBNAME'
               IMPORTING
                    jobcount         = v_jobcount
               EXCEPTIONS
                    cant_create_job  = 1
                    invalid_job_data = 2
                    jobname_missing  = 3
                    OTHERS           = 4.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            EXIT.
          ENDIF.
          submit rsbdcsub  with mappe    = 'YOURSESSIONNAME'
                           with z_verarb = 'X'
                           with fehler   = 'X'
                           USER sy-uname
                           VIA JOB 'YOURJOBNAME'
                           NUMBER v_jobcount AND RETURN.
    *-- close the job
               CALL FUNCTION 'JOB_CLOSE'
               EXPORTING
                    jobcount             = v_jobcount
                    jobname              = 'YOURJOBNAME'
                    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.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE 'W' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    Hope this helps,
    Srinivas

  • Question create a batch input session in display mode

    Hi, i have a batch input, with this three functions
    CALL FUNCTION 'BDC_OPEN_GROUP'
      CALL FUNCTION 'BDC_INSERT'
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    when i execute the program, i need to see the batch input session in display mode. I need to see all the screens.
    I try with
    DATA: PARAMETROS LIKE CTU_PARAMS.
    PARAMETROS-DISMODE = 'A'.
      CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         TCODE                  = 'ME51'
        POST_LOCAL             = NOVBLOCAL
        PRINTING               = NOPRINT
        SIMUBATCH              = 'A'
         CTUPARAMS               = PARAMETROS
        TABLES
          dynprotab              = i_bdcdata
      EXCEPTIONS
        INTERNAL_ERROR         = 1
        NOT_OPEN               = 2
        QUEUE_ERROR            = 3
        TCODE_INVALID          = 4
        PRINTING_INVALID       = 5
        POSTING_INVALID        = 6
        OTHERS                 = 7
    But i can´t see the screens.
    Help me, please
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 10, 2008 12:46 PM

    hi
        For a BDC upload you need to write a program which created BDC sessions.
    <u>Steps</u>:
    1. Work out the transaction you would use to create the data manually.
    2. Use transaction SHDB to record the creation of one material master data.
        Click the New recording button or the Menu - Recording - Create
    3. Save the recording, and then go back a screen 
    4. Select the recording and <b>click on Edit - Create Program.</b> Give the program a Z name, and select transfer from recording.
    5. Edit the program. You will see that all the data you entered is hard-coded into the program.
    Execute the program. It will have options to create a batch session or to process directly.
    IF THIS FINDS USEFUL PLEASE REWARD POINTS
    REGARDS
    ANOOP

Maybe you are looking for