Upload Journal Voutures of customer master from the Excel sheet using BAPI

Hi experts,
Can U have any sample program so that it can help me for my coding.

Hi,
You need write the abap program in the following manner,
1. Read the data from the excel sheet and then enforce the checks if at all any in the new program.
2. Fill all the parameters of the BAPI *BAPI_CASHJOURNALDOC_CREATE *.
3. After the above BAPI call, you need to call another *BAPI_TRANSACTION_COMMIT *.
4. Once Transaction commit bapi is successfully executed then only you will get the document number.
Please follow all the above mentioned steps then you can create the Journal Voutures migrated from an excel sheet to SAP successfully.
Thanks,
Mahesh.

Similar Messages

  • Change an Object property based on a value coming from the Excel sheet

    hi all
    i've been able to bind a value from the excel sheet to my my component
    but i want to change a property of an object in my component based on this value at the run time.
    during the design time, it works fine
    for example, if my value called "_xvisible"
    and i use to it to hide some object.
    if i set _xvisible during the design time in excel, it works fine in the run mode.
    but during the run mode, if the value got changed, there is no affect.
    thank you
    Amr

    Hi
    See the xcelsius samples present inside xcelsius SDK. there are examples describing how to bind data which will work at runtime also.
    Hope this helps
    Rush-me

  • How to read data from the excel file using java code.

    Hi to all,
    I am using below code to getting the data from the excel file but I can't get the corresponding data from the specific file. can anyone give me the correct code to do that... I will waiting for your usefull reply......
    advance thanks....
    import java.io.*;
    import java.sql.*;
        public class sample{
                 public static void main(String[] args){
                      Connection connection = null;
                          try{
                               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                               Connection con = DriverManager.getConnection( "jdbc:odbc:Mydsn","","" );
                               Statement st = con.createStatement();
                               ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );
                               System.out.println("sample:"+rs);
                                  ResultSetMetaData rsmd = rs.getMetaData();
                                  System.out.println("samplersd:"+rsmd);
                               int numberOfColumns = rsmd.getColumnCount();
                                  System.out.println("numberOfColumns:"+numberOfColumns);
                                   while (rs.next()) {
                                            System.out.println("sample1:"+rs);
                                            for (int i = 1; i <= numberOfColumns; i++) {
                                                 if (i > 1) System.out.print(", ");
                                                 String columnValue = rs.getString(i);
                                                 System.out.print(columnValue);
                                            System.out.println("");
                                       st.close();
                                       con.close();
                                      } catch(Exception ex) {
                                           System.err.print("Exception: ");
                                           System.err.println(ex.getMessage());
                        }

    1: What is the name of the excel sheet?
    2: What is printed in this program? null ? anything?
    error?Excel file name is "sample.xls" I set excel file connectivity in my JDBC driver(DSN). Here in my program I am not giving that excel file name. I am giving only that excel sheet name. that is followed
    ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );The output of this program is given bellow.
    sample:sun.jdbc.odbc.JdbcOdbcResultSet@1b67f74
    samplersd:sun.jdbc.odbc.JdbcOdbcResultSetMetaData@530daa
    numberOfColumns:2

  • How to trigger the workflow from the excel sheet

    hello friends,
    my problem is that i should trigger the workflow from a excel sheet which contains a list of appraisers and appraisees.how to do this. can anyone  help on this.
    thanks.

    Hi Murthy,
    If you are asking if a workflow can be started on R/3 while in Excel - may be possible if you can develop some fancy macros that can make RFC calls to an ABAP function module. I won't even attempt to travel that route.
    Save the excel sheet as CSV or Tab delimited file and process it using ABAP. You can use the WAPI function module SAP_WAPI_CREATE_EVENT (Rel 4.7)to start the Workflow by raising the relevant event. In earlier releases, see FM SWE_EVENT_CREATE.
    Please do keep in mind there could be performance and response time issues for dialog users of the system if you are going to start several workflows using a report program.
    Cheers,
    Ramki.

  • Customer Master export to excel sheet

    Hi Friends,
    How can I export/download the customer master details (general data, sales are data and company code data) in an excel sheet from the system.
    Regards,
    Wasim.

    HI,
    Go to Se16 and download the tables KNA1 (General Data), KNB1 (Company code data), KNVV (Sales area data).
    How to download:  Menu bar - system - list - save local file -- spreadsheet.
    Br.
    Ramana

  • Uploading data from excel sheet using BAPI (BAPI_ACC_MANUAL_ALLOC_POST)

    Hi,
    I am Using BAPI_ACC_MANUAL_ALLOC_POST (Manual cost allocation) for uploading into database. But i am getting the error "DO NOT USE COST ELEMENT xxxxxxxx FOR REPOST COSTS".
    can anyone explain me the possible reasons for  this error.
    any help will be rewarded.
    Thanks and Regards,
    Gautham Paspala

    Hi,
    Refer to the following code:
    DATA: lv_filetype(10) TYPE c,
            lv_gui_sep TYPE c,
            lv_file_name TYPE string.
      lv_filetype = 'ASC'.
      lv_gui_sep = 'X'.
      lv_file_name = pa_dfile.
    FM call to upload file
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lv_file_name
          filetype                = lv_filetype
          has_field_separator     = lv_gui_sep
        TABLES
          data_tab                = gi_zhralcon_file
        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.
    The excel file must be a tab delimited file.
    Hope it helps.
    Regards,
    Rajesh Kumar

  • Material Master: Update the Z fields using BAPI

    Hi to all,
    My requirement is simple. But I do not have much knowledge on BAPI. I have got some information that we can extend th BAPI and update the Z fields in material master. I have added the z fields in MARA. So when I call the bapi z fields has to get update.
    Which BAPI can i use? I have got one BAPI - BAPI_MATERIAL_SAVEDATA.   plz suggest me to do it.
    1. how do i enhance the BAPI or extend th BAPI.
    2. Is ther any approch to do it.
    thnks
    Yerukala Setty

    Hi,
    Append the z fields to BAPI_TE_MARA and BAPI_TE_MARAX structures using append structures.
    Populate two structures for the fields in BAPI_TE_MARA and BAPI_TE_MARAX.
    To BAPI_MATERIAL_SAVEDATA, under EXTENSIONIN parameters, pass structure name as BAPI_TE_MARA and Value Part1, 2, 3, 4 with the filled structure info.
    Similarly append X structure as well.
    Regards,
    Ganga

  • How  to Retreive data from the SAP  by using  BAPI's  through the Web .

    Shashi

    <copy&paste_and_everything_else_removed_by_moderator>
    Edited by: Julius Bussche on Sep 3, 2008 8:54 AM

  • Upload the excel sheet in table maintenance

    Hi,
    I have a requirement to add a button in the application toolbar of the table maintenance screen of a custom table. This button should upload the excel sheet data into the maintenance screen online.
    I have created the button in the table maintenance generator. Also, uploaded the data into the internal table from the excel sheet.
    The problem is I am unable to populate the data from the internal table to the maintenance screen online.
    Any pointers in this regards will be appreciated.
    Thanks,
    Best regards,
    Ajith

    Hi Mukul,
      I created a custom table ZHEDGERES. Then in the table maintenance -> environment -> modification -> user interface I selected Individual interface.
      Then, in the Menu painter for the program SAPLZHEDGERES, modified the PF status EULG and added the additional button in the Application toolbar. This application toolbar needs to be used to trigger the upload of excel into the custom table.
      Below is the standard code which is generated in the screen painter of the custom table.
    PROCESS BEFORE OUTPUT.
    MODULE LISTE_INITIALISIEREN.
    LOOP AT EXTRACT WITH CONTROL
      TCTRL_ZHEDGERES CURSOR NEXTLINE.
       MODULE LISTE_SHOW_LISTE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE LISTE_EXIT_COMMAND AT EXIT-COMMAND.
    MODULE LISTE_BEFORE_LOOP.
    LOOP AT EXTRACT.
       MODULE LISTE_INIT_WORKAREA.
       CHAIN.
        FIELD ZHEDGERES-HDATE .
        FIELD ZHEDGERES-CHAIN .
        FIELD ZHEDGERES-HEDGE_VALUE .
        FIELD ZHEDGERES-CURRENCY .
        MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
       ENDCHAIN.
       FIELD VIM_MARKED MODULE LISTE_MARK_CHECKBOX.
       CHAIN.
        FIELD ZHEDGERES-HDATE .
        MODULE LISTE_UPDATE_LISTE.
       ENDCHAIN.
    ENDLOOP.
    MODULE LISTE_AFTER_LOOP. 
      Need to add logic to extract the values from the excel sheet to an internal table and append the values from the internal table to the table control of the table maintenance.
    Thanks,
    Best regards,
    Ajith

  • Help required in creating a dimension from an excel sheet

    Hello all ,
    We have a new requirement ,where we need to create a Dimension from an excel sheet. I tried creating it from a . csv file. But , I am not sure how to set the across, down statement ( if any) . The procedure is able to peek the data from the excel sheet. But , it says that the dimension member is not a selected member of variables. We have not created any variable yet. The transcript of the procedure is below :
    remove dimension MODULE
    ACCESS EXTERNAL
    USE 'C:\module.csv'
    DESCRIPTION FREE ,
    peek only 5
    read
    BEGIN
    construct MODULE
    level MODULE_CD
    label MODULE_DESC
    preface "custom 5 allocate 1000,30,1"
    END
    end
    compile dimension MODULE
    Please advise
    Thanks and Regards
    Vijay

    Hi Vijay,
    I believe you should be identifying the fields you have in your csv file, in your case MODULE_CD and MODULE_DESC:
    DESCRIPTION FREE ,
    MODULE_CD text 10
    MODULE_DESC text 20
    Can you try that to see if it makes a difference?
    Regards!
    Ricardo

  • Conneting the microsoft excel sheet using jdbc

    HI all
    my requirement is to connect to the excel sheet using the jdbc odbc dsn and read the worksheets and get the data.
    i have created the dsn using vb scripting
    so when i click on a button. a dsn is created dynamically and the same dsn is passed as parameter to the system which will call a java program
    the java program will us the dsn to connect to the excel sheet to read the data.
    This is working fine
    the problem is sometimes the following exception is raised.
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.zt.ebiz.install.client.ExcelDriver.getConnection(ExcelDriver.java:290)
    at com.zt.ebiz.install.client.ExcelDriver.getHostInfo(ExcelDriver.java:337)
    at com.zt.ebiz.install.client.InstallClient.executeActions(InstallClient.java:188)
    at com.zt.ebiz.install.client.InstallClient.main(InstallClient.java:123)
    For this we are just restarting the system.
    Again it works fine.
    i would like to know the cause of this problem.
    please help me in this
    thanks
    Vijay Sunder

    It may be occured because of connection closing, make it sure to close connections after your transactions completed.

  • Reg: LSMW to Upload Unlaoding Points to Customer Master

    Dear Gurus,
    I have created an LSMW program to upload "Unloading Points" into Customer Master Record.
    It is working fine with single Unloading Point.
    There are multiple Unloading Points need to be maintained for every Customer.
    Can anyone provide me the logic to maintain multiple unloading points in Customer Master?
    XD02-ABLAD = XD02_S-ABLAD.
    Here the "ABLAD" is the Unloading Point.
    Regards,
    RK

    looks like you did a recording.
    in the standard given methods like IDOC, there you would have an extra record for the unloading point, you would just add as much records as you need.

  • Deleting AET custom field from the SAP tableu2019s level.

    Hi experts,
    I am deleting few un-used custom fields in AET. I am able to see delete symbol as status in AET. Although deleted custom fields are present in lot of structure and tables (eg: CRMD_ORDERADM_H) in SAP GUI tables. I want to delete the custom field from SAP GUI tables and structures.
    I tried to delete custom field from the SAP GUI tableu2019s level. But it is not allowing.
    Please get me some clue on deleting custom field from the SAP GUI tableu2019s level.
    Thanks in advance
    Chand

    Hi,
    The deletion of custom field in AET happens in two steps:
    1. You select a custom field that you want to delete, than you press on the delete icon in the Custom Field Assignment Block.
        Doing this, you mark the selected custom field to be deleted.
    2. You press on "Save and Generate" button. The "Save" will persist the deletion mark of the custom field. It means the custom field is marked to be deleted in the database. The "Generate" will process all the deletion of objects which are needed to delete the custom field, for example: Domain, Data Element, Append, etc.
    If the "Generate" does not happen due any reason, the deletion mark is already persisted in DB. It means, later on if you go back to AET, you will see that the custom field is marked to be deleted, but it is not yet deleted.
    If you do not press "Save and Generate" button at all, it means, you do not persist the deletion mark in DB. Later on if you go back to AET, you won't see that the custom field marked to be deleted.
    Note: Please make sure, "Generation" is only applied for field that is flagged to be generated. The "Generate" flag column is by default hidden. You can use personlization to show the column.
    Regards,
    Steve

  • [NIO] custom messages from the netwerk

    Hi you all,
    Yes this is another NIO question :)
    Ok I have the following situation, I've got a NIO server which reads custom messages from the netwerk. These messages consists of an interger and then a variable byte array.
    int -> length of the message
    byte array -> data of message (could be anything)
    On my local network it works fine because I don't have to worry about my read() not reading all the bytes the client send. So I can just use the ByteBuffer.getInt() to read the int and create a buffer for the byte array etc.
    But... on the intenet there is no garentee all the bytes are read. So if only the first 3 bytes of the whole message are in my read buffer and I call the getInt() I'll get an exception.
    How would you fix this? The only garentee is that I will always have 1 byte (except when a connection is closed or other error)
    I could create of small bytebuffer of 4 bytes and wait till it's full and then read the int, but what if I also have a length that can consist out of like 5 or 6 bytes... and I don't know by forehand if it's 4 or 5 or 6... or just 2...
    Any idear would be welcome... or even code if you have the time...
    Grtz
    David

    Use ByteBuffer[] { lengthField, dataField } as a structure for messages. Set the size of the length field statically as part of the protocol. Set dataField's limit to 0. Do readsinto this structure (there is an appropriate read method for an array of ByteBuffers) until there lengthField.remaining() == 0. At this point, read the int/long/whatever from lengthField and set dataField's limit to that. Then do the reads necessary until dataField.remaining() == 0. At this point, you'll have your whole message.
    The reason that I say "do reads" is that on any particular read you may only get one byte's worth of data. Therefore you have to hold this partially completed message in some variable, or as an attachment to the SelectionKey which was selected. As the Channel continually gets selected for OP_READ, you can do the above steps, and if there's not enough left in the channel, you just leave the message partially completed for the next OP_READ. Once it's complete, you do what you need to with it, and replace the attachment or variable with an empty ByteBuffer[] of the above format.
    --Dan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Running SCOM ACS in multiple customer environments from the same SCOM management group ?

    We are currently monitoring multiple customer environments from the one SCOM management group and are looking at possibilities of using ACS for auditing. 
    Is this technically possible ?  Does the ACS collector service need to sit on the customer side ?  could it be installed on the same server acting as the SCOM gateway server ?

    Hi,
    The number of ACS forwarders that can be supported by a single ACS collector and ACS database can vary, depending on many factors, such as the number of events that your audit policy generates, the role of the computers that the ACS forwarders monitor.
    If your environment contains too many ACS forwarders for a single ACS collector, you can install more than one ACS collector. Each ACS collector must have its own ACS database.
    An ACS Collector must be installed on computers running Operations Manager management server and for security reasons, it must also be a member of an Active Directory domain.
    More details please refer to the article below:
    http://technet.microsoft.com/en-us/library/hh212908.aspx
    Regards,
    Yan Li
    Regards, Yan Li

Maybe you are looking for