Customized java date function in heart of JDK

hi
how can i force JDK to return Persian or Arabic date instead of christian era?
i have an application in java platform. i couldn't change code of program, because source is closed and is not reachable. i want to know how can i use a wrapper for date function in java? if it is possible how can i replace java date functionality with my desired date function?
thanks for any help

Thanks for your help.
however i looking for one thing, similar a function wrapper that can substitute original method.
I don't know where the application use date function and how calls it. so i think that it is possible to change behavior of java itself.

Similar Messages

  • How to do sorting/filtering on custom java data source implementation

    Hi,
    I have an entity driven view object whose data should be retrieved and populated using custom java data source implementation. I've done the same as said in document. I understand that Query mode should be the default one (i.e. database tables) and createRowFromResultSet will be called as many times as it needs based on the no. of data retrieved from service, provided we should write the logic for hasNextForCollection(). Implementation sample code is given below.
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) {      
    Iterator datumItr = retrieveDataFromService(qc, params);
    setUserDataForCollection(qc, datumItr);
    hasNextForCollection(qc);
    super.executeQueryForCollection(qc, params, noUserParams);
    protected boolean hasNextForCollection(Object qc) {
    Iterator datumItr = (Iterator) getUserDataForCollection(qc);
    if (datumItr != null && datumItr.hasNext()){
    return true;
    setCallService(false);
    setFetchCompleteForCollection(qc, true);
    return false;
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet) {
    Iterator datumItr = (Iterator) getUserDataForCollection(qc);
    Object datumObj = datumItr.next();
    ViewRowImpl r = createNewRowForCollection(qc);
    return r;
    Everything is working fine include table sorting/filtering. Then i noticed that everytime when user perform sorting/filtering, executeQueryForCollection is called, which in turn calls my service. It is a performance issue. I want to avoid. So i did some modification in the implementation in such a way that, service call will happen only if the callService flag is set to true, followed by executeQuery(). Code is given below.
    private boolean callService = false;
    public void setCallService(boolean callService){
    this.callService = callService;
    public boolean isCallService(){
    return callService;
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams){
    if (callService)
    Iterator datumItr = retrieveDataFromService(qc, params);
    setUserDataForCollection(qc, datumItr);
    hasNextForCollection(qc);
    super.executeQueryForCollection(qc, params, noUserParams);
    Issue i have:
    When user attempts to use table sort/filter, since i skipped the service call and set null as userDataCollection, createRowFromResultSet is not called and data which i retrieved and populated to view object is totally got vanished!!. I've already retrived data and created row from result set. Why it should get vanished? Don't know why.
    Tried solution:
    I came to know that query mode should be set to Scan_Entity_Cache for filtering and Scan_View_Rows for sorting. I din't disturb the implementation (i.e. skipping service call) but overrided the executeQuery and did like the following code.
    @Override
    public void executeQuery(){
    setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    super.executeQuery();
    By doing this, i could able to do table filtering but when i try to use table sorting or programmatic sorting, sorting is not at all applied.
    I changed the code like beolw*
    @Override
    public void executeQuery(){
    setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
    super.executeQuery();
    Now sorting is working fine but filtering is not working in an expected way because Scan_View_rows will do further filtering of view rows.
    Question:
    I don't know how to achieve both filtering and sorting as well as skipping of service call too.
    Can anyone help on this?? Thanks in advance.
    Raguraman

    Hi,
    I have an entity driven view object whose data should be retrieved and populated using custom java data source implementation. I've done the same as said in document. I understand that Query mode should be the default one (i.e. database tables) and createRowFromResultSet will be called as many times as it needs based on the no. of data retrieved from service, provided we should write the logic for hasNextForCollection(). Implementation sample code is given below.
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) {
      Iterator datumItr = retrieveDataFromService(qc, params);
      setUserDataForCollection(qc, datumItr);
      hasNextForCollection(qc);
      super.executeQueryForCollection(qc, params, noUserParams);
    protected boolean hasNextForCollection(Object qc) {
      Iterator datumItr = (Iterator) getUserDataForCollection(qc);
      if (datumItr != null && datumItr.hasNext()){
        return true;
      setFetchCompleteForCollection(qc, true);
      return false;
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet) {
      Iterator datumItr = (Iterator) getUserDataForCollection(qc);
      Object datumObj = datumItr.next();
      ViewRowImpl r = createNewRowForCollection(qc);
      return r;
    }Everything is working fine include table sorting/filtering. Then i noticed that everytime when user perform sorting/filtering, executeQueryForCollection is called, which in turn calls my service. It is a performance issue. I want to avoid. So i did some modification in the implementation in such a way that, service call will happen only if the callService flag is set to true, followed by executeQuery(). Code is given below.
    private boolean callService = false;
    public void setCallService(boolean callService){
      this.callService = callService;
    public boolean isCallService(){
      return callService;
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams){
      if (callService) {
        Iterator datumItr = retrieveDataFromService(qc, params);
        setUserDataForCollection(qc, datumItr);
      hasNextForCollection(qc);
      super.executeQueryForCollection(qc, params, noUserParams);
    }Issue i have:
    When user attempts to use table sort/filter, since i skipped the service call and storing of userDataCollection, createRowFromResultSet is not called and data which i retrieved and populated to view object is totally got vanished!!. I've already retrived data and created row from result set. Why it should get vanished? Don't know why.
    Tried solution:
    I came to know that query mode should be set to Scan_Entity_Cache for filtering and Scan_View_Rows for sorting. I din't disturb the implementation (i.e. skipping service call) but overrided the executeQuery and did like the following code.
    @Override
    public void executeQuery(){
      setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
      super.executeQuery();
    }By doing this, i could able to do table filtering but when i try to use table sorting or programmatic sorting, sorting is not at all getting applied.
    I changed the code like below one (i.e. changed to ViewObject.QUERY_MODE_SCAN_VIEW_ROWS instead of ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS)
    @Override
    public void executeQuery(){
      setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
      super.executeQuery();
    }Now sorting is working fine but filtering is not working in an expected way because Scan_View_rows will do further filtering of view rows.
    If i OR'ed the Query Mode as given below, i am getting duplicate rows. (vewObject.QUERY_MODE_SCAN_ENTITY_ROWS | ViewObject.QUERY_MODE_SCAN_VIEW_ROWS) Question:
    I don't know how to achieve both filtering and sorting as well as skipping of service call too.
    Can anyone help on this?? Thanks in advance.
    Raguraman
    Edited by: Raguraman on Apr 12, 2011 6:53 AM

  • How to execute Custom java data source LOV view object from a common mthd?

    Hi,
    My application contains Custom java data source implemented LOVs. I want to have a util method which gets the view accessor name, find the view accessor and execute it. But i couldn't find any API to get the view accessors by passing the name.
    Can anyone help me iin how best view accessors can be accessed in common but no by creating ViewRowImpl class (By every developer) and by accessing the RowSet getters?
    Thanks in advance.

    I am sorrry, let me tell my requirement clearly.
    My application is not data base driven. Data transaction happens using tuxedo server.
    We have entity driven VOs as well as programmatic VOs. Both are custom java data source implemented. Entity driven VOs will participate in transactions whereas programmatic VOs are used as List view object to show List of values.
    Custom java datasource implementation in BaseService Viewobject Impl class looks like
            private boolean callService = false;
        private List serviceCallInputParams = null;
        public BaseServiceViewObjectImpl()
            super();
         * Overridden for custom java data source support.
        protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams)
            List dataFromService = null;
            if(callService)
                callService = retrieveDataFromService(serviceCallInputParams);
            setUserDataForCollection(qc, dataFromService != null? dataFromService.iterator(): null);   
            super.executeQueryForCollection(qc, params, noUserParams);
         * Overridden for custom java data source support.
        protected boolean hasNextForCollection(Object qc)
            Iterator<BaseDatum> datumItr = (Iterator<BaseDatum>) getUserDataForCollection(qc);
            if (datumItr != null && datumItr.hasNext())
                return true;
            callService = false;
            serviceCallInputParams = null;
            setFetchCompleteForCollection(qc, true);
            return false;
        }Individual screen developer, who want to load data to VO, will do something like the below code in their VO impl class
        public void fetch()
            BaseServiceViewObjectImpl vo = this;
            vo.setCallService(true);
            vo.setServiceCallInputParams(new ArrayList());
            vo.executeQuery();
        }As these custom java data source implemented LOV VOs comes across the screens, i want to have a util method at Base VOImpl class, that gets the view accessor name, finds the LOV VO instance, retrieves data for that. I want to do something like
         * Wrapper method available at Base Service ViewObject impl class
        public void fetchLOVData(String viewAccessorName, List serviewInputParams)
            // find the LOV View object instance
            BaseServiceViewObjectImpl lovViewObject  = (BaseServiceViewObjectImpl) findViewAccessor(viewAccessorName);
            // Get data for LOV view object from service
            lovViewObject.setCallService(true);
            lovViewObject.setServiceCallInputParams(serviewInputParams);
            lovViewObject.executeQuery();
    Question:
    1. Is it achievable?
    1. Is there any API available at View Object Impl class level, that gets the view accessor name and returns the exact LOV view object instance? If not, how can i achieve it?

  • Custom JAVA/ABAP functions in VC

    Hello gurus!
    status: I'm using NW2004s: EP7 SP8 & BI SP9;
    In visual composer I am trying to shuffle/duplicate/replace/add rows in a resulting table view, which gets data from bw query.
    I can use Expressions in VC to work with columns, but not really to work with rows (exception is to set text style/color/etc. in cell per row).
    So, I wonder if it is possible to create a function (for example in JDK or in ABAP), and then use it in visual composer (like one can use BAPI from R3 connection type) to receive-in data from above mentioned table view, to transform it and then to output it (in a new table view)?
    All ideas will be appreciated,
    --- Kaspars

    See this example of ABAP Webdynpro in VC.
    /people/thomas.jung/blog/2006/09/26/combining-abap-and-visual-composer

  • Java Subscription Function

    I created a custom java subscription function to be called from a business event and it worked fine the first time but when I started to add lines of code to it, those new lines are not being executed. I even tried deleting the class file and it was still executing the old code. It looks like the java class is being loaded in a jvm. Can you guys point me to the jvm that handles the java subscription function? What process do I need to restart to flush the jvm. If it is something else other than the jvm, what do i need to restart for the new class to take effect? Any documentation on the architecture will be helpful as well.

    You are attempting to use Business Event system to get a status back to the calling program (in your case Product Workbench). Please note that your calling transaction (Product Workbench transaction) and the Business Event subscription's transaction are different.
    Once you raise the business event, the BES sets a savepoint before executing the subscription and rolls back to that subscription when you raise the BusinessEventException. So the subscription transaction is rolledback but the exception is not really raised back to the Product Workbench.
    If you are on Oracle Applications 12.0 you have a workaround though. The BusinessEvent class provides a new method called getResponseData. So you may pass a status back to the calling program by setting the response data of BusinessEvent object and from Product Worbench, call getResponseData and decide whether to continue or rollback the transaction.
    Thanks

  • F4 / Help Functionality for input field in custom java iView

    Hi,
    As we see many F4 help on each input field in a transaction, how can we mimic the same functionality in a Custom Java iView. For example, ME23N, you can search a PO based on some criteria, when i create a new custom java iview using BAPI_PO_DISPLAY, how can provide that F4 or help functionality to the Purchase Order field.
    Your help is really appreciated.
    Thanks,
    Vijay

    Hi Vijay,
    the F4 Help functionality is always of big concern when you're switching from a R/3 or ABAP-SAP GUI environment to a webfront end. First of all: the convinience you're used to of creating a seach help and adding it to your data fields is gone, i.e. the current development status in the portal/java/webdynpro implies that you have to do most of the work on your own. Simple value helps might not be a problem, but complex ones are (as the one you've described). Here is a link to a tutorial in Java-webdynpro, maybe it gives you an idea:
    https://www.sdn.sap.com/sdn/developerareas/webdynpro.sdn?page=TutWD9_OVS.htm
    Regards,
    Ulli

  • Creation of Data Control for custom java method  which will return records

    Hi Guys,
    I have a requirement of creating a a custom java method in App module which will return a record set taking an id as input.In case of single return type it works fine but in case of returning record set it is not working.In my case i have to combine two tables and return it as a single entity as a view in Data Control.
    Warm Regards,
    Srinivas.

    Why don't you just create a custom view object? There's even an example or 2 in the docs:
    http://docs.oracle.com/cd/E16162_01/web.1112/e16182/intro_tour.htm#CHDGDIEC (check out "View object on refcursor" example)
    Edit: you are aware that you can create a View Object based on more than one table?
    John

  • Custom Java Function in BI Publisher

    Hi -
    Is it possible in BI Publisher to create a custom java function and call this function in RTF template?
    Thank You

    I was able to test it using Template Builder for MSWord , but when I try to upload it in BI Publisher Server, I am encountering error.

  • Create custom java function in graphical mapper for Global use?

    I created a java function (remove leading zeros in string field) in the graphical tool.
    The problem custom function is at local map level only.
    How can i make custom java function global for use in all SWC/namespaces/interfaces.
    Can this be done with XI 3.0 SP 13?  Any suggestions on how to do this.
    Many Thanks,

    HI William
       Check out this link...
    http://help.sap.com/saphelp_erp2005/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/22/e127f28b572243b4324879c6bf05a0/frameset.htm
    Cheers:-)
    Mithlesh

  • Custom Java class called from RTF template generates error

    We are running a report in BI Publisher and the report calls a custom developed Java class that is used to bind PDFs together and sent the result to another application.
    On the RTF template we have some XSLT that reads the input XML and sets a variable which is then passed to the Java class. We are however getting the following error when the report is called simultaneously 2 or more times:
    XML-22044: (Error) Extension function error: Error invoking 'JavaClassName': 'java.lang.Error: Cannot interweave overlay template with pdf input, combined number of pages is odd!
    I read this as the real cause of the error is the Java code but I'm not 100% sure. Also I don't understand what the error message means.
    Could someone help out please?
    Many thanks

    Since our this requirement is in Quotes module, its not using OAF. It is using plain JSPs and java classes.
    What i was thinking is, create the Option values as flex fields, and write a custom java class to fetch these data from the flex tables and use it in the JSP.
    The main problem we are facing now is,
    "...we wrote a simple java class, which establishes database connection, executes a simple insert & select query to our custom table. compiled & placed the class file under our new pkg structure under $JAVA_TOP eg. oracle.apps.xxx.quot.tmpl , bounced the apache."
    But when we tried to import this class in the jsp (which is being customized), the app just throwed Internal Server Error and we couldnt find any info in the Log file.
    Couldnt guess, why is this simple thing failing. Any idea ?

  • Problem during summer time switch with all date functions

    Hello,
    During the summertime switch, we faced some issues in MII (12.1.9 Build(116)).
    We are receiving the date/time in GMT XML format from our shop floor system.
    I noticed when the date/time is between 02:00 and 03:00, all date functions are not working in expression editor (like in assign block).
    For example : datefromxmlformat("2014-03-30T02:00:01","yyyyMMdd HHmmss") will return nothing... Even adding the Z to tell it's UTC does not help :
    datefromxmlformat("2014-03-30T02:00:01Z","yyyyMMdd HHmmss"), but no success...
    Even worst, the expression dateaddminutes("2014-03-30T02:00:01","10") will lead to a conversion exception...
    Is there a solution to this ?
    Thanks

    Daylight Savings Problem
    Problems since new Daylight Savings Time
    Java 1.6 07 vs xMII v11.5 and MII v12
    Date duration calculation in the BLS
    Server Downtime, Daylight saving time, and Time Shift - Using Central Development Services - SAP Library
    Hi Olivier,
    These all cover the topic, but many are for MII versions prior to yours.  However each has some explanations which are worth reading.  I would recommend the last one for an explanation of how Java and schedulers work during DST.
    Regards, Mike
    SAP Customer Experience Group - CEG

  • Custom extractors using function modules

    Hey all
    Does anyone has a document regarding how to <b>Develop Custom extractors using function modules?Step by step method would be great</b>
    Also document regarding <b>CTS in BW?</b>
    Appreciate it
    Thanks

    Hi,
    See here:
    Generic Extractors
    Generic data sources
    Generic DS
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Best regards,
    Eugene

  • How to get the value retruned by java script function into my jsp page

    Hai all,
    I had a particular java script function which returns a date.
    function getDate() {
         var sDate;
    // This code executes when the user clicks on a day in the calendar.
    if ("TD" == event.srcElement.tagName)
    // Test whether day is valid.
    if ("" != event.srcElement.innerText)
    //alert(event.srcElement.innerText);
    sDate = document.all.year.value + "-" + document.all.month.value + "-" + event.srcElement.innerText;
    document.all.ret.value = sDate;
    var mahi=window.open("configurexml.jsp?xyz=document.all.ret.value")
    return sDate;}
    Now i want to display this particular date in my jsp page. can anyone tell me the correct approach or a sample code to diaplay this date in my jsp page.
    <%@ page language="java"
    import="javax.xml.parsers.*,java.io.*,org.w3c.dom.*"%><%@ page import="java.util.*" %>
    !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html> <head> <title>Configuring Xml File</title>
    <SCRIPT LANGUAGE="JavaScript" SRC="xyz.js"> </SCRIPT>
    body bgcolor="#d0d0d0" onClick= "return getDate()" >
    <form name="f1">
    <b>20 october 2006 </b>
    Here where i am printing the date i had to get the value from the js function. how to do that. plz help me....

    Are you talking about server-side java code (servlets/jsp) or client side (applet)? Given we are in the JSP forum I'll assume we're talking server side.
    If so, you are making a common but fundamental mistake. JavaScript executes on the client, not on the server. If you want client data on the server it has to get there somehow. The simplest way to do this in JSP land is via HTTP. So... have your JavaScript code call a JSP (or servlet) and pass the value you want as a URL parameter. Of course this will also change the browser location, so if you don't want this to happen use a frame or iframe to capture your HTTP request.
    For example:
    Javascript....
    function someFunction() {
    return 1;
    var value = someFunction();
    location.href="somejsp.jsp?value=" + value;

  • How to call the java method in java script function in a portal application

    Hi Friends,
    I am developing one application where i need to fetch the data from KM content and displaying it on the screen in regular interval. I wrote one method in JSPdynpage for fetching data from KM content now I need to call that java method in java script function.
    java method(IComponentRequest request)
    //Coode for fetching the KM content
    function()
    <b>//Need to call the java method</b>
    setTimeout(function, 5000);//setting the time interval for this function
    <<htmlb display code>>
    If anybody can help me in calling the java method in java script function that will be very helpful for me.
    Thanks in advance,
    Sandeep Bonam

    Hi,
    Pls see if the following links could help.
    http://www.rgagnon.com/javadetails/java-0170.html
    http://www-128.ibm.com/developerworks/library/wa-resc/?dwzone=web
    Regards

  • Query in customer master data upload ....?

    Hi Guru's,
    I am uploading the customer master data from presentaion server to customer tables using functional module SD_CUSTOMER_MAINTAIN_ALL.
    while check the Function module separatly and it working properley and i am able to ctere customer...
    and i am using the same function module in the program i am unable to upload ..could please check and let me know where i am doing mistake in the below program logis..and values also moving properly before calling function module..while calling the functinal module the controle comming out of the loop and program went to dump i am able to see the message in dump as like this(it may helpfull for resolve):
    Name of function module...............: "SD_CUSTOMER_MAINTAIN_ALL"
    Name of formal parameter..............: "O_KNA1"
    Technical type of actual parameter....: "C"
    Technical length of actual parameter..: 20 bytes
    Technical type of formal parameter....: "u"
    Technical length of formal parameter..: 3634 bytes
    Name of formal parameter at caller....: "O_KNA1"
    *& Report  ZERP_CUSTOMER_CREATE_UPLOAD
    REPORT  zerp_customer_create_upload.
    PARAMETERS:p_files        TYPE string.
    *DATA :xkunnr(10)      LIKE kna1-kunnr.  "unique KUNNR
    DATA: gs_i_kna1           TYPE kna1,
          gs_i_knb1             TYPE knb1,
          gs_i_knvv           TYPE knvv,
          gs_return           TYPE bapireturn1,
          gs_i_bapiaddr1      TYPE   bapiaddr1,
          gt_t_xknvi          TYPE STANDARD TABLE OF fknvi,
          gwa_t_xknvi         TYPE fknvi,
          gt_t_xknbk          TYPE STANDARD TABLE OF fknbk,
          gwa_t_xknbk         TYPE fknbk,
          gt_t_yknvp          TYPE STANDARD TABLE OF fknvp,
          gwa_t_xknvp         TYPE fknvp.
    TYPES:BEGIN OF gty_itab1,
          abc(305),
          END OF gty_itab1.
    DATA: gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
          gwa_itab1 TYPE gty_itab1.
    TYPES :BEGIN OF gty_itab2,
           ktokd(4),        "customer account grp      kna1
           kunnr(10),       "customer                  kna1
           name1(35),       "name1                     kna1
           sortl(10),       "sort filed                kna1
           stras(35),       "house number and adres    kna1
           pstlz(10),       "postal code               kna1
           ort01(35),       "city                      kna1
           land1(3),        "country                   kna1
           telf1(16),       "tele phone no             kna1
           telfx(31),       "fax num                   kna1
           kukla(2),        "cust classificaion        kna1
           bukrs(4),        "company code              knb1
           akont(10),       "reconcilation acct        knb1
           vkorg(4),        "sales org                 knvv
           vtweg(2),        "distr chan                knvv
           spart(2),        "division                  knvv
           zterm(4),        "terms of payment          knvv
           bzirk(6),        "sales district            knvv
           vkbur(4),        "sales office              knvv
           vkgrp(3),        "sales grp                 knvv
           kdgrp(2),        "cust grp                  knvv
           waers(5),        "currency                  knvv
           konda(2),        "price grp                 knvv
           kalks(1),        "pricing procedure assign  knvv
           lprio(2),        "delivery plant            knvv
           vsbed(2),        "shipping conditions       knvv
           vwerk(4),        "delivering plant          knvv
           inco1(3),        "inco1                     knvv
           inco2(28),       "inco2                     knvv
           kkber(4),        "cred control area         knvv
           ktgrd(2),        "acc assgn grp             knvv
           taxkd(1),        "tax classification 4 cust knvi
           bankn(18),       "bank account number       knbk -
            xkunnr(10),
           END OF gty_itab2.
    DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
          gwa_itab2 TYPE gty_itab2.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                = p_files
        filetype                = 'ASC'
      TABLES
        data_tab                = gt_itab1
      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.
    LOOP AT gt_itab1 INTO gwa_itab1.
      gwa_itab2 = gwa_itab1-abc(305).
      APPEND gwa_itab2 TO gt_itab2.
    ENDLOOP.
    LOOP AT gt_itab2 INTO gwa_itab2.
      SPLIT gwa_itab2 AT ',' INTO gwa_itab2-ktokd
                                  gwa_itab2-kunnr
                                  gwa_itab2-name1 gwa_itab2-sortl
                                  gwa_itab2-stras gwa_itab2-pstlz
                                  gwa_itab2-ort01 gwa_itab2-land1
                                  gwa_itab2-telf1 gwa_itab2-telfx
                                  gwa_itab2-kukla gwa_itab2-bukrs
                                  gwa_itab2-akont gwa_itab2-vkorg
                                  gwa_itab2-vtweg gwa_itab2-spart
                                  gwa_itab2-zterm gwa_itab2-bzirk
                                  gwa_itab2-vkbur gwa_itab2-vkgrp
                                  gwa_itab2-kdgrp gwa_itab2-waers
                                  gwa_itab2-konda gwa_itab2-kalks
                                  gwa_itab2-lprio gwa_itab2-vsbed
                                  gwa_itab2-vwerk gwa_itab2-inco1
                                  gwa_itab2-inco2 gwa_itab2-kkber
                                  gwa_itab2-ktgrd
                                  gwa_itab2-taxkd
                                  gwa_itab2-bankn.
    *moving files values from ITAB2 work area to global structure related to FM.
      gs_i_kna1-ktokd   = gwa_itab2-ktokd.
      gs_i_kna1-kunnr   = gwa_itab2-kunnr.
      gs_i_kna1-name1   = gwa_itab2-name1.
      gs_i_kna1-sortl   = gwa_itab2-sortl.
      gs_i_kna1-stras   = gwa_itab2-stras.
      gs_i_kna1-pstlz   = gwa_itab2-pstlz.
      gs_i_kna1-ort01   = gwa_itab2-ort01.
      gs_i_kna1-regio   = gwa_itab2-land1.
      gs_i_kna1-telf1   = gwa_itab2-telf1.
      gs_i_kna1-telfx   = gwa_itab2-telfx.
      gs_i_kna1-kukla   = gwa_itab2-kukla.
      gs_i_knb1-bukrs   = gwa_itab2-bukrs.
      gs_i_knb1-akont   = gwa_itab2-akont.
    *I FOR GOT TO INCLUDE THE ZTERM VALUE IN EXCELL SHEET SO INCLUDED HARD CODE HERE
      gs_i_knb1-zterm   = '0001'.
      gs_i_knvv-vkorg   = gwa_itab2-vkorg.
      gs_i_knvv-vtweg   = gwa_itab2-vtweg.
      gs_i_knvv-spart   = gwa_itab2-spart.
      gs_i_knvv-zterm   = gwa_itab2-zterm.
      gs_i_knvv-bzirk   = gwa_itab2-bzirk.
      gs_i_knvv-vkbur   = gwa_itab2-vkbur.
      gs_i_knvv-vkgrp   = gwa_itab2-vkgrp.
      gs_i_knvv-kdgrp   = gwa_itab2-kdgrp.
      gs_i_knvv-waers   = gwa_itab2-waers.
      gs_i_knvv-konda   = gwa_itab2-konda.
      gs_i_knvv-kalks   = gwa_itab2-kalks.
      gs_i_knvv-lprio   = '02'.             "gwa_itab2-lprio.
      gs_i_knvv-vsbed   = gwa_itab2-vsbed.
      gs_i_knvv-vwerk   = gwa_itab2-vwerk.
      gs_i_knvv-inco1   = gwa_itab2-inco1.
      gs_i_knvv-inco2   = gwa_itab2-inco2.
      gs_i_knvv-kkber   = gwa_itab2-kkber.
      gs_i_knvv-ktgrd   = gwa_itab2-ktgrd.
      gwa_t_xknvi-tatyp  = 'UTXJ'.          "HARD CODE
      gwa_t_xknvi-aland  = 'US'.            "HARD CODED
      gwa_t_xknvi-kz     = '0'.             "HADR CODE
      gwa_t_xknvi-taxkd  = '0'.             "gwa_itab2-taxkd.
      APPEND gwa_t_xknvi TO gt_t_xknvi.
      gwa_t_xknbk-bankn  = gwa_itab2-bankn.
      APPEND gwa_t_xknbk TO gt_t_xknbk.
      gs_i_knb1-lockb          = 'X'.
      gs_i_knvv-kzazu          = 'X'.
      gs_i_knvv-kztlf          = 'X'.
      gs_i_knvv-perfk          = 'X'.
      gs_i_knvv-prfre          = 'X'.
      gs_i_kna1-spras          = 'EN'.
      CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
       EXPORTING
         i_kna1                              = gs_i_kna1
         i_knb1                              = gs_i_knb1
         i_knvv                              = gs_i_knvv
      I_BAPIADDR1                         =
      I_BAPIADDR2                         =
      I_MAINTAIN_ADDRESS_BY_KNA1          = ' '
      I_KNB1_REFERENCE                    = ' '
      I_FORCE_EXTERNAL_NUMBER_RANGE       = ' '
      I_NO_BANK_MASTER_UPDATE             = ' '
      I_CUSTOMER_IS_CONSUMER              = ' '
      I_RAISE_NO_BTE                      = ' '
      PI_POSTFLAG                         = ' '
      PI_CAM_CHANGED                      = ' '
      PI_ADD_ON_DATA                      =
      I_FROM_CUSTOMERMASTER               = ' '
    IMPORTING
      e_kunnr                             = xkunnr
      o_kna1                              = xkunnr
      E_SD_CUST_1321_DONE                 =
       TABLES
      T_XKNAS                             =
         t_xknbk                             = gt_t_xknbk
      T_XKNB5                             =
      T_XKNEX                             =
      T_XKNVA                             =
      T_XKNVD                             =
         t_xknvi                             = gt_t_xknvi
      T_XKNVK                             =
      T_XKNVL                             =
      T_XKNVP                             =
      T_XKNZA                             =
      T_YKNAS                             =
      T_YKNBK                             =
      T_YKNB5                             =
      T_YKNEX                             =
      T_YKNVA                             =
      T_YKNVD                             =
      T_YKNVI                             =
      T_YKNVK                             =
      T_YKNVL                             =
       t_yknvp                             = gt_t_yknvp
      T_YKNZA                             =
      T_UPD_TXT                           =
       EXCEPTIONS
         client_error                        = 1
         kna1_incomplete                     = 2
         knb1_incomplete                     = 3
         knb5_incomplete                     = 4
         knvv_incomplete                     = 5
         kunnr_not_unique                    = 6
         sales_area_not_unique               = 7
         sales_area_not_valid                = 8
         insert_update_conflict              = 9
         number_assignment_error             = 10
         number_not_in_range                 = 11
         number_range_not_extern             = 12
         number_range_not_intern             = 13
         account_group_not_valid             = 14
         parnr_invalid                       = 15
         bank_address_invalid                = 16
         tax_data_not_valid                  = 17
         no_authority                        = 18
         company_code_not_unique             = 19
         dunning_data_not_valid              = 20
         knb1_reference_invalid              = 21
         cam_error                           = 22
         OTHERS                              = 23.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        WRITE: / 'Error Message:', 'error in creation'.
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        WRITE: / 'costomer', gwa_itab2-kunnr, 'created'.
      ENDIF.
    ENDLOOP.

    please let me know if my qestion is not clear...
    and please cinfirm me ..that can i use the function module (SD_CUSTOMER_MAINTAIN_ALL) instead of BAPI (BAPI_CUSTOMER_CREATEFROMDATA1) for uploading customer master data.
    please respond me ASAP.
    thanks in advance and will give full points
    thanks&regards
    Srinivas.

Maybe you are looking for

  • Error while starting the Informatica services

    Hi All, I have installed Informatica on my local machine. All of sudden my Informatica services in services.msc went down. If I start the Informatica service means, it is starting in services.msc. But after few seconds it is again going down in servi

  • MAC driver for HP Pholtosmart C4200

    How do I get a download from Apple to allow HP Photosmart C4200 for my Snow Leapard

  • Can i use apple tv on ipad 1

    some one know if apple tv works in ipad 1

  • SAP HANA Spatial Features (Store Error)

    I've been stumbling with an the folowing error : "Error: SAP DBTech JDBC: [2048]: column store error: search table error: " over and over again. Every time I add a spatial column to a table it becomes unsuable (can't query, edit, add, update) so I ha

  • Auto run Servlet

    I want to develop a Servlet application that auto run on the server everyday. The application should be satisfy the following requirement: 1. auto run on scheduled time 2. immediately run when the server restart Any idea to do this ? Plse help Also,