Session maintenance in v7.0

Hi !
I'm trying to maintain the session b/w the soap client(weblogicclient.jar) and
soap server( weblogic v7.0).
My soap service is a simple java class. The service implements ServiceLifecycle
and also
I have implemented the init(Object Context) method in the soap service. But this
gets called on the startup of the
weblogic server itself. So a "null" context object is being passed to the soap
service and thus unable to get the session
object from the underlying container. At the client side I'm setting the property
to maintain the session.
How do I set the soap service to get loaded on the first request instead of loading
on startup of the server ?
I tried setting the load-on-startup option in the web.xml of the soap service,it
didn't help.
Is this the rightway to configure the server to maintain session ?
Any pointer will be highly appreciated
Regards
Kumar Raj

WLS 7.0 do not support Sessions. Servlet endpoint as defined in the
jax-rpc spec is optional and not implemented in WLS 7.0. In 8.1 you
can access the session using the following code:
regards,
-manoj
import javax.xml.namespace.QName;
import javax.xml.rpc.soap.SOAPFaultException;
import weblogic.webservice.context.WebServiceContext;
import weblogic.webservice.context.WebServiceSession;
import weblogic.webservice.context.ContextNotFoundException;
public class HelloWorldService{
public int helloStatefulWorld(){
WebServiceSession session;
try{
session = WebServiceContext.currentContext().getSession();
}catch( ContextNotFoundException e ){
throw new SOAPFaultException(
new QName( "http://tutorial/sample30/fault", "ContextNotFound" ),
"current context was not found",
null, null );
Integer count = (Integer)session.getAttribute( "count" );
if( count == null ){
count = new Integer( 0 );
session.setAttribute( "count", new Integer( count.intValue() + 1 ) );
return count.intValue();
"Kumar Raj" <[email protected]> wrote in message
news:3e80535a$[email protected]..
>
Hi !
I'm trying to maintain the session b/w the soap client(weblogicclient.jar)and
soap server( weblogic v7.0).
My soap service is a simple java class. The service implementsServiceLifecycle
and also
I have implemented the init(Object Context) method in the soap service.But this
gets called on the startup of the
weblogic server itself. So a "null" context object is being passed to thesoap
service and thus unable to get the session
object from the underlying container. At the client side I'm setting theproperty
to maintain the session.
How do I set the soap service to get loaded on the first request insteadof loading
on startup of the server ?
I tried setting the load-on-startup option in the web.xml of the soapservice,it
didn't help.
Is this the rightway to configure the server to maintain session ?
Any pointer will be highly appreciated
Regards
Kumar Raj

Similar Messages

  • Session maintenance with j2ee generated stub

    Hello,
    I am trying to maintain state between a JSE endpoint and a servlet that acts as a client.
    Here is the code for the client:
    * addClient.java
    * Created on May 22, 2006, 8:44 PM
    package pack;
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.xml.rpc.Stub;
    * @author julien
    * @version
    public class AddClient extends HttpServlet {
        /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
         * @param request servlet request
         * @param response servlet response
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try { // This code block invokes the add operation on web service
                int sum = getAdderWebServiceSEIPort().add(4);
                out.println("<html>");
                out.println("<head>");
                out.println("<title>Servlet addClient</title>");
                out.println("</head>");
                out.println("<body>");
                out.println("<h1>Servlet addClient at " + sum + "</h1>");
                out.println("</body>");
                out.println("</html>");
                out.close();
            } catch(java.rmi.RemoteException ex) {
                // TODO handle remote exception
            } catch(Exception ex) {
                // TODO handle custom exceptions here
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        /** Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Returns a short description of the servlet.
        public String getServletInfo() {
            return "Short description";
        // </editor-fold>
        private pack.AdderWebService getAdderWebService() {
            pack.AdderWebService adderWebService = null;
            try {
                javax.naming.InitialContext ic = new javax.naming.InitialContext();
                adderWebService = (pack.AdderWebService) ic.lookup("java:comp/env/service/AdderWebService");
            } catch(javax.naming.NamingException ex) {
                ex.printStackTrace();
            return adderWebService;
        private pack.AdderWebServiceSEI getAdderWebServiceSEIPort() {
            pack.AdderWebServiceSEI adderWebServiceSEIPort = null;
            try {
                Stub stub;
                adderWebServiceSEIPort = getAdderWebService().getAdderWebServiceSEIPort();
                stub = (Stub)adderWebServiceSEIPort;
                stub._setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY, true);
                adderWebServiceSEIPort= (pack.AdderWebServiceSEI)stub;
            } catch(javax.xml.rpc.ServiceException ex) {
                ex.printStackTrace();
            return adderWebServiceSEIPort;
    }and here is the code for the JSE endpoint:
    package pack;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpSessionEvent;
    import javax.servlet.http.HttpSessionListener;
    import javax.xml.rpc.ServiceException;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.rpc.server.ServiceLifecycle;
    import javax.xml.rpc.server.ServletEndpointContext;
    * This is the implementation bean class for the AdderWebService web service.
    * Created May 22, 2006 8:30:25 PM
    * @author julien
    public class AdderWebServiceImpl implements AdderWebServiceSEI, ServiceLifecycle{
        ServletEndpointContext endptCtx;
        SOAPMessageContext msgCtx;
         * Web service operation
        public int add(int number) throws java.rmi.RemoteException {
            System.out.println("add called");
             HttpSession session = endptCtx.getHttpSession();
             System.out.println("SESSION ID "+session.getId());
            if(session !=null){
                System.out.println("session not null");
                String idFromClient = msgCtx.getProperty("id").toString(); System.out.println("----"+idFromClient);
                String id = (String)session.getAttribute("id"); System.out.println("----"+id);
                if (id!= null && idFromClient.equals(id)){
                    System.out.println("nested non null");
                    int total = (Integer)session.getAttribute("total") + number;
                    session.setAttribute("total",total);
                    return  total;
                } else{
                    System.out.println("nested null");
                    session.setAttribute("id", idFromClient);
                    int total = number;
                    session.setAttribute("total",total);
                    System.out.println("here"+session.getAttribute("id"));
                    return total;
            } else{
                System.out.println("session null");
                return 0;
        public void init(Object context) throws ServiceException {
            System.out.println("init called");
            endptCtx = (ServletEndpointContext) context;
            msgCtx = (SOAPMessageContext)endptCtx.getMessageContext();
        public void destroy() {
            System.out.println("destroy called");
    }Here is the output from the console:
    1:53:47,692 INFO  [AxisService] Web Service deployed: http://ordinateur:8080/WebApplicationFiveEndpoint/AdderWebService
    01:53:48,720 INFO  [STDOUT] session Created
    01:53:57,708 INFO  [STDOUT] init called
    01:53:57,769 INFO  [STDOUT] org.jboss.axis.message.SOAPHeaderElementAxisImpl@1aa34dc[[mi:message-id: null]]
    01:53:57,769 INFO  [STDOUT] 123456789
    01:53:57,774 INFO  [STDOUT] add called
    01:53:57,774 INFO  [STDOUT] session Created
    01:53:57,775 INFO  [STDOUT] SESSION ID B15EEC235A416BE62D36192EAEB8AA88
    01:53:57,775 INFO  [STDOUT] session not null
    01:53:57,776 INFO  [STDOUT] ----123456789
    01:53:57,776 INFO  [STDOUT] ----null
    01:53:57,776 INFO  [STDOUT] nested null
    01:53:57,778 INFO  [STDOUT] here123456789
    01:53:57,792 INFO  [STDOUT] destroy called
    01:54:04,027 INFO  [STDOUT] init called
    01:54:04,042 INFO  [STDOUT] org.jboss.axis.message.SOAPHeaderElementAxisImpl@19ab9c5[[mi:message-id: null]]
    01:54:04,042 INFO  [STDOUT] 123456789
    01:54:04,043 INFO  [STDOUT] add called
    01:54:04,044 INFO  [STDOUT] session Created
    01:54:04,044 INFO  [STDOUT] SESSION ID 1C0770F2DF80971FC59F54DE3CCBBCE0
    01:54:04,044 INFO  [STDOUT] session not null
    01:54:04,044 INFO  [STDOUT] ----123456789
    01:54:04,045 INFO  [STDOUT] ----null
    01:54:04,045 INFO  [STDOUT] nested null
    01:54:04,045 INFO  [STDOUT] here123456789
    01:54:04,082 INFO  [STDOUT] destroy calledAs you can see, I have enabled session maintenance and still it does not work. FYI, I use Jboss 4.0.3. Can anyone help please??
    Thanks in advance,
    Julien.

    I suspect you're using verbose2zip to try to find the subset of required
    classes. It uses the java -verbose output to try to guess at a
    reasonable client-jar for your application.
    8.1 does have a thin-client jar that would meet your needs, but that
    wasn't available in 7.0
    I believe stubs are dynamically generated in 7.0, but I'm not positive.
    My best guess is your client jar is missing classes required by the
    RMI runtime to dynamically load classes.
    There's probably 3 things you could do:
    1) try posting in the rmi newsgroup. They might be better able to help
    you here.
    2) Open a support case
    3) Do the not-so-fun binary search where you look at the contents of the
    weblogic.jar and your client.jar and gradually either remove from
    weblogic.jar or add to your client.jar until it breaks/works again.
    -- Rob
    Gregory Chazalon wrote:
    Ok, I think I have delimited the problem.
    Because we use a 'heavy' java client to access our EJBs, we need to provide some
    weblogic classes to the client JVM. Hence we have made a wlsclient.jar which is
    a subset of weblogic.jar.
    When we use the full weblogic.jar on the client, we don't get the previous exception.
    But when we try to narrow this jar to the needed classes, we get this weird exception.
    (By the way I think we use a BEA tool to extract the needed classes, can't remember
    the name though...)
    Anyway, what I do not understand is why do we have on failure on a stub class
    of our own if the root cause is a missing weblogic class on the client application
    Maybe we have missed something, and we should use a prepacked jar bundled with
    WLS (Which one ?).
    How do we achieve this ?
    I invoke the WL gurus for this question...
    Thanks in advance.
    Gregory

  • Session Maintenance in JSp-- Servlet-- JSP

    Iam making a browser based Financial Aplication so I want to introduce sessions into it.
    My First page is a JSP which takes username and Password. Then it calls a servlet.
    So my Problems are-
    1. Iam able to start session from servlet (which validates username and password) but after that in the apllication some JSp's are there like for search options so how to maintain sessions in JSP's ?
    2. When user quits browser and then opening a browser and directly types a JSP page which is in-between the flow this JSP opens up whereas i want the user to go from starting as its a security loop hole.
    So how to maintain a session in a JSP (ie when control passes from Servlet to JSP at that time)?
    Plz Help me
    Thanks in advance

    Hi Innova,
    There is a solution .I think while validating the login page entries u should maintain a session variable and give it some constant value if the entered values are valid.And now u should always check this sesson variable for that constant value [ if(session.getParameter("s")==constvalue) ] only then u proceed further else diaplay an error message or link prompting to login
    I hope it will work fine check it out.
    GoodLuck.
    Bye......

  • Session maintenance at server side for webservice developed in CXF.

    Hi.
    Can anybody explain how to maintain session for a Webservice which is developed with the help of CXF? As earlier we were using AXIS, but recently we migrated to CXF. I tried to find out code samples, many places it&rsquo;s given the session handling from client side which is not suitable for webservices. As client can work on different technologies.
    So i cannot request client to put code for session handling.
    Help is appreciated.
    Thanks in advance.
    Regards
    Sreedhar

    Hi.
    Can anybody explain how to maintain session for a Webservice which is developed with the help of CXF? As earlier we were using AXIS, but recently we migrated to CXF. I tried to find out code samples, many places it&rsquo;s given the session handling from client side which is not suitable for webservices. As client can work on different technologies.
    So i cannot request client to put code for session handling.
    Help is appreciated.
    Thanks in advance.
    Regards
    Sreedhar

  • User Session Handling - Design Question

    Sorry, Wrong Forum
    Edited by: soontobeared on May 28, 2009 12:08 PM

    Hi,
    If I dont maintain a session, how do I handle the cases when the client terminates abruptly?
    I would like to know if I can have a servlet layer inbetween the client and the sever for session maintenance.
    Thanks
    Edited by: soontobeared on May 31, 2009 9:15 PM

  • Not able to display flat file's error line in output

    The below Source Code is BDC for XD01 (update Customer Master Record) in CALL TRANSACTION method. This program is written in call transaction method cause as per user’s requirement, user wants error log to be printed as soon as the BDC process finished in the background mode.
    When you execute this below program it will show a selection screen from where you can select your flat file from system.
    After executing this code show output like below as soon as it finished processing the FLAT file.
    1. Customer Update Summary
    2. Successful record with customer number and name.
    3. Error Records with 'record number' and 'reason for error'
    (For testing you just have to copy-paste-save-active  the source code)
    And I have encountered an issue over here in 3rd section-“Record Number” of “Error Records”.
    The “Record Number” is for display the line number of that flat file line which in which error has occurred.
    The “Record Number”  Entries showing only ‘0’ instead of showing line number of error entry .
    I have used Function Module FORMAT_MESSAGE to capture the errors. But not able to display line number of that flat file which is containing error.
    So please suggest me what changes I should make in below source code to get proper output.
    Flat file for your R&D
    1000     1000     10     10     0001     Company     Chobey & Group1N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     1     A     10     1
    1000     1000     10     10     0001     Company     Chobey & Group2N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     1     A     10     1
    1000     1000     10     10     0001     Company     Chobey & Group3N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     .     A     10     1
    1000     1000     10     10     0001     Company     Chobey & Group4N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     1     A     ..     1
    1000     1000     10     10     0001     Company     Chobey & Group5N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     1     A     10     1
    And Source Code
    *& Report  Z_TEST_SAI                                                  *
    REPORT  Z_TEST_SAI no standard page heading line-size 255.
    TYPES: BEGIN OF t_cust,
            bukrs like rf02d-bukrs,
            vkorg like rf02d-vkorg,
            vtweg like rf02d-vtweg,
            spart like rf02d-spart,
            ktokd like rf02d-ktokd,
            anred like kna1-anred,
            name1 like kna1-name1,
            sortl like kna1-sortl,
            name2 like kna1-name2,
            name3 like kna1-name3,
            name4 like kna1-name4,
            stras like kna1-stras,
            pfach like kna1-pfach,
            ort01 like kna1-ort01,
            pstlz like kna1-pstlz,
            ort02 like kna1-ort02,
            pfort like kna1-pfort,
            pstl2 like kna1-pstl2,
            land1 like kna1-land1,
            regio like kna1-regio,
            telx1 like kna1-telx1,
            telf1 like kna1-telf1,
            telfx like kna1-telfx,
            telf2 like kna1-telf2,
            teltx like kna1-teltx,
            stceg like kna1-stceg,
            cityc like kna1-cityc,
            lzone like kna1-lzone,
            niels like kna1-niels,
            kukla like kna1-kukla,
            akont like knb1-akont,
            fdgrv like knb1-fdgrv,
            vzskz like knb1-vzskz,
            zterm like knb1-zterm,
            vkbur like knvv-vkbur,
            versg like knvv-versg,
            vsbed like knvv-vsbed,
            ktgrd like knvv-ktgrd,
            taxkd like knvi-taxkd,
    END OF t_cust.
    TYPES: BEGIN OF t_sucrec,
              cnum TYPE kna1-kunnr,                          "Customer Number
              cnam TYPE kna1-name1,                          "Customer Name
    END OF t_sucrec.
    TYPES: BEGIN OF t_errrec,
    *        lineno TYPE i,                                  "Line Number
             lineno TYPE string,
           message TYPE string,                              "Error Message
    END OF t_errrec.
    DATA: v_file TYPE string,                                "Variable for storing flat file
    it_cust TYPE STANDARD TABLE OF t_cust,                   "Internal table of Customer
    wa_cust LIKE LINE OF it_cust,                            "Workarea of Internal table it_cust
    it_sucrec TYPE STANDARD TABLE OF t_sucrec,               "Internal table of Success records
    wa_sucrec LIKE LINE OF it_sucrec,                        "Workarea of Internal table it_sucrec
    it_errrec TYPE STANDARD TABLE OF t_errrec,
    wa_errrec LIKE LINE OF it_errrec,
    it_bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE,        "Internal table structure of BDCDATA
    it_messagetab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE, "Tracing Error Messages
    v_date LIKE sy-datum,                                    "Controlling of session date
    v_index LIKE sy-index,                                   "Index Number
    v_totrec TYPE i,                                         "Total Records
    v_errrec TYPE i,                                         "Error Records
    v_sucrec TYPE i,                                         "Success Records
    v_sesschk TYPE c.                                        "Session maintenance
    *& SELECTION-SCREEN
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 NO INTERVALS.
    PARAMETERS: p_file    TYPE rlgrap-filename.              "rlgrap-filename is a predefined structure
    SELECTION-SCREEN: END OF BLOCK blk1.
    SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002 NO INTERVALS.
    PARAMETERS: p_mode    LIKE ctu_params-dismode DEFAULT 'N',
                p_update  LIKE ctu_params-updmode DEFAULT 'A'.
    SELECTION-SCREEN END OF BLOCK blk2.
    *& INITIALIZATION
    INITIALIZATION.
    v_date = sy-datum - 1.
    *& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    FIELD_NAME = ' '
    IMPORTING
    file_name = p_file.
    *& START-OF-SELECTION
    START-OF-SELECTION.
    v_file = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = v_file
    filetype = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = it_cust
    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.
    *& END-OF-SELECTION
    END-OF-SELECTION.
    v_index = sy-index.
    LOOP AT it_cust INTO wa_cust.
      perform bdc_dynpro      using 'SAPMF02D' '0100'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RF02D-KTOKD'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/00'.
        perform bdc_field       using 'RF02D-BUKRS'
                                      wa_cust-bukrs.
        perform bdc_field       using 'RF02D-VKORG'
                                      wa_cust-vkorg.
        perform bdc_field       using 'RF02D-VTWEG'
                                      wa_cust-vtweg.
        perform bdc_field       using 'RF02D-SPART'
                                      wa_cust-spart.
        perform bdc_field       using 'RF02D-KTOKD'
                                      wa_cust-ktokd.
        perform bdc_dynpro      using 'SAPMF02D' '0110'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNA1-TELTX'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNA1-ANRED'
                                      wa_cust-anred.
        perform bdc_field       using 'KNA1-NAME1'
                                      wa_cust-name1.
        perform bdc_field       using 'KNA1-SORTL'
                                      wa_cust-sortl.
        perform bdc_field       using 'KNA1-NAME2'
                                      wa_cust-name2.
        perform bdc_field       using 'KNA1-NAME3'
                                      wa_cust-name3.
        perform bdc_field       using 'KNA1-NAME4'
                                      wa_cust-name4.
        perform bdc_field       using 'KNA1-STRAS'
                                      wa_cust-stras.
        perform bdc_field       using 'KNA1-PFACH'
                                      wa_cust-pfach.
        perform bdc_field       using 'KNA1-ORT01'
                                      wa_cust-ort01.
        perform bdc_field       using 'KNA1-PSTLZ'
                                      wa_cust-pstlz.
        perform bdc_field       using 'KNA1-ORT02'
                                      wa_cust-ort02.
        perform bdc_field       using 'KNA1-PFORT'
                                      wa_cust-pfort.
        perform bdc_field       using 'KNA1-PSTL2'
                                      wa_cust-pstl2.
        perform bdc_field       using 'KNA1-LAND1'
                                      wa_cust-land1.
        perform bdc_field       using 'KNA1-REGIO'
                                      wa_cust-regio.
        perform bdc_field       using 'KNA1-SPRAS'
                                      'EN'.
        perform bdc_field       using 'KNA1-TELX1'
                                      wa_cust-telx1.
        perform bdc_field       using 'KNA1-TELF1'
                                      wa_cust-telf1.
        perform bdc_field       using 'KNA1-TELFX'
                                      wa_cust-telfx.
        perform bdc_field       using 'KNA1-TELF2'
                                      wa_cust-telf2.
        perform bdc_field       using 'KNA1-TELTX'
                                      wa_cust-teltx.
        perform bdc_dynpro      using 'SAPMF02D' '0120'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNA1-CITYC'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNA1-STCEG'
                                      wa_cust-stceg.
        perform bdc_field       using 'KNA1-CITYC'
                                      wa_cust-cityc.
        perform bdc_field       using 'KNA1-LZONE'
                                      wa_cust-lzone.
        perform bdc_dynpro      using 'SAPMF02D' '0125'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNA1-KUKLA'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNA1-NIELS'
                                      wa_cust-niels.
        perform bdc_field       using 'KNA1-KUKLA'
                                      wa_cust-kukla.
        perform bdc_dynpro      using 'SAPMF02D' '0130'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNBK-BANKS(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0340'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RF02D-KUNNR'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0360'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVK-NAMEV(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0210'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNB1-VZSKZ'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNB1-AKONT'
                                      wa_cust-akont.
        perform bdc_field       using 'KNB1-FDGRV'
                                      wa_cust-fdgrv.
        perform bdc_field       using 'KNB1-VZSKZ'
                                      wa_cust-vzskz.
        perform bdc_dynpro      using 'SAPMF02D' '0215'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNB1-ZTERM'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNB1-ZTERM'
                                      wa_cust-zterm.
        perform bdc_dynpro      using 'SAPMF02D' '0220'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNB5-MAHNA'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0230'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNB1-VRSNR'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0610'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RF02D-KUNNR'.
        perform bdc_dynpro      using 'SAPMF02D' '0310'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVV-VERSG'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNVV-AWAHR'
                                      '100'.
        perform bdc_field       using 'KNVV-VKBUR'
                                      wa_cust-vkbur.
        perform bdc_field       using 'KNVV-WAERS'
                                      'INR'.
        perform bdc_field       using 'KNVV-KALKS'
                                      '1'.
        perform bdc_field       using 'KNVV-VERSG'
                                      wa_cust-versg.
        perform bdc_dynpro      using 'SAPMF02D' '0315'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVV-VSBED'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNVV-LPRIO'
        perform bdc_field       using 'KNVV-KZAZU'
                                      'X'.
        perform bdc_field       using 'KNVV-VSBED'
                                      wa_cust-vsbed.
        perform bdc_field       using 'KNVV-ANTLF'
                                      '9'.
        perform bdc_dynpro      using 'SAPMF02D' '0320'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVV-KTGRD'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNVV-BOKRE'
                                      'X'.
        perform bdc_field       using 'KNVV-KTGRD'
                                      wa_cust-ktgrd.
        perform bdc_dynpro      using 'SAPMF02D' '1350'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVI-TAXKD(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNVI-TAXKD(01)'
                                      wa_cust-taxkd.
        perform bdc_dynpro      using 'SAPMF02D' '0324'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVP-PARVW(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=UPDA'.
    CALL TRANSACTION 'XD01' USING it_bdctab
    MODE p_mode
    UPDATE p_update
    MESSAGES INTO it_messagetab.
    IF sy-subrc = 0.
    *& reading success records to corresponding internal table
    READ TABLE it_messagetab WITH KEY msgtyp = 'S'.
    IF sy-subrc = 0.
    wa_sucrec-cnum = it_messagetab-msgv1.
    wa_sucrec-cnam = wa_cust-name1.
    APPEND wa_sucrec TO it_sucrec.
    CLEAR wa_sucrec.
    ENDIF.
    ELSE.
    *& reading error records to corresponding internal table
    READ TABLE it_messagetab WITH KEY msgtyp = 'E'.
    IF sy-subrc = 0.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    id = sy-msgid
    no = it_messagetab-msgnr
    v1 = it_messagetab-msgv1
    v2 = it_messagetab-msgv2
    v3 = it_messagetab-msgv3
    v4 = it_messagetab-msgv4
    IMPORTING
    msg = wa_errrec-message.
    wa_errrec-lineno = v_index.
    *******wa_errrec-lineno  = v_index.
    *******wa_errrec-message = it_messagetab-msgv1.
    APPEND wa_errrec TO it_errrec.
    CLEAR wa_errrec.
    ENDIF.
    ENDIF.
    CLEAR : it_bdctab, it_messagetab.
    REFRESH: it_bdctab, it_messagetab.
    ENDLOOP.
    DESCRIBE TABLE it_cust LINES v_totrec.
    DESCRIBE TABLE it_errrec LINES v_errrec.
    DESCRIBE TABLE it_sucrec LINES v_sucrec.
    PERFORM disp_data.
    SKIP 2.
    IF v_sucrec > 0.
    PERFORM disp_success_data.
    ENDIF.
    SKIP 2.
    IF v_errrec > 0.
    PERFORM disp_error_data.
    ENDIF.
    *& Form bdc_dynpro
    *#  text
    *#  -->P_0104 text
    *#  -->P_0105 text
    FORM bdc_dynpro USING program
    dynpro.
    CLEAR it_bdctab.
    it_bdctab-program = program.
    it_bdctab-dynpro = dynpro.
    it_bdctab-dynbegin = 'X'.
    APPEND it_bdctab.
    ENDFORM. " bdc_dynpro
    *& Form bdc_field
    *#  text
    *#  -->P_0109 text
    *#  -->P_IT_cust_LIFNR text
    FORM bdc_field USING fnam
    fval.
    CLEAR it_bdctab.
    it_bdctab-fnam = fnam.
    it_bdctab-fval = fval.
    APPEND it_bdctab.
    ENDFORM. " bdc_field
    *& Form disp_data
    *#  text
    *#  --> p1 text
    *#  <-- p2 text
    FORM disp_data .
    ULINE (45).
    WRITE : / sy-vline,
    12 'FAMD CUSTOMER UPDATE SUMMARY'(004) COLOR 1,
    45 sy-vline.
    ULINE /(45).
    WRITE : / sy-vline,
    'Total Records Processed'(007),
    28 '=',
    30 v_totrec,
    45 sy-vline,
    / sy-vline,
    'Error Records'(005),
    28 '=',
    30 v_errrec,
    45 sy-vline,
    / sy-vline,
    'Successful Records'(006),
    28 '=',
    30 v_sucrec,
    45 sy-vline.
    ULINE /(45).
    ENDFORM. " disp_data
    *& Form disp_success_data
    *#  text
    *#  --> p1 text
    *#  <-- p2 text
    FORM disp_success_data .
    ULINE (45).
    WRITE : / sy-vline,
    14 'Successful Records'(012) COLOR 1,
    45 sy-vline.
    ULINE /(45).
    WRITE : / sy-vline ,
    'Customer Number'(010) COLOR 2,
    17 sy-vline,
    25 'Customer Name'(011) COLOR 2,
    45 sy-vline.
    ULINE /(45).
    LOOP AT it_sucrec INTO wa_sucrec.
    WRITE: / sy-vline ,
    wa_sucrec-cnum,
    17 sy-vline,
    19 wa_sucrec-cnam,
    45 sy-vline.
    ENDLOOP.
    ULINE /(45).
    ENDFORM. " disp_success_data
    *& Form disp_error_data
    *#  text
    *#  --> p1 text
    *#  <-- p2 text
    FORM disp_error_data .
    ULINE (85).
    WRITE : / sy-vline,
    35 'Error Records'(013) COLOR 1,
    85 sy-vline.
    ULINE /(85).
    WRITE : / sy-vline,
    'Record Number'(008) COLOR 2,
    sy-vline,
    37 'Reason for error'(009) COLOR 2,
    85 sy-vline.
    ULINE /(85).
    LOOP AT it_errrec INTO wa_errrec.
    WRITE : / sy-vline,
    wa_errrec-lineno,
    17 sy-vline,
    wa_errrec-message,
    85 sy-vline.
    ENDLOOP.
    ULINE /(85).
    ENDFORM. " disp_error_data

    Worked out n found the solution

  • Authentication issue with Xcelsius/Portal integration

    I am facing an issue with the way we have integrated our Xcelsius dashboard with our corporate portal. I know this probably is more of a SDK question than Administration, but I figured I will ask it here anyway since Tim and some others are diverse enough in their knowledge base. This might be LONG post but please advise if anyone has any good pointers.
    We have an Xcelsius dashboard that needs to be served up via our corporate intranet (based on MS Sharepoint 2007). Now we are NOT using the MS Sharepoint Portal Integration Kit, but just doing a basic integration of the SWF call within a web part on Sharepoint. All this means is that within a portlet (web-part) on Sharepoint, I am making a HTTP call to the openDocument URL to invoke the SWF file. So the SWF is actually served up from our Tomcat App Server, and displayed onto this frame within the portal. That is the basic idea.
    To achieve this, what I did was write some custom code using the Java SDK to modify the openDocument a little bit. By doing so, I was able to insert some behind-the-scenes-login code wherein no matter who the portal user (Win AD-based) is, he is logged in to BOE as a generic "dashboard-user" and the dashboard is served up. This worked fine for the first dashboard where all we had was SWF and some WebI linking using openDocument (no full-InfoView access).
    But in this second dashboard now, what we also have is a hyperlink for users to get to InfoView to do Ad-hoc reporting. What this does is open a child browser window from within the portal (dashboard) --- and it remembers the BOE session for the generic user id "dashboard-user" and logs the end-user in to InfoView using that. But what I actually want is that the end-users, on this new window, should only be prompted at the traditional InfoView logon screen where they can manually enter their Windows AD password and get in. Thus, I would like to keep the dashboard SWF page session separate from the InfoView ad-hoc session, which I cannot seem to do because of the browser relationship and session maintenance.
    I am trying to find a way where I can simulate a single sign-on for dashboard viewers on the portal, but at the same time let them jump off to InfoView as themselves.
    Any thoughts on how I can do this?
    Notes:
    We DO NOT have Single Sign-On enabled for InfoView
    We are using Windows AD authentication (manual, no SSO)
    We are on Tomcat

    Sarang Deshpande wrote:
    1) If the InfoView app on Tomcat (desktoplaunch) is configured with Vintela, openDocument calls from the portal with automatically work using behind the scenes SSO, correct?
    in XIR2 everything that falls under infoview should SSO when infoview is setup for SSO (not the case in XI 3.x)
    Sarang Deshpande wrote:
    2) What is the best practice when it comes to the service accounts needed? I have implemented Windows AD manual auth already so I have a service account that use for that. Should I be using the same on and making vintela/SSO-specific changes to it...or should I have a separate vintela service account and deal with two different ones..each for a diff purpose?
    There is no best practice per se but the less service account the lower your chances to duplicate an SPN, functionally everything seems to work just as well with multiple as it does with 1 (of course with 1 there is less management work) If you click the SSO link in my forum sticky post I have a section explaining this with some suggested methods of deploying a service account(s)
    Sarang Deshpande wrote:
    3) Other than some minor browser configurations that might be required, is there anything else that I should communicate to the team about what might be required to be "pushed" to users' PCs?
    Using the default config nothing should be required on the client machine (unless SSO has been disabled in the browser or you intend to use a url that contains a period ..... (i.e. FQDN or IP) with hostname URL (the default) it should just work.
    To note if you have XP SP2 or older there is a microsoft spnego bug you may need to apply a fix if you aren't patched to SP3 (about 5% of our customers run into this).
    Regards,
    Tim

  • Apache+mod_jk+ssl

    Hello,
    Is it possible to have an apache web server in front of a cluster of Tomcat servers and still force the ssl connection to go all the way to the tomcat servers or must ssl negotiation stop at the web server ? This would involve ssl session maintenance by mod_jk load balancing, right ? Does it work that way ?
    Thank you.

    Just remembered something...
    Assuming I have a load balancer capable of routing ssl comunication between a client and clustered Tomcat node in a sticky fashion (based on IP mapping for instance), that would still mean there would be no fail-over (node down => broken ssl connection).
    Due to this, I'm beggining to think that the only way to have a load-balanced, failed-over cluster is to stop the ssl at the load balancer.
    If this is so, another question emerges: how to force ssl at the load balancer, since declarative servlet container security (transport-guarantee == CONFIDENTIALITY) will have no effect whatsoever. In fact the container will have to enable plain http since that is what the load balancer will be delivering it.
    I bet this a really simple thing that I'm making a mess of. Please HELP!
    Thank you

  • BDC Problem

    Dear Guru,
    Here i have encountered a typical issue.
    Im Performing BDC for VK11 (Create Condition Record) with "Key Combination" --->> "Location, Material Code (Base Price for Longs)".
    While I am running this BDC ( source code attached below) in All screen mode every datas which are of type "CHAR" like--->>
    Condition type(kschl) ,
    Plant(werks) ,
    Material No(matnr),
    Valid From date(datab),
    Valid To date(datbi),
    Rate Unit(konwa) are coming properly from flatfile except
    Rate (condition amount - KBETR) which is are of data type "CURR".
    So guru I want to know what code i should add into my below bdc prog to fetch data properly into RATE - Condition amount field which is of type " CURR".
    Pls Help.
    Source Code:
    REPORT z_bdc_vk11_famd
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    *& DATA-DECLARATION
    TYPES: BEGIN OF t_cust,
                kschl LIKE rv13a-kschl,
                werks LIKE komg-werks,
                matnr LIKE komg-matnr,
                kbetr LIKE konp-kbetr,
               konwa LIKE konp-konwa,
                datab LIKE rv13a-datab,
                datbi LIKE rv13a-datbi,
           END OF t_cust.
    TYPES: BEGIN OF t_sucrec,
             cnum TYPE komg-werks,
             cnam TYPE komg-matnr,
    END OF t_sucrec.
    TYPES: BEGIN OF t_errrec,
           lineno TYPE string,      "Line Number
          message TYPE string,      "Error Message
    END OF t_errrec.
    DATA:  v_file TYPE string,      "Variable for storing flat file
          it_cust TYPE STANDARD TABLE OF t_cust, "Internal table of Customer
          wa_cust LIKE LINE OF it_cust,  "Workarea of Internal table it_cust
        it_sucrec TYPE STANDARD TABLE OF t_sucrec,
                                          "Internal table of Success records
        wa_sucrec LIKE LINE OF it_sucrec,
                                       "Workarea of Internal table it_sucrec
        it_errrec TYPE STANDARD TABLE OF t_errrec,
                                       "Internal table of Error records
        wa_errrec LIKE LINE OF it_errrec,
                                       "Workarea of Internal table it_errrec
        it_bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE,
                                        "Internal table structure of BDCDATA
    it_messagetab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE,
                                        "Tracing Error Messages
           v_date LIKE sy-datum,  "Controlling of session date
          v_index LIKE sy-tabix,  "Index Number
         v_totrec TYPE i,         "Total Records
         v_errrec TYPE i,         "Error Records
         v_sucrec TYPE i,         "Success Records
        v_sesschk TYPE c.         "Session maintenance
    *& SELECTION-SCREEN
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 NO
    INTERVALS.
    PARAMETERS: p_file    TYPE rlgrap-filename.
    "rlgrap-filename is a predefined structure
    SELECTION-SCREEN: END OF BLOCK blk1.
    SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002 NO
    INTERVALS.
    PARAMETERS: p_mode    LIKE ctu_params-dismode DEFAULT 'N',
                p_update  LIKE ctu_params-updmode DEFAULT 'A'.
    SELECTION-SCREEN END OF BLOCK blk2.
    *& INITIALIZATION
    INITIALIZATION.
      v_date = sy-datum - 1.
    *& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = ' '
        IMPORTING
          file_name     = p_file.
    *& START-OF-SELECTION
    START-OF-SELECTION.
      v_file = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = v_file
          filetype                = 'ASC'
          has_field_separator     = 'X'
        TABLES
          data_tab                = it_cust
        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.
    *& END-OF-SELECTION
    END-OF-SELECTION.
      LOOP AT it_cust INTO wa_cust.
        v_index = sy-tabix.
        PERFORM bdc_dynpro      USING 'SAPMV13A' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RV13A-KSCHL'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ANTA'.
        PERFORM bdc_field       USING 'RV13A-KSCHL'
                                      wa_cust-kschl.
        PERFORM bdc_dynpro      USING 'SAPLV14A' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RV130-SELKZ(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=WEIT'.
        PERFORM bdc_dynpro      USING 'SAPMV13A' '1595'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RV13A-DATBI(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'KOMG-WERKS'
                                      wa_cust-werks.
        PERFORM bdc_field       USING 'KOMG-MATNR(01)'
                                      wa_cust-matnr.
        PERFORM bdc_field       USING 'KONP-KBETR(01)'
                                      wa_cust-kbetr.
        PERFORM bdc_field       USING 'KONP-KONWA(01)'
                                      'INR'.
        PERFORM bdc_field       USING 'RV13A-DATAB(01)'
                                      wa_cust-datab.
        PERFORM bdc_field       USING 'RV13A-DATBI(01)'
                                      wa_cust-datbi.
        PERFORM bdc_dynpro      USING 'SAPMV13A' '1595'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'KOMG-MATNR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SICH'.
        CALL TRANSACTION 'VK11' USING it_bdctab
                                 MODE p_mode
                               UPDATE p_update
                        MESSAGES INTO it_messagetab.
        IF sy-subrc = 0.
    *& reading success records to corresponding internal table
          READ TABLE it_messagetab WITH KEY msgtyp = 'S'.
          IF sy-subrc = 0.
           wa_sucrec-cnum = it_messagetab-msgv1.
            wa_sucrec-cnum = wa_cust-werks.
            wa_sucrec-cnam = wa_cust-matnr.
            APPEND wa_sucrec TO it_sucrec.
            CLEAR wa_sucrec.
          ENDIF.
        ELSE.
    *& reading error records to corresponding internal table
          READ TABLE it_messagetab WITH KEY msgtyp = 'E'.
          IF sy-subrc = 0.
            CALL FUNCTION 'FORMAT_MESSAGE'
              EXPORTING
                id  = sy-msgid
                no  = it_messagetab-msgnr
                v1  = it_messagetab-msgv1
                v2  = it_messagetab-msgv2
                v3  = it_messagetab-msgv3
                v4  = it_messagetab-msgv4
              IMPORTING
                msg = wa_errrec-message.
            wa_errrec-lineno = v_index.
            APPEND wa_errrec TO it_errrec.
            CLEAR wa_errrec.
          ENDIF.
        ENDIF.
        CLEAR : it_bdctab, it_messagetab.
        REFRESH: it_bdctab, it_messagetab.
      ENDLOOP.
      DESCRIBE TABLE it_cust LINES v_totrec.
      DESCRIBE TABLE it_errrec LINES v_errrec.
      DESCRIBE TABLE it_sucrec LINES v_sucrec.
      PERFORM disp_data.
      SKIP 2.
      IF v_sucrec > 0.
        PERFORM disp_success_data.
      ENDIF.
      SKIP 2.
      IF v_errrec > 0.
        PERFORM disp_error_data.
      ENDIF.
    *& Form bdc_dynpro
    text
    -->P_0104 text
    -->P_0105 text
    FORM bdc_dynpro USING program dynpro.
      CLEAR it_bdctab.
      it_bdctab-program  = program.
      it_bdctab-dynpro   = dynpro.
      it_bdctab-dynbegin = 'X'.
      APPEND it_bdctab.
    ENDFORM. " bdc_dynpro
    *& Form bdc_field
    FORM bdc_field USING fnam fval.
      CLEAR it_bdctab.
      it_bdctab-fnam = fnam.
      it_bdctab-fval = fval.
      APPEND it_bdctab.
    ENDFORM. " bdc_field
    *& Form disp_data
    FORM disp_data .
      ULINE (45).
      WRITE : / sy-vline,
      4 'FAMD Price Master UPDATE SUMMARY'(004) COLOR 1,
      45 sy-vline.
      ULINE /(45).
      WRITE : / sy-vline,
      'Total Records Processed'(007),
      28 '=',
      30 v_totrec,
      45 sy-vline,
      / sy-vline,
      'Error Records'(005),
      28 '=',
      30 v_errrec,
      45 sy-vline,
      / sy-vline,
      'Successful Records'(006),
      28 '=',
      30 v_sucrec,
      45 sy-vline.
      ULINE /(45).
    ENDFORM. " disp_data
    *& Form disp_success_data
    FORM disp_success_data .
      ULINE (45).
      WRITE : / sy-vline,
      14 'Successful Records'(012) COLOR 1,
      45 sy-vline.
      ULINE /(45).
      WRITE : / sy-vline ,
      'Plant Number'(010) COLOR 2,
      17 sy-vline,
      25 'Material Number'(011) COLOR 2,
      45 sy-vline.
      ULINE /(45).
      LOOP AT it_sucrec INTO wa_sucrec.
        WRITE: / sy-vline ,
        wa_sucrec-cnum,
        17 sy-vline,
        19 wa_sucrec-cnam,
        45 sy-vline.
      ENDLOOP.
      ULINE /(45).
    ENDFORM. " disp_success_data
    *& Form disp_error_data
    FORM disp_error_data .
      ULINE (90).
      WRITE : / sy-vline,
      35 'Error Records'(013) COLOR 1,
      90 sy-vline.
      ULINE /(90).
      WRITE : / sy-vline,
      'Record Number'(008) COLOR 2,
      sy-vline,
      37 'Reason for error'(009) COLOR 2,
      90 sy-vline.
      ULINE /(90).
      LOOP AT it_errrec INTO wa_errrec.
        WRITE : / sy-vline,
        wa_errrec-lineno,
        17 sy-vline,
        wa_errrec-message,
        90 sy-vline.
      ENDLOOP.
      ULINE /(90).
    ENDFORM. " disp_error_data
    Flat file Sequence:
    Condition Type     Plant     Matrial No     Rate      Validity start date     Validity end date

    Hi,
    I think you are using  'wa_cust-kbetr' directly while populating rate field in BDC.
    Please write wa_cust-kbetr into a character variable and pass the character variable to BDC.
    data: t_rate(16) type c.
    write wa_cust-kbetr to t_rate no-grouping.
    Pass t_rate instead of wa_cust-kbetr in the BDC.
    PERFORM bdc_field USING 'KONP-KBETR(01)'
          t_rate.
    Like wise you might have to write your date variables also.
    Thanks and regards,
    S. Chandramouli.

  • Amount field of VK11 isnt fetching from flatfile when im performing it'sBDC

    Dear Guru,
    Here i have encountered a typical issue.
    Im Performing BDC for VK11 (Create Condition Record) with "Key Combination" --->> "Location, Material Code (Base Price for Longs)".
    While I am running this BDC ( source code attached below) in All screen mode every datas which are of type "CHAR" like--->>
    Condition type(kschl) ,
    Plant(werks) ,
    Material No(matnr),
    Valid From date(datab),
    Valid To date(datbi),
    Rate Unit(konwa) are coming properly from flatfile except
    Rate (condition amount - KBETR)  which is are of data type "CURR".
    So guru I want to know what code i should add into my below bdc prog to fetch data properly into  RATE - Condition amount field which is of type " CURR".
    Pls Help.
    Source Code:
    REPORT z_bdc_vk11_famd
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    *& DATA-DECLARATION
    TYPES: BEGIN OF t_cust,
                kschl LIKE rv13a-kschl,
                werks LIKE komg-werks,
                matnr LIKE komg-matnr,
                kbetr LIKE konp-kbetr,
    ***            konwa LIKE konp-konwa,
                datab LIKE rv13a-datab,
                datbi LIKE rv13a-datbi,
           END OF t_cust.
    TYPES: BEGIN OF t_sucrec,
             cnum TYPE komg-werks,
             cnam TYPE komg-matnr,
    END OF t_sucrec.
    TYPES: BEGIN OF t_errrec,
           lineno TYPE string,      "Line Number
          message TYPE string,      "Error Message
    END OF t_errrec.
    DATA:  v_file TYPE string,      "Variable for storing flat file
          it_cust TYPE STANDARD TABLE OF t_cust, "Internal table of Customer
          wa_cust LIKE LINE OF it_cust,  "Workarea of Internal table it_cust
        it_sucrec TYPE STANDARD TABLE OF t_sucrec,
                                          "Internal table of Success records
        wa_sucrec LIKE LINE OF it_sucrec,
                                       "Workarea of Internal table it_sucrec
        it_errrec TYPE STANDARD TABLE OF t_errrec,
                                       "Internal table of Error records
        wa_errrec LIKE LINE OF it_errrec,
                                       "Workarea of Internal table it_errrec
        it_bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE,
                                        "Internal table structure of BDCDATA
    it_messagetab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE,
                                        "Tracing Error Messages
           v_date LIKE sy-datum,  "Controlling of session date
          v_index LIKE sy-tabix,  "Index Number
         v_totrec TYPE i,         "Total Records
         v_errrec TYPE i,         "Error Records
         v_sucrec TYPE i,         "Success Records
        v_sesschk TYPE c.         "Session maintenance
    *& SELECTION-SCREEN
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 NO
    INTERVALS.
    PARAMETERS: p_file    TYPE rlgrap-filename.
    "rlgrap-filename is a predefined structure
    SELECTION-SCREEN: END OF BLOCK blk1.
    SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002 NO
    INTERVALS.
    PARAMETERS: p_mode    LIKE ctu_params-dismode DEFAULT 'N',
                p_update  LIKE ctu_params-updmode DEFAULT 'A'.
    SELECTION-SCREEN END OF BLOCK blk2.
    *& INITIALIZATION
    INITIALIZATION.
      v_date = sy-datum - 1.
    *& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = ' '
        IMPORTING
          file_name     = p_file.
    *& START-OF-SELECTION
    START-OF-SELECTION.
      v_file = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = v_file
          filetype                = 'ASC'
          has_field_separator     = 'X'
        TABLES
          data_tab                = it_cust
        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.
    *& END-OF-SELECTION
    END-OF-SELECTION.
      LOOP AT it_cust INTO wa_cust.
        v_index = sy-tabix.
        PERFORM bdc_dynpro      USING 'SAPMV13A' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RV13A-KSCHL'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ANTA'.
        PERFORM bdc_field       USING 'RV13A-KSCHL'
                                      wa_cust-kschl.
        PERFORM bdc_dynpro      USING 'SAPLV14A' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RV130-SELKZ(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=WEIT'.
        PERFORM bdc_dynpro      USING 'SAPMV13A' '1595'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RV13A-DATBI(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'KOMG-WERKS'
                                      wa_cust-werks.
        PERFORM bdc_field       USING 'KOMG-MATNR(01)'
                                      wa_cust-matnr.
        PERFORM bdc_field       USING 'KONP-KBETR(01)'
                                      wa_cust-kbetr.
        PERFORM bdc_field       USING 'KONP-KONWA(01)'
                                      'INR'.
        PERFORM bdc_field       USING 'RV13A-DATAB(01)'
                                      wa_cust-datab.
        PERFORM bdc_field       USING 'RV13A-DATBI(01)'
                                      wa_cust-datbi.
        PERFORM bdc_dynpro      USING 'SAPMV13A' '1595'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'KOMG-MATNR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SICH'.
        CALL TRANSACTION 'VK11' USING it_bdctab
                                 MODE p_mode
                               UPDATE p_update
                        MESSAGES INTO it_messagetab.
        IF sy-subrc = 0.
    *& reading success records to corresponding internal table
          READ TABLE it_messagetab WITH KEY msgtyp = 'S'.
          IF sy-subrc = 0.
    *        wa_sucrec-cnum = it_messagetab-msgv1.
            wa_sucrec-cnum = wa_cust-werks.
            wa_sucrec-cnam = wa_cust-matnr.
            APPEND wa_sucrec TO it_sucrec.
            CLEAR wa_sucrec.
          ENDIF.
        ELSE.
    *& reading error records to corresponding internal table
          READ TABLE it_messagetab WITH KEY msgtyp = 'E'.
          IF sy-subrc = 0.
            CALL FUNCTION 'FORMAT_MESSAGE'
              EXPORTING
                id  = sy-msgid
                no  = it_messagetab-msgnr
                v1  = it_messagetab-msgv1
                v2  = it_messagetab-msgv2
                v3  = it_messagetab-msgv3
                v4  = it_messagetab-msgv4
              IMPORTING
                msg = wa_errrec-message.
            wa_errrec-lineno = v_index.
            APPEND wa_errrec TO it_errrec.
            CLEAR wa_errrec.
          ENDIF.
        ENDIF.
        CLEAR : it_bdctab, it_messagetab.
        REFRESH: it_bdctab, it_messagetab.
      ENDLOOP.
      DESCRIBE TABLE it_cust LINES v_totrec.
      DESCRIBE TABLE it_errrec LINES v_errrec.
      DESCRIBE TABLE it_sucrec LINES v_sucrec.
      PERFORM disp_data.
      SKIP 2.
      IF v_sucrec > 0.
        PERFORM disp_success_data.
      ENDIF.
      SKIP 2.
      IF v_errrec > 0.
        PERFORM disp_error_data.
      ENDIF.
    *& Form bdc_dynpro
    *#  text
    *#  -->P_0104 text
    *#  -->P_0105 text
    FORM bdc_dynpro USING program dynpro.
      CLEAR it_bdctab.
      it_bdctab-program  = program.
      it_bdctab-dynpro   = dynpro.
      it_bdctab-dynbegin = 'X'.
      APPEND it_bdctab.
    ENDFORM. " bdc_dynpro
    *& Form bdc_field
    FORM bdc_field USING fnam fval.
      CLEAR it_bdctab.
      it_bdctab-fnam = fnam.
      it_bdctab-fval = fval.
      APPEND it_bdctab.
    ENDFORM. " bdc_field
    *& Form disp_data
    FORM disp_data .
      ULINE (45).
      WRITE : / sy-vline,
      4 'FAMD Price Master UPDATE SUMMARY'(004) COLOR 1,
      45 sy-vline.
      ULINE /(45).
      WRITE : / sy-vline,
      'Total Records Processed'(007),
      28 '=',
      30 v_totrec,
      45 sy-vline,
      / sy-vline,
      'Error Records'(005),
      28 '=',
      30 v_errrec,
      45 sy-vline,
      / sy-vline,
      'Successful Records'(006),
      28 '=',
      30 v_sucrec,
      45 sy-vline.
      ULINE /(45).
    ENDFORM. " disp_data
    *& Form disp_success_data
    FORM disp_success_data .
      ULINE (45).
      WRITE : / sy-vline,
      14 'Successful Records'(012) COLOR 1,
      45 sy-vline.
      ULINE /(45).
      WRITE : / sy-vline ,
      'Plant Number'(010) COLOR 2,
      17 sy-vline,
      25 'Material Number'(011) COLOR 2,
      45 sy-vline.
      ULINE /(45).
      LOOP AT it_sucrec INTO wa_sucrec.
        WRITE: / sy-vline ,
        wa_sucrec-cnum,
        17 sy-vline,
        19 wa_sucrec-cnam,
        45 sy-vline.
      ENDLOOP.
      ULINE /(45).
    ENDFORM. " disp_success_data
    *& Form disp_error_data
    FORM disp_error_data .
      ULINE (90).
      WRITE : / sy-vline,
      35 'Error Records'(013) COLOR 1,
      90 sy-vline.
      ULINE /(90).
      WRITE : / sy-vline,
      'Record Number'(008) COLOR 2,
      sy-vline,
      37 'Reason for error'(009) COLOR 2,
      90 sy-vline.
      ULINE /(90).
      LOOP AT it_errrec INTO wa_errrec.
        WRITE : / sy-vline,
        wa_errrec-lineno,
        17 sy-vline,
        wa_errrec-message,
        90 sy-vline.
      ENDLOOP.
      ULINE /(90).
    ENDFORM. " disp_error_data
    Flat file Sequence:
    Condition Type     Plant     Matrial No     Rate      Validity start date     Validity end date

    I worked out n i hav found the solution

  • JNLP & User Authentication (Application Portal Dilemma)

    There is an interesting article on JavaWorld under the Applied Java Topic about distributed applications and Java Web Start. Recently I have also become a big fan of rapid thick-client deployment using the JNLP framework. However, I (and many others I suspect) have come across a road-block implicit to distributed application (non-applet) development. There is no ability to preserve a session.
    Now in Jonathan Simon's article, in presents the case for "Application Portals" in which one could easily set up an authentication servlet and during run-time construct a list of verified applications. This implementation seems straightforward and but I am confused on one simple point for which I am in "dying-need" of clarity. The JNLP simply provides a link and protocol to deploy and update the client-side application. Upon initial execution or launching, the "link" is unknown making this solution great. However, once launched the link can be determined and the application can be executed without the use of the authentication portal (or if an off-line implementation is also deployed - launched locally).
    Is there a current design pattern to circumvent this limitation? How can I pass session information or even arguments to the client-application when launched? What happens when the application is launched via the desktop integrated icon? At first glance, I would expect the solution to be to invoke a WebService from the application upon execution of main. This service would then authenticate, but still would require its own interface for data (user/pass) capturing - thereby nullifying the entire point of setting up an authenticating application portal.
    Any suggestions or clarity would be well received

    I'm not sure if this will help you guys or not, but there is a guide for deploying JNLP applications from a servlet here: http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/downloadservletguide.html
    Perhaps you can use this to dynamically specify the JNLP file. If a user accesses the server from the plain URL the servlet assigns a new session id, and places this in the codebase or href of the JNLP file it sends to the user. Later when the user runs the JNLP application from app manager, or an icon, the servlet will see the decorated codebase/href and act accordingly.
    Anyway, like I said, I'm not sure if this is exactly what you are looking for, but I think it has been used in the past for session maintenance.
    As to why JNLP doesn't support portal tech... these two technologies were invented at the same time. Initially they were somewhat competing ideas.
    For the future it might be possible to make JNLP more portal friendly, but in that case, Sun needs to have a better idea from the users what is needed. Simply saying, "make it better" is just to vague. Be specific, and who knows what good ideas might be picked up. (Another possibility is to contribute your own ideas for improvement through http://www.java.net/).
    Mike.

  • Cookies...I need alternatives to using them...

    I need to create a text only version of the portal to meet
    requirements of the Federeal Gov't's Disabilities Act...
    So, I'm scraping the content of the Portal Pages (pages from
    v1.0.2.2) by basically creating another middle tier (db ->
    application server -> scraper -> browser).
    The issue is COOKIES. I loose them at the "scraper" tier. And
    for some reason, I can't retrieve the Oracle Portal generated
    cookies from the client machine. The result is a "security
    error" when rendering portlets on a page with non-public access
    requirements.
    So, how can I maintain the user's session WITHOUT the use of
    cookies? I would think this would have to be done for the WAP
    version of the portal...but then again, maybe not.
    Please help!
    Thanks,
    Ryan Stefani

    Hi,
    How abt using HttpSession ? This is one of the modes of session
    maintenance in a J2EE scenario. Typically, when you go for a MVC
    architecture in Java, a controller (a servlet, which typically
    maintains session info), a view (a JSP, which is called from the
    servlet and also the UI) and a model (an EJB, which represents
    data). This class is in Servlet API.
    Hope this helps,
    --Rajesh

  • Help With HttpURLConnection and PHP

    I can connect to a site with HttpURLConnection but i need to access a link FROM that site.
    Ex: www.hangman/index.php
    I need to get a link like www.hangman/index.php?letter=a
    It will only display the letter if you go from www.hangman/index.php and click on the letter. But how do i do that with HttpURLConnection.
    I think you have to use the POST , but it doesnt work.
    Thanks.

    That's probably because the site uses cookies to maintain a session.
    The cookie's name is PHPSESSID, so I'm guessing this is a standard PHP session maintenance system (I haven't worked with PHP much...).
    So if you want to create a java app that will play hangman from that site, it looks like you'll have to handle cookies to keep the session active between accesses. So you'll grab the cookie from the response headers in the first connection, and then send it to the server in the request headers in subsequent connections. The cookie may remain the same throughout the session, or it may change on each connection; I don't know.
    I did a quick google and found this:
    http://jcookie.sourceforge.net/
    I haven't used it myself, but it looks useful. Unless you're doing this as a learning exercise, it's probably easier to use this than to wrote your own cookie code.

  • Re: Bdc call transaction

    Hi all can any one give good code and entire process for BDC call transaction method.explain the entire process clearly.
    Thanks&regards
    Sashi

    Hi,
    Check the following code:
    *& Report  Z_BDCP_VENDCALLTRNS
    *& TITLE                 : Vendor Creation BDC Program (Call Transaction Method) *
    *& AUTHOR                : XXXXXXXXXX                               *
    *& DATE OF CREATION      : xx-xx-xxxx                                            *
    *& PROGRAM TYPE          : Executable Program                                    *
                             MODIFICATION LOG                                      *
    *& AUTHOR                :                                                       *
    *& DATE OF CHANGE        :                                                       *
    *& FUNCTIONAL SPECS      :                                                       *
    *& CORRECTIONS REQUEST   :                                                       *
    *& DESCRIPTION OF CHANGE :                                                       *
    REPORT  z14644sd_bdcp_vendcalltrns.
    TYPES: BEGIN OF t_vend,
            lifnr LIKE rf02k-lifnr,    "Vendor Account Number
            ktokk LIKE rf02k-ktokk,    "Vendor account group
            anred LIKE lfa1-anred,     "Title
            name1 LIKE lfa1-name1,     "Vendor Name
            sortl LIKE lfa1-sortl,     "Sort field
            land1 LIKE lfa1-land1,     "Country Key
            spras LIKE lfa1-spras,     "Language Key
            banks TYPE lfbk-banks,     "Bank country key
            bankl TYPE lfbk-bankl,     "bank key
            bankn TYPE lfbk-bankn,     "account number
            END OF t_vend.
    TYPES: BEGIN OF t_sucrec,
            vnum TYPE lfa1-lifnr,      "Vendor Account Number
            vnam TYPE lfa1-name1,      "Vendor Name
            END OF t_sucrec.
    TYPES: BEGIN OF t_errrec,
            err_rec TYPE string,       "Error Record
            lineno TYPE i,             "Line Number
            message TYPE string,       "Error Message
            END OF t_errrec.
    DATA: v_file TYPE string,                                      "Variable for storing flat file
          it_vend TYPE STANDARD TABLE OF t_vend,                   "Internal table of Vendor
          wa_vend LIKE LINE OF it_vend,                            "Workarea of Internal table it_vend
          it_sucrec TYPE STANDARD TABLE OF t_sucrec,               "Internal table of Success records
          wa_sucrec LIKE LINE OF it_sucrec,                        "Workarea of Internal table it_sucrec
          it_errrec TYPE STANDARD TABLE OF t_errrec,
          wa_errrec LIKE LINE OF it_errrec,
          it_bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE,        "Internal table structure of BDCDATA
          it_messagetab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE, "Tracing Error Messages
          v_date LIKE sy-datum,                                    "Controlling of session date
          v_index LIKE sy-index,                                   "Index Number
          v_totrec TYPE i,                                         "Total Records
          v_errrec TYPE i,                                         "Error Records
          v_sucrec TYPE i,                                         "Success Records
          v_sesschk TYPE c.                                        "Session maintenance
    *& SELECTION-SCREEN
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 NO INTERVALS.
    PARAMETERS: p_file TYPE rlgrap-filename.    "rlgrap-filename is a predefined structure
    SELECTION-SCREEN: END OF BLOCK blk1.
    SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002 NO INTERVALS.
    PARAMETERS: p_mode LIKE ctu_params-dismode DEFAULT 'N',
                p_update LIKE ctu_params-updmode DEFAULT 'A'.
    SELECTION-SCREEN END OF BLOCK blk2.
    *& INITIALIZATION
    INITIALIZATION.
      v_date = sy-datum - 1.
    *& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
      FIELD_NAME          = ' '
       IMPORTING
         file_name           = p_file.
    *& START-OF-SELECTION
    START-OF-SELECTION.
      v_file = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = v_file
          filetype                = 'ASC'
          has_field_separator     = 'X'
        TABLES
          data_tab                = it_vend
        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.
    *& END-OF-SELECTION
    END-OF-SELECTION.
      v_index = sy-index.
      LOOP AT it_vend INTO wa_vend.
        PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
        PERFORM bdc_field USING 'RF02K-LIFNR' wa_vend-lifnr.
        PERFORM bdc_field USING 'RF02K-KTOKK' wa_vend-ktokk.
        PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_dynpro USING 'sapmf02k' '0110'.
        PERFORM bdc_field USING 'lfa1-anred' wa_vend-anred.
        PERFORM bdc_field USING 'lfa1-name1' wa_vend-name1.
        PERFORM bdc_field USING 'lfa1-sortl' wa_vend-sortl.
        PERFORM bdc_field USING 'lfa1-land1' wa_vend-land1.
        PERFORM bdc_field USING 'lfa1-spras' wa_vend-spras.
        PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
        PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
        PERFORM bdc_field USING 'BDC_OKCODE' '=ENTR'.
        PERFORM bdc_field USING 'LFBK-BANKS(01)' wa_vend-banks.
        PERFORM bdc_field USING 'LFBK-BANKL(01)' wa_vend-bankl.
        PERFORM bdc_field USING 'LFBK-BANKN(01)' wa_vend-bankn.
        PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
        PERFORM bdc_field USING 'BDC_OKCODE' '=ENTR'.
        PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
        PERFORM bdc_field USING 'bdc_okcode' 'UPDA'.
        CALL TRANSACTION 'XK01' USING  it_bdctab
                                MODE   p_mode
                                UPDATE p_update
                                MESSAGES INTO it_messagetab.
        IF sy-subrc = 0.
    *& reading success records to corresponding internal table
          READ TABLE it_messagetab WITH KEY msgtyp = 'S'.
          IF sy-subrc = 0.
            wa_sucrec-vnum = it_messagetab-msgv1.
            wa_sucrec-vnam =  wa_vend-name1.
            APPEND wa_sucrec TO it_sucrec.
            CLEAR wa_sucrec.
          ENDIF.
        ELSE.
    *& reading error records to corresponding internal table
          READ TABLE  it_messagetab WITH KEY msgtyp =  'E'.
          IF sy-subrc = 0.
            CALL FUNCTION 'FORMAT_MESSAGE'
              EXPORTING
                id  = sy-msgid
                no  = it_messagetab-msgnr
                v1  = it_messagetab-msgv1
                v2  = it_messagetab-msgv2
                v3  = it_messagetab-msgv3
                v4  = it_messagetab-msgv4
              IMPORTING
                msg = wa_errrec-message.
            wa_errrec-lineno = v_index.
            APPEND wa_errrec TO it_errrec.
            CLEAR wa_errrec.
          ENDIF.
        ENDIF.
        CLEAR : it_bdctab, it_messagetab.
        REFRESH: it_bdctab, it_messagetab.
      ENDLOOP.
      DESCRIBE TABLE it_vend LINES v_totrec.
      DESCRIBE TABLE it_errrec LINES v_errrec.
      DESCRIBE TABLE it_sucrec LINES v_sucrec.
      PERFORM disp_data.
      SKIP 2.
      IF v_sucrec > 0.
        PERFORM disp_success_data.
      ENDIF.
      SKIP 2.
      IF v_errrec > 0.
        PERFORM disp_error_data.
      ENDIF.
    *&      Form  bdc_dynpro
          text
         -->P_0104   text
         -->P_0105   text
    FORM bdc_dynpro  USING    program
                              dynpro.
      CLEAR it_bdctab.
      it_bdctab-program  = program.
      it_bdctab-dynpro   = dynpro.
      it_bdctab-dynbegin = 'X'.
      APPEND it_bdctab.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
          text
         -->P_0109   text
         -->P_IT_VEND_LIFNR  text
    FORM bdc_field  USING    fnam
                             fval.
      CLEAR it_bdctab.
      it_bdctab-fnam = fnam.
      it_bdctab-fval = fval.
      APPEND it_bdctab.
    ENDFORM.                    " bdc_field
    *&      Form  disp_data
          text
    -->  p1        text
    <--  p2        text
    FORM disp_data .
      ULINE (45).
      WRITE : / sy-vline,
             18 'SUMMARY'(004) COLOR 1,
             45 sy-vline.
      ULINE /(45).
      WRITE : / sy-vline,
                'Total Records Processed'(007),
             28 '=',
             30 v_totrec,
             45 sy-vline,
              / sy-vline,
                'Error Records'(005),
             28 '=',
             30 v_errrec,
             45 sy-vline,
              / sy-vline,
                'Successful Records'(006),
             28 '=',
             30 v_sucrec,
             45 sy-vline.
      ULINE /(45).
    ENDFORM.                    " disp_data
    *&      Form  disp_success_data
          text
    -->  p1        text
    <--  p2        text
    FORM disp_success_data .
      ULINE (45).
      WRITE : / sy-vline,
             14 'Successful Records'(012) COLOR 1,
             45 sy-vline.
      ULINE /(45).
      WRITE : / sy-vline ,
                'Vendor Number'(010) COLOR 2,
             17 sy-vline,
             25 'Vendor Name'(011) COLOR 2,
             45 sy-vline.
      ULINE /(45).
      LOOP AT it_sucrec INTO wa_sucrec.
        WRITE: / sy-vline ,
                 wa_sucrec-vnum,
              17 sy-vline,
              19 wa_sucrec-vnam,
              45 sy-vline.
      ENDLOOP.
      ULINE /(45).
    ENDFORM.                    " disp_success_data
    *&      Form  disp_error_data
          text
    -->  p1        text
    <--  p2        text
    FORM disp_error_data .
      ULINE (85).
      WRITE : / sy-vline,
             35 'Error Records'(013) COLOR 1,
             85 sy-vline.
      ULINE /(85).
      WRITE : / sy-vline,
                'Record Number'(008) COLOR 2,
                sy-vline,
             37 'Reason for error'(009) COLOR 2,
             85 sy-vline.
      ULINE /(85).
      LOOP AT it_errrec INTO wa_errrec.
        WRITE : / sy-vline,
                  wa_errrec-lineno,
               17 sy-vline,
                  wa_errrec-message,
               85 sy-vline.
      ENDLOOP.
      ULINE /(85).
    ENDFORM.                    " disp_error_data
    Regards,
    Bhaskar

  • Urgent ***Open OAF page from Pl/SQL***

    Hello All,
    we are sending an HTML email from Pl/sql,
    now the requirement is..In email body user will get request Id. This request Id will be Hyperlinked (Using HTML Tag). Once User click on Request id.. One OAF Page should Open.
    Our Problem is: when user click on request Id , OAF Page opens with below error:
    You have insufficient privileges for the current operation. Please contact your System Administrator
    When user click on Home Its redirecting to Username/Password page. After entering the Username/Password it doesn't go to desired page.
    We know the problem is with session maintenance.
    Any Idea How to achieve this functionality.
    Thanks,
    Ab

    Hello Sun,
    I have added function to Menu and Responsibility.
    In Function WEB HTML Tab I added HTML Call = OA.jsp?OAFunc=FWK_TOOLBOX_HELLO&OAHP=FWK_TOOLBOX_TUTORIAL_APP&OASF=FWK_TOOLBOX_HELLO
    My function Name is : XXGENZ_R2R_COA_DASHBOARD
    Now if I am trying to open below URL from browser..
    http://apps.oracle.com:12715/OA_HTML/OA.jsp?OAFunc=XXGENZ_R2R_COA_DASHBOARD&RequestId=3&RecordType=End-Date&StatusCode=Inprocess&DispositionCode=H1&ReadMode=Y
    But It dint work.. URL is directing to User name and password page..and If u enter the User name and password its redirect to Oracle Apps Home page...
    Thanks,
    AB

Maybe you are looking for