How to use Reader or InputStream to get byte[]

Any opinions on the best way to get a byte[] using java.io.Reader or java.io.InputStream?
I haven't used these in anger before, so sorry for the rookie nature!
Any simple examples would be much appreciated!
Thanks

So sorry, I wasn't really listening . . . YOU WANT BYTE[]! OH! <8*O
From DataInputStream docs v1.3.1:
read
public final int read(byte[] b)
               throws IOException
    Reads some number of bytes from the contained input stream and stores them into the buffer array b. The number of bytes actually read is returned as an integer. This method blocks until input data is available, end of file is detected, or an exception is thrown.
    If b is null, a NullPointerException is thrown. If the length of b is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.
    The first byte read is stored into element b[0], the next one into b[1], and so on. The number of bytes read is, at most, equal to the length of b. Let k be the number of bytes actually read; these bytes will be stored in elements b[0] through b[k-1], leaving elements b[k] through b[b.length-1] unaffected.
    If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.
    The read(b) method has the same effect as:
read(b, 0, b.length)
Overrides:
read in class FilterInputStream
Parameters:
b - the buffer into which the data is read. Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached. Throws:
IOException - if an I/O error occurs.See Also:
FilterInputStream.in, InputStream.read(byte[], int, int)

Similar Messages

  • I recieved an Adobe Master Collection License number from my school (Stevens Institute of Technology) and I can't figure out how to use it in order to get the product. I've created a username and that's as far as I've gotten.

    I recieved an Adobe Master Collection License number from my school (Stevens Institute of Technology) and I can't figure out how to use it in order to get the product. I've created a username and that's as far as I've gotten. I need to download the product and I can't figure out where to begin.

    Ask someone at your school... Do you have a Cloud redemption code, or a CS6 serial number?
    If Cloud, Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html and
    http://www.adobe.com/products/creativecloud/faq.html
    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall
    http://forums.adobe.com/community/download_install_setup/creative_cloud_faq
    What it is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Cloud Getting Started https://helpx.adobe.com/creative-cloud.html
    If CS6, download at Other downloads and enter your serial number when prompted
    Again... your 1st resource is your school

  • How to use Reader in non-interactive persistent mode to convert PDFs?

    How to use Adobe Acrobat Reader in non-interactive and persistent mode to convert PDFs to PostScript (or even better, bitmapped image files) ?
    At present, I'm using
        acroread -toPostScript  indir/*pdf outdir/
    to convert a set of PDFs to PostScript (the platform is Solaris on Sparc).
    These PDFs arrive at varying rates at arbitrary intervals and I'd like to avoid the overhead of startup of the acroread process and loading of the fonts etc. I would like the acroread process to become persistent and that it should convert the PDFs either as and when they become available or on demand (ie upon receipt of some signal or message).
    In the words, the usage is similar to that used by web browsers, which is effectively a client of the rendering service provided by the Adobe Acrobat Reader running in the background.
    The only difference is that I need the output in a file (or set of files), either bitmap or PostScript.
    Any help / pointers on how to do this would be greatly appreciated.
    Thanks and best regards.

    Hello,
    As I understand, you would like to setup a watch folder which will be getting pdf files in arbitrary intervals. You then want each pdf to be converted to ps in a separate folder.
    You could achieve this with the help of a script by polling for pdf files present in the watch folder. When you find pdf files, convert them to ps, save the ps file in another folder and then move the pdf to another folder.
    In any case, once the process of conversion of pdf to ps is over, acroread will quit.
    There is no way to keep the acroread process running in background and convert pdfs as and when they are available.
    Please let me know if this answers your query.
    Regards,
    Rishi

  • How to use read() method in JEditorPane

    Hai,
    I not quite understand how to use the "read(InputStream in, Object desc)" method in JEditorPane, especially the "Object desc" argument. What should I put there? Can anyone give me an examples?
    Thank you and sorry for the trouble.

    The second parameter could be an HTMLDocument. If you
    just pass null, then it takes the default as Text
    document.
    Cheers~ Thank idreesmd :)

  • How to use/read a property in a WSDL file?

    Hello list,
    Does anybody know how to use a property (e.g. myapp.host.name) in a WSDL file to dynamically switch between a certain host through the use of a property file?
    My property file would look like this:
    myapp.host.name=<some-ip-address-or-dns>
    myapp.host.port=1234
    I would save this property file as myapp.properties.
    In a WSDL file that I receive from a 3rd-party I want to remove the hardcoded hostname and replace it with my property. For instance, something like this:
    <port binding="tns:DoSomething" name="DoSomething">
        <soap address location="http://abcdks02:1234/avb_xsd/start.edw?MySource=WebService></soap:address>
    </port>{code}
    should be replaced by this:
    {code}<port binding="tns:DoSomething" name="DoSomething">
        <soap address location="http://${myapp.host.name}:${myapp.host.port}/avb_xsd/start.edw?MySource=WebService></soap:address>
    </port>Is there a fast, efficient and clean way to do this? I do not want to use maven2 filtering, because that forces a new re-deployment every time you change the value of the property. I also want to avoid Spring, because we're trying to get rid of Spring in our project.
    What else can I use? I am sure there is a fast and efficient way to do this.
    Any help is appreciated!
    Thanks,
    Gian

    Hi biblio,
    I have used the method you have mentioned to change the target end point. And that was successful. Thank you. Apart from this I have another issue. I want my web service read some database related values from properties file only when the web service is deployed. Currently the java application read the database related values in a static block. I have made this java application to a web service. I am new to java and thought of there may be something like ServletContextListener where I can read properties file. This allows me to read properties file only when the web application is deployed.

  • How to use a regural expression to get all digit from a string.

    Hi All,
    Do you know how to use regural expression to get all digits from the following string via ABAP program?
    "'Log Attributes                 0 (  0 )     (   10 % Available  )"
    Thanks,
    Andrew

    Hi,
    Try the code mentioned below:
      DATA: STR_LEN  LIKE SY-FDPOS,
            RSTR_LEN LIKE SY-FDPOS,
            OFF      LIKE SY-FDPOS.
      DATA: IDX      LIKE SY-FDPOS,        "mn B20K054003
            CL       LIKE SY-FDPOS.        "mn B20K054003
      DATA: RSTRING(40).
      DATA: STRING(40).   " value 'A,N,I,L'.
      FIELD-SYMBOLS: <NLS_CHAR>.           "mn B20K054003
    MOVE I_REGUH-ZNME1 TO STRING.
      MOVE SPACE TO RSTRING.
      STR_LEN = STRLEN( STRING ).
      DESCRIBE FIELD RSTRING LENGTH RSTR_LEN.
      IF RSTR_LEN < STR_LEN. RAISE TOO_SMALL. ENDIF.
      WHILE IDX < STR_LEN.                 "mn B20K054003
        ASSIGN STRING+IDX(*) TO <NLS_CHAR>.   "mn B20K054003
        IF SY-LANGU EQ '2'.                "mn B20K054003
          CALL FUNCTION 'NLS_THAI_CHARLEN' "mn B20K054003
               EXPORTING                   "mn B20K054003
                    THAI_STRING  = <NLS_CHAR>       "mn B20K054003
               CHANGING                    "mn B20K054003
                    THAI_CHARLEN = CL.     "mn B20K054003
        ELSE.                              "mn B20K054003
          CL = CHARLEN( <NLS_CHAR> ).      "mn B20K054003
        ENDIF.                             "mn B20K054003
        IF IDX NE 0.                       "mn B20K054003
          SHIFT RSTRING RIGHT BY CL PLACES."mn B20K054003
        ENDIF.                             "mn B20K054003
        RSTRING+0(CL) = STRING+IDX(CL).    "mn B20K054003
        IDX = IDX + CL.                    "mn B20K054003
      ENDWHILE.                            "mn B20K054003
    Regds,
    Anil
    Edited by: Matt on Jul 1, 2009 9:36 AM -added code tags

  • How to use the buying group to get the report?

    Dear all:
    I check the function of buying group in customer master data.
    system show  The buying group is used for reporting purposes only. You can, for example, generate an account statement with line items for all members and for the buying group.
    but i check all report link with customer, not find this fields.
    why?  and  how to use this function in the report?
    can you give some suggestion?
    thanks
    ALEX

    anybody can help me?

  • How to use read text for VF03 for a particular header text ID...

    Hello Experts,
    How do we read the text from a given text ID? in my speccs, it says that I need to get the text from
    a given text ID for invoices(VF03).
    Thank you guys and take care!

    i am not at system right now, but I guess object is VBBK. you can do SE16 on STXH, put name as your invoiuce#, iD as your text id, object as VBBK and see if it returns the row. if not leave object as blank and see hwat does it return for object for the given key

  • Does anyone know how to use ELVIS in Labview to get current and voltage measurements?

    Trying to use ELVIS in Labview to get measurements with a NI myDAQ.

    I have changed from using the ELVISmx driver as I was unable to call on the digital multimeter of the myDAQ twice, I have set up a VI using the DAQ assistant with the myDAQ, I am using the AI0 port for a voltage reading and using the DMM for my current reading, the circuit is working as I am measuring the voltage on a resistor after the ammeter but I am unable to get a current reading in order for it to work. If I have something wired wrong please let me know, thank you. My circuit is a 12VAC power supply, going through a potentiometer to drop the voltage to 8VAC, which passes through a resistor, ammeter is in series after this and attached to another resistor to complete my loop, the AI0 for my volt meter is connected across the second resistor, I have the proper voltage reading when I run the VI, but am unable to get a current input. Thanks for the help.
    Attachments:
    Mikes Project2.vi ‏131 KB

  • How to use read statement on a select options

    Hi all,
    I am trying to read the all the values on user selection screen select options.
    I have an internal table loaded with data.
    So while looping this internal table, I need to check the table certain tank field (lgort) against the select options tank values entered by user.
    It is fine when user uses the multiple values on the select options since I use the "READ" statement on the select options and get the matching values.
    Example: when user uses the multiple value selection on a select-options to enter values A554 and A555
    The select-options table will be:
    sign   option    low         high
    I          EQ       A554
    I          EQ       A555
    LOOP AT gt_output_location INTO gw_output.
      READ TABLE s_lgort INTO gw_lgort WITH KEY low = gw_output-lgort.
        IF sy-subrc = 0.
        * append row to another table.
        ENDIF.
    ENDLOOP.
    Problem:
    Example: when user uses range on a select-options to enter values A554 and A555
    sign   option    low         high
    I          BT      A554       A555
    The read statement can only get matching value A554.  
    LOOP AT gt_output_location INTO gw_output.
      READ TABLE s_lgort INTO gw_lgort WITH KEY low = gw_output-lgort.
        IF sy-subrc = 0.
        * append row to another table.
        ENDIF.
    ENDLOOP.
    Anyone have any idea on this?? Thanks!!

    Hi all, I need to consider each and every lines of the gt_output_location as there are other fields need to consider also. Basically I am checking each and every lines of this table to see which lines I need to append to another table.
    That is why I did not use  "LOOP AT gt_output_location INTO gw_output WHERE lgort IN s_lgort"
    The full gt_output_location:
    LOOP AT gt_output_location INTO gw_output.
    *      IF p_lgort = space AND p_umlgo = space.
           IF gv_lines_lgort = 0 AND gv_lines_umlgo = 0.
    *       only append those from tank <> to tank
             IF gw_output-lgort <> gw_output-umlgo.
               APPEND gw_output to gt_output.
               CLEAR gw_output.
             ELSE. "from tank == to tank
    *         append those from plant <> to plant
               IF gw_output-werks <> gw_output-umwrk.
                 APPEND gw_output to gt_output.
                 CLEAR gw_output.
               ENDIF.
             ENDIF.
    *      ELSEIF p_lgort = space AND p_umlgo <> space.
           ELSEIF gv_lines_lgort = 0 AND gv_lines_umlgo > 0.
    *        IF gw_output-umlgo = p_umlgo.
             READ TABLE s_umlgo INTO gw_umlgo WITH KEY low = gw_output-umlgo.
             IF sy-subrc = 0.
    *         only append those from tank <> to tank
               IF gw_output-lgort <> gw_output-umlgo.
                 APPEND gw_output to gt_output.
                 CLEAR gw_output.
               ELSE. "from tank == to tank
    *           append those from plant <> to plant
                 IF gw_output-werks <> gw_output-umwrk.
                   APPEND gw_output to gt_output.
                   CLEAR gw_output.
                 ENDIF.
               ENDIF.
             ENDIF.
    *      ELSEIF p_umlgo = space AND p_lgort <> space.
           ELSEIF gv_lines_umlgo = 0 AND gv_lines_lgort > 0.
    *        IF gw_output-lgort = p_lgort.
             READ TABLE s_lgort INTO gw_lgort WITH KEY low = gw_output-lgort.
             IF sy-subrc = 0.
    *         only append those from tank <> to tank
               IF gw_output-lgort <> gw_output-umlgo.
                 APPEND gw_output to gt_output.
                 CLEAR gw_output.
               ELSE. "from tank == to tank
    *           append those from plant <> to plant
                 IF gw_output-werks <> gw_output-umwrk.
                   APPEND gw_output to gt_output.
                   CLEAR gw_output.
                 ENDIF.
               ENDIF.
             ENDIF.
           ELSE.
    *        IF gw_output-lgort = p_lgort AND gw_output-umlgo = p_umlgo.
             READ TABLE s_lgort INTO gw_lgort WITH KEY low = gw_output-lgort.
             IF sy-subrc = 0.
    *         only append those from tank <> to tank
               IF gw_output-lgort <> gw_output-umlgo.
                 APPEND gw_output to gt_output.
                 CLEAR gw_output.
               ELSE. "from tank == to tank
    *           append those from plant <> to plant
                 IF gw_output-werks <> gw_output-umwrk.
                   APPEND gw_output to gt_output.
                   CLEAR gw_output.
                 ENDIF.
               ENDIF.
             ENDIF.
             READ TABLE s_umlgo INTO gw_umlgo WITH KEY low = gw_output-umlgo.
             IF sy-subrc = 0.
    *         only append those from tank <> to tank
               IF gw_output-lgort <> gw_output-umlgo.
                 APPEND gw_output to gt_output.
                 CLEAR gw_output.
               ELSE. "from tank == to tank
    *           append those from plant <> to plant
                 IF gw_output-werks <> gw_output-umwrk.
                   APPEND gw_output to gt_output.
                   CLEAR gw_output.
                 ENDIF.
               ENDIF.
             ENDIF.
           ENDIF.
           CLEAR gw_lgort.
           CLEAR gw_umlgo.
         ENDLOOP.

  • How to use Spry.Utils.extractParamsFromForm to get value of a form element

    Can we use Spry.Utils.extractParamsFromForm to get value of a
    form element ?
    I tried this
    quote:
    var cid =
    Spry.Utils.extractParamsFromForm('adForm','category');
    Here the form name is adForm and category is an select item.
    This gives me error
    quote:
    elements.join is not a function
    Any idea on this guys.

    Can we use Spry.Utils.extractParamsFromForm to get value of a
    form element ?
    I tried this
    quote:
    var cid =
    Spry.Utils.extractParamsFromForm('adForm','category');
    Here the form name is adForm and category is an select item.
    This gives me error
    quote:
    elements.join is not a function
    Any idea on this guys.

  • How to use Read table with out key fields

    Hi Experts,
    I need to retrieve the 2 internal tables data into single table.
    I have 3 common fields between the 2 tables but I don't have the Key fields. Then how to use the read table in this.
    Thanks in Advance.
    Edited by: satish4abap on Mar 10, 2010 9:39 AM

    Hi Satish,
    Key fields are nothing but the common fields with which you can pick the data from the second internal table.
    If you can paste your Internal table fields then we will be able to assit you better.
    However, in genral scenarios you can use it as below :
    In this scenario, we are putting data from 3 internal table to another single internal table.
    LOOP AT T_PRGEN INTO WA_PRGEN.
           WA_FINAL-GUID_PR       = WA_PRGEN-GUID_PR.
           WA_FINAL-ATTR20A       = WA_PRGEN-ATTR20A.
           WA_FINAL-ATTR05A       = WA_PRGEN-ATTR05A.
           WA_FINAL-ATTR05B       = WA_PRGEN-ATTR05B.
           WA_FINAL-ATTR05C       = WA_PRGEN-ATTR05C. " + DG1K902190
           WA_FINAL-ATTR10A       = WA_PRGEN-ATTR10A.
        READ TABLE T_V_TCAV201 INTO WA_V_TCAV201 WITH KEY ATTRV20 = WA_PRGEN-ATTR20A BINARY SEARCH.
        IF SY-SUBRC = 0.
          WA_FINAL-TEXT1   = WA_V_TCAV201-TEXT1.    "SUBID-TEXT1
        ENDIF.
        READ TABLE T_PNTPR INTO WA_PNTPR WITH KEY GUID_PR = WA_PRGEN-GUID_PR BINARY SEARCH.
        IF SY-SUBRC = 0.
           WA_FINAL-PRVSY  = WA_PNTPR-PRVSY.   "PROD NO
           WA_FINAL-GRVSY  = WA_PNTPR-GRVSY.   "LOGICAL SYS GROUP
        ENDIF.
      append wa_final to t_final.
    endloop.

  • How to use the select option to get the multiple bom explosion

    hi friends,
              i have completed the bom exp using parameters to get one material
    input,but i need to adopt select option to give from and to materials
    i ll gives from and to materials with description and bom deails
    i here gave the coding also, pl give me a suggestion how to adpot the select
    optoins instead of parameters ,very urgent
    REPORT PP_BOM_EXPLOSION.
    tables :mara,marc,stpo.
    TYPE-POOLS : SLIS.
    *parameters: p_werks like t001w-werks obligatory.
    SELECT-OPTIONS : p_matnr FOR mara-matnr obligatory.
    **select-options : p_matnr for mara-matnr obligatory.
    PARAMETERS : P_WERKS LIKE T001W-WERKS OBLIGATORY,
            P_MATNR LIKE MARA-MATNR OBLIGATORY.
    *parameters: p_werks like marc-werks obligatory,
    *p_matnr like marc-matnr obligatory.
    constants c_x value 'X'.
    data: begin of it_comp occurs 0,
    matnr like mara-matnr,
    maktl like makt-maktx,
    idnrk like stpox-idnrk,
    ojtxp like stpox-ojtxp,
    menge like stpox-menge,
    meins like stpox-meins,
    matkl like stpox-matmk,
    end of it_comp.
    data : topmat like cstmat.
    data: w_topmat like cstmat.
    DATA : IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : WA_FIELDCAT_LN LIKE LINE OF IT_FIELDCAT.
    DATA : IT_EVENTCAT  TYPE SLIS_T_EVENT.
    DATA : WA_EVENTCAT_LN  LIKE LINE OF IT_EVENTCAT.
    DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: S_COL_POS TYPE I.
    start-of-selection.
    perform explode_assembly.
    PERFORM BUILD_FIELDCATALOG.
    PERFORM DATA_DISPLAY.
    *end-of-selection.
    *perform write_report.
    *top-of-page.
    *perform print_header.
    *form print_header.
    *write: /(18) 'Component'(h00),
    *(40) 'Description'(h01),
    *'Mat.Group'(h02),
    *(18) 'Quantity'(h03).
    *uline.
    *endform.
    *form write_report.
    *write: / w_topmat-matnr under text-h00 color col_heading,
    *w_topmat-maktx under text-h01 color col_heading.
    *loop at it_comp.
    *write: /
    *it_comp-idnrk under text-h00,
    *it_comp-ojtxp under text-h01,
    *it_comp-matkl under text-h02,
    *it_comp-menge unit it_comp-meins under text-h03,
    *it_comp-meins.
    *endloop.
    *uline.
    *endform.
    form explode_assembly.
    data: it_stb like stpox occurs 0 with header line,
    it_stb2 like stpox occurs 0 with header line,
    it_stb3 like stpox occurs 0 with header line,
    w_msg(255) type c.
    SELECT MATNR FROM MARA INTO CORRESPONDING FIELDS OF TABLE IT_MARA
                               WHERE MATNR IN P_MATNR.
    Explode highest level:
    *LOOP AT IT_MARA.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    auskz = c_x
    capid = 'PP01'
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    BGIXO = c_x
    MKMAT = c_x
    MMAPS = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = P_MATNR
    werks = p_werks
    importing
    topmat = w_topmat
    tables
    stb = it_stb
    exceptions
    alt_not_found = 1
    call_invalid = 2
    material_not_found = 3
    missing_authorization = 4
    no_bom_found = 5
    no_plant_data = 6
    no_suitable_bom_found = 7
    conversion_error = 8
    others = 9.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    into w_msg.
    *write: / w_msg.
    exit.
    endif.
    Don't process documents
    delete it_stb where idnrk is initial.
    Don't process valid from furure:
    delete it_stb where datuv >= sy-datum.
    Explode phantom assemblies up to last level
    *do.
    it_stb2[] = it_stb[].
    *delete it_stb2 where dumps is initial.
    *if it_stb2[] is initial.
    *exit.
    *endif.
    *delete it_stb where not dumps is initial.
    delete it_stb where VPRSV <> 'S' OR MMSTA = '61'.
    loop at it_stb2.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    capid = 'PP01'
    auskz = c_x
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = it_stb2-idnrk
    werks = p_werks
    tables
    stb = it_stb3
    exceptions
    alt_not_found = 1
    call_invalid = 2
    material_not_found = 3
    missing_authorization = 4
    no_bom_found = 5
    no_plant_data = 6
    no_suitable_bom_found = 7
    conversion_error = 8
    others = 9.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    into w_msg.
    *write: / w_msg.
    else.
    delete it_stb3 where idnrk is initial.
    delete it_Stb3 where sobsl = 50.
    loop at it_stb3 .
    multiply it_stb3-menge by it_stb2-menge.
    modify it_stb3 transporting menge.
    endloop.
    append lines of it_stb3 to it_stb.
    endif.
    *ENDLOOP.
    endloop.
    *enddo.
    Build table of components collecting the same components from
    all levels
    loop at it_stb.
    it_comp-matkl = it_stb-matmk.
    it_comp-idnrk = it_stb-idnrk.
    it_comp-ojtxp = it_stb-ojtxp.
    it_comp-menge = it_stb-menge.
      CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT'
        EXPORTING
        INPUT                = IT_STB-MEINS
        LANGUAGE             = SY-LANGU
        IMPORTING
      LONG_TEXT            =
       OUTPUT               = IT_STB-MEINS
      SHORT_TEXT           =
    EXCEPTIONS
       UNIT_NOT_FOUND       = 1
       OTHERS               = 2
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    it_comp-meins = it_stb-meins.
    collect it_comp.
    clear it_comp.
    endloop.
    *READ TABLE IT_COMP INDEX 1.
    *IF SY-SUBRC = 0.
    IT_COMP-MATNR = w_topmat-matnr.
    IT_COMP-MAKTL = w_topmat-maktx.
    INSERT IT_COMP index 1.
    *ENDIF.
    ENDFORM.
    FORM TO APPEND DATA INTO ALV FORM
    FORM BUILD_FIELDCATALOG.
    PERFORM BUILD_FIELDCAT USING 'MATKL' 'Component'.
    PERFORM BUILD_FIELDCAT USING 'MATKL' 'Component'.
    *loop at it_comp.
       PERFORM BUILD_FIELDCAT USING 'MATNR' 'Material'.
      PERFORM BUILD_FIELDCAT USING 'MAKTL' 'Material Description'.
      PERFORM BUILD_FIELDCAT USING 'IDNRK' 'Component'.
      PERFORM BUILD_FIELDCAT USING 'OJTXP' 'Description'.
      PERFORM BUILD_FIELDCAT USING 'MATKL' 'Material Group'.
      PERFORM BUILD_FIELDCAT USING 'MENGE'  'Quantity'.
      PERFORM BUILD_FIELDCAT USING 'MEINS' 'Unit Of MEASUREMENT'.
    *endloop.
    ENDFORM.
    FORM TO BUILD IN FIELD CATALOG FOR ALV FORM
    FORM BUILD_FIELDCAT USING L_FIELDNAME LIKE DD03L-FIELDNAME S_TEXT LIKE DD03P-SCRTEXT_M.
      CLEAR WA_FIELDCAT_LN.
      ADD 1 TO S_COL_POS.
      WA_FIELDCAT_LN-REF_TABNAME  = 'IT_COMP'.
      WA_FIELDCAT_LN-FIELDNAME    = L_FIELDNAME.
      WA_FIELDCAT_LN-SELTEXT_M    = S_TEXT.
      WA_FIELDCAT_LN-COL_POS      = S_COL_POS.
      WA_FIELDCAT_LN-QFIELDNAME   = SPACE.
      WA_FIELDCAT_LN-HOTSPOT      = SPACE.
      WA_FIELDCAT_LN-JUST         = 'R'.
      APPEND WA_FIELDCAT_LN TO IT_FIELDCAT.
    ENDFORM.
    FORM TO BUILD IN FIELD CATALOG FOR ALV FORM
    FORM DATA_DISPLAY.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = TEXT-001
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = IT_FIELDCAT
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_COMP
       EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.
    Thanks in advance
                                                                                    Regards
    senthilkumar D

    tables :mara,marc,stpo.
    parameters: p_werks like t001w-werks obligatory.
    *p_matnr like mara-matnr obligatory.
    *select-options : p_matnr for mara-matnr obligatory.
    select-options : P_matnr for mara-matnr.
    *parameters: p_werks like marc-werks obligatory,
    *p_matnr like marc-matnr obligatory.
    constants c_x value 'X'.
    data: begin of it_comp occurs 0,
    idnrk like stpox-idnrk,
    ojtxp like stpox-ojtxp,
    menge like stpox-menge,
    meins like stpox-meins,
    matkl like stpox-matmk,
    end of it_comp.
    data: w_topmat like cstmat.
    data : begin of itab occurs 0,
            matnr like mara-matnr,
            end of itab.
    *data : itab type table of mara with header line.
    start-of-selection.
    perform explode_assembly.
    end-of-selection.
    perform write_report.
    top-of-page.
    perform print_header.
    form print_header.
    write: /(18) 'Component'(h00),
    (40) 'Description'(h01),
    'Mat.Group'(h02),
    (18) 'Quantity'(h03).
    uline.
    endform.
    form write_report.
    write: / w_topmat-matnr under text-h00 color col_heading,
    w_topmat-maktx under text-h01 color col_heading.
    loop at it_comp.
    write: /
    it_comp-idnrk under text-h00,
    it_comp-ojtxp under text-h01,
    it_comp-matkl under text-h02,
    it_comp-menge unit it_comp-meins under text-h03,
    it_comp-meins.
    endloop.
    uline.
    endform.
    form explode_assembly.
    data: it_stb like stpox occurs 0 with header line,
    it_stb2 like stpox occurs 0 with header line,
    it_stb3 like stpox occurs 0 with header line,
    w_msg(255) type c.
    select matnr from mara into table itab where matnr  between p_matnr-low and p_matnr-high.
    loop at p_matnr.
      itab-matnr = p_matnr-low.
       append itab.
       itab-matnr = p_matnr-high.
       append itab.
       clear itab.
       endloop.
    Explode highest level:
    loop at itab.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    auskz = c_x
    capid = 'PP01'
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    BGIXO = c_x
    MKMAT = c_x
    MMAPS = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = itab-matnr
    werks = p_werks
    importing
    topmat = w_topmat
    tables
    stb = it_stb
    exceptions
    alt_not_found = 1
    call_invalid = 2
    material_not_found = 3
    missing_authorization = 4
    no_bom_found = 5
    no_plant_data = 6
    no_suitable_bom_found = 7
    conversion_error = 8
    others = 9.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    into w_msg.
    write: / w_msg.
    exit.
    *else.
    endif.
    loop at it_stb.
    it_comp-matkl = it_stb-matmk.
    it_comp-idnrk = it_stb-idnrk.
    it_comp-ojtxp = it_stb-ojtxp.
    it_comp-menge = it_stb-menge.
    it_comp-meins = it_stb-meins.
    collect it_comp.
    clear it_comp.
    endloop.
    endloop.
    endform.
    i got the low and high from selectoption and then move it into itab.
    then i pass itab-matnr into fm. using loop.
    but i got only one output
    but ineet to got from and to output.
    give me a solution
    Regards
    ds

  • How to use Reader Extensions - or do I need Livecycle?

    I'll start with saying that I am totally new to Livecycle. I've downloaded a demo of Designer to see if it helps with some of the processes I am currently doing in Acrobat.
    The only tool I really NEED from Livecycle is the ability to have the end user attach a file in Reader. This would be managers attaching supporting documents for employee evaluations.
    I've found that this can be done with Read Extensions but I have no idea how to enable my form to use these or how to even start.
    Where can I get a tutorial for this process OR is this more than I need to be doing JUST to have attachments enabled in Reader.
    Thanks!

    Reader users can attach files as comments, either to an AcroForm or a static XFA form. The type of attachments you're asking about can only be enabled in Reader with LiveCycle Reader Extensions, which is entirely different than LiveCycle Designer and costs quite a bit more. The only other place you can get it is through DataLogics with their Adobe PDF Java Toolkit: http://www.datalogics.com/products/pdf/pdfjt/
    See if attaching files as comments is sufficient though. An alternative would be for the managers to use Acrobat. Standard is sufficient.

  • How to use viewslifetime managed property to get the list of sites which are least accessed?

    Hi,<o:p></o:p>
    I am trying to get the subsites of a site collection which are least accessed. I am using ViewsLifeTime managed property in a content search web part with a condition like this:
    ViewsLifeTime < 0
    OR
    ViewsLifeTime = 0.
    However, It is not giving any results. I even tried with ViewsLifeTime < 10. I have some subsites which are accessed less than 10 times. I came to know this when I saw the value of ViewsLifeTime
    property.
    Can anyone suggest how to add a condition on ViewsLifeTime property?
    Thanks in advance.

    Hi Mohan,
    Here is a thread with similar issue for your reference:
    http://social.technet.microsoft.com/Forums/en-US/770f100d-eadb-45d1-9305-15f11cf9038d/ctxcurrentitemviewslifetime-is-showing-null?forum=sharepointsearch 
    If you would like to get site usage report in SharePoint 2013, there is OOTB feature for you to view popular trends report for a site, you could refer to the link below:
    http://blogs.technet.com/b/tothesharepoint/archive/2014/01/28/view-and-configure-usage-analytics-reports-in-sharepoint-server-2013.aspx
    In addition, custom script for usage report for SharePoint sites might be more helpful to your requirement to know access times:
    http://blog.falchionconsulting.com/index.php/tag/audit/
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for

  • End routine to populate Info-cube.

    Hi , Is it possible to load fileds of a Info-cube using End routines in the following scenairos. 1.Loading fields of info-cube by referencing/using a master data table in End routine. 2.Loading fields of info-cube by referencing/using a DSO fields  i

  • Two tables in one? OR convert an entity between two tables OR one identity

    Hello. we have two container entities with children, each on different tables. we want to be able to have a container start as either type, have children of either type and be able to be "converted" to the other kind. if they are stored seperately, t

  • Is oracle bpm studio free downloadable or we need to buy license?

    Is oracle bpm studio free downloadable or we need to buy license?

  • How to test flash remoting?

    I am using cf 7.0.2.I want to use coldfusion remoting. Please let me know if I need install other software and how to make it work. I also need to know how to test the function.Thanks Mark

  • Project date

    Hi Gurus, Currently my plant is facing problems in planned order side. The following are my queries: 1.We have huge backlock and for that reason we are moving dates in T.code CJ20N top level assembly. Whenever we change the dates in toplevel assembly