Store/print name of variable

import java.util.ArrayList;
public class Lalalala {
public static void main(String [] args) {
ArrayList<String> stringers1 = new ArrayList<String>();
ArrayList<String> stringers2 = new ArrayList<String>();
ArrayList listers = new ArrayList();
stringers1.add("abc");
stringers1.add("def");
stringers2.add("ghi");
listers.add(stringers1);
listers.add(stringers2);
System.out.println(listers);
This code prints out "[[abc, def], [ghi]]" when I would like it to print out "[stringers1, stringers2]"
So my question is: Is there anyway I can store the name of a variable / ArrayList in an ArrayList?

Nesthead wrote:
Sorry, I know it's confusing.
So instead, am I able to access a specific String in an ArrayList of Strings in an ArrayList?
Or,
ArrayList<String> stringers = new ArrayList<String>();
stringers.add("abc");
stringers.add("def");
ArrayList<ArrayList> listers = new ArrayList<ArrayList>();
listers.add(stringers);
Is there a line of code that will allow me to access only "def"?Still sounds like you should use a Map. I'm assuming (since you've not provided details) that you have some object
class Foo {
  String name;
  int x;
  String y;
  Date z;
}and you have a List of that object, and you want to retrieve one of them based on its "name" field. If that's the case, put the objects in a map, where the key is the name field and the value is the object.
Why do you even have List<List<String>>? That sounds kind of icky. What do the String and the two Lists represent?
If for some reason you really just have List<List<String>> and that is actually valid for what you're trying to accomplish, then you'd have to iterate over the outer list, and call indexOf on the inner list. Assuming I'm guessing correctly at what you mean by "access" that String.
Also, when you post code, highlihgt it and click the CODE button so that it will be readable.
Edited by: jverd on Oct 4, 2009 9:53 AM
Edited by: jverd on Oct 4, 2009 9:54 AM

Similar Messages

  • Store Column-Name into variable

    Hello from germany
    I got stuck with following:
    How is it possible to store the name of a column into a variable or is it possible to put an index "on" a column?
    The reason for this: I need to fill and check a complete column!
    Thanks for Your help!
    Best regards
    Marlon

    Those sure are unrelated questions. Lets say we have a table like this:
    SQL> CREATE TABLE t (
      2    a  number,
      3    b  varchar2(8),
      4    c  date );
    Table created.You can get a column name like this:
    SQL> set serveroutput on
    SQL> DECLARE
      2    second_col   VARCHAR2 (30);
      3  BEGIN
      4    SELECT column_name
      5      INTO second_col
      6      FROM user_tab_columns
      7     WHERE table_name = 'T'
      8       AND column_id = 2;
      9    DBMS_OUTPUT.PUT_line(second_col);
    10  END;
    11  /
    B
    PL/SQL procedure successfully completed.
    SQL> You can put an index on a column like this:
    SQL> CREATE INDEX t_n1 ON t(b);
    Index created.And you can add data to the table like this:
    SQL> insert into t(a, b) values (4, 'asdf');
    1 row created.
    SQL> select * from t;
             A B        C
             4 asdf
    SQL>

  • Storing Column-Name into variable? Possible?

    Hello from germany
    I got stuck with following:
    How is it possible to store the name of a column into a variable or is it possible to put an index "on" a column?
    The reason for this: I need to fill and check a complete column!
    Thanks for Your help!
    Best regards
    Marlon

    Your question is not clear. Howver, this is what I guess you want to do.
    Example, Check that the Emplyee Number I enter is KING. Check and Print message accordingly.
    Here i user PL/SQL run in SQLPlus
    SET VERIFY OFF
    SET SERVEROUTPUT ON
    DECLARE
         EMP_NAME VARCHAR(30);
    BEGIN
         SELECT ENAME
         INTO EMP_NAME
         FROM EMP
         WHERE EMPNO = &EMP_NUMBER;
         IF EMP_NAME = 'KING'
         THEN
              DBMS_OUTPUT.PUT_LINE('The Emplyee Name is: '||EMP_Name);
         ELSIF EMP_NAME != 'KING'
         THEN
              DBMS_OUTPUT.PUT_LINE('The Emplyee is not KING but: '||EMP_Name);
         END IF;
    EXCEPTION
         WHEN NO_DATA_FOUND
         THEN
              DBMS_OUTPUT.PUT_LINE('The Employee Number Entered is Invalid');
    END;
    /

  • Double click and get and store the value in variable.

    Hi,
    My intention is when i double click a particular record on a tabular, i want to capture or store the particular value of record into a variable and call that variable in print/preview button PLSQL code.
    Below i show the screenshot which contain a tabular and print preview button. After populating the data. the user will double click on the agent code LC354 and click the print/preview button it should display report for only the
    agent code of LC354(this is what i want). But normally when i click the print preview button it wil show the report of agent code of LC354 and LC325(this what i dont want).
    http://imageshack.us/photo/my-images/811/printpb.png/
    My problem is how to capture the value((*LC354*)) of particular record after double click the agent code(*LC354*)?
    i tried to store agent code in variable AG_CNT in mouse double click trigger with following plsql code. but it dosent work.
    declare
    AG_CNT varchar2(10);
    begin
    *AG_CNT* :=GET_ITEM_PROPERTY('RFQ_AGENT_DETAILS.AGENT_CODE',CURRENT_RECORD);
    end;after that pass that AG_CNT value in *:AG_CODE*. below code is in print/preview button.
         cursor c1 is select nvl(count(ENQUIRY_NO),0) from scott.EXP_QUOTE_STATUS
         where ltrim(rtrim(upper(job_status))) like 'APPROVED%' and ENQUIRY_NO = :REQ_FOR_QUOT.ENQUIRY_NO
    AND AGENT_CODE=*:AG_CODE* ;how to do this?
    skud.

    Hi skud
    i juast want to store the agent code to variable.if i did get ur point...
    Why don't u just use a simple assign statment for example...
    DECLARE
    V_VALUE  NUMBER;
    BEGIN
    V_VALUE := LC354 ; -- IF it was a value as LC354 static i mean
    -- or u could use any value
    V_VALUE := :ur_form_item_name; --- if it was dynamic
    END;That's it .
    Hope this helps...
    Regards,
    Ammatu Allah.

  • How to printing oracle report by specific printer name  on solaris?

    When running reports
    -http://host/reports/rwservlet?destype=PRINTER&desname=printername&desformat=dflt.prt&report=test.rdf&userid=test/test@TEST&MODE=CHARACTER
    report with destype=printer desname=printername, the report fails with REP-50159 Executed successfully but there were some errors when distribute the output
    if set default printer by add PRINTER=printername export PRINTER; in uiprint.txt
    it can print to printer.
    i found document id 394554.1 in metalink but it can't fix problem.
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:342229662272785964::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,394554.1,1,1,1,helvetica
    To fix the problem, execute the following steps:
    1. Take a backup of opmn.xml
    2. Edit opmn.xml and include the path information of the new printer:
    For In-process report server add the path information within <OC4J_BI_Forms>
    Eg:
    <process-type id="OC4J_BI_Forms" module-id="OC4J">
    <environment>
    <variable id="DISPLAY" value="localhost:0"/>
    <variable id="LD_LIBRARY_PATH"
    value="D:\Oracle\product\FRHome_1\lib32:D:\Oracle\product\FRHome_1\lib"/>
    <variable id="PATH" value="//printserver;D:/Oracle/product/FRHome_1/bin;................./>
    </environment>
    Here //printserver is the network drive where is printer is installed.
    For standalone report server add the path information within <reportservername>
    Eg:
    <ias-component id="standalonerepsvr01" status="enabled" id-matching="false">
    <process-type id="ReportsServer" module-id="ReportsServices">
    <process-set id="standalonerepsvr01" restart-on-death="true" numprocs="1">
    <environment>
    <variable id="DISPLAY" value="localhost:0"/>
    <variable id="LD_LIBRARY_PATH"
    value="D:\Oracle\product\FRHome_1\lib32:D:\Oracle\product\FRHome_1\lib"/>
    <variable id="PATH" value="//printserver;D:/Oracle/product/FRHome_1/bin;........../>
    </environment>
    3. Reload opmn : opmnctl reload
    4. Restart opmn: opmnctl stopall , opmnctl startall
    5. Run the report with destype=printer and desname=newprintername
    my config (solaris)
    oracle application server release 2 (10.1.2.0.2)
    i used axis printserver name is SZ_R02.
    <process-type id="OC4J_BI_Forms" module-id="OC4J">
    <environment>
    <variable id="DISPLAY" value="localhost:0"/>
    <variable id="LD_LIBRARY_PATH_64" value="/data/app/mid/lib:/data/app/mid/network/lib32:/data/app/mid/lib32:/data/app/mid/lib:/data/app/mid/network/lib::/data/app/mid/jdk/jre/lib/sparcv9"/>
    <variable id="LD_LIBRARY_PATH" value="/data/app/mid/lib32:/data/app/mid/lib:/data/app/mid/network/lib32:/data/app/mid/lib32:/data/app/mid/lib:/data/app/mid/network/lib::/data/app/mid/jdk/jre/lib/sparc"/>
                        <variable id="PATH" value="/SZ_R02:/data/app/mid/lib32:/data/app/mid/lib:/data/app/mid/network/lib32:/data/app/mid/lib32:/data/app/mid/lib:/data/app/mid/network/lib::/data/app/mid/jdk/jre/lib/sparc"/>
    </environment>
    how to print to printer by specific printer name?
    thank you very much
    khun

    if submit url with parameter
    http://hostname:7778/reports/rwservlet?destype=PRINTER&desname=lpSZ_R02_2&report=sticker.out
    error
    REP-50159: Executed successfully but there were some errors when distribute the output
    How to Solution?

  • Printer name "ARCH" not defined - Archive printer

    Hi,
    We are trying to archive some FI objects and store it in the documentum.We have defined the ARCH printer as per SAP guidelines (Device type ARCHLINK, Access method- Archiving Device). While selecting the printer in transaction SARA for the archiving it was giving error message 'Printer name "ARCH" not defined'. The information on the error message is given below. But the printer is already exists in table TSP03. Checked note 639149 authorizations are in place and the printer is already added in content repository thru OAC0. Also note 739828 referred and the prerequisites required are in place. We use ECC 6.0 NW 7.01 release.
    Please provide some inputs, all inputs to solve this issue is welcome.
    Printer name "ARCH" not defined
    Message no. PT001
    Diagnosis
    Table TSP03 contains all valid printer names. The printer name specified here does not exist in the table.
    Procedure
    Enter a valid printer name from table TSP03. You can define new printers using the spool administration function.
    Thanks in advance.
    rgds,
    Shyl

    When we use any other printer which is not defined as Access method -I Archiving device then we are able to select the printer and continue
    Thats the way it should be
    But the intention here is to use the Archiving program (in Device class of SPAD) and continue with Archiving the print lists. So for that we have to make the printer working for Archiving mode
    The spool parameters are for the background job, you cannot use Method I for it, you already set the output method in OAC0 for the print lists.
    Also regarding the selection of 'Send to SAP spool' and 'Print Immediately'' we will be able to select this in the 'Properties' but the error message appears before that and no further selection possible.
    As I mentioned before you need to use a common printer for the background job spool.
    Regards
    Juan

  • Regarding callfunction for output device without a prompt for printer name.

    Hi,
      Is there any call function, for accessing output device, without a prompt for printer name? Can we directly execute the smart form without print popup?
    Can anyone suggest me in this regard.
    Thanks in advance,
    Shwetha Korlepara.

    Hi,
    Check my code and reward points by clicking the star on the left of reply,if it helps.
    *& Report  ZZZ_JAYTEST1                                                *
    REPORT  zzz_jaytest1 NO STANDARD PAGE HEADING MESSAGE-ID zhrt.
    Variable Declaration
    DATA : v_form_name TYPE rs38l_fnam,
           itab TYPE STANDARD TABLE OF pa0001,
           w_ctrlop TYPE ssfctrlop,
          w_compop TYPE ssfcompop,
          w_return TYPE ssfcrescl.
    SELECT * FROM pa0001 INTO TABLE itab UP TO 5 ROWS.
    SORT itab BY pernr.
    DELETE ADJACENT DUPLICATES FROM itab COMPARING pernr.
    DATA: control TYPE ssfctrlop,
    control_parameters TYPE ssfctrlop,
    output_options type SSFCOMPOP.
    control-preview = 'X'.
    control-no_open = 'X'.
    control-no_close = 'X'.
    control-no_dialog = 'X'.
    control-device = 'PRINTER'.
    output_options-tddest = 'LOCL'.
    OUTPUT_OPTIONS-TDNOPRINT = 'X'.
    OUTPUT_OPTIONS-BCS_LANGU = SY-LANGU.
    CALL FUNCTION 'SSF_OPEN'
    EXPORTING
       USER_SETTINGS            = ' '
       OUTPUT_OPTIONS           = output_options
       CONTROL_PARAMETERS       = control
    EXCEPTIONS
       FORMATTING_ERROR         = 1
       INTERNAL_ERROR           = 2
       SEND_ERROR               = 3
       USER_CANCELED            = 4
       OTHERS                   = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    output_options-tddest = 'LOCL'.
    OUTPUT_OPTIONS-TDNOPRINT = 'X'.
    OUTPUT_OPTIONS-BCS_LANGU = SY-LANGU.
    CALL FUNCTION '/1BCDWB/SF00000066'
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = control
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS             = output_options
       USER_SETTINGS              = ' '
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            = w_return
      JOB_OUTPUT_OPTIONS         =
      TABLES
        itab                       = itab
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'SSF_CLOSE'.

  • Print PDF file directly to store printer

    Hi Gurus,
    Having not found a solution, we think we need help from you. We have searched forums and google but have not found adequate solutions.
    We are a retailer having different stores. Our main office is using SAP. Each store has its printer and defined in our SAP system. We want to print PDF files directly to store printer using SAP . How should we do that ? We think there are 2 steps:
    1) Upload PDF files from network directory into SAP (We done it, no problem)
    2) Having now PDF files in internal tables, how should we proceed to print PDF files using store printers?
         Please note that we do not want to use CL_GUI_PDFVIEWER since we do not want to display the PDF and having the obligation to choose the print option from dialog and also we do not want to call Adobe OLE object  to print
    Any answer would be appreciated
    Thank you very much

    Hi,
    It is really late to give response this post. But still who ever refering to this post for the same issue this solution is useful for achieving same in background:
    Even same can be used in smartforms, for getting spool request in PDF format as well which will decrease the size of file when printing in SAP printer.
    ct_tline is PDF output:
    DATA: lv_pdfsource TYPE xstring.
    FIELD-SYMBOLS:<p> TYPE x. " <p> type any.
    LOOP AT ct_tline INTO cs_tline.
      ASSIGN cs_tline TO <p> CASTING TYPE x.
      CONCATENATE lv_pdfsource <p> INTO lv_pdfsource IN BYTE MODE.
    ENDLOOP.
    * ->Create spool request in PDF format
    CALL FUNCTION 'ADS_CREATE_PDF_SPOOLJOB'
      EXPORTING
        printer  = 'LOCL'            "Printer name supporting PDF device type
    *   DEST     =
        pages    = 1
        pdf_data = lv_pdfsource        "XSTRING internal table
    *   NAME     =
    *   SUFFIX1  =
    *   SUFFIX2  =
    *   COPIES   =
    *   PRIO     =
        IMMEDIATE_PRINT         = 'X'
    *   AUTO_DELETE             =
    *   TITLELINE               =
    *   RECEIVER =
    *   DIVISION =
    *   AUTHORITY               =
    *   LIFETIME = '0'
    * IMPORTING
    *   SPOOLID  =
    * EXCEPTIONS
    *   NO_DATA  = 1
    *   NOT_PDF  = 2
    *   WRONG_DEVTYPE           = 3
    *   OPERATION_FAILED        = 4
    *   CANNOT_WRITE_FILE       = 5
    *   DEVICE_MISSING          = 6
    *   NO_SUCH_DEVICE          = 7
    *   OTHERS   = 8
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.

  • Remove Printer Name from Crystal Report

    How can i remove the printer name from the Crystal Report so that the PrinterName property of the CRAXDRT.Report object in the RDC SDK is blank WITHOUT having the "No Printer" Option checkbox checked?
    Here's the scenerio.  When I first create a Report and don't go into Page Setup, PrinterName property is blank.  If I go into Page Setup and explicitly select a printer, PrinterName property equals the name of the printer selected.  If I check the "No Printer" checkbox in Page Setup, PrinterName property is blank.  But if i go back in and uncheck the "No Printer" checkbox in Page Setup, the PrinterName property equals the name of my Windows Default Printer.

    I'm still not sure what is unclear about my first question.  And I'm not sure how any of the info you are requesting is going to make any difference in answering my question.  And I'm not sure how your analogy fits here but ..
    Version of CR = 11.0.0.895
    CR Service Packs applied = None
    Web or Win app? = Win App
    OS? = Windows XP Service Pack 3
    Development language?  = Both Visual Basic 6 and C#.Net 2008
    Method of CR files deployment = email the .RPT file to a client
    Where were the runtime files downloaded from? = Runtimes are installed from Merge Modules donwload from SAP site
    What is the version of the craxdrt.dll on the deployed box? = 11.0.0.893
    So here are the exact steps so you can understand what is going on:
    I have the Crystal Reports Application open side-by-side with my Visual Basic development environment in debug mode so i can step through the code using the RDC SDK.
    1. I open the Crystal Reports Application and create a brand new report - "Test.RPT" and DO NOT go into Page Setup at all and save the report.
    2. In my Visual Basic development environment, i run the code that will generate the report, Here's the exact code
        Dim m_crApp As CRAXDRT.Application
        Dim m_crReport As CRAXDRT.Report
        Set m_crApp = New CRAXDRT.Application
        Set m_crReport = New CRAXDRT.Report
        Set m_crReport = m_crApp.OpenReport("Test.RPT")
    3. When i look at the PrinterName property in the CRAXDRT.Report object, it is blank.
        ie. crReport.PrinterName is equal to ""
    4. I reopen the Crystal Reports Application with report "Test.RPT" and go into Page Setup and check the "No Printer" option.
    5. I go back into my Visual Basic development environment and rerun the code that will generate the report.
    6. When i look at the PrinterName property in the CRAXDRT.Report object, it is still blank.
        ie.  crReport.PrinterName is equal to ""
    7. I reopen the Crystal Reports Application with report "Test.RPT" and go into Page Setup and uncheck the "No Printer" option. I have NOT specified any printer, nor have i clicked the "Printer..." button to setup a printer....i have just unchecked the "No Printer" option
    8. I go back into my Visual Basic development environment and rerun the code that will generate the report.
    9. When i look at the PrinterName property in the CRAXDRT.Report object, it is now set to my WINDOWS DEFAULT PRINTER, yet i had not specified any printer.
        ie.  crReport.PrinterName is equal to "
    MyNetwork\MyPrinter"
    PROBLEMS:
    1. The client needs the report to go to the default windows printer of their machine
    2. If the "No Printer" Option is checked, the Report does not print at all
    3. If the report is set to MY default windows printer and i give it to the client, at times it takes upwards of to a minute for the Print Dialog to disply.  As i've read on other forum posts, it appears Crystal is looking for MY printer on the clients machine and takes a minute before i realizes it can't find it and then sets it to the CLIENTS default windows printer.
    4. The client believes it is unreasonable to wait a minute for the print dialog to appear ...and i agree.
    5. I cannot change the code to use the Select Printer in the RDC SDK - it's a long explanation why but just suffice it to say that i cannot do this.
    All i want to do is either:
    1. Remove the Printer Name in the actual report from the Crystal Reports designer - basically undoing what Crystal did when i went into Page Setup.
    2. Via the RDC SDK, be able to detect the "No Printer" option is selected. Checkign CRAXDRT.PrinterName equal to "" is not an option.

  • I can not print a report from my quicken program because the printer name has the word on in it

    I recently purchased and installed a HP Officejet Mobile L411 printer. For all apps. on my computer (Window&) the printer name is as follows: HP officiate Noble L411. On my Quicken program the printer name is as follows: HP Officejet Mobile L411 on USB001. In checking Quickens help/troubleshooting guide, Ifound thirst statement, make sure the printers name doesn"t contain the word "on". My question is how do I get my printers name in Quicken changed so it doesn't contain the word "on"

    Try opening the PDF in Preview and see if it will print out of it.

  • How to Use Transient View Objects to Store Session-level Global Variables

    hi
    Please consider section "40.8.5 How to Use Transient View Objects to Store Session-level Global Variables"
    at http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
    Based on this documentation I created the example application
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.01.zip
    It behaves as show in the screencast at http://screencast.com/t/qDvSQCgpvYdd
    Its Application Module has a Transient View Object instance "MyEmployeesContextVOVI", as master for the child View Object instance "EmpInCtxJobVI".
    On rollback the Transient View Object instance keeps its row and attribute values.
    Also when passivation and activation is forced (using jbo.ampool.doampooling=false ) the Transient View Object instance seems to keep its row and attribute values.
    questions:
    - (q1) Why does the expression #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty} evaluate as true when a Transient View Object instance attribute value is changed (as shown in screencast at http://screencast.com/t/qDvSQCgpvYdd )?
    - (q2) What would be a robust approach to make a Transient View Object instance more self-contained, and manage itself to have only one single row (per instance) at all times (and as such removing the dependency on the Application Module prepareSession() as documented in "5. Create an empty row in the view object when a new user begins using the application module.")?
    many thanks
    Jan Vervecken

    Thanks for your reply Frank.
    q1) Does sample 90 help ? http://blogs.oracle.com/smuenchadf/examples/
    Yes, the sample from Steve Muench does help, "90. Avoiding Dirtying the ADF Model Transaction When Transient Attributes are Set [10.1.3] "
    at http://blogs.oracle.com/smuenchadf/examples/#90
    It does point out a difference in marking transactions dirty by different layers of the framework, "... When any attribute's value is changed through an ADFM binding, the ADFM-layer transaction is marked as dirty. ...".
    This can be illustrate with a small change in the example application
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.02.zip
    It now shows the result of both these expressions on the page ...
    #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty}
    #{bindings.MyEmployeesContextVOVIIterator.dataControl.dataProvider.transaction.dirty}... where one can be true and the other false respectively.
    See also the screencast at http://screencast.com/t/k8vgNqdKgD
    Similar to the sample from Steve Muench, another modification to the example application introduces MyCustomADFBCDataControl
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.03.zip
    public class MyCustomADFBCDataControl
      extends JUApplication
      @Override
      public void setTransactionModified()
        ApplicationModule vApplicationModule = (ApplicationModule)getDataProvider();
        Transaction vTransaction = vApplicationModule.getTransaction();
        if (vTransaction.isDirty())
          super.setTransactionModified();
    }Resulting in what seems to be more consistent/expected transaction (dirty) information,
    see also the screencast at http://screencast.com/t/756yCs1L1
    Any feedback on why the ADF Model layer is so eager to mark a transaction dirty is always welcome.
    Currently, question (q2) remains.
    regards
    Jan

  • How to store data in a variable in select query

    Hi,
    Below is the select query in which i want to store the data in variable but i am getting runtime error as the fields are more as compared to variable,the declaration is necessary for it due to the reteriving for data.
    Please provide me guidelines how to do it.
    DATA: BEGIN OF ITSC01 OCCURS 0,
          PRUEFLOS LIKE QALS-PRUEFLOS,
          MBLNR LIKE QAMB-MBLNR,
          LGORT LIKE MSEG-LGORT,
          END OF ITSC01.
    IF STIT-MGEIG GE 0.
    LOOP AT STIT." WHERE PRUEFLOS EQ STIT-PRUEFLOS.
        SELECT A~PRUEFLOS B~MBLNR C~LGORT FROM QALS AS A
               INNER JOIN QAMB AS B ON B~PRUEFLOS = A~PRUEFLOS
               INNER JOIN MSEG AS C ON C~MBLNR = B~MBLNR AND C~MJAHR = B~MJAHR
               INTO SLOC WHERE A~PRUEFLOS EQ STIT-PRUEFLOS.
    *           INTO TABLE ITSC01 WHERE A~PRUEFLOS EQ STIT-PRUEFLOS AND A~MATNR EQ STIT-MATNR AND C~LGORT EQ 'SC03'.
        SORT ITSC01 BY PRUEFLOS.
         READ TABLE ITSC01 WITH KEY PRUEFLOS = ITSC01-PRUEFLOS.
          IF ITSC01-LGORT EQ 'SC03'.
          STIT-MGEIG = 0.
          ENDIF.
    MODIFY STIT.
    ENDLOOP.
    ENDIF.

    hmm..
    try this:
    DATA: l_PRUEFLOS LIKE QALS-PRUEFLOS,
              l_MBLNR LIKE QAMB-MBLNR,
             l_LGORT LIKE MSEG-LGORT,
    IF STIT-MGEIG GE 0.
    LOOP AT STIT." WHERE PRUEFLOS EQ STIT-PRUEFLOS.
        SELECT APRUEFLOS BMBLNR C~LGORT FROM QALS AS A
               INNER JOIN QAMB AS B ON BPRUEFLOS = APRUEFLOS
               INNER JOIN MSEG AS C ON CMBLNR = BMBLNR AND CMJAHR = BMJAHR
               INTO ( l_PRUEFLOS , l_MBLNR, l_LGORT )
          WHERE A~PRUEFLOS EQ STIT-PRUEFLOS.
              INTO TABLE ITSC01 WHERE APRUEFLOS EQ STIT-PRUEFLOS AND AMATNR EQ STIT-MATNR AND C~LGORT EQ 'SC03'.
        SORT ITSC01 BY PRUEFLOS.
         READ TABLE ITSC01 WITH KEY PRUEFLOS = ITSC01-PRUEFLOS.
          IF ITSC01-LGORT EQ 'SC03'.
          STIT-MGEIG = 0.
          ENDIF.
    MODIFY STIT.
    ENDLOOP.
    ENDIF.

  • Printer name is Truncated while creating TO in WM area from QM notification

    Dear All,
      While creating transfer order(WM) from QM notification. I am getting error  "device <printer name> does not exist". Even though printer name is available i am getting this error.  When the length of printer name is greater than 4 only i am facing this error.
    while checking the screen 3000 in program SAPLQMLR . Field LTAP-LDEST is not checked for Scrollable option. Where as the same field is used in WM T.code LT01 there scrollable option is checked , if we select the same printer system is accepting.
    I searched for SAP noted i dint find any thing related to this.
    Have any one faced such problem and got any solution. If so please provide the details.
    I would like to get suggestion to over come this bug.
    Thanks in Advance.
    Regards
    Srihari.P

    There is a notes available in SAP. Using this only it is possible to solve this problem
    Regards
    Srihari P

  • What is the datatype to store the value of variable of  UTL_HTTP.resp

    Hello,
    I am using Oracle 11g R2 SOE.
    I have table Called SMS consists of two columns (TEXT , RESPONSE) to store the value of variable of type UTL_HTTP.resp
    the datatype of TEXT column is varchar2.
    What should be the datatype of the column RESPONSE that is supposed to store the value of a variable of type UTL_HTTP.resp ????
    Please see the following example if it was not clear;
    Declare
      l_url2 SMS.RESPONSE%TYPE;
      l_http_request2   UTL_HTTP.req;
      l_http_response2  UTL_HTTP.resp;
    begin
      l_http_request2  := UTL_HTTP.begin_request(l_url2);
      l_http_response2 := UTL_HTTP.get_response(l_http_request2);
      insert into SMS (text,response) values (l_url2,l_http_response2);
      UTL_HTTP.end_response(l_http_response2);
    end;Regards,
    Fateh

    Fateh wrote:
    Hello,
    I am using Oracle 11g R2 SOE.
    I have table Called SMS consists of two columns (TEXT , RESPONSE) to store the value of variable of type UTL_HTTP.resp
    the datatype of TEXT column is varchar2.
    What should be the datatype of the column RESPONSE that is supposed to store the value of a variable of type UTL_HTTP.resp ????
    Please see the following example if it was not clear;
    Declare
    l_url2 SMS.RESPONSE%TYPE;
    l_http_request2   UTL_HTTP.req;
    l_http_response2  UTL_HTTP.resp;
    begin
    l_http_request2  := UTL_HTTP.begin_request(l_url2);
    l_http_response2 := UTL_HTTP.get_response(l_http_request2);
    insert into SMS (text,response) values (l_url2,l_http_response2);
    UTL_HTTP.end_response(l_http_response2);
    end;Regards,
    Fatehutl_http.resp is a record type Its defined like this
    TYPE resp IS RECORD (
       status_code    PLS_INTEGER,
       reason_phrase  VARCHAR2(256),
       http_version   VARCHAR2(64));http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/u_http.htm#i1012713
    I would suggest in your table you split the RESPONSE column into 3 different column and store the fields STATUS_CODE, REASON_PHARSE and HTTP_VERSION accordingly.

  • ReportSDKPrinterException: Printer name could not be set

    I am working on testing a web application with BOE XI V 3.1.  I have the database and RAS machines setup.  I have been working on changing my app to printing through the RAS.  I have print preview and export working, but am running into issues printing to a printer.
    On the RAS which is on a virtual machine, I have a printer setup as a local printer to a tcpip port so the VM can access a printer on our network.  But when I call the clientDoc.getPrintOutputController().printReport(printOptions); I get the error message ReportSDKPrinterException: Printer name could not be set.
    I have also on the side been testing using a small jsp modified from a working print preview.
    Here is the jsp:
    <%@ page contentType="text/html; charset=utf-8" %>
    <%@
       page import="com.crystaldecisions.sdk.occa.report.application.*,
      com.crystaldecisions.sdk.occa.report.data.*,
      com.crystaldecisions.sdk.occa.report.document.*,
      com.crystaldecisions.sdk.occa.report.lib.*,
      com.crystaldecisions.report.web.viewer.*"
    %>
    <html>
    <head>
    <title>Print Report</title>
    </head>
    <body>
    <%@ include file="AlwaysRequiredSteps_UnmanagedRAS.jsp"%>
    <%
      // Populate parameters
      clientDoc.getDataDefController().getParameterFieldController().setCurrentValue("", "TAB_ID", "Configuration");
      clientDoc.getDataDefController().getParameterFieldController().setCurrentValue("", "LOGO_LOCATION", "d:\\reports\\images\\highjump.gif");
      PrintReportOptions printOptions = new PrintReportOptions();
      printOptions.setPrinterName("Dell");
      clientDoc.getPrintOutputController().printReport(printOptions);
      clientDoc.close();
    %>
    </body>
    </html>
    The code from AlwaysRequiredSteps_UnmanagedRAS.jsp is:
    <%
    // This file contains the required steps to open an unmanaged report from a file path accessible to the RAS Server.
    // Modify this path to the location of the report on your system.
    String path = "rassdk://C:\\reports\\ReportList.rpt";
    // Create a new Report Application Session.
    ReportAppSession ra = new ReportAppSession();
    // Create a RAS service.
    ra.createService("com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");
    // Set the RAS server to be used for the service.
    ra.setReportAppServer("10.192.183.196:1566");
    // Initialize RAS.
    ra.initialize();
    // Create the ReportClientDocument object.
    ReportClientDocument clientDoc = new ReportClientDocument();
    // Set the RAS server to be used.
    clientDoc.setReportAppServer(ra.getReportAppServer());
    // Open the report, and set the open type to Read Only.
    clientDoc.open(path, OpenReportOptions._openAsReadOnly);
    %>
    The result I get from running this is:
    HTTP Status 500 - An exception occurred processing JSP page /PrintReport.jsp at line 28
    type Exception report
    message An exception occurred processing JSP page /PrintReport.jsp at line 28
    description The server encountered an internal error that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: An exception occurred processing JSP page /PrintReport.jsp at line 28
    25:   PrintReportOptions printOptions = new PrintReportOptions();
    26:   printOptions.setPrinterName("DELL");
    27:  
    28:   clientDoc.getPrintOutputController().printReport(printOptions);
    29:
    30:   clientDoc.close();
    31: %>
    Stacktrace:
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    root cause
    javax.servlet.ServletException: com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException: Printer name could not be set: DELL---- Error code:-2147215357 Error code name:internal
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:916)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:845)
      org.apache.jsp.PrintReport_jsp._jspService(PrintReport_jsp.java:133)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    root cause
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException: Printer name could not be set: DELL---- Error code:-2147215357 Error code name:internal
      com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException.throwReportSDKPrinterException(Unknown Source)
      com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)
      org.apache.jsp.PrintReport_jsp._jspService(PrintReport_jsp.java:120)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    root cause
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterNotFoundException: Printer name could not be set: DELL---- Error code:-2147215365 Error code name:printerNotFoundError
      com.businessobjects.crystalreports.printer.bean.a.try(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.ReportPrinter.setPrinterName(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.ReportPrinter.print(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)
      org.apache.jsp.PrintReport_jsp._jspService(PrintReport_jsp.java:120)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    root cause
    java.awt.print.PrinterException: No printer named "DELL" could be found.
      com.businessobjects.crystalreports.viewer.core.f$a.a(Unknown Source)
      com.businessobjects.crystalreports.viewer.core.f.a(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.a.try(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.ReportPrinter.setPrinterName(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.ReportPrinter.print(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)
      org.apache.jsp.PrintReport_jsp._jspService(PrintReport_jsp.java:120)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.53 logs.
    Apache Tomcat/7.0.53
    I would really appreciate any help in figuring out how to print to the RAS.
    Thanks in advance.

    Hi Jason,
    Could you please let us know the complete Business Objects version with Service Pack and Fix Pack?
    Actually the issue you are facing was identified as a bug and was fixed in Business Objects Enterprise XI 3.1 FixPack 2.2.
    Please go through the SAP Note: 1417374 - Error "Printer name could not be set" when printing using the RAS SDK.
    Hope this helps.
    Regards,
    Rajarsh

Maybe you are looking for