Modified Functional module not executing the inserted Code

Hi everyone
I've modified the IW_C_CREATE_TRANSPORT_REQUEST Functional module so that it calls the GUI_EXEC FM which calles my java script which saves the transport ID with a filename specified. The code seems to work when i test it within SAP, but when i come to use STARTRFC to call the function, the added code dosen't seem to be executing, the transport still gets created but my javascript is not being called?
Anyone know why?
Thanks - Peter
Code following
FUNCTION IW_C_CREATE_TRANSPORT_REQUEST.
""Local interface:
*"  IMPORTING
*"     VALUE(DESCRIPTION) LIKE  E07T-AS4TEXT
*"     VALUE(TRANSPORT_KIND) LIKE  E070-TRFUNCTION DEFAULT 'K'
*"     VALUE(LANGU) LIKE  SY-LANGU DEFAULT 'EN'
*"     VALUE(CQ_ID) LIKE  E070-TRKORR DEFAULT 'FileName'
*"  EXPORTING
*"     VALUE(COMMFILE) LIKE  E070-TRKORR
*"     VALUE(PROG_PATH) LIKE  E070-TRKORR
*"     VALUE(CLASSNAME) LIKE  E07T-AS4TEXT
*"  EXCEPTIONS
*"      LANGUAGE_MISSING
*"      NUMBER_RANGE_FULL
*"      UNALLOWED_TRFUNCTION
*"      NO_AUTHORIZATION
*"      CREATE_TRANSPORT_ERROR
CLEAR COMMFILE.
CASE TRANSPORT_KIND.
  WHEN 'P'.
Stücklisten für Releasewechsel
    IF NOT LANGU IS INITIAL.
      PERFORM CREATE_RELEASE_REQUEST
        USING    LANGU
                 DESCRIPTION
                 TRANSPORT_KIND
        CHANGING COMMFILE.
    ELSE.
    keine Sprache angegeben und Transportart Stücklisten
      RAISE LANGUAGE_MISSING.
    ENDIF.
  WHEN OTHERS.
Alle anderen Transporte
  PERFORM CREATE_REQUEST
    USING    DESCRIPTION
             TRANSPORT_KIND
    CHANGING COMMFILE.
ENDCASE.
*{ INSERT SM1K900042 1
WRITE 'Entering My Pogram'.
PROG_PATH = 'java.exe'.
CLASSNAME = '-cp c: writeToFile'.
CONDENSE CLASSNAME.
CONDENSE PROG_PATH.
CONCATENATE CLASSNAME CQ_ID COMMFILE INTO CLASSNAME SEPARATED BY ' '.
CALL FUNCTION 'GUI_EXEC'
EXPORTING
PARAMETER = CLASSNAME
COMMAND = PROG_PATH.
WRITE 'Our path is'.
WRITE PROG_PATH.
WRITE CLASSNAME.
*} INSERT
ENDFUNCTION.
*************************FORMS****************************************
      FORM CREATE_RELEASE_REQUEST                                    *
Transportauftrag für Stücklisten erstellen                           *
FORM CREATE_RELEASE_REQUEST
  USING    P_LANGU              LIKE SY-LANGU
           P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT
           P_TRANS_KIND         LIKE E070-TRFUNCTION
  CHANGING P_COMMFILE           LIKE E070-TRKORR.
  DATA: SUBRC         LIKE SY-SUBRC,
        H_TMP_LANG(2) TYPE C,
        H_NUMBER(3)   TYPE C,
        NUMBER(4)     TYPE C.
Anwednungslog öffnen
  PERFORM OPEN_LOG
    USING P_TRANSPORT_DESCRIPT.
*Nummer ziehen
  PERFORM GET_NUMBER USING    P_LANGU
                     CHANGING H_NUMBER
                              SUBRC.
  IF     SUBRC = 12.
Fehler beim erstellen des Transportauftrags
    RAISE CREATE_TRANSPORT_ERROR.
  ELSEIF SUBRC = 11.
Nummernkreis voll
    RAISE NUMBER_RANGE_FULL.
  ELSE.
    WRITE P_LANGU TO H_TMP_LANG.
    P_COMMFILE = 'SAPKXXXLYY'.
    REPLACE 'XXX' WITH H_NUMBER     INTO P_COMMFILE.
    REPLACE 'YY'  WITH H_TMP_LANG   INTO P_COMMFILE.
    CALL FUNCTION 'SUBST_CREATE_COMMANDFILE'
         EXPORTING
              IV_KORRNAME          = P_COMMFILE
              IV_KORRTYPE          = P_TRANS_KIND
              IV_KORRTEXT          = P_TRANSPORT_DESCRIPT
         EXCEPTIONS
              NAME_COLLISION       = 1
              CREATE_HEADER_FAILED = 2
              UPDATE_HEADER_FAILED = 3
              OTHERS               = 4.
    IF SY-SUBRC <> 0.
      CLEAR P_COMMFILE.
    Fehler beim Erstellen des Transportauftrags
      RAISE CREATE_TRANSPORT_ERROR.
    ELSE.
    Transportauftrag erstellt
    Log schreiben
      PERFORM WRITE_LOGFILE
        USING P_COMMFILE.
    ENDIF.
  ENDIF.
ENDFORM.                               "CREATE_RELEASE_REQUEST
      FORM CREATE_REQUEST                                            *
Transportauftrag erstellen                                           *
FORM CREATE_REQUEST
  USING    P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT
           P_TRANS_KIND         LIKE E070-TRFUNCTION
  CHANGING P_COMMFILE           LIKE E070-TRKORR.
  CALL FUNCTION 'TRINT_INSERT_NEW_COMM'
       EXPORTING
            WI_KURZTEXT   = P_TRANSPORT_DESCRIPT
            WI_TRFUNCTION = P_TRANS_KIND
       IMPORTING
            WE_TRKORR     = P_COMMFILE
       EXCEPTIONS
         NUMBER_RANGE_FULL       = 1
         INVALID_INPUT           = 2
         NO_AUTHORIZATION        = 3
         OTHERS                  = 4.
  CASE SY-SUBRC.
    WHEN 0.
  Auftrag erstellt
  Anwednungslog öffnen
      PERFORM OPEN_LOG
        USING P_TRANSPORT_DESCRIPT.
  Log schreiben
      PERFORM WRITE_LOGFILE
        USING P_COMMFILE.
    WHEN 1.                             "Nummernkreis für Aufträge voll
      CLEAR P_COMMFILE.
      RAISE NUMBER_RANGE_FULL.
     p_error_msg-no = '735'.
    WHEN 2.                             "Unbekannter Auftragstyp
      CLEAR P_COMMFILE.
      RAISE UNALLOWED_TRFUNCTION.
     p_error_msg-no = '353'.
    WHEN 3.                             "keine Berechtigung
      CLEAR P_COMMFILE.
      RAISE NO_AUTHORIZATION.
     p_error_msg-no = '328'.
    WHEN 4.                             "Allgemeiner Fehler
      CLEAR P_COMMFILE.
      RAISE CREATE_TRANSPORT_ERROR.
     p_error_msg-no = '353'.
  ENDCASE.
ENDFORM.                               "create_request
FORM OPEN_LOG                                                        *
Anwedungslog öffnen                                                  *
FORM OPEN_LOG
  USING P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT.
*init application log
  PERFORM LOG_INIT USING C_APPL_LOG_TRANSPORT.
*log header
  PERFORM LOG_HEADER
    USING C_APPL_LOG_TRANSPORT P_TRANSPORT_DESCRIPT.
ENDFORM.                             "OPEN_LOG
FORM WRITE_LOGFILE                                                   *
Logfile in den Anwendungslog schreiben                               *
-> P_TRANSPORT_DESCRIPT                                              *
FORM WRITE_LOGFILE
  USING P_COMMFILE           LIKE E070-TRKORR.
DATA: H_ERROR_MSG LIKE IWERRORMSG.
*log message transport created
  CLEAR H_ERROR_MSG.
  MOVE '42'  TO H_ERROR_MSG-ID.
  MOVE 'I'   TO H_ERROR_MSG-TYPE.
  MOVE '733' TO H_ERROR_MSG-NO.
  MOVE P_COMMFILE TO H_ERROR_MSG-V1.
  PERFORM LOG_MSG
    USING C_APPL_LOG_TRANSPORT '2' H_ERROR_MSG.
*log save
  PERFORM LOG_SAVE
    USING C_APPL_LOG_TRANSPORT.
ENDFORM.              "WRITE_LOGFILE
      FORM GET_NUMBER                                               *
-->  LANGU                                                         *
-->  NUMBER                                                        *
FORM GET_NUMBER
  USING    LANGU   LIKE SY-LANGU
  CHANGING NUMBER  TYPE C
           SUBRC   LIKE SY-SUBRC.
  CONSTANTS: OBJECT LIKE INRI-OBJECT VALUE 'SIWBTRANSP'.
  DATA: NR_RANGE LIKE INRI-NRRANGENR,
        RETURNCODE LIKE  INRI-RETURNCODE,
        ERROR_MSG LIKE IWERRORMSG.
  CLEAR SUBRC.
  NR_RANGE = '01'.
  CALL FUNCTION 'NUMBER_GET_NEXT'
       EXPORTING
            NR_RANGE_NR             = NR_RANGE
            OBJECT                  = OBJECT
            SUBOBJECT               = LANGU
       IMPORTING
            NUMBER                  = NUMBER
            RETURNCODE              = RETURNCODE
       EXCEPTIONS
            INTERVAL_NOT_FOUND      = 1
            NUMBER_RANGE_NOT_INTERN = 2
            OBJECT_NOT_FOUND        = 3
            QUANTITY_IS_0           = 4
            QUANTITY_IS_NOT_1       = 5
            INTERVAL_OVERFLOW       = 6
            OTHERS                  = 7.
  CASE SY-SUBRC.
    WHEN 00.
    WHEN 01.
      PERFORM NUMBER_RANGE_INTERVAL_INSERT
              USING      NR_RANGE  LANGU
              CHANGING   NUMBER
                         RETURNCODE.
    WHEN OTHERS.
      SUBRC = 12.
      PERFORM FILL_ERROR_MSG
        USING    C_MESSAGE_ERROR 736 SY-SUBRC SPACE SPACE SPACE
        CHANGING ERROR_MSG.
      PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 1 ERROR_MSG.
  ENDCASE.
  CASE RETURNCODE.
    WHEN ' '.
    WHEN '1'.                          "Nummer im kritischen Bereich
      PERFORM FILL_ERROR_MSG
        USING    C_MESSAGE_INFO 734 SPACE SPACE SPACE SPACE
        CHANGING ERROR_MSG.
      PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 2 ERROR_MSG.
    WHEN '2'.                          "letzte Nummer vergeben
      PERFORM FILL_ERROR_MSG
        USING    C_MESSAGE_INFO 735 SPACE SPACE SPACE SPACE
        CHANGING ERROR_MSG.
      PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 1 ERROR_MSG.
      SUBRC = 11.
  ENDCASE.
ENDFORM.                               "number_get
Message was edited by:
        Peter Lai

Hi i've tried restarting and starting the server, but it didn't help, would it have anything to do with the fact i'm callin sap which is calling JAVA from a .exe program. The .exe program is having problems connecting to the JAVA program as there is no link?
I did a trace as well and this is what it came up with:
Error in program 'startrfc': ======> Exception condition "NO_BATCH" raised.
>>>> [1] <unknown>    : EXT  <ac: 7> L DDSLOCTE01 >>> CLOSE abrfcrcv.c 429 (23850562)
  -{F0776FA3-F1A7-4662-BF7A-D1352735C394}
*> RfcReceive
        handle = 1
         Data conversion On
Error in program 'startrfc': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
Error in program 'startrfc': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
>>>> [1] <unknown>    : EXT  <ac: 8> L DDSLOCTE01 >>> FREE abrfcio.c 3517 (23850562)
  -{F0776FA3-F1A7-4662-BF7A-D1352735C394}
Trace file opened at 20070312 164006 GMT Standard T, SAP-REL 640,0,119 RFC-VER 3 818122 MT-SL
*> RfcClose called by external program ...
        handle = 1
*> rfcClose called by RFC-Library in file: abrfc.c, line: 532
        handle = 1
Trace file opened at 20070312 164006 GMT Standard T, SAP-REL 640,0,119 RFC-VER 3 818122 MT-SL
<* rfcClose
>* RfcClose
Any help or ideas what it could be would be great

Similar Messages

  • Function module to execute the session

    Hi All,
    I want to know the function module to execute the session created in sm35.

    Hi,
    bdc_open_group:
    this function module is used to open the session.
    parameters related to this function module are
    client:sy-mandt
    uname:sy-uname
    holddate:sy-datum
    group: <groupname>
    keep: 'X' / ' '.
    2)bdc_insert:this function module is used to insert the
    values to the session
    parameters related to bdc_insert are
    tcode: mention the transaction code
    dynprotab: mention the internal table having structure like bdcdata.
    3)bdc_close_group:
    when ever u open the session it is must to close the session
    Hope it helps you.
    Regards Mansi

  • Function module to change the reason code for status in a Opportunuity/lead

    Hi,
    What is the function module to change the opportunity reason.   I was able to change the status using the crm_order_maintain but How can I change the reason for that opportunity.
    Thanks
    naveen

    You can use CRM_ORDER_MAINTAIN and populate the parameter IT_SERVICE_OS
    or use BAPI_OPPORTUNITY_CHANGEMULTI and populate the parameter SERVICE_OS.
    BR,
    Florin

  • Function module not executing in background due to Transactional RFC error in SM58

    Hi Team,
    I am executing a report which calls a function module in background.This in turn creates a LUW which should eventually get cleared once the processing is completed through commit statement.
    However LUW is going for an error whenever it gets executed through commit statement.
    The error message in SM58 is
    Error msg : Conversation 
    <init> not found / CPIC-CALL: 'ThSA PCMRCV' : cmRc=19 thRc=
    However when I try to excecute the function module in foreground, it works correctly as expected.
    Please note that the same report is being used for various clients and the function module is working fine in all others.Hence, I am expecting that thers is no issue with the code.
    Is there some settings which we are missing here.
    Please provide me your valuable inputs.

    Hi Divy,
    It appears to network issue. please use below SAP note to perform network analysis using NIPING.
    SAP note 500235 - Network diagnosis with NIPING
    Hope this helps.
    Regards,
    Deepak Kori

  • Function Module to Execute the task backgroundly

    HI gurus
        I need to execute the workitem programatically which is possible in the SAP_WAPI_SET_WORKITEM_STATUS but I need the wiresult as 001 or 002 or 003 because this workitem task as decision task. So how I have to handle either through any FM or any coding. Please let me know the FM or codes.
    Thanks,
    Velu...

    I think you should use SAP_WAPI_DECISION_COMPLETE Function module
    WI_RESULT  field stores the unique value for each decision option.
    Thanks
    Arghadip

  • Function module to execute the program in the background.

    Hi Experts,
         I have two reports i am calling report2 from report1. Here the problem is i wanted to pass the input parameters using the "submit" statement and i wanted only one field value from the report2... whcih is used in report1 and i dont wanted to display the selection screen or output of report2. i am using the submit and return and i am unable to get it... can any one suggest and send me a peace of code.. for this...
    he would be rewarded
    Regards,
    Rajashekahr.A

    if you don't want the selection screen or the output...you can use the option
    SUBMIT <RPT> EXPORTING LIST TO MEMORY AND RETURN
    this will directly execute the report without showing you the selection screen or the output..
    now you also want a value from report 2 into report1...you can set the value from report 2 into a memory variable..using EXPORT to memory id option....
    hope it helps

  • JSP not executing the java code

    Hello there.
    my m/c: tru64 unix
    Apache version: 2.0
    tomcat version: 4.0.5
    browser version: IE5
    I have index.jsp as
    =======
    <HTML>
    <HEAD>
    <TITLE> Vimala's JSP </TITLE>
    </HEAD>
    <BODY>
    Hello <%= request.getParameter ("name") %>
    <%
    for (int i=1; i < 5; i++)
    out.print ("<BR> Sample JSP loop");
    %>
    <FORM METHOD=POST ACTION="vimala.jsp">
    Enter nothing
    <INPUT TYPE=TEXTAREA NAME=name>
    <BR><BR><INPUT TYPE=SUBMIT>
    </FORM>
    </BODY>
    </HTML>
    =======
    The above neither prints the getParameter ("name") as passed in URL nor it prints the "for loop" values.
    However the html related things such as title and Form are properly displayed in the browser.
    I think I'm missing something in the tomcat (server.xml) or apache (httpd.conf) configurations. Your inputs to solve my problem is very much appreciated.
    Thank you,
    Vimala.

    Please find the web.xml here.
    ==============web.xml start==============
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <!-- ======================== Introduction ============================== -->
    <!-- This document defines default values for all web applications -->
    <!-- loaded into this instance of Tomcat. As each application is -->
    <!-- deployed, this file is processed, followed by the -->
    <!-- "/WEB-INF/web.xml" deployment descriptor from your own -->
    <!-- applications. -->
    <!-- ================== Built In Servlet Definitions ==================== -->
    <!-- The default servlet for all web applications, that serves static -->
    <!-- resources. It processes all requests that are not mapped to other -->
    <!-- servlets with servlet mappings (defined either here or in your own -->
    <!-- web.xml file. This servlet supports the following initialization -->
    <!-- parameters (default values are in square brackets): -->
    <!-- -->
    <!-- debug Debugging detail level for messages logged -->
    <!-- by this servlet. [0] -->
    <!-- -->
    <!-- input Input buffer size (in bytes) when reading -->
    <!-- resources to be served. [2048] -->
    <!-- -->
    <!-- listings Should directory listings be produced if there -->
    <!-- is no welcome file in this directory? [true] -->
    <!-- -->
    <!-- output Output buffer size (in bytes) when writing -->
    <!-- resources to be served. [2048] -->
    <!-- -->
    <!-- readonly Is this context "read only", so HTTP -->
    <!-- commands like PUT and DELETE are -->
    <!-- rejected? [true] -->
    <servlet>
    <servlet-name>default</servlet-name>
    <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <init-param>
    <param-name>listings</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- The "invoker" servlet, which executes anonymous servlet classes -->
    <!-- that have not been defined in a web.xml file. Traditionally, this -->
    <!-- servlet is mapped to URL pattern "/servlet/*", but you can map it -->
    <!-- to other patterns as well. The extra path info portion of such a -->
    <!-- request must be the fully qualified class name of a Java class that -->
    <!-- implements Servlet (or extends HttpServlet), or the servlet name -->
    <!-- of an existing servlet definition. This servlet supports the -->
    <!-- following initialization parameters (default values are in square -->
    <!-- brackets): -->
    <!-- -->
    <!-- debug Debugging detail level for messages logged -->
    <!-- by this servlet. [0] -->
    <servlet>
    <servlet-name>invoker</servlet-name>
    <servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- The JSP page compiler and execution servlet, which is the mechanism -->
    <!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
    <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
    <!-- following initialization parameters (default values are in square -->
    <!-- brackets): -->
    <!-- -->
    <!-- classpath What class path should I use while compiling -->
    <!-- generated servlets? [Created dynamically      -->
      <!--                       based on the current web application] -->
    <!-- -->
    <!-- classdebuginfo Should the class file be compiled with -->
    <!-- debugging information? [false] -->
    <!-- -->
    <!-- ieClassId The class-id value to be sent to Internet -->
    <!-- Explorer when using <jsp:plugin> tags. -->
    <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
    <!-- -->
    <!-- jspCompilerPlugin The fully qualified class name of the JSP -->
    <!-- compiler plug-in to be used. See below for -->
    <!-- more information. -->
    <!-- [Use internal JDK compiler] -->
    <!-- -->
    <!-- keepgenerated Should we keep the generated Java source code -->
    <!-- for each page instead of deleting it? [true] -->
    <!-- -->
    <!-- largefile Should we store the static content of JSP -->
    <!-- pages in external data files, to reduce the -->
    <!-- size of the generated servlets? [false] -->
    <!-- -->
    <!-- logVerbosityLevel The level of detailed messages to be produced -->
    <!-- by this servlet. Increasing levels cause the -->
    <!-- generation of more messages. Valid values are -->
    <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
    <!-- [WARNING] -->
    <!-- -->
    <!-- mappedfile Should we generate static content with one -->
    <!-- print statement per input line, to ease -->
    <!-- debugging? [false] -->
    <!-- -->
    <!-- scratchdir What scratch directory should we use when -->
    <!-- compiling JSP pages? [default work directory  -->
      <!--                       for the current web application] -->
    <!-- -->
    <!-- If you wish to use Jikes to compile JSP pages: -->
    <!-- * Set the "classpath" initialization parameter appropriately -->
    <!-- for this web application. -->
    <!-- * Set the "jspCompilerPlugin" initialization parameter to -->
    <!-- "org.apache.jasper.compiler.JikesJavaCompiler". -->
    <servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
    <param-name>logVerbosityLevel</param-name>
    <param-value>WARNING</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
    </servlet>
    <!-- Server Side Includes processing servlet, which processes SSI -->
    <!-- directives in HTML pages consistent with similar support in web -->
    <!-- servers like Apache. Traditionally, this servlet is mapped to -->
    <!-- URL pattern "*.shtml". This servlet supports the following -->
    <!-- initialization parameters (default values are in square brackets): -->
    <!-- -->
    <!-- buffered Should output from this servlet be buffered? -->
    <!-- (0=false, 1=true) [0] -->
    <!-- -->
    <!-- debug Debugging detail level for messages logged -->
    <!-- by this servlet. [0] -->
    <!-- -->
    <!-- expires The number of seconds before a page with SSI -->
    <!-- directives will expire. [No default] -->
    <!-- -->
    <!-- isVirtualWebappRelative -->
    <!-- Should "virtual" paths be interpreted as -->
    <!-- relative to the context root, instead of -->
    <!-- the server root? (0=false, 1=true) [0] -->
    <!-- -->
    <!-- ignoreUnsupportedDirective -->
    <!-- Should unknown or misspelled Ssi directives -->
    <!-- be ignored and no errors shown? -->
    <!-- (0=false, 1=true) [1] -->
    <!-- IMPORTANT: To use the CGI servlet, you also need to rename the -->
    <!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file -->
    <!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar -->
    <!--
    <servlet>
    <servlet-name>ssi</servlet-name>
    <servlet-class>org.apache.catalina.servlets.SsiInvokerServlet</servlet-class>
    <init-param>
    <param-name>buffered</param-name>
    <param-value>1</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <init-param>
    <param-name>expires</param-name>
    <param-value>666</param-value>
    </init-param>
    <init-param>
    <param-name>isVirtualWebappRelative</param-name>
    <param-value>0</param-value>
    </init-param>
    <init-param>
    <param-name>ignoreUnsupportedDirective</param-name>
    <param-value>1</param-value>
    </init-param>
    <load-on-startup>4</load-on-startup>
    </servlet>
    -->
    <!-- Common Gateway Includes (CGI) processing servlet, which supports -->
    <!-- execution of external applications that conform to the CGI spec -->
    <!-- requirements. Typically, this servlet is mapped to the URL pattern -->
    <!-- "/cgi-bin/*", which means that any CGI applications that are -->
    <!-- executed must be present within the web application. This servlet -->
    <!-- supports the following initialization parameters (default values -->
    <!-- are in square brackets): -->
    <!-- -->
    <!-- cgiPathPrefix The CGI search path will start at -->
    <!-- webAppRootDir + File.separator + this prefix. -->
    <!-- [WEB-INF/cgi] -->
    <!-- -->
    <!-- clientInputTimeout The time (in milliseconds) to wait for input -->
    <!-- from the browser before assuming that there -->
    <!-- is none. [100] -->
    <!-- -->
    <!-- debug Debugging detail level for messages logged -->
    <!-- by this servlet. [0] -->
    <!-- IMPORTANT: To use the CGI servlet, you also need to rename the -->
    <!-- $CATALINA_HOME/server/lib/servlets-cgi.renametojar file -->
    <!-- to $CATALINA_HOME/server/lib/servlets-cgi.jar -->
    <!--
    <servlet>
    <servlet-name>cgi</servlet-name>
    <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
    <init-param>
    <param-name>clientInputTimeout</param-name>
    <param-value>100</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>6</param-value>
    </init-param>
    <init-param>
    <param-name>cgiPathPrefix</param-name>
    <param-value>WEB-INF/cgi</param-value>
    </init-param>
    <load-on-startup>5</load-on-startup>
    </servlet>
    -->
    <!-- ================ Built In Servlet Mappings ========================= -->
    <!-- The servlet mappings for the built in servlets defined above. Note -->
    <!-- that, by default, the CGI and SSI servlets are not mapped. You -->
    <!-- must uncomment these mappings (or add them to your application's own -->
    <!-- web.xml deployment descriptor) to enable these services -->
    <!-- The mapping for the default servlet -->
    <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/</url-pattern>
    </servlet-mapping>
    <!-- The mapping for the invoker servlet -->
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    <!-- The mapping for the JSP servlet -->
    <servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>
    <!-- The mapping for the SSI servlet -->
    <!--
    <servlet-mapping>
    <servlet-name>ssi</servlet-name>
    <url-pattern>*.shtml</url-pattern>
    </servlet-mapping>
    -->
    <!-- The mapping for the CGI Gateway servlet -->
    <!--
    <servlet-mapping>
    <servlet-name>cgi</servlet-name>
    <url-pattern>/cgi-bin/*</url-pattern>
    </servlet-mapping>
    -->
    <!-- ==================== Default Session Configuration ================= -->
    <!-- You can set the default session timeout (in minutes) for all newly -->
    <!-- created sessions by modifying the value below. -->
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <!-- ===================== Default MIME Type Mappings =================== -->
    <!-- When serving static resources, Tomcat will automatically generate -->
    <!-- a "Content-Type" header based on the resource's filename extension, -->
    <!-- based on these mappings. Additional mappings can be added here (to -->
    <!-- apply to all web applications), or in your own application's web.xml -->
    <!-- deployment descriptor. -->
    <mime-mapping>
    <extension>abs</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ai</extension>
    <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>aif</extension>
    <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>aifc</extension>
    <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>aiff</extension>
    <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>aim</extension>
    <mime-type>application/x-aim</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>art</extension>
    <mime-type>image/x-jg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>asf</extension>
    <mime-type>video/x-ms-asf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>asx</extension>
    <mime-type>video/x-ms-asf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>au</extension>
    <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>avi</extension>
    <mime-type>video/x-msvideo</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>avx</extension>
    <mime-type>video/x-rad-screenplay</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>bcpio</extension>
    <mime-type>application/x-bcpio</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>bin</extension>
    <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>bmp</extension>
    <mime-type>image/bmp</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>body</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>cdf</extension>
    <mime-type>application/x-cdf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>cer</extension>
    <mime-type>application/x-x509-ca-cert</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>class</extension>
    <mime-type>application/java</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>cpio</extension>
    <mime-type>application/x-cpio</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>csh</extension>
    <mime-type>application/x-csh</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>css</extension>
    <mime-type>text/css</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>dib</extension>
    <mime-type>image/bmp</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>doc</extension>
    <mime-type>application/msword</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>dtd</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>dv</extension>
    <mime-type>video/x-dv</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>dvi</extension>
    <mime-type>application/x-dvi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>eps</extension>
    <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>etx</extension>
    <mime-type>text/x-setext</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>exe</extension>
    <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>gif</extension>
    <mime-type>image/gif</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>gtar</extension>
    <mime-type>application/x-gtar</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>gz</extension>
    <mime-type>application/x-gzip</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>hdf</extension>
    <mime-type>application/x-hdf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>hqx</extension>
    <mime-type>application/mac-binhex40</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>htc</extension>
    <mime-type>text/x-component</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>htm</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>hqx</extension>
    <mime-type>application/mac-binhex40</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ief</extension>
    <mime-type>image/ief</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jad</extension>
    <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jar</extension>
    <mime-type>application/java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>java</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jpe</extension>
    <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jpeg</extension>
    <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jpg</extension>
    <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>js</extension>
    <mime-type>text/javascript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>kar</extension>
    <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>latex</extension>
    <mime-type>application/x-latex</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>m3u</extension>
    <mime-type>audio/x-mpegurl</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mac</extension>
    <mime-type>image/x-macpaint</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>man</extension>
    <mime-type>application/x-troff-man</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>me</extension>
    <mime-type>application/x-troff-me</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mid</extension>
    <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>midi</extension>
    <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mif</extension>
    <mime-type>application/x-mif</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mov</extension>
    <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>movie</extension>
    <mime-type>video/x-sgi-movie</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mp1</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mp2</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mp3</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpa</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpe</extension>
    <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpeg</extension>
    <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpega</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpg</extension>
    <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpv2</extension>
    <mime-type>video/mpeg2</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ms</extension>
    <mime-type>application/x-wais-source</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>nc</extension>
    <mime-type>application/x-netcdf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>oda</extension>
    <mime-type>application/oda</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pbm</extension>
    <mime-type>image/x-portable-bitmap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pct</extension>
    <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pdf</extension>
    <mime-type>application/pdf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pgm</extension>
    <mime-type>image/x-portable-graymap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pic</extension>
    <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pict</extension>
    <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pls</extension>
    <mime-type>audio/x-scpls</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>png</extension>
    <mime-type>image/png</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pnm</extension>
    <mime-type>image/x-portable-anymap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pnt</extension>
    <mime-type>image/x-macpaint</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ppm</extension>
    <mime-type>image/x-portable-pixmap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ps</extension>
    <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>psd</extension>
    <mime-type>image/x-photoshop</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>qt</extension>
    <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>qti</extension>
    <mime-type>image/x-quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>qtif</extension>
    <mime-type>image/x-quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ras</extension>
    <mime-type>image/x-cmu-raster</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>rgb</extension>
    <mime-type>image/x-rgb</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>rm</extension>
    <mime-type>application/vnd.rn-realmedia</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>roff</extension>
    <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>rtf</extension>
    <mime-type>application/rtf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>rtx</extension>
    <mime-type>text/richtext</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>sh</extension>
    <mime-type>application/x-sh</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>shar</extension>
    <mime-type>application/x-shar</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>smf</extension>
    <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>snd</extension>
    <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>src</extension>
    <mime-type>application/x-wais-source</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>sv4cpio</extension>
    <mime-type>application/x-sv4cpio</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>sv4crc</extension>
    <mime-type>application/x-sv4crc</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>swf</extension>
    <mime-type>application/x-shockwave-flash</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>t</extension>
    <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tar</extension>
    <mime-type>application/x-tar</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tcl</extension>
    <mime-type>application/x-tcl</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tex</extension>
    <mime-type>application/x-tex</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>texi</extension>
    <mime-type>application/x-texinfo</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>texinfo</extension>
    <mime-type>application/x-texinfo</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tif</extension>
    <mime-type>image/tiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tiff</extension>
    <mime-type>image/tiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tr</extension>
    <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tsv</extension>
    <mime-type>text/tab-separated-values</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ulw</extension>
    <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ustar</extension>
    <mime-type>application/x-ustar</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xbm</extension>
    <mime-type>image/x-xbitmap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xpm</extension>
    <mime-type>image/x-xpixmap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xwd</extension>
    <mime-type>image/x-xwindowdump</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>wav</extension>
    <mime-type>audio/x-wav</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- Wireless Bitmap -->
    <extension>wbmp</extension>
    <mime-type>image/vnd.wap.wbmp</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- WML Source -->
    <extension>wml</extension>
    <mime-type>text/vnd.wap.wml</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- Compiled WML -->
    <extension>wmlc</extension>
    <mime-type>application/vnd.wap.wmlc</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- WML Script Source -->
    <extension>wmls</extension>
    <mime-type>text/vnd.wap.wmls</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- Compiled WML Script -->
    <extension>wmlscriptc</extension>
    <mime-type>application/vnd.wap.wmlscriptc</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>wrl</extension>
    <mime-type>x-world/x-vrml</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>Z</extension>
    <mime-type>application/x-compress</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>z</extension>
    <mime-type>application/x-compress</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>zip</extension>
    <mime-type>application/zip</mime-type>
    </mime-mapping>
    <!-- ==================== Default Welcome File List ===================== -->
    <!-- When a request URI refers to a directory, the default servlet looks -->
    <!-- for a "welcome file" within that directory and, if present, -->
    <!-- to the corresponding resource URI for disp

  • Is there any function module to convert the date format

    Dear ABAPers,
    Is there any function module to convert the date format from dd.mm.yyyy to dd-mmm-yyyy.
           I want to convert the date format from dd.mm.yyy to dd.mmm.yyy Eg.from 10.03.2008 to 10-mar-2009.
    Thanks & Regards,
    Ashok.

    hi,
    create custom function module or copy the below code in the report ..and use it
    the out put for below is :----Convert a DATE field into a full format date eg. March 23, 2000
    FUNCTION Z_CONVERT_DATE_INTO_FULL_DATE.
    ""Local interface:
    *"       IMPORTING
    *"             VALUE(DATE) LIKE  SY-DATUM
    *"       EXPORTING
    *"             VALUE(FORMATTED_DATE)
    *"       EXCEPTIONS
    *"              INVALID_DATE
    TABLES: TTDTG.
    DATA: BEGIN OF T_DATE,
            YYYY(4) TYPE C,
            MM(2) TYPE C,
            DD(2) TYPE C,
          END OF T_DATE.
    DATA: DAY(3) TYPE N.
    DATA: VARNAME LIKE TTDTG-VARNAME.
    IF DATE IS INITIAL.
      CLEAR FORMATTED_DATE.
      EXIT.
    ENDIF.
    check document date format
    CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
      EXPORTING
        DATE = DATE
      EXCEPTIONS
        PLAUSIBILITY_CHECK_FAILED = 1.
    IF SY-SUBRC NE 0.
      RAISE INVALID_DATE.
    ENDIF.
    MOVE DATE TO T_DATE.
    CONCATENATE '%%SAPSCRIPT_MMM_' T_DATE-MM INTO VARNAME.
    SELECT SINGLE * FROM TTDTG WHERE SPRAS = 'EN' AND VARNAME = VARNAME.
    WRITE T_DATE-DD TO DAY.
    CONCATENATE DAY ',' INTO DAY.
    CONCATENATE TTDTG-VARVALUE DAY T_DATE-YYYY INTO FORMATTED_DATE
      SEPARATED BY SPACE.
    ENDFUNCTION.
    the output is :--Convert a DATE field into a full format date eg. March 23, 2000
    Regards,
    Prabhudas

  • Function Module to Execute BEx Query and Save as work book.

    Hi
    I have a requirement for executing the Query after the data is loaded into the cube and save as Workbook and emailing to the user. Is there any Function module to Execute the Query and saving as Work book? . Please suggest me the way how to approach the problem.
    Thanks for your help in advance.

    Hi,
    It is possible to execute the Query and send the result as workbook vial email to the user.
    For that use should use Information Broadcaster.
    Steps:
    1. Goto information broadcaster.
    2. Choose object type as "Query"
    3.Click create new setting.
    4. Give description and choose distribution type as "Broadcast E-mail"
    5.Choose output format "XML(MS Excel)
    6.In recipient tab Give valid e-mail addres which you want to send.
    7.Save it. and give technical name
    8.Click schedule.
    9.choose "Execution with Data Change in the InfoProvider " correspondig infoprovider will be shown (check the check box)
    10. that's it. whenever data loaded in your infocube, it will be automatically executed and send to user mail.
    <removed> if u want more information let me know.
    Regards,
    Senthil Kumar.P

  • RFC enabled function module is not runing the BDC code in it.

    Dear Experts,
    1. We have created a RFC enabled function module to change status of a activity and to save it we are using BDC code and we have also put the code in the RFC FM only.
    The RFC fm is runing fine and changing the data and also saving it by runing the BDC when run in the R/3 system only.
    But when i run the FM from portal its just chaning the status but not runing the BDC code in it.
    below i am puting the code of the FM.
    FUNCTION ZRFC_CRM_STATUS_CHANGE_EXTERN .
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(CHECK_ONLY) TYPE  XFELD DEFAULT ' '
    *"     VALUE(CLIENT) LIKE  SY-MANDT DEFAULT SY-MANDT
    *"     VALUE(OBJNR) TYPE  CRM_JSTO-OBJNR OPTIONAL
    *"     VALUE(USER_STATUS) LIKE  CRM_JEST-STAT
    *"     VALUE(SET_INACT) TYPE  XFELD DEFAULT ' '
    *"     VALUE(SET_CHGKZ) LIKE  CRM_JSTO-CHGKZ OPTIONAL
    *"     VALUE(XNOAUTO) LIKE  CRM_JSTO_UPD-XNOAUTO OPTIONAL
    *"     VALUE(NO_CHECK) TYPE  XFELD DEFAULT ' '
    *"     VALUE(ZOBJNR) TYPE  CHAR80
    *"     VALUE(OBJECT_ID) TYPE  CRMT_OBJECT_ID
    *"  EXPORTING
    *"     VALUE(STONR) LIKE  TJ30-STONR
    *"  EXCEPTIONS
    *"      OBJECT_NOT_FOUND
    *"      STATUS_INCONSISTENT
    *"      STATUS_NOT_ALLOWED
    *{   INSERT         D60K900707                                        1
      DATA: BEGIN OF JSTAT_TMP.
              INCLUDE STRUCTURE JSTAT.
      DATA: END OF JSTAT_TMP.
      data: bdcdata like bdcdata  occurs 0 with header line.
      data: dire type CRMD_ACTIVITY_H-direction.
      CLEAR: DIRE.
    OBJNR = ZOBJNR.
      MANDT = CLIENT.
      JSTAT_TMP-STAT  = USER_STATUS.
      JSTAT_TMP-INACT = SET_INACT.
      IF USER_STATUS+0(1) NE EXTERN.
        RAISE STATUS_NOT_ALLOWED.
      ENDIF.
    Statusobjekt ggf. einlesen
      PERFORM STATUS_READ USING OBJNR IOBTYP ISTSMA NOT_FOUND.
      CHECK NOT_FOUND = OFF.
    ggf. Änderungsbelege aktivieren
      IF SET_CHGKZ = 'X' AND JSTO_BUF-CHGKZ = SPACE AND CHECK_ONLY = SPACE.
        PERFORM SET_CHGKZ USING OBJNR.
      ENDIF.
    set XNOAUTO-flag if desired
      IF XNOAUTO = 'X' AND CHECK_ONLY = SPACE.
        PERFORM SET_XNOAUTO USING OBJNR.
      ENDIF.
      crm_jostd-OBJNR = OBJNR.
    Status-Puffer füllen
      REFRESH JEST_BUF_A.
      REFRESH JEST_BUF_E.
      CLEAR   JEST_BUF_A.
      CLEAR   JEST_BUF_E.
      CLEAR JEST_K.
      MOVE MANDT       TO JEST_K-MANDT.
      MOVE crm_jostd-OBJNR TO JEST_K-OBJNR.
      READ TABLE JEST_BUF WITH KEY JEST_K BINARY SEARCH.
      IF SY-SUBRC IS INITIAL.
        TABIX = SY-TABIX.
        MOVE-CORRESPONDING JEST_BUF TO JEST_BUF_E.
        APPEND JEST_BUF_E.
        MOVE-CORRESPONDING JEST_BUF TO JEST_BUF_A.
        MOVE MANDT TO JEST_BUF_A-MANDT.
        APPEND JEST_BUF_A.
        DO.
          ADD 1 TO TABIX.
          READ TABLE JEST_BUF INDEX TABIX.
          IF SY-SUBRC IS INITIAL AND JEST_BUF-OBJNR = crm_jostd-OBJNR.
            MOVE-CORRESPONDING JEST_BUF TO JEST_BUF_E.
            APPEND JEST_BUF_E.
            MOVE-CORRESPONDING JEST_BUF TO JEST_BUF_A.
            MOVE MANDT TO JEST_BUF_A-MANDT.
            APPEND JEST_BUF_A.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
      ENDIF.
      g_no_check = no_check.
      OBJNR = ZOBJNR.
      PERFORM STATUS_CHANGE_EXTERN USING CHECK_ONLY
                                         OBJNR
                                         JSTAT_TMP
                                         EXTERN.
      clear g_no_check.
    Zurückschreiben in Puffer
      PERFORM CHG_JEST_BUF_E.
    ggf. Statusordnungsnummer ermitteln
      IF STONR IS REQUESTED.
        CALL FUNCTION 'CRM_STATUS_READ'
             EXPORTING
                  OBJNR       = OBJNR
                  ONLY_ACTIVE = 'X'
             IMPORTING
                  STONR       = STONR.
      ENDIF.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
      RETURN        =
    *COMMIT WORK.
    wait up to 10 seconds.
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLCRM_1O_MANAG_UI'.
      bdcdata-dynpro   = '0100'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
       CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = '=READ'.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLCRM_1O_MANAG_UI'.
      bdcdata-dynpro   = '0510'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
       CLEAR bdcdata.
      bdcdata-fnam = 'BDC_CURSOR'.
      bdcdata-fval = 'GV_OBJECT_ID'.
      APPEND bdcdata.
       CLEAR bdcdata.
      bdcdata-fnam = 'GV_OBJECT_ID'.
      bdcdata-fval = OBJECT_ID.
      APPEND bdcdata.
         CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = '=OKAY'.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLCRM_1O_MANAG_UI'.
      bdcdata-dynpro   = '0100'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = '=1OMAIN_TT'.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLCRM_1O_MANAG_UI'.
      bdcdata-dynpro   = '0100'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
       CLEAR bdcdata.
      bdcdata-fnam = 'BDC_CURSOR'.
      bdcdata-fval = 'CRMT_7010_ACTIVITY_UI-DIRECTION'.
      APPEND bdcdata.
    select single direction from CRMD_ACTIVITY_H into dire
                                  where  guid = objnr.
      if sy-subrc = 0.
        if dire = '0'.
          dire = '1'.
        elseif dire = '1'.
         dire = ''.
       elseif dire is initial.
         dire = '1'.
        endif.
    endif.
    CLEAR bdcdata.
      bdcdata-fnam = 'CRMT_7010_ACTIVITY_UI-DIRECTION'.
      bdcdata-fVAL = DIRE.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = '=SAVE'.
      APPEND bdcdata.
    CALL TRANSACTION 'CRMD_BUS2000126'  using bdcdata mode 'N'.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
      RETURN        =
    *COMMIT WORK.
    wait up to 5 seconds.
    *}   INSERT
    ENDFUNCTION.
    Thanks and regards
    Neel

    Dear experts,
    Already the FM is RFC enabled other i won't be able to call it from portal
    and coming to using the BAPI_ACTIVITY CHANGE fm that acting very weird so we are using the CRM EXTERN CHANGE USER STATUS fm which is working fine but the only problem is even when we comit from BAPI_TRANSACTION_COMMIT its not getting the delta queue of BW updated eventhough its chaning the status.
    So for the above reasons we are using the BDC code in the FM for pressing the save button then its will update the changes to BW delta queue as well.
    its working fine when i run it from the system in tcode SE37 only the BDC code is not runing when i am doing it from portal apart from the fm is chaning the status .
    thanks and regards
    Neel

  • Functional module for determining the sales tax code

    Dear all,
    Kindly help me is there any Functional module to determine the sales tax code?
    My Requirement is Based on the Country, Sales Org and Tax code Pricing should pick up automatically.
    I tried adding the same fields in the table and inserted in the access sequence and created the condition record for the same.
    Created the order but system is not able to get  the Tax code while determining the price?
    Please help ...
    Regards,
    SK

    My Requirement is Based on the Country, Sales Org and
         Tax code Pricing should pick up automatically
    but system is not able to get the Tax code while determining the price?
    Your both the above comments are contradict to each other. In the first statement, you say pricing should pick up automatically whereas, in the next statement, you say tax code is not determining.   Please indicate the requirement clearly.
    thanks
    G. Lakshmipathi

  • Function module not genrating a output when executing

    Hello
    I am using this function module to calculate the difference between the number of days using factory calendar. The function module is working fine but it is not giving the output. It is not generating the result. here is the code for the function module
    please can you check and let me know what can be the reason
      DATA:
        DURATION_F       TYPE F.
      IF  START_DATE IS INITIAL
      AND END_DATE IS INITIAL.
        MESSAGE E032 RAISING PARAMETERS_NOT_VALID.
    Bitte geben Sie ein gültiges Start- und Enddatum an
      ENDIF.
      IF FLG_UNITS IS INITIAL.
        PERFORM TIME_UNITS.
        FLG_UNITS = 'X'.
      ENDIF.
      IF UNIT = SPACE.
        UNIT = UNIT_DAY.
      ENDIF.
      PERFORM DURATION_COMPUTE
         USING
              START_DATE
              START_TIME
              END_DATE
              END_TIME
              FACTORY_CALENDAR
              UNIT
         CHANGING
              DURATION_F
              START_DATE
              END_DATE
              START_TIME
              END_TIME.
      DURATION = DURATION_F.
    ENDFUNCTION.

    when calling the function module get the duration field as output
    write that output on the list

  • A nested exception occurred. Could not execute the function

    Hi Experts,
    Post upgrade of SAP Portal from 7.0 to 7.31, and when we click any application related to visual composer it shows the below error.
    and the default trace shows
    #2.0 #2014 07 22 02:34:11:243#0-700#Error#visualComposer_NWBIKit_logger#
    #EP-PIN-PRT#tc~epbc~prtc~core#C000A7EEAF63014200000002000019B9#11738650000000004#sap.com/com.sap.visualcomposer.BIKit#visualComposer_NWBIKit_logger#C921154#36##E220BC96117411E4C8F2000000B31E1A#519cf5b0118311e48b43000000b31e1a#519cf5b0118311e48b43000000b31e1a#0#Thread[HTTP Worker [@2079636611],5,Dedicated_Application_Thread]#Plain##
    A nested exception occurredCould not execute the function
    [EXCEPTION]
    com.sapportals.connector.execution.ExecutionException: A nested exception occurred. Could not execute the function.
    at com.sapportals.connectors.SAPCFConnector.SAPConnectorException.getNewExecutionLocalizedException(SAPConnectorException.java:193)
    at com.sapportals.connectors.SAPCFConnector.execution.functions.SAPCFConnectorInteraction.execute(SAPCFConnectorInteraction.java:617)
    at com.sap.portal.guimachine.bikit.query.bw.QueryViewFlatRfc.execute(QueryViewFlatRfc.java:209)
    at com.sap.portal.guimachine.bikit.designtime.bw.BWResultsetProcessor$ExecuteHandler.execute(BWResultsetProcessor.java:399)
    Please give us your valuable inputs to solve this.
    Thanks in advace!!
    Regards,
    Preetha Balan

    Hi Colin,
    Sorry for the delay in response!!
    Yes SAP gave patch VC70RUNTIME file to apply to get rid of this error.
    Even asked us to follow the sap note
    1532050 - Disabling error messages that pop up at runtime
    Hope this helps you
    Thanks,
    Preetha Balan

  • Error "The application could not execute the required function"

    Hi All,
    When I try to activate the DTP the following error occurs."the application could not execute the required function".
    I was able to activate the DTP for the same DataSource 2 days back but now I am unable to activate .
    Kindly suggest what could be the possible reason for the same.
    Regards,
    Santosh Mani

    If you have transformation, check it is active. Is the object 0plant is acitve or not?
    Ravi Thotahdri

  • How to find out the Functional module related to a T-code

    Hi All ,
    Please tell how to find out the Functional module related to a T-code.
    i want it for the T-code RSZDELETE.

    Hi
    There is no direct way to see this.
    You need to Pick the Program(Se37/38) and tables (SE16/11)and to see where its been used
    The FM for RSZDELETE is RSZ_DB_COMP_REORG_AS_POPUP.
    Hope it helps

Maybe you are looking for

  • Multiple iPod users on one computer, one iTunes

    Need help. We have 3 iPod 5th generation using one computer and each of us have different tastes in music/movies/games etc. I just spent 6 hours redoing my personal setting to resync my iPod after my son reset it for his tastes. Is there any way of s

  • How do I save music from iTunes to SD card

    How do I save a playlist from iTunes to a SD card for my daughter's Nintendo DSi?

  • New  AV connection kit

    Hi everyone:)i've just bought new Av connection kit it's pretty good deal and everything looks pretty ok (i thought it would be terrible)on my 32" Plasma TV ,but AV cable (3.5 mm jack) was cracked...yes...I don't even know y..so gonna go and exchange

  • Inter-company Inspection plan

    Hello Need your advice in SME Please. We have two company code. We are planning to use one Plant Master inspection charat for the next plant in the Inspection plan . Means same group and same group counter will be used for both the material in the Ma

  • TREX Configuration for BW or BI server.

    Hello Experts, I need to know the steps for configuring TREX for BI information (BI reports) published in KM content of the portal.. The solution should provide the indexing service for the report published.. Steps for Increased performance in search