Reg : BAPI create GL account

Hi ,
I need to create the GL (Company code data thro FSS1 transaction) .Data is available in Excel file . Is there any BAPI to create GL for this transaction?....
Regards,
Krishna.

Hi
This is a small BDC program which is enough to upload this GL accounts
see the sample code
ABAP Name   :   ZFI_GL_FSS0
Description :   This Program is used to Upload the
                 GL Account Master using Transaction FSS0.
REPORT zfi_gl_fss0
       NO STANDARD PAGE HEADING
       LINE-SIZE 255.
Standard Include for Selection Screen
INCLUDE bdcrecx1.
Internal Table for Upload Data
DATA: BEGIN OF i_gl OCCURS 0,
        saknr(010),            " GL Account
        bukrs(004),            " Company Code
        waers(005),            " Currency
        xsalh(001),            " BAl Local Curr Ind
        mwskz(002),            " Tax Category
       xopvw(001),            " Open Item Ind
       xkres(001),            " Line Item Ind
        zuawa(003),            " Sort Key
        fstag(004),            " Field Category
      END OF i_gl.
Data Variables & Constants
CONSTANTS : c_x             VALUE 'X',  " Flag
            c_tax           VALUE '0'.  " Tax Category
Parameters
PARAMETERS: p_file LIKE ibipparms-path.  " Filename
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
    IMPORTING
      file_name     = p_file.
Start of Selection
START-OF-SELECTION.
Open the BDC Session
  PERFORM open_group.
Upload the File into internal Table
  CALL FUNCTION 'UPLOAD'
    EXPORTING
      filename                = p_file
      filetype                = 'DAT'
    TABLES
      data_tab                = i_gl
    EXCEPTIONS
      conversion_error        = 1
      invalid_table_width     = 2
      invalid_type            = 3
      no_batch                = 4
      unknown_error           = 5
      gui_refuse_filetransfer = 6
      OTHERS                  = 7.
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Upload the Data from Internal Table
  LOOP AT i_gl.
Initial Screen
    PERFORM bdc_dynpro      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN'
                                     '2001'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ACC_CRE'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_KEY-SAKNR'.
    PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                  i_gl-saknr.
    PERFORM bdc_field       USING 'GLACCOUNT_SCREEN_KEY-BUKRS'
                                  i_gl-bukrs.
    perform bdc_dynpro      using
                       'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TAB02'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                  i_gl-WAERS.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XSALH'
                                  i_gl-XSALH.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                  i_gl-MWSKZ.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-ZUAWA'.
   perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                 i_gl-XOPVW.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                  c_x."i_gl-XKRES.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                  i_gl-ZUAWA.
    perform bdc_dynpro      using
                         'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'GLACCOUNT_SCREEN_CCODE-FSTAG'.
    perform bdc_field       using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                  i_gl-FSTAG.
Call The Transaction
    PERFORM bdc_transaction USING 'FSS0'.
  ENDLOOP.
Close the BDC Session
  PERFORM close_group.
Regards
Anji

Similar Messages

  • BAPI Create Contract Account in Module PSCD

    Hi all,
    I have a requirement create Contract Account (TCode CAA1) in module PSCD by BAPI.
    I use BAPI : BAPI_CTRACCONTRACTACCOUNT_CR1.
    I set value for some required parameters and Perform BAPI, i receive 2 error messages in RETURN parameter :
    - Enter a value in field Account Determ. ID
    - Enter a value in field Payment Terms
    I don't know where to set value for Account Determ.ID and Payment Terms in BAPI.
    I searched description of BAPI parameters but there is no BAPI parameter suitable.
    I also searched on this forum but no topic found.
    Pls help,
    Thank.
    nvsinh.

    Hi all,
    The problem is solved.
    The proplem comes from release version of ECC6.
    Thanks all,
    Sinhto

  • How to create an Accounting Document by calling BAPI

    Hai friends ,
    please tell me how to call this BAPI and fulfill all the parameters .. Please help me , I dont know the head and tail of it ...
    create an Accounting Document by calling BAPI  BAPI_ACC_DOCUMENT_POST
    Below is the step to fill the parameters for BAPI:
    Enter company code, invoice no, invoice date, document type, header text into DOCUMENTHEADER
    Enter customer, item text, company code, payment term into ACCOUNTRECEIVABLE
    Enter offset account, company code, document type, item text into ACCOUNTGL
    Enter currency type u201800u2019, currency, exchange rate, amount into CURRENCYAMOUNT. Please note there will be two rows in this table, one positive amount and one negative amount
    Call the BAPI to create the AR document. If p_check is checked, call the BAPI only without COMMIT and then do the message processing
    If p_check is initial, COMMIT the data to the database tables.
    Check the RETURN table after each BAPI, if no u2018Eu2019 message type found, output the document no. Otherwise, output the error messge to the screen with the message type u2018Eu2019.
    thanks in advance ...

    Hi,
    Check the link
    http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=617
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-error-1973720
    http://delaynomore.spaces.live.com/blog/cns!D2BFFB84EDFE4189!528.entry
    http://sap4.com/wiki/index.php?title=BAPI_ACC_DOCUMENT_POST
    http://www.sapfans.com
    Anurodh

  • BAPI to create an account in SAP Banking

    I'm trying to create an account in SAP Banking using BAPI BAPI_BCA_ACCOUNT_CREATE.
    The path for account creation is given below for reference.....
    SAP Menu->Financial Services->Account Management->Account->Account Master Data->Create Account (Transaction BCA_CN_ACCT_01)
            The execution of BAPI is successful and it's generating an internal id. How to get the Account number from this internal id?
            May be, internally it's reserving an account number. For example, If last created account was IN/969696/0000000122/, after running the BAPI, if I try to create an account manually again, then it's creating an account with number IN/969696/0000000124/. But I'm unable to view A/c IN/969696/0000000123/ created by the BAPI in BCA_CN_ACCT_03 as it says the account number doen't exist.
           The same process is working fine when i'm using BDC for transaction BCA_CN_ACCT_01 and I'm able to see the account number in BCA_CN_ACCT_03.
    I'm calling BAPI_BCA_ACCOUNTAM_SAVE_ALL and BAPI_TRANSACTION_COMMIT after calling the BAPI as well.
    Is there any other process involved? Do I have to call any other BAPI to get the account no in external format?
    Kindly help.........

    Hello Keshav,
                           Thanks a lot for your reply......
    The BAPI BAPI_CREATE_ACPOOL is not available in SAP Banking. Currently, I've done it with BDC, to provide a temporary solution.
    KIndly share sample code or documentations for this BAPI, if someone has worked on it.

  • What is the BAPI for creating BP account / contact ?

    Hello experts,
    what is the BAPI for creating BP account / contact ?
    Please replay me as erarly as possible. Urgent requirment.
    Thanks,
    HP

    Hi,
    I think it is for bua1.
    Below are other bapi's which migt be useful:-
    BAPI_BPCONTACT_ADD_TO_ASGN BAPI Partner Sales Activity AddToAssigned
    BAPI_BPCONTACT_CHANGE BAPI Change Partner Sales Activity
    BAPI_BPCONTACT_CREATEFROMDATA BAPI Partner Sales Activity Create from Data
    BAPI_BPCONTACT_CREATEWITHDIA BAPI Partner Sales Activity - Create from Data Dialog
    regards
    Sandipan

  • Bapi to create cusomer accounting

    Hi all,
    can anyonre tel me the bapi to Create Customer (Accounting)
    Thanks

    <b>BAPI_CUSTOMER_CREATE</b>
    Create Customer Master Online
    With this method, you can create or extend a customer.
    <b>BAPI_CUSTOMER_CREATEFROMDATA</b>
      Note: In SAP R/3 4.5A, this BAPI is replaced by BAPI
    "<b><i>BAPI_CUSTOMER_CREATEFROMDATA1</i></b>", which takes full account of the
    integration of customer address data in Central Address Management
    (CAM). As this BAPI ("BAPI_CUSTOMER_CREATEFROMDATA") is being replaced,
    it will only be supported for 2 releases after SAP R/3 4.5A.
    This method of the "Customer" business object can be used to create a
    customer in SAP R/3 on the basis of entered address data (import
    parameter PI_ADDRESS).
    The entered address data has a direct influence on the master data,
    company code data and contact person data. One contact person record is
    created for the customer to be created.
    All the master data, company code data, sales area data, and tax code
    data that is not entered is adopted from a reference customer, and from
    sales area data (sales organization, distribution channel and division -
    import parameter PI_COPYREFERENCE).
    (Exception: Currency field of the sales area data. This field can be
    transferred to the BAPI via structure PI_ADDRESS via the currency fields
    (in R/3 or in ISO format).
    If both currency fields are transferred to the BAPI, the currency field
    in R/3 format has priority.
    If both currency fields are blank when transferred to the BAPI, the
    currency field is determined using table T005, on the basis of the
    country that is specified.
    Message was edited by:
            Chandrasekhar Jagarlamudi

  • Problem in creating an account document using BAPI_ACC_DOCUMENT_POST

    Hi Experts,
    I have a porblem while creating an account document from BAPI_ACC_DOCUMENT_POST.
    The problem is acc document is geeting posted and I am getting an document number for that bapi, but its not getting saved to data base and I am getting the following error message
    "Document 1900004327 3000 does not exist in fiscal year 2005
    Message no. F5A397
    System Response
    The required document either does not exist in the fiscal year or is still being posted.
    When the document is read, archived documents are also considered."
    Please sugggest...
    We are using ECC 6.0
    Thanks,
    Suma.

    Hi,
    this means that the posting is not open...
    try with 2008...
    or else ask ur financial consultatto check, whether the 2005 is open or not.
    u also try posting manually using FB01 with same entries u r using for this BAPI...so that u can track the error.
    Also use BAPI_TRAACTION_COMMIT after bapi post.
    check ur subsystem which u r passing for the BAPI..
    wa_general-assetsubno = '0000'. Is it 3000 or 0000
    Try using 0...
    Edited by: Sumi Vasu on May 14, 2008 8:13 AM

  • Remove admin "Create user account" privileges

    I have set up an admin account and installed Norton Family to monitor internet usage. Problem is the admin user is creating another account each time it wants to see restricted sites, and deletes it when done.
    The user needs full admin access to install programs and use external drives.
    Is there anyway I can disable the "create new user" feature? maybe break something in reg? This admin is the primary account, I'd like to have my windows 7 system running one account only.
    Thanks
     

    Hi,
    I totally agree with arnavsharma's view.
    Windows 7 allows multiple users to share the same computer using different accounts. It is advised that each account on the computer be setup as a Standard User, which has limited permissions, so that it is harder for malware to infect the computer.
    Then please follow “How to configure standard user to install driver” tutorial to use external drives
    Allow Standard Users to Install Drivers For Devices from Specified Setup Classes
    http://technet.microsoft.com/en-us/library/cc770453(WS.10).aspx
    Configure Computer Policy to Allow Non-Administrators to Install Specific Devices
    http://technet.microsoft.com/en-us/library/cc725772.aspx
    In addition, there is no idea to allow standard users to install software.
    Karen Hu
    TechNet Community Support

  • Auto Script which creates SAP Account when AD gets created.

    Hello Experts - Requirement is "Create SAP User account automatically when AD account gets created", can I acheive this through ECATT scripts?
    If this is possible, idea is to create an ECATT script and schedule it to run every night to find all new users on AD and create their account on SAP and lock their accounts.
    Do you think this can be acheived thru ECATT's?
    If not ECATT, is there any way out to acheive my objective. We are planning to reduce overhead for SAP User admins, I was thinking on following steps:
    1) New User request for AD
    2) After approval create AD account
    3) Design a scrip, which will look for all new users on AD and will create & lock them on SAP (Nightly Job or something)
    Your thoughts?
    Your suggestions are much appreciated.
    Thanks.

    Hi Martin,
    I have a customer with 16 million users in SU01. They don't use IdM and don't need it either at the moment.
    I have another customer with 700 users and they are implementing IdM because it makes sense. They need it to reduce complexity.
    There are no IdM license costs, unless you provision non-SAP systems.
    You can skip GRC by using a well designed concept for report RSUSR008_009_NEW if it meets your requirements - particularly the number of systems. It does however have it's limits (per ABAP client) and is not user friendly at first. Also no nice pie-charts for managers, etc.
    Emergency User Access comes in many shapes and sizes... SAP declined a development suggestion from me to improve the "FireFighter" tool so I developed it on my own for my customers using BAPIs and they are happy. The main requiremenent not fullfilled is that the user context changes so that you loose access to HR data, queries, variants, workflow items, purchase orders, etc. The FireFighter users also become obvious targets of attacks and the application users (dialog) need authority to change the FireFighter's passwords to use the application  - which means that they can use RFC to do the same without using the FireFighter transactions / logs / etc.
    Regarding other IdMs, I have experience with some, but documented here on SDN is only the password syncronization problems which Novell suffers from. These "problems" are intentional - or better said --> their own fault for using "hacks"...
    If you search for "Novell" you will find them.
    Cheers,
    Julius

  • When I attempt to send a text from the new iPad, a dialog box appears with the option to either sign in with Apple ID Password or Create New Account. I try signing in using my Apple ID password but IMessage informs me that email address cannot be verified

    When I attempt to send a text from the new iPad, a dialog box appears with the option to either sign in with Apple ID Password or Create New Account. I try signing in using my Apple ID password but IMessage informs me that email address cannot be verified because it is already in use ??? What am I doing wrong?

    settings -> iTunes & App Store
    click on apple ID listed there
    select Sign Out
    sign in with the proper account
    from then on, when the store ask for your password it should be with the correct ID

  • When creating iTunes account, my mom provided her credit card information and the system does not accept pre populated province and gives the error message ("please enter at most 3 letters or numbers for province") how does she get past this?

    Why is my mom getting the error message for province when trying to create iTunes account when providing her credit card information?

    Hi Nahal,
    I'm just wondering, is it possible that your Mom (originally) got her credit card in a different province?
    I don't know much, but of this I am certain:  Apple would absolutely, positively, love to help you create an iTunes account!
    Otherwise, you can start here > http://support.apple.com/kb/HE57
    Best Regards,
    mm~

  • Can't create new account at EFAX after purchase of HP 6520 e-all in one series printer

    Hello, I just purchased my printer yesterday.So far everthing seems to be working except for creating an account with efax. It takes me to this link: https://www.efax.com/promohp?v=1&tp=HPSW&locale=en-CA&eID=A60F380B434B42506C0D7E7F4095D79C6E823E7D But the 'Create an account' button is greyed out and cannot be clicked on. I am wondering what I am doing wrong?  Thank you,Tracy  

    Hello tt927! I work for eFax and I can help you to subscribe to your free eFax/HP account. I'm sending you a private message indicating the additional information I require to fulfill your request.    

  • I am new to IPAD and I want o use facetime, how can I use it to communicate with my mac at home, do I need to create another account with a different email account

    I am new to IPAD and I want o use facetime, how can I use it to communicate with my mac at home, do I need to create another account with a different email account

    do I need to create another account with a different email account
    Yes, the email addresses need to be unique to each device. You may use the same Apple ID on each device, but the email address used by each device needs to be different.

  • After downloading Mozilla Firefox 4.0 Beta to my desktop I restarted the computer, but I do not receive any prompts to create an account with a Secret Password. How do I set up the account if the prompt never show up?

    Several months ago I installed the Firefox Home app on my iPhone to sync the bookmarks that I had on my Windows XP home computer. It has worked just fine until a few days ago. Just recently I was notified that the app would no longer work because of changes that have been made. I have tried to follow the instructions that were emailed to me regarding how to setup the new Firefox Sync add-on, but I am having a problem. After downloading Mozilla Firefox 4.0 Beta to my desktop and restarting my computer, I do not receive any prompts to create an account with a password and a secret phrase, as the instructions specify. How do I set up the account if the prompt never shows up?

    Click on the Firefox button then select Options to open the Options dialog. Now go to the Sync panel for the option to setup a new account.

  • A friend created 3 accounts on his iPhone 5 but forgot the passwords. He can't reset the password as yahoo address is no longer valid. Erasing the phone doesn't solve the issue. How to register the phone with Apple?

    A computer illiterate friend created 3 accounts on his iPhone 5 but forgot the passwords. He can't reset the password as his yahoo address is no longer valid. Erasing the phone doesn't solve the issue as the Apple server identifies the hardware as registered. How to register the phone with Apple?
    I helped him create a new email address and new iCloud account on my Mac but when we try to register the phone with Apple it says: Maximim accounts limit reached for this device. How can he register the phone? I read different threads and found out that only Apple care can do that. We're in Romania and don't know where to call. Any suggestions on how we fix this?

    When I checked the support site for Romania, you apparently don't have an Apple Care contact center.  You "may" try calling the US Apple care number to verify the account and have the password reset sent to a different email address.  800-694-7466

Maybe you are looking for

  • How to delete songs from music file

    Would like to delete all songs from my music file...could delete playlist but not the individual songs

  • Register marks move to top of imposed PDF after color convert

    I have an imposed PDF made up of 16 smaller files...It is imposed from Metrix and it creates a PDF. I need to map the spot colors onto the color bar...I go to (ink manager) change the colors then (color convert) to map the colors and the register mar

  • Is it possible to apply effects at an increasing rate

    I guess i would like is to apply effects like reverb or detune that start off suttle and reach a peak i choose and contuniue till i want them to either fade away or stop? i believe this would be some kind of morphing or variable intensity included wi

  • Need help forcibly ejecting a CD.  I've tried *everything*

    Hello all, I attempted to burn an ISO to a brand new CD-RW disc on an Intel 1.86Ghz Mac running OS X 10.4.6. Unfortunately, after preparing the file to be written, OS X produced an error dialogue about the CD being unable to be written to (it had don

  • Is there any option to select Desktop Software from various versions ?

    Hi, I am using blackberry curve 9300 for more than one year. To manage my phone I downloaded and working with desktop software 5.x for my purpose. I am using Windows XP SP2 for my PC and it's working fine for all of my purposes. One week ago, I took