BATCH INPUT TO CHECK AUTHORIZATION

Hi All,
Can anyone tell me how to code a small batch that will go into sap to ensure system authorizations are set?As the requirement is immediate,quick answers will be highly appreciated.
Rewards if useful.
Thanks n Regards,
Indu.

Hi,
What type of authorization check u need like tcode r any field.
U have follow like that.
AUTHORITY-CHECK OBJECT 'ZPRCHK_NEW' :
         ID 'TCD' FIELD SY-TCODE
         ID 'BUKRS' DUMMY
         ID 'PRCTR' DUMMY
         ID 'SPART' DUMMY
         ID 'WERKS' DUMMY
         ID 'VKORG' DUMMY
         ID 'EKORG' DUMMY.
  IF sy-subrc NE 0.
    MESSAGE TEXT-003 TYPE 'E'.
    LEAVE PROGRAM.
  ENDIF.
Regards:
Prabu

Similar Messages

  • How to check whether a batch input session is completed in ABAP program

    I have created a ABAP program to create a batch input session (reference to RSBDCSUB). After the creation of the batch input session, I kick it to start and read the execution log. However, sometimes I cannot read anything from the execution log as the execution of the batch input is a synchronized process to the execution of my program, i.e. at the time being that I try to read the log of a particular transaction, that transaction is being processing / haven't start processing.
    How can I check whether a batch input session is completed in the program?
    The code that corresponding to the triggering of batch input session:
    SUBMIT (SUBREPORT)
       USER MTAB-USERID
       VIA JOB MTAB-GROUPID
       NUMBER JNUMB
       WITH QUEUE_ID  EQ MTAB-QID
       WITH MAPPE     EQ MTAB-GROUPID
       WITH MODUS     EQ 'N'
       WITH LOGALL    EQ LMODUS
    Or is there any method to wait here until the process is completed before further processing?

    Hi gundam,
    1. Or is there any method to wait here until the process is completed before further processing?
    There is no such direct method to wait.
    2. Immediately after submitting in background,
       we cannot wait
      neither can we LOOP and go on detecting
      whether the b/g process has completed or not !
    3. To over come such problems,
      we have to use another technique.
    4. we have to submit another
       job which will get triggered
       on event SAP_END_OF_JOB
       ie. when the original job will finish,
      our new job will AUTOMATICALLY get triggered,
    5. This new job / program
       will do the FURTHER actions !
    regards,
    amit m.

  • Checking of Batch Input Folders

    Good Morning,
    In transaction SM35 i can check the status of Batch Input Folders. How can i check it using ABAP?
    Is there any function to do so?
    Best Regards,
    Pedro Gaspar

    Hi Pedro,
    Check this link,
    https://forums.sdn.sap.com/click.jspa?searchID=3008317&messageID=3282683
    Thanks.

  • No budget checking for batch input

    Hi people
    We are using the budget checking functions under Funds Mgmt (Former Budgeting) ECC6.0. Is there a way that we can exclude budget checking for postings done through batch input?
    appreciate any help.
    TQ
    darth maut

    Hi,
    Please check the SAP note 573409
    Regards,
    Abhijit

  • RSBDCSUB - Batch Input - Job - Authorization

    Dear All,
    I want to execute session in background using the program RSBDCSUB, but I want to change the user of the session.
    User A creates the Batch input (TC FB03), but doesn't have the authorization to modify an FI document.
    User B has this authorization, and execute the BI.
    There is no problem if user B execute the session online, but if he use RSBDCSUB, then the system keeps the authorization of user A. The idea is that the USER B creates a job running RSBDCSUB several times a day and we don't want to give the authorization to user A .
    Do you know if there is a possibility to do it ?
    Thanks for your help
    Nathalie

    creating a BI session usually is done with function module BDC_OPEN_GROUP.
    One of the importing parameters is the USERID, usually filled with SY-UNAME (the user who executes the function module/report/transaction) but you could overwrite it with any other valid user. If you don't have a report parameter to set the user different from SY-UNAME you would have to modify the report.
    Alternativly a report could be written that changes the user after the session is created.

  • 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

  • Ff68 not able to generate batch input

    Hi,
    I have given all authoristions for ff68 to perticuler userid  but batch input is not being generated for the same.
    I have checked the authorisations and it is proper.
    earlier  i am able to do ff68 without any error, it suddenly stopped now.
    Please help me in this regard

    Hi
    There are 2 things:
    1. Check with the authorizations changed recent past for your user id roles.
    2. Whether the session name was given or not with the check box bank postings only
    3. SM35 check your user id basis.
    Regards,
    Suresh

  • Delete only own batch-inputs

    Hello,
    I am having some problems with batch input authorizations. I want to give users authorizations only to delete the batch-inputs which have been created with their own user. I have seen the object S_BDC_MONI, but this object does not allow me to indicate that the user is only authorized to delete his/her own batch-inputs. Is there an standard authorization object that allows users only to delete their own batch-inputs?
    I have also checked the possibility to create my own authorization object, the same as S_BDC_MONI but with a new field where I can indicate that only the own batch-inputs can be deleted. But if I do it will SM37 check this authorization? I don't want to indicate the user in this field, because then I would need a new role for each user. I need a field (similar to PSIGN) where I can say each user can delete only their own batch-inputs.
    Any idea?
    Thank you very much in advance.
    Regards,
    Maite

    there's no solution to your problem, i'm sorry.
    S_BDC_MONI only checks the name of the batch-inputs, not the creator or the username with whos authorization it is run.
    creating your own object will only work if the calling program (SM35, SM37 ...) does the counterpart of the checking using authority-check. so simply creating an object and adding it to a transaction with SU24 will not work without the coding of the caller being adjusted. of course, this would be a major modification.
    all you can do is to adjust your batch-input creating programs to apply those names to the batch-inputs that you can easily cover using S_BDC_moni.

  • I am not able to open a batch input job using SM37

    Hi Gurus,
                          I am not able to open a batch input job using SM37. I enter SM37 through a well authorized ID. May be there is a authorization issue or may be not. I check all the check boxes even then it is not possible. Please help me.

    Hi Amit Sharma,
    If I am not wrong, the problem would be because you have not closed the job after creating it.
    You must have used JOB_OPEN, JOB_SUBMIT but not JOB_CLOSE.
    Job_Close is the FM which submits the created job to the background processing system.
    Hope this resolves. If not, paste your code here so that we can have a look
    Thanks,
    Babu Kilari

  • 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

  • Step by step batch input

    Hi friends,
    Please tell me about how to create a batch input from beginning to end.
    How can I achieve the entry of the data?
    sm35 or shdb is used to record the transaction steps?
    One says sm35, the other says shdb?
    Step by step?
    Thanks in advance.

    Hi,
    BDC option
    ABAP Runtime Environment (BC-ABA)
    Batch Data Communication option.
    BDC options define the processing mode for a batch input session.
    Examples of modes used for processing sessions are:
    •     Display all records.
    •     Display for error dialogs only.
    •     Process session in the background.
    •     Process session on the screen.
    Purpose
    During data transfer, data is transferred from an external system into the SAP R/3 System. You can use data transfer when you:
    •     Transfer data from an external system into an R/3 System as it is installed.
    •     Transfer data regularly from an external system into an R/3 System. Example: If data for some departments in your company is input using a system other than the R/3 System, you can still integrate this data in the R/3 System. To do this, you export the data from the external system and use a data transfer method to import it into the R/3 System.
    Implementation considerations
    Before creating your own data transfer program, you should use the Data Transfer Workbench to find the data transfer programs that are delivered by SAP.
    The Data Transfer Workbench 
    Purpose
    The Data Transfer Workbench supports the automatic transfer of data into the R/3 System.
    The Workbench is particularly useful for large amounts of data. It guarantees that data is transferred efficiently and ensures that data in the R/3 System is consistent.
    Features
    The Data Transfer Workbench provides the following functions:
    •     Integration of standard data transfer programs
    •     Registration and integration of your own data transfer programs
    •     Various techniques to load data into R/3.
    The data is read from a transfer file in SAP format and loaded into the R/3 System using one of the techniques below:
    •     Administration and organization of data transfer projects
    •     Tools for analyzing the required SAP structures
    •     BAPI interface
    •     Batch input
    •     Direct input
    Integration
    SAP applications support the data transfer of numerous SAP business objects. The data transfer program specifies the data format definition that is necessary to import the data into the R/3 System. Adapt your conversion program for exporting the data from the external system to this definition.
    Once the data has been exported, you can import it into your system using a generated data transfer program.
    Features
    •     Data transfer from other, external systems
    •     Generation of data transfer programs
    •     Generation of function modules that can be used as an interface to the R/3 System
    Initial Data Transfer 
    Prerequisites
    Before you start the initial data transfer, you should have answered the following questions:
    •     Which business objects are to be transferred?
    The objects to be transferred depend on the business applications you are using. If you are using sales and distribution processing, for example, you should transfer the material master records as well as the sales master records .
    •     How should the business objects be transferred?
    Various techniques are available to load the data into the R/3.
    Process Flow
    The process of transferring data can be divided into the steps:
    1.     Preparing the data transfer
    •     Analyzing and Cleaning Legacy Data
    •     Analyzing SAP Structures
    •     Developing Programs, Function Modules and BAPIs
    •     Creating a Program or FM for Data Extraction
    •     Creating a Mapping Program
    •     Registering Programs, Function Modules and BAPIs
    1.     Executing the data transfer
    •     Organizing the Transfer in Projects
    •     Executing Data Transfer Runs, monitoring (CCMS) and processing (log)
    •     Checking transferred objects in R/3 using a function module or report (task type AUD).
    The graphic below describes the steps involved in transferring the data:
    ThThe The Data Transfer Workbench is an integrated project management for all the required steps involved in transferring data to your R/3 System.
    You need to use programs or function modules for the various steps. SAP provides a range of BAPIs for loading data into R/3.
    You could also carry out all the steps, except for loading the data via BAPIs, without using the Data Transfer Workbench.
    In the first step you extract the existing data from a source system into a file and clean it there, if necessary.
    To load data into R/3 you need a transfer file in an appropriate SAP format.
    Using a mapping program you have to map the extracted data to the structures of the transfer file.
    To load the data into the R/3 System one of the Techniques is used depending on the type of business object . I f more than one of these techniques is provided for a particular object type, you should read the documentation to find out what the different uses are .
    Once you have created a project, you can start a run. The tasks of the run definition are processed in order.
    After the data has been successfully loaded into the R/3 System, it can be checked here.
    Result
    You have transferred the data into the relevant R/3 application and checked it here.
    Data Transfer 
    Purpose
    During data transfer, data is transferred from an external system into the SAP R/3 System. You can use data transfer when you:
    •     Transfer data from an external system into an R/3 System as it is installed.
    •     Transfer data regularly from an external system into an R/3 System. Example: If data for some departments in your company is input using a system other than the R/3 System, you can still integrate this data in the R/3 System. To do this, you export the data from the external system and use a data transfer method to import it into the R/3 System.
    Implementation considerations
    Before creating your own data transfer program, you should use the Data Transfer Workbench to find the data transfer programs that are delivered by SAP.
    Integration
    SAP applications support the data transfer of numerous SAP business objects. The data transfer program specifies the data format definition that is necessary to import the data into the R/3 System. Adapt your conversion program for exporting the data from the external system to this definition.
    Once the data has been exported, you can import it into your system using a generated data transfer program.
    Features
    •     Data transfer from other, external systems
    •     Generation of data transfer programs
    •     Generation of function modules that can be used as an interface to the R/3 System
    Data Transfer Methods 
    You can use the following methods to transfer data:
    •     Direct input: With direct input, the SAP function modules execute the consistency checks. However with batch input, these consistency checks are executed with the help of the screens. This means that direct input has considerable performance advantages.
    •     CALL TRANSACTION: Data consistency check with the help of screen logic.
    •     Batch input with batch input sessions : Data consistency check with the help of screen logic.
    Difference between Batch Input and CALL TRANSACTION
    If the direct input cannot be used for your task, this makes creating a data transfer program easier since the underlying transactions ensure that the data consistency checks are executed.
    In the case of an error during the data transfer (if data records are inconsistent, for example), you can restart the transfer at the point in the program where the error occurred.
    Batch input methods
    With the batch input method, an ABAP program reads the external data that is to be entered in the R/3 System and stores the data in a "batch input session". The session records the actions that are required to transfer data into the system using normal SAP transactions.
    When the program has generated the session, you can run the session to execute the SAP transactions in it. You can explicitly start and monitor a session with the batch input management function (by choosing System &#61614; Services &#61614; Batch input), or have the session run in the background processing system.
    CALL TRANSACTION methods
    In the second method, your program uses the ABAP statement CALL TRANSACTION USING to run an SAP transaction. External data does not have to be deposited in a session for later processing. Instead, the entire batch input process takes place inline in your program.
    The information in Choosing Data Transfer Methods will help you decide which is the best data transfer method.
    Data Transfer: Overview of Batch Input  
    Prerequisites
    Before beginning the initial data transfer, you should answer the following questions:
    •     Which business objects are to be transferred?
    The business objects to be transferred depend on the business applications that you will be using. If you are using sales and distribution processing, for example, you must transfer the material masters as well as the sales documents from your legacy system.
    •     How are the business objects to be transferred?
    The data can be transferred either manually or automatically, using an SAP data transfer program or using your own transfer program.
    Process flow
    During the initial data transfer, data from the external system is converted into a sequential data transfer file and then transferred into the R/3 System using an SAP data transfer program. The data transfer file is the prerequisite for successfully transferring data as it contains the data in a converted format that is suitable for the R/3 System.
    1.     Check to see if an SAP data transfer program (direct input, batch input or CALL TRANSACTION) exists for this data using the Data Transfer Workbench. Refer to the notes for this transfer program.
    If no SAP data transfer program exists, proceed as follows:
    2.     Determine the SAP transactions that a user would use to enter data records.
    3.     Record these transactions using the batch input recorder. Ensure that you have filled all of the relevant fields with data.
    4.     Use this data to generate a data transfer program.
    5.     Display the Data Transfer Workbench and create your own data transfer object.
    6.     Now follow the steps for transferring data using the Data Transfer Workbench.
    The Transaction Recorder 
    Use
    You can use the transaction recorder to record a series of transactions and their screens.
    Features
    You can use the recording to create
    •     Data transfer programs that use batch input or CALL TRANSACTION
    •     Batch input sessions
    •     Test data
    •     Function modules.
    The recording can be executed several times. The screens are run in exactly the same way as they were run during the recording.
    You can edit recordings that you have already made using an editor.
    Activities
    1.     To display the batch input initial screen, choose System &#61614; Services &#61614; Batch input&#61614; Edit.
    2.     Choose Recording. The system now displays the initial screen of the batch input recorder.
    3.     Make a recording of the relevant transactions.
    4.     Generate one or several of the objects named above.
    Special features
    •     F1 -, F4 - and self-programmed F1 - and F4 help ( PROCESS ON HELP-REQUEST , PROCESS ON VALUE-REQUEST ) are not recorded. The same applies to all commands in the System and Help menus.
    •     Error and warning dialogs are not recorded. This means that only the OK code field and the field contents that lead to successful further processing in the current screen.
    •     " COMMIT WORK " in a transaction flow indicates the successful end of the transaction as regards batch input. The recording also ends successfully.
    •     " LEAVE TO TRANSACTION " in the course of a transaction indicates that it is not suitable for batch input. The recording is terminated.
    •     In ScreenPainter screens, movements in the scrollbar are not recorded. Use the function keys F21-F24 for positioning.
      Recording Transactions 
    The recording forms the basis of generating data transfer programs, sessions, test data and function modules.
    Procedure
    1.     Display the initial screen of the batch input recorder.
    2.     Assign a name to your recording.
    3.     Choose Create.
    4.     On the subsequent dialog box, enter the transaction code that you want to record and choose Continue.
    The system displays this transaction.
    5.     Execute the transaction in the usual way.
    6.     When you have finished processing the transaction, the system displays an overview of the transaction and your input.
    Choose Get transaction if no errors occurred while the transaction was being recorded.
    If you do not want to keep the last recording that you made, go to the next step.
    7.     Choose Next transac. If you want to record an additional transaction. Then continue from point 4.
    8.     Save your recording when you have finished.
    Recording 
    Once you have recorded the transaction, you can process it again later.
    Procedure
    1.     Display the initial screen of the batch input recorder (Transaction SHDB).
    2.     Choose Overview.
    The system displays an overview of all recordings.
    3.     Position the cursor on the relevant recording and choose Execute.
    4.     Choose one of the following processing modes:
    A : Display all screens.
    E : Display errors only. In the case of an error, the system displays the screen on which the error occurred. Once this error has been corrected, the system continues to process the recording until the next error occurs.
    N : No display. The recording is not processed visibly.
    5.     Choose the update mode:
    A : Asynchronous update
    S : Synchronous update
    L : Local update
    6.     You begin to process the recording when you choose Enter to exit the dialog box. When the recording is complete, the system displays a log that lists the name of the transaction, the system field SY-SUBRC and the system messages that were output.
    Using the Recording Editor 
    The recording editor contains functions that you can use to edit your recordings.
    Procedure
    1.     Display the initial screen of the batch input recorder (Transaction SHDB).
    2.     Choose Overview.
    The system displays an overview of all recordings.
    3.     Position the cursor on the relevant recording and choose Change.
    4.     The following functions are available on the overview that the system displays:
    • Delete transaction from the recording: This deletes the selected transaction.
    • Add a new transaction to the recording: The transaction is added at the end of the recording.
    • Editing: You can edit the current recording.
    If you choose Editing, proceed as follows:
    5.     The system displays an editor where you can add and delete individual lines. You can also change the contents of these lines.
    6.     If these editor functions are insufficient for your requirements, you can choose Export to download the recording onto your presentation host and use a PC editor to edit it there.
    7.     Choose Import to import this file back into the R/3 System. Ensure that the file is still in the correct format.
    8.     Choose Check to ensure that the edited version of the recording is still syntactically correct.
    9.     Save your changes to the recording when you have finished editing it.
    Generating Batch Input Sessions From the Recording 
    The data from the recording is transferred into batch input sessions that you can process for test purposes using the usual mechanisms.
    Prerequisites
    Before you can generate a batch input session, you must record the transactions through which the data is to enter the R/3 System. You use the batch input recorder to do this.
    Procedure
    1.     Display the initial screen of the batch input recorder (Transaction SHDB).
    2.     Choose Overview.
    The system displays an overview of all recordings.
    3.     Position the cursor on the relevant recording and then choose Generate session.
    4.     Enter a session name, a user with whose authorizations the session is to be processed, the identification whether the session is to be deleted once it has been processed and the processing date.
    5.     Choose Continue to exit the dialog box.
    You have generated a batch input session that uses the same data for the input fields that you entered when you created the recording. You can now process this as usual.
    Generating Data Transfer Programs 
    Prerequisites
    Before you can generate a data transfer program, you must record the transactions using which the data is imported into the R/3 System. You use the batch input recorder to do this.
    Procedure
    1.     Display the initial screen of the batch input recorder (Transaction SHDB).
    2.     Choose Overview.
    The system displays an overview of all recordings.
    3.     Position the cursor on the relevant recording and choose Create program.
    4.     On the following screen, specify a program name.
    5.     You can also choose how the maintained field contents of the recorded screens are to be filled:
    • Transfer the values that were used during the recording. If you require a flexible data transfer, you must modify this program.
    • Set the parameters of the input values to be maintained and import these values from a data file. To set the parameters, the system creates a data structure and imports the data records from an external file into this data structure. The program assumes that the external file has been adapted to this data structure.
    6.     If you have decided to set parameters for the input values to be maintained, it is useful if you create a test file when you generate the program. To do this, flag the checkbox and enter a name for the test file. For more information, see creating a test file.
    7.     Choose Continue.
    8.     The system displays the attribute screen of the program editor. Choose the relevant attributes here and save the program.
    Result
    You have now generated a data transfer program that you can use to import data into the R/3 System. The program can execute the data transfer using batch input or CALL TRANSACTION .
    Generating Function Modules 
    Prerequisites
    Before you can generate a data transfer program, you must record the transactions using which the data is imported into the R/3 System. You use the batch input recorder to do this.
    Procedure
    1.     Display the initial screen of the batch input recorder (Transaction SHDB).
    2.     Choose Overview.
    The system displays an overview of all recordings.
    3.     Position the cursor on the relevant recording and choose Create function module.
    4.     On the subsequent dialog box, enter a function module name, a function group and a short text for the function module. Exit the dialog box by choosing Continue.
    The system automatically creates the function module.
    Result
    You have now generated a function module that you can use as an interface for your R/3 System. As well as information relevant for the data transfer, the function module's import interface has a parameter for each input field of the transaction recorded.
    Using Function Modules 
    Prerequisites
    The function module was generated from a recording made using the batch input recorder.
    Procedure
    1.     Cal the function module.
    2.     Supply the generic interface of the function module:
    CTU : Flag whether the data is to be transferred using batch input method CALL TRANSACTION USING . The system generates a batch input session if this flag is not set.
    MODE : Processing mode:
    A     Display all
    E     Display only errors
    N     No display
    UPDATE : Update mode:
    S     Synchronous
    A     Asynchronous
    L     Local update
    GROUP : (If CTU is already specified): Name of the batch input session to be generated
    USER : (If CTU is already specified): User with whose authorizations the session is to be processed
    KEEP : Specifies whether this session is to be deleted once it has been processed
    HOLDDATE : Specifies the earliest processing date for the error session
    NODATA : Defines the NODATA character
    3.     Supply the function module's special interface.
    For each input field that was filled when you recorded the transactions, the system creates an import parameter. The recorded value is used as the default value for this import parameter.
    Creating Test Files 
    To test the data transfer program that you have created, you can create a data record in a sequential file. This data record contains all the field contents from the recording that are relevant to the data transfer in the format required by the data transfer program. It is therefore useful if you align the format of your conversion program data file with the format of the test file.
    Prerequisites
    Before you can generate a data transfer program, you must record the transactions using which the data is imported into the R/3 System. You use the batch input recorder to do this.
    Procedure
    1.     Display the initial screen of the batch input recorder (Transaction SHDB).
    2.     Choose Overview.
    The system displays an overview of all recordings.
    3.     Position the cursor on the relevant recording and choose Create test data.
    4.     Enter a test file and exit the dialog box by choosing Continue.
    You have now created a test file.
    If the test file you have specified already exists, the system appends the new data record.
    If you do not specify the path, the system archives the test file in the working directory of the current application server.
    Executing the Data Transfer 
    Purpose
    You generally use the Data Transfer Workbench to execute the data transfer. The following section describes how you transfer data directly using the batch input method.
    Prerequisites
    You require a data transfer program. This may be an SAP data transfer program, or you can create your own program.
    Process flow
    1.     Provide the data to be imported in a data file. Ensure that the data is in the correct format.
    2.     If you are using a generated data transfer program, you can choose a data transfer method.
    If you are only dealing with one data record, you can import this directly using a generated function module.
    3.     Execute the data transfer program.
    4.     Analyze the program and correct any errors that occur.
    Writing Data Conversion Programs 
    The data conversion program is responsible for the following tasks:
    •     Converting the data that is to be transferred into the R/3 System as required by the SAP data structure or transactions that you are using.
    If you are using an SAP batch input standard program, you must generate the data structure from the SAP standard data structure (see generating an SAP data structure).
    If you develop your own batch input program, the data structure is determined by the R/3 System when the program is generated. Generate a test file from the recording and align the format of your conversion program with the format of the test file.
    A conversion may be necessary for data type and length data type and length. The data type required by all standard SAP batch input programs is C, character data. You can find the required field lengths either in your analysis of the data declaration structure of the generated batch input program or in the data structures that you generate.
    •     The data is exported in SAP format to a sequential file. The batch input program in the R/3 System reads the data in from this file.
    Process flow
    The tasks involved in writing a data transfer program are shown in the diagram and list below.
    Writing Data Conversion Programs 
    The data conversion program is responsible for the following tasks:
    •     Converting the data that is to be transferred into the R/3 System as required by the SAP data structure or transactions that you are using.
    If you are using an SAP batch input standard program, you must generate the data structure from the SAP standard data structure (see generating an SAP data structure).
    If you develop your own batch input program, the data structure is determined by the R/3 System when the program is generated. Generate a test file from the recording and align the format of your conversion program with the format of the test file.
    A conversion may be necessary for data type and length data type and length. The data type required by all standard SAP batch input programs is C, character data. You can find the required field lengths either in your analysis of the data declaration structure of the generated batch input program or in the data structures that you generate.
    •     The data is exported in SAP format to a sequential file. The batch input program in the R/3 System reads the data in from this file.
    Process flow
    The tasks involved in writing a data transfer program are shown in the diagram and list below.
    Selecting a Data Transfer Method  
    When you transfer data in ABAP, you have three options to submit the data for the data transfer. Only the first two methods can be recommended without reservation. The third method, by way of CALL DIALOG, is outmoded. CALL DIALOG is less comfortable than the other methods. You should use it only if you must.
    •     Use the CALL TRANSACTION USING statement
    Summary: With CALL TRANSACTION USING, the system processes the data more quickly than with batch input sessions. Unlike batch input sessions, CALL TRANSACTION USING does not automatically support interactive correction or logging functions.
    Your program prepares the data and then calls the corresponding transaction that is then processed immediately.
    The most important features of CALL TRANSACTION USING are:
    o     Synchronous processing
    o     Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called
    o     You can update the database both synchronously and asynchronously
    The program specifies the update type
    o     Separate LUW (logical units of work) for the transaction
    The system executes a database commit immediately before and after the CALL TRANSACTION USING statement
    o     No batch input processing log
    •     Create a session on the batch input queue.
    Summary: Offers management of sessions, support for playing back and correcting sessions that contain errors, and detailed logging.
    Your program prepares the data and stores it in a batch input session. A session is a collection of transaction data for one or more transactions. Batch input sessions are maintained by the system in the batch input queue. You can process batch input sessions in the background processing system.
    Your program must open a session in the queue before transferring data to it, and must close it again afterwards. All of these operations are performed by making function module calls from the ABAP program.
    The most important aspects of the session interface are:
    o     Asynchronous processing
    o     Transfers data for multiple transactions
    o     Synchronous database update
    During processing, no transaction is started until the previous transaction has been written to the database.
    o     A batch input processing log is generated for each session
    o     Sessions cannot be generated in parallel
    The batch input program must not open a session until it has closed the preceding session.
    •     Use the CALL DIALOG statement
    Summary: Not recommended if you can enter data by way of sessions or CALL TRANSACTION USING.
    Your program prepares data for a sequence of dialog screens, and calls a dialog module for immediate processing.
    The most important aspects of the CALL DIALOG interface are:
    o     Synchronous processing
    o     Transfers data for a sequence of dialog screens
    o     No separate database update for the dialog
    A database update occurs only when the calling program executes a commit operation.
    o     Shares LUW with calling program
    o     No batch input processing log is generated
    Executing Data Transfer Programs 
    Procedure
    If you are using an SAP data transfer program, follow the procedure specified in the program documentation.
    If you are using a generated data transfer program, proceed as follows:
    1.     Start the data transfer program.
    2.     Decide which batch input method you want to use for the data transfer.
    a) CALL TRANSACTION USING:
    You must specify the:
    – Processing mode: You use this parameter to specify whether processing should take place in the background or in dialog mode.
    Possible values are:
    A     Display all
    E     Display only errors
    N     No display
    – Update mode: This parameter determines how the data is to be updated:
    Possible values are:
    S     Synchronous
    A     Asynchronous
    L     Local update
    – Error session: Here you have the option to specify a session name for a batch input session in which data is to be written in the case of an error. You can use this to identify incorrect data records after the batch input program has run and to import the records into the R/3 System once you have corrected them.
    If you are creating an error session, you must also specify:
    – User: Specify the user with whose authorizations the sessions are processed.
    – Keep session: This specifies whether or not the session should be deleted once it has been processed.
    – Lock date: Specify the processing date for the error session.
    b) Generate session:
    – Session name: Specify a name for the batch input session to be generated.
    – User: Specify the user with whose authorizations the sessions are processed.
    – Keep session: This specifies whether or not the session should be deleted once it has been processed.
    – Lock date: Specify the processing date for the error session.
    3.     Specify a character that is to be used as the NODATA character.
    4.     Specify the path of the data file from which the data is to be imported into the R/3 System.
    5.     Execute the program.
    6.     If you have generated a session, or if errors occurred in CALL sTRANSACTION USING mode, you must now edit the generated sessions. You can find information on this in BC - System services in batch input sessions.
    Batch Input Authorizations 
    You do not need special authorization - other than the ABAP run time authorization (authorization object S_PROGRAM - to run a program that creates batch input. Any user can create batch input sessions.
    Starting processing for a session once it is in the queue is another matter, however. You can find more information on this in batch input sessions.
    Creating a Session with BDC_OPEN_GROUP  
    Use the BDC_OPEN_GROUP function module to create a new session. Once you have created a session, then you can insert batch input data into it with BDC_INSERT.
    You cannot re-open a session that already exists and has been closed. If you call BDC_OPEN_GROUP with the name of an existing session, then an additional session with the same name is created.
    A batch input program may have only one session open at a time. Before opening a session, make sure that any sessions that the program closes any sessions that it previously had opened.
    BDC_OPEN_GROUP takes the following EXPORTING parameters:
    •     CLIENT
    Client in which the session is to be processed.
    Default: If you don't provide a value for this parameter, the default is the client under which the batch input program runs when the session is created.
    •     GROUP
    Name of the session that is to be created. May be up to 12 characters long.
    Default: None. You must specify a session name.
    •     HOLDDATE
    Lock date. The session is locked and may not be processed until after the date that you specify. Only a system administrator with the LOCK authorization for the authorization object Batch Input Authorizations can unlock and run a session before this date.
    Format: YYYYMMDD (8 digits).
    Default: No lock date, session can be processed immediately. A lock date is optional.
    •     KEEP
    Retain session after successful processing. Set this option to the value X to have a session kept after it has been successfully processed. A session that is kept remains in the input/output queue until an administrator deletes it.
    Sessions that contain errors in transactions are kept even if KEEP is not set.
    Default: If not set, then sessions that are successfully processed are deleted. Only the batch input log is kept.
    •     USER
    Authorizations user for background processing. This is the user name that is used for checking authorizations if a session is started in background processing. The user must be authorized for all of the transactions and functions that are to be executed in a session. Otherwise, transactions will be terminated with "no authorization" errors.
    The user can be of type dialog or background. Dialog users are normal interactive users in the R/3 System. Background users are user master records that are specially defined for providing authorizations for background processing jobs.
    Adding Data to a Session: BDC_INSERT  
    Use the BDC_INSERT function module to add a transaction to a batch input session. You specify the transaction that is to be started in the call to BDC_INSERT. You must provide a BDCDATA structure that contains all of the data required to process the transaction completely.
    BDC_INSERT takes the following parameters:
    •     TCODE
    The code of the transaction that is to be run.
    •     POST_LOCAL
    Parameter to update data locally. If POST_LOCAL = ‘X’, data will be updated locally.
    (refer to the keyword documentation of SET UPDATE TASK LOCAL for more information)
    •     DYNPROTAB
    The BDCDATA structure that contains the data that is to be processed by the transaction.
    DYNPROTAB is a table parameter in the function module.
    Closing a Session: BDC_CLOSE_GROUP  
    Use the BDC_CLOSE_GROUP function module to close a session after you have inserted all of your batch input data into it. Once a session is closed, it can be processed.
    Function Module BDC_CLOSE_GROUP
    Exception parameters
    Parameter     Function
    NOT_OPEN     Client
    QUEUE_ERROR     Internal use
    BDC_CLOSE_GROUP needs no parameters. It automatically closes the session that is currently open in your program.
    You must close a session before you can open another session from the same program.
    You cannot re-open a session once it has been closed. A new call to BDC_OPEN_GROUP with the same session name creates a new session with the same name.
    Processing Batch Input Sessions 
    When you create a batch input session, it remains in the batch input queue until it is explicitly started. Session processing can be started in two ways:
    •     An on-line user can start the session using the batch input menu options. (To access the batch input options, choose System &#61614; Services &#61614; Batch Input.)
    •     You can submit the background job RSBDCSUB to start a session in background processing. If several sessions have the same name, RSBDCSUB starts them all.
    It’s possible to coordinate the generation and execution of a session in the background processing system.
    You can, for example, schedule both the batch input program and RSBDCSUB in the background. If you designate the batch input job as the predecessor for RSBDCSUB, then RSBDCSUB will be started automatically when the batch input job successfully completes.
    Alternatively, you can schedule both the batch input program and RSBDCSUB as job steps in a single background job. In this case, however, RSBDCSUB is started even if the batch input program should terminate abnormally.
    For detailed information about processing batch input sessions, see Managing Batch Input Sessions in the System Services guide.
    Frequent Data Transfer Errors 
    The most frequent errors include:
    •     The BDCDATA structure contains screens in incorrect sequence.
    •     The BDCDATA structure assigns a value to a field that does not exist on the current screen.
    •     The BDCDATA structure contains a field that exceeds the specified length.
    General guidelines
    You should be aware of the following guidelines when you create sessions and call transactions or dialogs:
    •     You must provide data for all required fields on a screen.
    •     You can only specify the initial data for a screen. The system does not accept input as a response to a warning or an error message.
    •     If there is more than one possible screen sequence for a transaction or dialog, your program specifies the screen sequence for the transaction. You must transfer all screens that the dialog user sees to the selected screen sequence. This applies even if the screen itself is not used to input data.
    Direct Input  
    To enhance the batch input procedure, the system offers the direct input technique, especially for transferring large amounts of data. In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not process screens. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. To maintain and start these programs, use program RBMVSHOW or Transaction BMV0.
    Examples for direct input programs are:
    Program     Application
    RFBIBL00     FI
    RMDATIND     MM
    RVAFSS00     SD
    RAALTD11     AM
    RKEVEXT0     CO-PA
    Pls reward points.
    Regards,
    Ameet

  • FV50 - Parking not possible during batch input

    Dear SDN,
    our client has a custom program for GL Document batch input through TCode FV50.
    Though the answer should not be, the question here is very straightforward: why, in this program, the mentioned error occurs for some users, but not for others, giving ALL the input parameters are the same???
    1 - Batch input runs
    2 - FV50 is displayed
    3 - (Menu) Document -> Park
    4 - Error: FP140 - Msg: "Parking not possible during batch input"
    Note: User who gets the error has ALL the authorizations that users who don't get the error have.
    Any suggestion is highly appreciated.
    Regards,
    Fabio

    This message is triggered in SAPMF05A program - MF05AFB0_BELEG_PARKEN include.
    keep a breakpoint at this line and check in debug mode.
    Also since you are using a custom program to call FV50 transaction,
    check if CTU_PARAMS structure is used and try using NOBINPT = 'X' option.
      if sy-binpt ne space.
        call function 'CUSTOMIZED_MESSAGE'
          exporting
            i_arbgb = 'FP'
            i_dtype = 'E'
            i_msgnr = '140'.
        if 1 = 2.
          message e140(fp).
        endif.
      endif.

  • Batch input of a list of values

    Hello,
    I have to make a batch input of a list.
    The screen of the transaction contains a list with 9 lines, if i enter a value in one, another line is added to the list.
    I did record this transaction and have an incremented list in the generated program that looks like this :
    it begins whith ADRPCIT-POST_CODE(01) and increments till 09
    perform bdc_dynpro      using 'SAPLSZRL' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ADRPCDCITY-POST_CODE(08)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'ADRPCDCITY-POST_CODE(08)'
                                  record-POST_CODE_08_017.
    perform bdc_dynpro      using 'SAPLSZRL' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ADRPCDCITY-POST_CODE(09)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'ADRPCDCITY-POST_CODE(09)'
                                  record-POST_CODE_09_018.
    perform bdc_dynpro      using 'SAPLSZRL' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ADRPCDCITY-POST_CODE(09)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLSZRL' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ADRPCDCITY-POST_CODE(07)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'ADRPCDCITY-POST_CODE(07)'
                                  record-POST_CODE_07_019.
    perform bdc_dynpro      using 'SAPLSZRL' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ADRPCDCITY-POST_CODE(08)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'ADRPCDCITY-POST_CODE(08)'
                                  record-POST_CODE_08_020.
    perform bdc_dynpro      using 'SAPLSZRL' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ADRPCDCITY-POST_CODE(09)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'ADRPCDCITY-POST_CODE(09)'
                                  record-POST_CODE_09_021.
    perform bdc_dynpro      using 'SAPLSZRL' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ADRPCDCITY-POST_CODE(09)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    What i did is setting the value of the incremented number to 09 if it's greater than 09 but i'm not sure it's the right way to do it cause i get only 9 records
    My code :
    LOOP AT gt_record ASSIGNING <fs_record>.
        IF sy-tabix > 9.
          ligne = 9.
        ELSE.
          ligne = sy-tabix.
        ENDIF.
        IF ligne > 1.
          IF city_mem EQ <fs_record>-city_code_001.
            flag_end = 'X'.
          ELSE.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=SAVE'.
            PERFORM bdc_transaction USING 'SR10'.
            CLEAR flag_end.
          ENDIF.
        ENDIF.
        city_mem = <fs_record>-city_code_001.
        IF flag_end NE 'X'. "premier passage
          PERFORM bdc_dynpro      USING 'SAPLSZRC' '0100'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'ADRCITYD-CITY_CODE'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'ADRCITYD-CITY_CODE'
                                        <fs_record>-city_code_001.
          PERFORM bdc_field       USING 'ADRCITYD-COUNTRY'
                                        'FR'.
          PERFORM bdc_field       USING 'ADRCITYD-LANGU'
                                        'F'.
          PERFORM bdc_dynpro      USING 'SAPLSZRC' '0200'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'ADRCITYD-COMMU_CODE'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'ADRCITYD-FLAG_STRTS'
                                        'X'.
          PERFORM bdc_field       USING 'ADRCITYD-CITY_NAME'
                                        <fs_record>-city_name_005.
          PERFORM bdc_field       USING 'ADRCITYD-REGION'
                                        <fs_record>-region_006.
          PERFORM bdc_field       USING 'ADRCITYD-TIME_ZONE'
                                        'CET'.
          PERFORM bdc_field       USING 'ADRCITYD-COMMU_CODE'
                                        <fs_record>-commu_code_008.
          PERFORM bdc_field       USING 'ADRCITYD-DEF_LANGU'
                                         'F'.
          PERFORM bdc_dynpro      USING 'SAPLSZRC' '0200'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'ADRCITYD-CITY_NAME'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=PSTC'.
          PERFORM bdc_field       USING 'ADRCITYD-FLAG_STRTS'
                                        'X'.
          PERFORM bdc_field       USING 'ADRCITYD-CITY_NAME'
                                        <fs_record>-city_name_005.
          PERFORM bdc_field       USING 'ADRCITYD-REGION'
                                        <fs_record>-region_006.
          PERFORM bdc_field       USING 'ADRCITYD-TIME_ZONE'
                                        'CET'.
          PERFORM bdc_field       USING 'ADRCITYD-COMMU_CODE'
                                        <fs_record>-commu_code_008.
          PERFORM bdc_field       USING 'ADRCITYD-DEF_LANGU'
                                        'F'.
    *      PERFORM bdc_dynpro      USING 'SAPLSZRL' '0400'.
        ENDIF.
        PERFORM bdc_dynpro      USING 'SAPLSZRL' '0400'.        "ajout2
        lignec = ligne.
        CONCATENATE 'ADRPCDCITY-POST_CODE(' lignec ')' INTO cp.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      cp.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING cp
                                      <fs_record>-post_code_01_016.
      ENDLOOP.
    *  deniere sauvegarde
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
      PERFORM bdc_transaction USING 'SR10'.
      CLEAR flag_end.
      PERFORM close_group.
      PERFORM close_dataset USING dataset.
    Can somebody help me on this one ?
    Thank you,
    Tom.

    If it is table control you may have to pass PageDown after 9 rec & again start with (01)
    record number remains 1 to 9 but Top_line parameter will change to 9or10 after 1 pagedown.
    Cxould be P++
    you can record Pagedown & check recording.

  • 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.

Maybe you are looking for

  • Adobe Premiere Elements 12: This type of file is not supported, or the required codec is not installed

    Hallo! I use Adobe Premiere Elements 12 on my computer (PC, windows 7). When I try do re-open my projects on Adobe Premiere Elements I get the message: This type of file is not supported, or the required codec is not installed. The file type of my sa

  • Axis SOAP adapter

    We tried to use the Axis HTTP protocol in the definition of the communication channel as shown here: Adapter type: SOAP Transport protocol: HTTP Message protocol: Axis Adapter engine: Central Adapter Engine. When we tried to execute the scenario, we

  • Drill Down Error / Report Builder Limitations

    I have been having alot of problems recently with the new version of 7.0.2. A few things that i have noticed is that i can't do drill downs anymore. I don't think it's a coding issue since it was working in the previous 2 releases of Report Builder(7

  • Material Valuation in Delivery

    Hi Gurus, Normally for delivery  and production order the system pick the value from standard price in material master for FG item. In our scenario the prodcution is created based on Sales order. The value is not picking from Standard price. it is pi

  • Garageband. What the heck? Freezing still.

    Still not able to use Chord Trainer at all. I am able to get the lessons to play, until entering into any of the menus. The lesson will then freeze, just like chord trainer does. This software has never been smooth as silk, but they ran at least. Com