BC4J: Set parameter to a view

Hi, I have this query:
SELECT v.*
FROM (SELECT DISTINCT liva.*
FROM AA_LISTAS_VALORES liva
CONNECT BY PRIOR liva.aa_liva_serie = liva.serie
AND PRIOR liva.aa_liva_identificador = liva.identificador
START WITH liva.dominio = :0 ) v
CONNECT BY v.aa_liva_serie = PRIOR v.serie
AND v.aa_liva_identificador = PRIOR v.identificador
START WITH v.aa_liva_serie IS NULL AND v.aa_liva_identificador IS NULL
how i can pas the parameter :0, im using the oracle possitonal bindingStyle, also i try whit oracle named, but oracle named doesn't work.
works fine but I have a warrning
in the stack i have this warrning:
2007-02-07 10:20:15.869 WARNING JBO-29000: Unexpected exception caught: oracle.jbo.SQLStmtException, msg=JBO-27122: SQL error during statement preparation. Statement: SELECT v.*
FROM (SELECT DISTINCT liva.*
FROM AA_LISTAS_VALORES liva
CONNECT BY PRIOR liva.aa_liva_serie = liva.serie
AND PRIOR liva.aa_liva_identificador = liva.identificador
START WITH liva.dominio = :0 ) v
CONNECT BY v.aa_liva_serie = PRIOR v.serie
AND v.aa_liva_identificador = PRIOR v.identificador
START WITH v.aa_liva_serie IS NULL AND v.aa_liva_identificador IS NULL
2007-02-07 10:20:15.869 WARNING JBO-27122: SQL error during statement preparation. Statement: SELECT v.*
FROM (SELECT DISTINCT liva.*
FROM AA_LISTAS_VALORES liva
CONNECT BY PRIOR liva.aa_liva_serie = liva.serie
AND PRIOR liva.aa_liva_identificador = liva.identificador
START WITH liva.dominio = :0 ) v
CONNECT BY v.aa_liva_serie = PRIOR v.serie
AND v.aa_liva_identificador = PRIOR v.identificador
START WITH v.aa_liva_serie IS NULL AND v.aa_liva_identificador IS NULL
2007-02-07 10:20:15.869 WARNING Missing IN or OUT parameter at index:: 1

this is my code:
String dominio = "AL:TEST";
listaValoresPT.setWhereClauseParam(0, dominio);
listaValoresPT.executeQuery();
I couldn't avoid this warrning, so I used the following code instead:
listaValoresPT.setQuery("SELECT v.*\n" +
"FROM (SELECT DISTINCT liva.*\n" +
"FROM AA_LISTAS_VALORES liva\n" +
"CONNECT BY PRIOR liva.aa_liva_serie = liva.serie\n" +
"AND PRIOR liva.aa_liva_identificador = liva.identificador\n" +
"START WITH liva.dominio = '"+ dominio + "' ) v\n" +
"CONNECT BY v.aa_liva_serie = PRIOR v.serie\n" +
"AND v.aa_liva_identificador = PRIOR v.identificador\n" +
"START WITH v.aa_liva_serie IS NULL AND v.aa_liva_identificador IS NULL");
listaValoresPT.executeQuery();
even that i will appreciate any other suggestion for avoiding this warrning whitout using
the previous code.
thanks.

Similar Messages

  • Setting parameter in Detail View Object

    I want to setting parameter in detail view.I have two table.One is master another is detail.I use parameter in master table so I put my page parameter form and I execute it.It work fine.I want to use parameter in detail table.In detail table if I dont use parameter master is execute it automaticly and it shows the result but when I put the parameter in detail it isn't show any result it say no rows return.Please help about to use detail views parameters(bind variables)

    Hmmm, sorry, not sure.
    Can I suggest you change your code to the following:
    RowSetIterator[] iter= getMasterRowSetIterators();
    if (iter != null && iter[0].first() != null) {
      Row row = rsi[0].getCurrentRow();
      .....(etc)....And run it in the debugger. See if it actually gets to the Row line. If not getMasterRowSetIterators() isn't returning any iterators and you should check how you've exposed your VOs in your AM - specifically looking to see if your detail VO is actually a detail VO to a parent VO.
    Also I'm not sure overriding executeQuery() is the best place to be doing this as the doco says it is not always called. The doco seems to indicate executeQueryForCollection() is the preferred method. However in my testing it appears you can't set the query parameters in this method.
    Sorry I couldn't be more helpful.
    CM.

  • Declaratively set the value of a bind parameter in a view query

    Can I declaratively set that I want the value of the bind parameter in the view query to be the value of a specific field in the current row of a specific iterator in my data bindings? Thanks :D

    user11976105 wrote:
    Hm I guess I should mention I'm doing the retrieval in Java, using a ValueChangeListenerIn this case, you will still need to bind an ExecuteWithParams action to your page definition and execute it from your ValueChangeListener after supplying its named data.
    In the code spinet, the new value from the ValueChangeEvent is passed to the bind variable.
    public void yourValidChangeListener(ValueChangeEvent valueChangeEvent) {
        // get the ExecuteWithParameters operation binding from the bindings
        OperationBinding executeWithParameters = ADFUtils.findOperation("yourExecuteWithParametersBindingId");
        // setup bind variable using the new value from the valueChangeEvent
        executeWithParameters.getParamsMap().put("yourParameterId", valueChangeEvent.getNewValue());
        // execute
        executeWithParameters.execute();
        // check for errors
        if(executeWithParameters.getErrors().size() != 0) {
            // error(s) occured
    }

  • CrystalReportViewer - Setting parameter throws ancestor error on page navigation

    We are having web application reports in the application using BO-XI SDK Viewer API. This API approach was working fine earlier. We upgrade our reporting component to SAP BO-4 (Crystal Server 2011) due to EOL of BOXI.
    We have updated new API’s provided by SAP as per guide.
    We updated web based Crystal Report Viewer (DHTML Viewer). The crystalreportviewer folder coming with SAP CS 2011.
    We applied updated patch set upto last patch released CS2011 SP4 Patch4.
    We still facing issue while viewing report in DHTML viewer provided by SAP. Please advice on below.
    In our web application we do have updated folder for /crystalreportviewer.
    We dynamically creating enterprise session object to get client document which explained as below –
    IEnterpriseSession es = null;
    try{
    es = sm.logon(mUser, mPassword, mAPSName, mAuthType);
    }catch(Exception e){
    // request dispatched to error page
    // Get the Report Application Factory service from Crystal Enterprise
    IReportAppFactory rptAppFactory = (IReportAppFactory)es.getService("", "RASReportService");
    // Get the InfoStore service from Crystal Enterprise
    IInfoStore infoStore = (IInfoStore)es.getService("", "InfoStore");
    IInfoObjects oInfoObjects = infoStore.query(“Select * From CI_INFOOBJECTS…for RPT File.”);
    ReportClientDocument clientDoc = rptAppFactory.openDocument((IInfoObject)oInfoObjects.get(0), 0, objLocale);
    Setting parameter
    // Setting Parameter to clientDoc
    Object[] parameters = { 
                                                    parseDate(fromDate),
                                                    parseDate(endDate),
                                                    getLanguageID(request),
                                                    reportName,
                                                    getLanguageID(request)
    Fields parameterFields = clientDoc.getDataDefController().getDataDefinition().getParameterFields();
    for(int index=0; index < parameters.length; index++){
                    ParameterField oldParameter = (ParameterField)parameterFields.getField(index);
                    ParameterField newParameter = (ParameterField) oldParameter.clone(true);
                    newParameter.getCurrentValues().removeAllElements();                                                   
                    ParameterFieldDiscreteValue newDiscreteValueObj = new ParameterFieldDiscreteValue();
                    newDiscreteValueObj.setValue(parameters[index]);
                    newParameter.getCurrentValues().add(newDiscreteValueObj);
                    ParameterFieldController paramController = clientDoc.getDataDefController().getParameterFieldController();
                    paramController.modify(oldParameter, newParameter);
    // Create an  Viewer
    CrystalReportViewer viewer = new CrystalReportViewer();
    //Set the name for the interactive viewer
    viewer.setName("Crystal_Report_Viewer");
    viewer.setDisplayPage(true);
    //Set Navigation button false
    viewer.setHasHistoryNavigationButtons(false);
    //Set best fit to page true
    viewer.setBestFitPage(true);
    // Set reuse parameter on referesh
    viewer.setReuseParameterValuesOnRefresh(true);
    // Set Own Page true
    viewer.setOwnPage(true);
    // Enabled export and print button
    viewer.setHasExportButton(true);
    viewer.setHasPrintButton(true);
    // Group Tree Removed
    viewer.setDisplayGroupTree(false);
    // Toggle group false
    viewer.setHasToggleGroupTreeButton(false);
    //viewer.refresh();
    // Removed refersh button
    viewer.setHasRefreshButton(false);
    viewer.setPrintMode(CrPrintMode.ACTIVEX);
    // Set the source for the interactive viewer to the client documents report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Retain parameter and set again for pagination in viewer
    setReportURL(viewer,request);
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    //response.flushBuffer();
    // Close client document
    clientDoc.close();
    // Dispose of the viewer object
    viewer.dispose();
    es.logoff();
    Issue we faced?
    a) On Pagination thorws exception in webreportinglog as
    [@APPNAME@] ERROR [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] WebReportLogger.error(62) | Unable to set the ancestors
    com.businessobjects.report.web.json.JSONException: JSONObject["ancestors"] is not a JSONArray.
                    at com.businessobjects.report.web.json.JSONObject.getJSONArray(JSONObject.java:456)
                    at com.businessobjects.report.web.shared.JSONParameter.getDiscreteValueFromJSON(JSONParameter.java:670)
                    at com.businessobjects.report.web.shared.JSONParameter.getValueFromJSON(JSONParameter.java:609)
                    at com.businessobjects.report.web.shared.JSONParameter.jsonToDefaultFieldValues(JSONParameter.java:587)
                    at com.businessobjects.report.web.shared.JSONParameter.getDefaultValues(JSONParameter.java:474)
                    at com.businessobjects.report.web.shared.JSONParameter.toParameterField(JSONParameter.java:872)
                    at com.businessobjects.report.web.shared.ParametersHelper.jsonToFields(ParametersHelper.java:309)
                    at com.businessobjects.report.web.state.ViewerState.restoreCommonState(ViewerState.java:2838)
                    at com.businessobjects.report.web.state.ViewerState.restore(ViewerState.java:2741)
                    at com.businessobjects.report.web.component.ViewerContainer.restoreState(ViewerContainer.java:210)
                    at com.businessobjects.report.web.WorkflowController.loadViewState(WorkflowController.java:418)
                    at com.businessobjects.report.web.WorkflowController.init(WorkflowController.java:393)
    b) On Export / print button nothing happened even request didn’t passed.
    WEB-INF/web.xml entry as below.
    <?xml version="1.0"?>
    <!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>
                    <context-param>
            <param-name>crystal_document_view</param-name>
                                    <!-- weblayout : Fills the entire report view pane with the report. There is no grey background -->
            <param-value>weblayout</param-value>
                    </context-param>
                    <context-param>
                                    <param-name>crystal_exception_log_file</param-name>
                                    <param-value>webreportingexception.log</param-value>
                    </context-param>
                    <context-param>
            <param-name>crystal_exception_info</param-name>
                                    <!-- long - Displays the exception information with the accompanying stack trace. -->
            <param-value>long</param-value>
                    </context-param>
                    <context-param>
                                    <param-name>crystal_image_uri</param-name>
                                    <param-value>/TangibleWebApp/crystalreportviewers</param-value>
                    </context-param>
                    <context-param>
            <param-name>crystal_image_use_relative</param-name>
            <param-value>webapp</param-value>
                    </context-param>
                    <context-param>
                                    <param-name>crystal_processing_indicator_delay</param-name>
                                    <param-value>100</param-value>
                    </context-param>
                    <context-param>
                                    <param-name>crystal_use_asynchronous_requests</param-name>
                                    <param-value>false</param-value>
                    </context-param>
                    <context-param>
                                    <param-name>crystal_servlet_uri</param-name>
                                    <param-value>/TangibleWebApp/CrystalReportViewerHandler</param-value>
                    </context-param>
                    <servlet>
            <servlet-name>CrystalReportViewerServlet</servlet-name>
            <servlet-class>com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet</servlet-class>
                    </servlet>
                    <servlet-mapping>
                                    <servlet-name>CrystalReportViewerServlet</servlet-name>
                                    <url-pattern>/TangibleWebApp/CrystalReportViewerHandler</url-pattern>
                    </servlet-mapping>
                    <servlet>
                                    <servlet-name>document</servlet-name>
                                    <servlet-class>com.oreilly.servlet.OpenDoc</servlet-class>
                    </servlet>
                    <servlet>
                                    <servlet-name>InitialServlet</servlet-name>
                                    <servlet-class>com.servlet.InitialServlet</servlet-class>
                                    <load-on-startup>1</load-on-startup>
                    </servlet>
                    <servlet>
                                    <servlet-name>FactorsLogo</servlet-name>
                                    <servlet-class>com.servlet.FactorsLogo</servlet-class>
                    </servlet>
                    <servlet-mapping>
                                    <servlet-name>FactorsLogo</servlet-name>
                                    <url-pattern>/servlet/FactorsLogo</url-pattern>
                    </servlet-mapping>
                    <servlet-mapping>
                                    <servlet-name>document</servlet-name>
                                    <url-pattern>/servlet/document</url-pattern>
                    </servlet-mapping>
                    <session-config>
                                    <session-timeout>30</session-timeout>
                    </session-config>
                    <welcome-file-list>
                                    <welcome-file>/tangible/index.jsp</welcome-file>
                    </welcome-file-list>
                    <listener>
                                    <listener-class>com.common.util.applistener.AppListener</listener-class> 
                    </listener>
    </web-app>
    Thanks in advance for your advice / suggestions.

    Am I right in guessing that you were previously using the ActiveX viewer?
    Currently your code is closing the document and logging off Enterprise.  Pretty much any action that is done in the DHTML viewer will cause a postback to the server which will no longer have the document or session available with your current code which will cause all sorts of problems.  You need to persist these objects, and only clean them up once you are completely finished with them.

  • How to send/set parameter from BSP page to iview

    Dear Expert,
    Can advise me how to send or set parameter from BSP page to iview ?
    http://xxx.xxx.com/irj/portal?navigationtarget=roles://pcd:portal_content/FLD.ObjetLibrary/FLD.Iviews/FLD.CRM/ET/bsppage.htm?lv_param=xxx
    I want to view my bsp page in portal but with parameter value.
    I can open my bsp page without parameter value like link below :
    http://xxx.xxx.com/irj/portal?navigationtarget=roles://pcd:portal_content/FLD.ObjetLibrary/FLD.Iviews/FLD.CRM/ET/
    Thnx & Regards,
    Pieter

    Hi,
    your BSP page get's integrated via an iFrame. So, simply speaking, it's not possible to pass an parameter back.
    But what you can try is to use the Portal DataBag component. In the BSP page, store the information you want to pass in the browser. The iView/Portal than has to check if there is a new parameter / value stored.
    SAP Help: http://help.sap.com/saphelp_nw70/helpdata/en/68/322a9261c54e51b7965f86aac3dae2/frameset.htm
    br,
    Tobias

  • Viewlink between Custom VO "Cannot set user query to view"

    We have an application where we have extended custom VO and EO’s to get data from flat files. It all looks fine till we create a viewlink for a LOV with two related VO’s. The viewlink VO fails we get message of the form -Cannot set user query to view "CustomVO1" because it is a destination in a view link”. Are there any methods to override in the custom VO/EO or any parameter to be added to configs. Has someone tried this out

    Thanks for the update and for sharing the solution!
    Regards,
    Hussein

  • Popup window error must set parameter windowInfo

    Hi Friends,
    I am getting error as :- must set parameter windowInfo,when I am clicking on the link to view the Modal window.
    I am providing the correct window name, btu still teh error coming.
    any clue please.
         IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI
         .getComponentInfo()
         .findInWindows("OrderPopupWindow");

    Check if you are setting the windowInfo properly or not.
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow( <b><u>windowInfo</u></b>, true);
    Bala

  • SET PARAMETER AND GET PARAMETER

    What is the difference between Set parameter and Get parameter?

    Hi,
    Set parameter is used to put some value into ABAP memory area, get paramter is used to retrive values form ABAP memory.
    refer the below sample code.
    here i am taking one material number and i am passing that mateial number by using 'set parameter id', the material number will be stored in ABAP-memory area 'MAT', and then i am calling the Tcode 'MM03', after executing the Tcode  (from program) automatically 'MM03' will reads that material number from that ABAP-memory area and it will displays the 'MM03' tcode along with material number.
    you can find the parameter-id's from data element of that field.
    parameters: p_matnr like mara-matnr.
    set parameter id 'MAT' field p_matnr.
    call transaction 'MM03'.
    Reward if useful.
    Thanks,
    Sreeram.

  • Problem with set parameter id

    hi all,
    i am using the below code to set the parameter id to project , subproject and object for the t-code in lsmw. but when it goes to lsmw
    it does not take these values in lsmw . can anyone please check where i am going wrong? thanks in advance.
    at selection-screen.
    data: project type /SAPDMC/LSSCREEN-PROJECT,
          subproj  type /SAPDMC/LSSCREEN-SUBPROJ,
          object  type /SAPDMC/LSSCREEN-OBJECT.
          if sscrfields-ucomm eq 'CLI1'.
         if p_up = 'X'.
            data: project type c length 20 value 'SIVA',
                  subproj type c length 20 value 'PRICING',
                  object  type c length 20 value 'SD'.
         proj = 'SIVA'.
         subproj = 'PRICING'.
         obj = 'SD'.
                SET PARAMETER ID: PROJECT   FIELD   PROJECT,
                                                SUBPROJ   FIELD   SUBPROJ,
                                                OBJECT    FIELD   OBJECT.
                call transaction 'LSMW' and skip first screen.
          endif.
    saurabh.

    hi,
    looking at the source code of LSMW, not parameter ID is what you need, but memory id:
      IMPORT /SAPDMC/LSMEMORY FROM MEMORY ID '/SAPDMC/LSMW'.
      IF SY-SUBRC = 0.
        PROJECT = /SAPDMC/LSMEMORY-PROJECT.
        SUBPROJ = /SAPDMC/LSMEMORY-SUBPROJ.
        OBJECT = /SAPDMC/LSMEMORY-OBJECT.
      ELSE.
    ENDIF.code}
    use EXPORT TO MEMORY ... statement in your program acc. to the needs above.
    hope this helps
    ec

  • Report  using Set parameter & get parameters.

    Hi,
           My requirement is from select query  the list of PO will be display. Now i want when i click on one of the purchase order .
    i want to diaplay PO using CALL TRANSACTION 'ME23N'  with the help of set and get parameters .  or can i do it with interactive report.
    Regards,

    Hi,
    1) Write a Report to show the Output(Use HIDE statment for PO filed while outputing the list).
    2) In the event AT LINE-SELECTION write logic.
    GET CURSOR FIELD field VALUE val.
    SET PARAMETER ID 'BES' FIELD dobj.
    CALL TRANSACTION ME23N.
    Regards,
    J.

  • How to set value from one view to other view's context node attr b4 save

    HI all,
    My requirement is as below:
    There are two views in component BP_CONT.
    BP_CONT/ContactDetails    IMPL class
    BP_CONT/SalesEmployee   SALESEMPLOYEE    STRUCT.SALESEMPLOYEE
    I want to set value from first view to second view's context node's attribute.
    i get Sales Employee BP number in ContactDetails view, from here i want to set that value in to STRUCT.SALESEMPLOYEE
    of second view in the same component.
    please send me code snippet for doing the same.
    Thanks in advance.
    seema

    Hi Seema
    You can access the fields from different views by either using custom controllers or by using component controllers, in your case you can access the Sales employee BP number from the Component controller.
    first access the component controller  as below in BP_CONT/SalesEmployee  (in do_prepare_output method) or in (specific setter method)
    lv_compcontroller type ref to CL_BP_CONT_BSPWDCOMPONENT_IMPL,
    lv_partner type ref to cl_crm_bol_entity,
    lv_role type string,
    lv_partner_no type string.
    lv_employee TYPE REF TO if_bol_bo_property_access,
    lv_compcontroller  = me->COMP_CONTROLLER.
    lv_partner ?= lv_compcontroller  ->typed_context->-partner->collection_wrapper->get_current( ).
    lv_role = lv_partner->get_property( iv_attr_name = 'BP_ROLE' )
    IF LV_ROLE = 'SALESEMPLOYEE'
      lv_partner_no ?= lv_current->get_property( iv_attr_name = 'BP_NUMBER' ).
    endif.
    now set the value
    lv_employee ?= me->typed_context->salesemployee->collection_wrapper->get_current( )
    CHECK lv_employee IS BOUND.
        lv_employee->set_property( iv_attr_name = 'SALESEMPLOYEE' iv_value =  lv_partner_no  )
    Thanks & Regards
    Raj

  • Get and Set Parameter ID in BDC Call transaction

    Hi all
    I have written this BDC program to run a transaction eg33  to install meter. After meter get installled System generates  Device location number. I need to use this device location number in calling another transaction il03.  but my data fetching using get and set parameter id is not giving accurate result. Kindly check my code and suggest where should I improve. Or whatelse can I do to fullfill this type of requirement other than GET and SET PARAMETER ID.
    REPORT  ZAC_EG33 NO STANDARD PAGE HEADING
                     LINE-SIZE 100.
    TABLES: EABL,
            BUT000,
            ZISUH0003.
    DATA :
          XYZ LIKE IFLO-TPLNR.
    DATA: IT_STATUS TYPE ZISUH0003.
    DATA: G_INDEX TYPE I,
          G_START_COL TYPE I VALUE '1',      "start column
          G_START_ROW TYPE I VALUE '14',      "start row
          G_END_COL   TYPE I VALUE '18',     "maximum column
          G_END_ROW   TYPE I VALUE '75',  "maximum row
          G_TEXT(20),                         "stores error messages
          G_PAGES        TYPE I,
          G_CURRENT_PAGE TYPE I,
          G_COUNT LIKE SY-DBCNT.
    data: l_file   type file_table,
          file1    type string,
          l_title  type string,
          LENGTH   TYPE I,
          FILES    type filetable,
          SUBRC    type i,
          STR_FILE type STRING,
          D_FILE   type RLGRAP-FILENAME,
          filename TYPE String,
          L_itab_date(10).
    FIELD-SYMBOLS : <FS>.
    DATA: IT_EXCEL LIKE STANDARD TABLE OF ALSMEX_TABLINE WITH HEADER LINE,
          IT_MESS TYPE STANDARD TABLE OF BDCMSGCOLL WITH HEADER LINE.
    TYPES: BEGIN OF TY_OPEN,
            HAUS LIKE REG30-HAUS,
            EADAT(10),
            GERAETNEU LIKE REG30-GERAETNEU,
            MESSDRCK LIKE REG30-MESSDRCK,
            ZWSTANDCE LIKE REG30-ZWSTANDCE,
            END OF TY_OPEN.
    DATA : T_ANLAGE LIKE EANLD-ANLAGE,
           VSTELLE LIKE EVBS-VSTELLE,
           S_ANLAGE LIKE EANLD-ANLAGE,
           temp_c(7).
    DATA: IT_OPEN TYPE STANDARD TABLE OF TY_OPEN WITH HEADER LINE.
    DATA: BDCDATA TYPE STANDARD TABLE OF BDCDATA WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 2.
    PARAMETERS: P_FILE like RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN END OF BLOCK 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE  .
      PERFORM GET_FILE_NAME.
      MOVE FILENAME TO P_FILE.
    START-OF-SELECTION.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = p_file
        I_BEGIN_COL                   = 1  "VF_START_COL
        I_BEGIN_ROW                   = 2  "VF_START_ROW
        I_END_COL                     = 5  "VF_END_COL
        I_END_ROW                     = 10000  "VF_END_ROW
      TABLES
        INTERN                        = IT_EXCEL
      EXCEPTIONS
        INCONSISTENT_PARAMETERS       = 1
        UPLOAD_OLE                    = 2
        OTHERS                        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF IT_EXCEL[] IS INITIAL.
      G_TEXT = 'No Data Uploaded'.
    ELSE.
      SORT IT_EXCEL BY ROW COL.
      LOOP AT IT_EXCEL.
        MOVE : IT_EXCEL-COL TO G_INDEX.
        ASSIGN COMPONENT G_INDEX OF STRUCTURE IT_OPEN TO <FS>.
        MOVE IT_EXCEL-VALUE TO <FS>.
        AT END OF ROW.
          IF NOT IT_OPEN IS INITIAL.
          APPEND IT_OPEN." TO IT_LINE.
          CLEAR IT_OPEN.
          CLEAR IT_EXCEL.
          ENDIF.
        ENDAT.
      ENDLOOP.
    ENDIF.
    REFRESH IT_EXCEL.
    ULINE.
    FORMAT COLOR 3 ON.
    WRITE: /1 sy-vline ,
           2 'Material No.' ,
           25 sy-vline,
            2 'Logs' ,
            100 sy-vline.
    uline.
    FORMAT COLOR OFF.
    PERFORM BDC_OPEN_READING.
    MESSAGE S013(ZPS).
    *&      Form  GET_FILE_NAME
          text
    -->  p1        text
    <--  p2        text
    FORM GET_FILE_NAME .
    REFRESH FILES.
    call method cl_gui_frontend_services=>file_open_dialog
                exporting
                  window_title            = l_title
                changing
                  file_table              = files
                  rc                      = subrc
                exceptions
                  file_open_dialog_failed = 1
                  cntl_error              = 2
                  error_no_gui            = 3
                  others                  = 4.
              check sy-subrc = 0.
              loop at files into l_file.
                str_file = l_file.
                move str_file to filename.
                exit.
              endloop.
    ENDFORM.                    " GET_FILE_NAME
    *&      Form  BDC_OPEN_READING
          text
    -->  p1        text
    <--  p2        text
    FORM BDC_OPEN_READING .
    LOOP AT IT_OPEN.
    REFRESH BDCDATA.
    clear : temp_c.
    move it_open-MESSDRCK to temp_c.
    condense : temp_c.
    PERFORM MAP1.
    CALL TRANSACTION 'EG33' USING BDCDATA MODE 'A' MESSAGES INTO IT_MESS.
    +***changes by added on 28/02/08 +
    get parameter id 'IFL' FIELD XYZ.
    PERFORM MAP2.
    set parameter id 'IFL' FIELD XYZ.
    ++*
    CALL TRANSACTION 'IL03' USING BDCDATA MODE 'A' MESSAGES INTO IT_MESS.
    +****end change added on 28.02.08+DATA: G_INSNO LIKE IT_OPEN-HAUS.
    IF NOT IT_MESS[] IS INITIAL.
      G_INSNO = IT_OPEN-HAUS.
      PERFORM GET_MESSAGES  TABLES IT_MESS USING G_INSNO." IT_LINE.
    ENDIF.
    READ TABLE IT_MESS WITH KEY MSGTYP = 'E'.
    IF SY-SUBRC NE 0.
    READ TABLE IT_MESS WITH KEY MSGTYP = 'S'  MSGNR = '622'.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE VSTELLE FROM EVBS INTO VSTELLE WHERE HAUS = IT_OPEN-HAUS.
    SELECT SINGLE ANLAGE FROM EANL INTO T_ANLAGE WHERE VSTELLE = VSTELLE.
    MOVE T_ANLAGE TO IT_STATUS-ANLAGE.
    MOVE 'X' TO IT_STATUS-RFC.
    *perform get_date_format using IT_OPEN-EADAT.
    MOVE IT_OPEN-EADAT TO IT_STATUS-ADATE.
    SELECT SINGLE ANLAGE FROM ZISUH0003 INTO  S_ANLAGE WHERE ANLAGE =
    T_ANLAGE.
      IF SY-SUBRC EQ 4.
        INSERT ZISUH0003 FROM IT_STATUS.
      ELSE.
        UPDATE ZISUH0003 FROM IT_STATUS.
      ENDIF.
      ENDIF.
      ENDIF.
      REFRESH IT_MESS.
      CLEAR   IT_MESS.
    ENDLOOP.
    ENDFORM.                    " BDC_OPEN_READING
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> SPACE.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.
    *&      Form  MAP1
          text
    -->  p1        text
    <--  p2        text
    FORM MAP1 .
    perform bdc_dynpro      using 'SAPLE30D' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'REG30-GERAETNEU'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'REG30-HAUS'
                                  IT_OPEN-HAUS.  "'100000000033'.
    perform bdc_field       using 'REG30-EADAT'
                                  IT_OPEN-EADAT.  "'18.02.2006'.
    perform bdc_field       using 'REG30-GERAETNEU'
                                  IT_OPEN-GERAETNEU.  "'66a'.
    perform bdc_dynpro      using 'SAPLE30D' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'REG30-TEMP_AREA(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'REG30-MESSDRCK'
                                   temp_c. "IT_OPEN-MESSDRCK'0.0125'.
    perform bdc_field       using 'REG30-GERWECHS'
                                  '05'.
    perform bdc_field       using 'REG30-ANZDAYSOFPERIOD(01)'
                                  '30'.
    perform bdc_field       using 'REG30-ZWSTANDCE(01)'
                                  IT_OPEN-ZWSTANDCE.  "'10'.
    perform bdc_field       using 'REG30-ZWSTANDCE(02)'
                                  '0'.
    perform bdc_field       using 'REG30-PERVERBR(01)'
                                  '0'.
    perform bdc_field       using 'REG30-PERVERBR(02)'
                                  '0'.
    perform bdc_field       using 'REG30-TEMP_AREA(01)'
                                  '0001'.
    perform bdc_field       using 'REG30-TEMP_AREA(02)'
                                  '0001'.
    perform bdc_field       using 'REG30-PR_AREA_AI(01)'
                                  '0001'.
    perform bdc_field       using 'REG30-PR_AREA_AI(02)'
                                  '0001'.
    ENDFORM.                    " MAP1
    ****CHANGEs added BY ALKA 28.02.08
    *&      Form  MAP2
          text
    -->  p1        text
    <--  p2        text
    FORM MAP2 .
    perform bdc_dynpro      using 'SAPMILO0' '1110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'IFLO-TPLNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'IFLO-TPLNR'
                                  XYZ..
    perform bdc_field       using 'RILO0-TPLKZ'
                                  'AO_GP'.
    perform bdc_dynpro      using 'SAPMILO0' '2100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'IFLO-PLTXT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\04'.
    perform bdc_field       using 'IFLO-PLTXT'
                                  'DEVICE LOCATION'.
    perform bdc_dynpro      using 'SAPMILO0' '2100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'IFLO-PLTXT'
                                  'DEVICE LOCATION'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'ITOBATTR-EINZL'.
    perform bdc_field       using 'ITOBATTR-IEQUI'
                                  'X'.
    perform bdc_field       using 'ITOBATTR-EINZL'
                                  'X'.
    ENDFORM.                    " MAP2
    *****END CHANGE added on 28.02.08
    *&      Form  get_date_format
          text
         -->P_IT_ORDER_TABLE_C_DATE  text
    FORM get_date_format USING L_ITAB_DATE." LIKE SY-DATUM.
    data: d_temp(4),
          m_temp(2),
          y_temp(4).
    *move L_ITAB_DATE to L_ITAB_DATE.
    y_temp = L_ITAB_DATE(4).
    m_temp = L_ITAB_DATE+4(2).
    d_temp = L_ITAB_DATE+6(2).
    CONCATENATE d_temp '.' m_temp '.' y_temp into L_ITAB_DATE.
    ENDFORM.                    " get_date_format
    *&      Form  GET_MESSAGES
          text
         -->P_IT_MESS  text
         -->P_G_INSNO  text
    FORM GET_MESSAGES  TABLES IT_MESS STRUCTURE BDCMSGCOLL USING G_INSNO .TABLES T100.
    DATA: L_MSTRING(255).
    LOOP AT IT_MESS WHERE MSGTYP = 'E'   OR MSGTYP = 'S'.
          SELECT SINGLE * FROM T100 WHERE SPRSL = IT_MESS-MSGSPRA
                                    AND   ARBGB = IT_MESS-MSGID
                                    AND   MSGNR = IT_MESS-MSGNR.
          IF SY-SUBRC = 0.
            L_MSTRING = T100-TEXT.
            IF L_MSTRING CS '&1'.
              REPLACE '&1' WITH IT_MESS-MSGV1 INTO L_MSTRING.
              REPLACE '&2' WITH IT_MESS-MSGV2 INTO L_MSTRING.
              REPLACE '&3' WITH IT_MESS-MSGV3 INTO L_MSTRING.
              REPLACE '&4' WITH IT_MESS-MSGV4 INTO L_MSTRING.
            ELSE.
              REPLACE '&' WITH IT_MESS-MSGV1 INTO L_MSTRING.
              REPLACE '&' WITH IT_MESS-MSGV2 INTO L_MSTRING.
              REPLACE '&' WITH IT_MESS-MSGV3 INTO L_MSTRING.
              REPLACE '&' WITH IT_MESS-MSGV4 INTO L_MSTRING.
            ENDIF.
            CONDENSE L_MSTRING.
          ENDIF.
          CONDENSE G_INSNO.
          CONCATENATE 'For' ' ' G_INSNO ',' L_MSTRING INTO L_MSTRING SEPARATED BY SPACE.
    FORMAT COLOR 2 ON.
    *IF IT_MESS-MSGTYP = 'S' AND IT_MESS-MSGNR = '622'.
    *WRITE: 1 sy-vline,
            L_MSTRING    under 'Error Messages',
           100 sy-vline.
    *ULINE.
    *ELSEIF IT_MESS-MSGTYP = 'E'.
    WRITE: 1 sy-vline,
             L_MSTRING    under 'Logs',
            100 sy-vline.
    ULINE.
    *ENDIF.
    ENDLOOP.
    ENDFORM.                    " GET_MESSAGES

    i think there might be some time gap between CALL TRANSACTION and GET PARAMETER ID.....,that is to say,the new No. has not been generated and what you fetch is an old No..
    i think you should use the "CALL TRANSACTION" like the following one:
    CALL TRANSACTION 'EG33' USING BDCDATA MODE 'A'  UPDATE 'L'  MESSAGES INTO IT_MESS .
    then i think you can get the right value.
    P.S: the different update model(from SAP document)
           upd Effect
    "A"   Asynchronous update. Updates of called programs are executed in the same way as if in the             COMMIT WORK statement the AND WAIT addition was not specified.
    "S" Synchronous processing. Updates of the called programs are executed in the same way as if in the COMMIT WORK statement the AND WAIT addition had been specified.
    "L" Local update. Updates of the called program are executed in such a way as if the SET UPDATE TASK LOCAL statement had been executed in it.
    Other As for "A".

  • How to set parameter id for a field, which is in disable mode ?

    Hi,
    I Have to set parameter id for field ledger for transaction FAGLB03, which is in disable mode, i have to set it through program,please let me know how to set it.
    Thanks.

    Say i have 5 rows then
    for(int i=1;i<=5;i++){
    String Newpath = updatepath(eval("{{obj.libraryname.web_input_text_fieldname}}"),i)
    web.text_area(Newpath).setText("Text to be set")
    Below function is used to update my path
    public String updatepath(String path,int i) throws exception {
    String FPath = "";
    if(i<2) {
    FPath = path.substring(0, path.indexOf("'", path.lastIndexOf("@id=")+5))+path.substring(path.indexOf("'", path.lastIndexOf("@id=")+5));
    } else {
    FPath = path.substring(0, path.indexOf("'", path.lastIndexOf("@id=")+5))+(i-1)+path.substring(path.indexOf("'", path.lastIndexOf("@id=")+5));
    return Fpath
    anyother way to update path and set the fields in mutiple block is appreciable
    thanks
    Suresh

  • How to find out the SET PARAMETER ID for FB02 transaction

    hi masters,
    i m working on a alv report and in that i have to make a BELNR field as a interactive field. i m using the 'user command' for this.
    FORM user_command USING ucomm TYPE sy-ucomm
                        selfield TYPE slis_selfield.
      IF selfield-value IS NOT INITIAL.
        CASE selfield-fieldname.
          WHEN 'BELNR'.
            SET PARAMETER ID 'FBAS'  FIELD selfield-value.
            CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
          WHEN OTHERS.
            MESSAGE text-000 TYPE 'W'.
        ENDCASE.
      ENDIF.
    ENDFORM.                    "user_command
    i used this code using this. using this code my program goes to FB03 tc but it don't shows the data of BELNR what i was clicked. it always shows first BELNR no. in the table. plz anyone help me for this..
    the  SET PARAMETER ID 'FBAS'  i m using is right? if not plz suggest me how to find out correct one?

    Hi Vicky,
    To know the Parameter Id of any field in a transaction ,
    you just press F1 onthe particular field then in technical settings under Field data
    you can see the PARMATER ID.
    So if you check like this you can see 'BLN' as parameter id for Document number in FB03
    transaction
    Regards,
    Manoj Kumar P

  • Set Parameter id is not working in case of select-options

    Hi,
    i am using the below code to get the SWIA first field fill with some data which i am getting by logic written..but its not getting filled since in tcode the first input box is select-options not a parameter..if it would have been a parameter than my logic would have worked finest. so kindly suggest what to do now in case of select-options.
    form user_command  using p_ucomm    type sy-ucomm
                             p_selfield type slis_selfield.
      data : wi type sww_wiid .
      clear : wi .
      read table it_final into wa_final index p_selfield-tabindex.
      if sy-subrc = 0.
        check ( wa_final-wi_id is not initial ).
        wi = wa_final-wi_id .
        case p_ucomm.
          when '&IC1'.
            set parameter id 'WID' field wi.
            call transaction 'SWIA'and skip first screen.
        endcase.
      endif.
    endform.
    Regards,
    HiM

    ThanQ..i got you totally..thanks to remind
    Regards,
    HiM

Maybe you are looking for

  • Help me !!!how to use a DataSource to play and save at the same time??

    I create a DataSource : DataSource ds = Manager.createDataSource(new MediaLocator("rtp://192.168.2.195:10000/audio")); use this DataSource to create a cloneable DataSource: ds = Manager.createCloneableDataSource(ds); use this cloneable DataSource to

  • I cannot set up a blue tooth connection between my apple ipod and phone

    I cannot set up a bluetooth connection between my apple ipod touch and an external speaker wirelessly. The speaker is a boombar and although I have been able to set  it up successfully between the speaker and my iphone, I have not been able to set it

  • Bug? ajax layers not working.

    hi just installed safari 5. i like the new address feature where we can type the page's title instead of the url. anyway, its a feature that firefox already had quite sometime. anyway, most pages with ajax is not working, especially those with layers

  • Yet another slow speed thread....

    Every so often I have issues with the speeds pertaining to my two BT Broadband lines into my house. So here we go again, I've problems with one of the lines which for my rural village location usually nets very good results... Normally I get this :-

  • WRT54G all computers connect to internet, but not each other

    ver 5 firmware v1.02.5 build 002, Jan. 9, 2008 Here is my issue. I run a secure wireless network at my home, consisting of 1 desktop (wired) and 1 laptop (wireless) after setting up the network, and turning on file sharing, and sharing drives, the ne