Plz chk the code wats wrong in it

hi
i m having itab with vbeln
and ztable with objnr and ordsent.
where objnr and vbeln are equal
so now when i find objnr EQ vbeln i have to modify the ztable-ordsent = ' '.
i have writen the followin code
LOOP AT lt_ztsd2marc INTO ls_ztsd2marc.
    READ TABLE ct_success INTO ls_success WITH KEY ordnr =
    ls_ztsd2marc-ordnr.
    IF sy-subrc EQ 0.
      ls_ztsd2marc-ordsent = ' '.
      MODIFY TABLE lt_ztsd2marc FROM ls_ztsd2marc TRANSPORTING ordsent .
      MODIFY ztsd2marc FROM TABLE lt_ztsd2marc.
      IF sy-subrc EQ 0.
        MESSAGE s112(z2).
      ENDIF.
    ENDIF.
  ENDLOOP.
its updating it in work area but the changes are not gettin reflected in the internal table and not even in my ztable ztsd2marc.
plz tell me wat is wrong in this code?

hi..
jus try the code below.. it'll def give the solution to ur question.
i've jus modified little of ur code that u posted.
LOOP AT lt_ztsd2marc INTO ls_ztsd2marc.
READ TABLE ct_success INTO ls_success WITH KEY ordnr =
ls_ztsd2marc-ordnr.
IF sy-subrc EQ 0.
ls_ztsd2marc-ordsent = ' '.
MODIFY TABLE lt_ztsd2marc FROM ls_ztsd2marc TRANSPORTING ordsent
where ordnr = ls_ztsd2marc-ordnr .
**MODIFY ztsd2marc FROM TABLE lt_ztsd2marc.
update ztsd2marc set ordsent = it_ztsd2marc-orsent
where ordnr = it_ztsd2marc-ordnr.
IF sy-subrc EQ 0.
MESSAGE s112(z2).
ENDIF.
ENDIF.
ENDLOOP.
all the best

Similar Messages

  • Converting output list to pdf ... plz chk the code....

    hi
        can any one execute the following code n tell me y its not workin...
    actually the file is getting downloaded and it opens by excel but not with the pdf.
    REPORT  z_output_pdf.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA:wa_ekpo TYPE t_ekpo,
    p_repid LIKE sy-repid,
        it_ekpo TYPE STANDARD TABLE OF t_ekpo.
    DATA : lv_repid TYPE sy-repid,
            lv_uname TYPE sy-uname.
    data:
      mstr_print_parms like pri_params,
      mc_valid(1)      type c,
      mi_bytecount     type i,
      mi_length        type i.
    data:
      mtab_pdf    like tline occurs 0 with header line,
      mc_filename like rlgrap-filename.
    lv_repid = sy-repid.
    lv_uname = sy-uname.
    SELECT ebeln matnr
    FROM ekpo
    INTO TABLE it_ekpo.
    LOOP AT it_ekpo INTO wa_ekpo.
      WRITE :/ wa_ekpo-ebeln, wa_ekpo-matnr.
    ENDLOOP.
    DATA: print_parameters TYPE pri_params,
            valid_flag(1) TYPE c,
            mi_rqident    LIKE tsp01-rqident.
    DATA:  p_linsz TYPE sy-linsz VALUE 132, " Line size
      p_paart TYPE sy-paart VALUE 'X_65_132'.  " Paper Format
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      IMPORTING
        out_parameters       = print_parameters
        valid                = valid_flag
      EXCEPTIONS
        invalid_print_params = 2
        OTHERS               = 4.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
    print_parameters-linsz = p_linsz.
    print_parameters-paart = p_paart.
        print_parameters-pdest = 'LOCL'.
    *SUBMIT (lv_repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                    SPOOL PARAMETERS print_parameters
                    VIA SELECTION-SCREEN
                    AND RETURN.
    *IF sy-subrc  <> 0.
    WRITE :' error'.
    *ENDIF.
    *-- Find out what the spool number is that was just created
    PERFORM get_spool_number USING lv_repid
               lv_uname
      CHANGING mi_rqident.
    *-- Convert Spool to PDF
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid = mi_rqident
          no_dialog  = space
          dst_device = print_parameters-pdest
        importing
          pdf_bytecount                  = mi_bytecount
        tables
          pdf        = mtab_pdf
        exceptions
          err_no_abap_spooljob           = 1
          err_no_spooljob                = 2
          err_no_permission              = 3
          err_conv_not_possible          = 4
          err_bad_destdevice             = 5
          user_cancelled                 = 6
          err_spoolerror                 = 7
          err_temseerror                 = 8
          err_btcjob_open_failed         = 9
          err_btcjob_submit_failed       = 10
          err_btcjob_close_failed        = 11
          others     = 12.
    call function 'DOWNLOAD'
         exporting
              bin_filesize            = mi_bytecount
              filename                = mc_filename
             filetype                = 'BIN'
         importing
              act_filename            = mc_filename
         tables
              data_tab                = it_ekpo.
      write :' ============'.
          FORM get_spool_number *
          Get the most recent spool created by user/report              *
    -->  F_REPID               *
    -->  F_UNAME               *
    -->  F_RQIDENT             *
    FORM get_spool_number USING f_repid
         f_uname
                    CHANGING f_rqident.
      DATA:
        lc_rq2name LIKE tsp01-rq2name.
      CONCATENATE f_repid+0(8)
                  f_uname+0(3)
        INTO lc_rq2name SEPARATED BY '_'.
      DATA : ls_tsp01 TYPE tsp01,
            lt_tsp01 TYPE TABLE OF tsp01.
      SELECT * FROM tsp01
      INTO TABLE lt_tsp01
      WHERE  rq2name = lc_rq2name
      ORDER BY rqcretime DESCENDING.
      LOOP AT lt_tsp01 INTO ls_tsp01.
        f_rqident = ls_tsp01-rqident.
        EXIT.
      ENDLOOP.
    SELECT * FROM tsp01 WHERE  rq2name = lc_rq2name
    ORDER BY rqcretime DESCENDING.
       f_rqident = tsp01-rqident.
       EXIT.
    ENDSELECT.
      IF sy-subrc NE 0.
        CLEAR f_rqident.
      ENDIF.
    ENDFORM." get_spool_number
    plz chk n tell me where its goin wrong....
    Message was edited by:
            neha gupta

    Hi neha,
    i do it in this way:
    REPORT ZGRO_ITAB_PDF_SPOOL.
    DATA: BEGIN OF ITAB OCCURS 0,
             TEXT(72),
          END   OF ITAB.
    Länge der PDF-Datei in Byte
    DATA: PDF_FILESIZE TYPE I.
    DATA: BIN_FILESIZE TYPE I.
    Druckparameter mit Gültigkeit
    DATA: PARAMS      LIKE PRI_PARAMS,
          VALID       TYPE C.
    Spoolnummer
    DATA: SPOOL_NR     LIKE TSP01-RQIDENT,
          SPOOL_NR_DEL LIKE TSP01_SP0R-RQID_CHAR.
    PDF Ausgabetabelle
    DATA: BEGIN OF PDF_OUTPUT OCCURS 0.
            INCLUDE STRUCTURE TLINE.
    DATA: END   OF PDF_OUTPUT.
    DATA: PROGRAM(128) TYPE C.
    DATA: DATEI TYPE STRING VALUE 'D:TESTPDF.PDF'.
    DATA: APPL  TYPE STRING.
    START-OF-SELECTION.
    Druckparameter besorgen (hier für LOCA)
    Line-size sollte entsprechende der Ausgabe gesetzt werden
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          DESTINATION    = 'LOCA'
          LINE_SIZE      = 080
          IMMEDIATELY    = ' '
          NO_DIALOG      = 'X'
        IMPORTING
          OUT_PARAMETERS = PARAMS
          VALID          = VALID.
      CHECK VALID <> SPACE.
    Versorgen der internen Tabelle
      READ REPORT 'ZGRO_ITAB_PDF_SPOOL' INTO ITAB.
    Ausgabe der internen Tabelle mit den Druckparametern.
      NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG NO-TITLE NO-HEADING.
      LOOP AT ITAB.
        WRITE:/ ITAB.
      ENDLOOP.
      NEW-PAGE PRINT OFF.
    Spoolnummer besorgen
      SPOOL_NR = SY-SPONO.
    Konvertierung der Ausgabe nach PDF
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = SPOOL_NR
        IMPORTING
          PDF_BYTECOUNT            = PDF_FILESIZE
        TABLES
          PDF                      = PDF_OUTPUT
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 9
          ERR_BTCJOB_SUBMIT_FAILED = 10
          ERR_BTCJOB_CLOSE_FAILED  = 11
          OTHERS                   = 12.
      CHECK SY-SUBRC = 0.
      SPOOL_NR_DEL = SPOOL_NR.
    Spool wieder löschen
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
        EXPORTING
          SPOOLID = SPOOL_NR_DEL.
      BIN_FILESIZE = PDF_FILESIZE.
    Download der Spools
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
          BIN_FILESIZE = BIN_FILESIZE
          FILENAME     = DATEI
          FILETYPE     = 'BIN'
        CHANGING
          DATA_TAB     = PDF_OUTPUT[].
    Programmpfad auf PC für PDF ermitteln
      CALL FUNCTION 'SO_PROGNAME_GET_WITH_PATH'
        EXPORTING
          DOCTYPE           = 'PDF'
        IMPORTING
          PATHNAME          = PROGRAM
        EXCEPTIONS
          PATH_NOT_FOUND    = 1
          PROGRAM_NOT_FOUND = 2
          NO_BATCH          = 3
          X_ERROR           = 4
          OTHERS            = 5.
    PDF ausführen
      APPL = PROGRAM.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
        EXPORTING
          PARAMETER   = DATEI
          APPLICATION = APPL.
    Programmende                                                        *
    Regards, Dieter

  • Plz chk the code

    ==================================
    PERFORM get_spool_number USING sy-repid
               sy-uname
      CHANGING mi_rqident.
    =====================================
    FORM get_spool_number USING f_repid
         f_uname
                    CHANGING f_rqident.
      DATA:
        lc_rq2name LIKE tsp01-rq2name.
      CONCATENATE f_repid+0(8)
                  f_uname+0(3)
        INTO lc_rq2name SEPARATED BY '_'.
      SELECT rqident FROM tsp01 WHERE  rq2name = lc_rq2name
      ORDER BY rqcretime DESCENDING.
        f_rqident = tsp01-rqident.
        EXIT.
      ENDSELECT.
      IF sy-subrc NE 0.
        CLEAR f_rqident.
      ENDIF.
    ENDFORM." get_spool_number
    Field list without INTO clause is not allowed . allowed. . allowed. .     
    is the error i m getting   when i activate it..
    what is the error in  select query....

    Hi,
    try this
    ==================================
    PERFORM get_spool_number USING sy-repid
    sy-uname
    CHANGING mi_rqident.
    =====================================
    FORM get_spool_number USING f_repid
    f_uname
    CHANGING f_rqident.
    DATA: lc_rq2name LIKE tsp01-rq2name.
    CONCATENATE f_repid+0(8) f_uname+0(3)
    INTO lc_rq2name SEPARATED BY '_'.
    SELECT rqident INTO tsp01-rqident FROM tsp01
    WHERE rq2name = lc_rq2name
    ORDER BY rqcretime DESCENDING.
    f_rqident = tsp01-rqident.
    EXIT.
    ENDSELECT.
    IF sy-subrc NE 0.
    CLEAR f_rqident.
    ENDIF.
    ENDFORM." get_spool_number
    Make sure that u have declared teh TABLES: tsp01.
    Hope thsi solves ur problem.
    Reward points and close the thread if ur problem got solved.

  • A few days ago I bought my first IMAC. I needed to download Mountain Lion, and I would get it for free as it's a new IMAC. Apple sent me a 'content code' - several times - because every time I enter it, it says the code is wrong.

    A few days ago I bought my first IMAC. I needed to download Mountain Lion, and I would get it for free as it's a new IMAC. Apple sent me a 'content code' - several times - because every time I enter it, it says the code is wrong.

    Sorry to ask, but is it case sensitive?
    Otherwise best to contact support and register a ticket: http://www.apple.com/support/contact/

  • HT1349 I got an itunes card from my hubby and it will not work it says the code is wrong:(

    I got this gift card and it keeps telling me the code is wrong on the card so I do not know how to redeem it?

    Kat..
    Try here >  iTunes Store: Invalid, inactive, or illegible codes

  • SAX problem(plz see the code given)

    hi all,
    i am using SAX parser for validating my xml file against the dtd,i am getting some errors that i am not able to make out.cud u plz help me.i am sending u my files.
    ------------------------java file------------------------------------
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class Echo extends DefaultHandler
    public static void main(String argv[]){
    if (argv.length != 1) {
    System.err.println("Usage: cmd filename");
    System.exit(1);
    // Use an instance of ourselves as the SAX event handler
    //DefaultHandler handler=new DefaultHandler();
    Echo handler=new Echo();
    // Use the default (non-validating) parser
    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setValidating(true);
    try {
    // Set up output stream
    out = new OutputStreamWriter(System.out, "UTF8");
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse( new File(argv[0]), handler );
    catch (SAXParseException spe) {
    // Error generated by the parser
    System.out.println("\n** Parsing error"
    + ", line " + spe.getLineNumber()
    + ", uri " + spe.getSystemId());
    System.out.println(" " + spe.getMessage() );
    }catch (Throwable t){
    t.printStackTrace();
    System.exit(0);
    static private Writer out;
    public void startDocument()
    throws SAXException{
    emit("<?xml version='1.0' encoding='UTF-8'?>");
    nl();
    public void endDocument()
    throws SAXException{
    try {
    nl();
    out.flush();
    }catch (IOException e) {
    throw new SAXException("I/O error", e);
    public void startElement(String namespaceURI,
    String sName, // simple name (localName)
    String qName, // qualified name
    Attributes attrs)
    throws SAXException
    String eName = sName; // element name
    if ("".equals(eName)) eName = qName; // namespaceAware = false
    emit("<"+eName);
    if (attrs != null) {
    for (int i = 0; i < attrs.getLength(); i++) {
    String aName = attrs.getLocalName(i); // Attr name
    if ("".equals(aName)) aName = attrs.getQName(i);
    emit(" ");
    emit(aName+"=\""+attrs.getValue(i)+"\"");
    emit(">");
    public void endElement(String namespaceURI,
    String sName, // simple name
    String qName // qualified name
    throws SAXException
    emit("</"+qName+">");
    public void characters(char buf[], int offset, int len)
    throws SAXException
    String s = new String(buf, offset, len);
    emit(s);
    public void ignorableWhitespace(char buf[], int offset, int Len)
    throws SAXException
    nl();
    //emit("IGNORABLE");
    private void emit(String s)
    throws SAXException
    try {
    out.write(s);
    out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    private void nl()
    throws SAXException
    String lineEnd = System.getProperty("line.separator");
    try {
    out.write(lineEnd);
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    public void error(SAXParseException e)
    throws SAXParseException
    throw e;
    public void warning(SAXParseException e)throws SAXParseException{
    System.out.println("WARNING : Line Number:- "+e.getLineNumber());
    System.out.println("WARNING : Column Number:- "+e.getColumnNumber());
    System.out.println("WARNING : System ID:- "+e.getSystemId());
    System.out.println("WARNING : Public Number:- "+e.getPublicId());
    --------------------------xml file------------------------------------
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE slideshow SYSTEM "echo.dtd">
    <!-- A SAMPLE set of slides -->
    <slideshow
    title="Sample Slide Show"
    date="Date of publication"
    author="Yours Truly"
    >
    <![CDATA[Digram : frobmorten <------------ fuznaten
    | <3> ^
    | <1> | <1> = fozzle
    V | <2> = framboze
    Staten+ <3> = frenzle
    <2>
    ]]>
    <!-- TITLE SLIDE -->
    <slide type="all">
    <image src="my.gif" alt="this is my pic" type="image/gif"/>
    <title>Wake up to WonderWidgets!</title>
    </slide>
    <!-- OVERVIEW -->
    <slide type="all">
    <title>Overview</title>
    <item>WonderWidgets are great</item>
    <item/>
    <item>Who buys WonderWidgets</item>
    </slide>
    <slide type="all">
    <title>Overview</title>
    <item>Who buys WonderWidgets</item>
    </slide>
    </slideshow>
    -----------------------------dtd file---------------------------------
    <!ELEMENT slideshow (slide+)>
    <!ATTLIST slideshow
    title CDATA #IMPLIED
    date CDATA #IMPLIED
    author CDATA #IMPLIED
    >
    <!ELEMENT slide (image?,title, item*)>
    <!ATTLIST slide type CDATA #IMPLIED>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT item (#PCDATA | item)* >
    <!ELEMENT image EMPTY>
    <!ATTLIST image
    alt CDATA #IMPLIED
    src CDATA #REQUIRED
    type CDATA "image/gif"
    >
    -----------------------ERROR I AM GETTING IS--------------------------
    <?xml version='1.0' encoding='UTF-8'?>
    <slideshow title="Sample Slide Show" date="Date of publication" author="Yours Tr
    uly">
    Digram : frobmorten <------------ fuznaten
    | <3> ^
    | <1> | <1> = fozzle
    V | <2> = framboze
    Staten+ <3> = frenzle
    <2>
    <slide type="all">
    <image src="my.gif" alt="this is my pic" type="image/gif"></image>
    <title>Wake up to WonderWidgets!</title>
    </slide>
    <slide type="all">
    <title>Overview</title>
    <item>WonderWidgets are great</item>
    <item></item>
    <item>Who buys WonderWidgets</item>
    </slide>
    <slide type="all">
    <title>Overview</title>
    <item>Who buys WonderWidgets</item>
    </slide>
    org.xml.sax.SAXException: The content of element type "slideshow" must m
    atch "(slide)+".
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
    ava:979)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at Echo.main(Echo.java:28)
    with my lot efforts i am not able to make out where i am wrong,plz do have a look on the codes.
    thanx in advance
    best regards
    anshul

    Hi i have consulted the XML spec and it is not possible to have a CDATA section as element content. A element declaration can have only content that is empty, ANY (i.e. can include any other declared elements in DTD), mixed (i.e. can contain PCDATA or child elements, or child elements. An element cannot include any character data which CDATA represents. i.e it is not valid to do <!ELEMENT slideshow CDATA>
    The CDATA can only be used with an attribute declaration. Regard CDATA as a type definition for any attribute variables.
    So what do i suggest. You could declare a separate element which has an attribute for the CDATA section
    <!ELEMENT input (Name)>
    <!ATTLIST input instructions CDATA #REQUIRED>
    hope this helps.

  • Plz check the code

    Hi all,
    Friends please tell me what is the problem with this code.....
    It is not giving what i want.......
    I want only that row in the table to have orange background which contains the value 'check'..
    but what it does is that it sets all the other rows as orange too....
    but when i select all the rows in the table.....it does show the color of the cell which contains 'check' and the color of the rest of the cells which are set to highlight color...
    please chk the following code and let me know if there is any error...
    public class ErrorEntryCellRenderer extends DefaultTableCellRenderer {
        /** Creates a new instance of ErrorEntryCellRenderer */
        public ErrorEntryCellRenderer() {
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            Component retValue;
            retValue = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            if(value instanceof String) {
                if(((String)value).equalsIgnoreCase("check")) {
                    setBackground(Color.ORANGE);
                    validate();
            return retValue;
    }Thank you..
    Message was edited by:
    vaibhavpingle

    it doesnt work then...it does not paint any thing......
    i did the following changes
    public Component getTableCellRendererComponent(JTable table, Color c, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            Component retValue;
            retValue = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            if(value instanceof String) {
                if(((String)value).equalsIgnoreCase("check")) {
                    setBackground(Color.ORANGE);
                    validate();
                } else {
                    setBackground(c);
                    validate();
            return retValue;
        }

  • The code is wrong

    I am using CS3 which has AS3 and i want my button to play a
    movie clip at a specified coordinate when clicked on. the button is
    called: doc_butt (thats the instance name) the movie clip is
    called: docpatient (may need an instance name(someone told me it
    needed to be in the display menu, but i don't know where that is))
    and the code is as follows. Please tell me where i went
    wrong.

    Kat..
    Try here >  iTunes Store: Invalid, inactive, or illegible codes

  • Plz explain the code

    REPORT zfi_vendor_ageing
    NO STANDARD PAGE HEADING
    LINE-COUNT 58
    line-size 168
    MESSAGE-ID zh_msg.
    D A T A B A S E T A B L E S D E C L A R A T I O N
    TABLES: lfa1, " Vendor Master (General)
    t001, " Company Codes
    rfpdo.
    I N T E R N A L T A B L E S D E C L A R A T I O N S *
    Internal Table for Vendor Open Items Data
    DATA: BEGIN OF int_bsik OCCURS 0,
    lifnr LIKE bsik-lifnr, " Vendor Number
    name1 LIKE lfa1-name1, " Vendor Name
    shkzg LIKE bsik-shkzg, " Dr/Cr Indicator
    belnr LIKE bsik-belnr, " Document Number
    xblnr LIKE bsik-xblnr, " Ref Doc No
    blart LIKE bsik-blart, " Document Type
    zfbdt LIKE bsik-zfbdt, " Base Line Date
    zbd1t LIKE bsik-zbd1t, " Due date1
    zbd2t LIKE bsik-zbd2t, " Due Date2
    zbd3t LIKE bsik-zbd3t, " Due Date3
    waers LIKE bsik-waers, " Currency
    dmbtr LIKE bsik-dmbtr, " Amount in Local Curr
    END OF int_bsik.
    Internal Table for Amounts Sum Up Data
    DATA: BEGIN OF int_final OCCURS 0,
    lifnr LIKE bsik-lifnr, " Vendor Number
    name1 LIKE lfa1-name1, " Vendor Name
    total1 LIKE bsik-dmbtr, " Amount in Local Curr
    total2 LIKE bsik-dmbtr, " Amount in Local Curr
    total3 LIKE bsik-dmbtr, " Amount in Local Curr
    total4 LIKE bsik-dmbtr, " Amount in Local Curr
    total5 LIKE bsik-dmbtr, " Amount in Local Curr
    total6 LIKE bsik-dmbtr, " Amount in Local Curr
    total LIKE bsik-dmbtr, " Amount in Local Curr
    END OF int_final.
    D A T A D E C L A R A T I O N S
    DATA : v_flag, " Flag
    v_gtotal1 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal2 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal3 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal4 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal5 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal6 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal LIKE bsik-dmbtr, " Amount Totals
    v_subtotal1 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal2 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal3 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal4 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal5 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal6 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal LIKE bsik-dmbtr, " Amount Totals
    v_date LIKE bsik-zfbdt, " Due Date
    v_tage1(4), " Age 30 days
    v_tage2(4), " Age 60 days
    v_tage3(4), " Age 90 days
    v_fir(15), " Column Text1
    v_sec(15), " Column Text2
    v_thir(15), " Column Text3
    v_four(17), " Column Text4
    v_fidd(4), " Days field1
    v_sedd(4), " Days field2
    v_thdd(4), " Days field3
    v_fodd(4), " Days field4
    v_str TYPE SY-LISEL, " String
    v_str1(11), " String
    v_tage(3), " String
    v_date1(10). " Date field
    R A N G E D E C L A R A T I O N S
    RANGES: r_date1 FOR bsik-zfbdt, " Date Range 1
    r_date2 FOR bsik-zfbdt, " Date Range 2
    r_date3 FOR bsik-zfbdt, " Date Range 3
    r_date4 FOR bsik-zfbdt. " Date Range 4
    S E L E C T I O N S C R E E N *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr. "Vendor account
    PARAMETERS: p_bukrs LIKE t001-bukrs. "Co. Code
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_allgst LIKE rfpdo-allgstid OBLIGATORY DEFAULT sy-datum.
    "Open items at key date
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_tage1 LIKE rfpdo1-allgfael DEFAULT '30',
    p_tage2 LIKE rfpdo1-allgfael DEFAULT '60',
    p_tage3 LIKE rfpdo1-allgfael DEFAULT '90',
    p_tage4 LIKE rfpdo1-allgfael DEFAULT '120'.
    SELECTION-SCREEN END OF BLOCK b3.
    A T S E L E C T I O N S C R E E N *
    AT SELECTION-SCREEN.
    Validate the screen fields
    PERFORM validate_flds.
    S T A R T O F S E L E C T I O N *
    START-OF-SELECTION.
    Fetch main data
    PERFORM fetch_data.
    T O P O F P A G E
    Header
    TOP-OF-PAGE.
    PERFORM header.
    E N D O F P A G E
    Footer
    END-OF-PAGE.
    ULINE.
    T O P O F P A G E D U R I N G L I N E S E L E C T I O N *
    Top of Page in Secondary List
    TOP-OF-PAGE DURING LINE-SELECTION.
    PERFORM header1.
    A T L I N E S E L E C T I O N *
    AT LINE-SELECTION.
    Perform Line Selections
    PERFORM line_selection.
    E N D O F S E L E C T I O N
    END-OF-SELECTION.
    List generation
    PERFORM basic_list.
    *& Form validate_flds
    Validation of Selection Screen fields
    FORM validate_flds .
    Validate Vendor Code
    CLEAR lfa1-lifnr.
    SELECT lifnr UP TO 1 ROWS
    INTO lfa1-lifnr
    FROM lfa1
    WHERE lifnr IN s_lifnr AND
    spras = sy-langu.
    ENDSELECT.
    IF sy-subrc <> 0.
    MESSAGE e000 WITH 'Invalid Vendor Code range'(023).
    ENDIF.
    Validate Company Code
    CLEAR t001-bukrs.
    SELECT bukrs UP TO 1 ROWS
    INTO t001-bukrs
    FROM t001
    WHERE bukrs = p_bukrs AND
    spras = sy-langu.
    ENDSELECT.
    IF sy-subrc <> 0.
    MESSAGE e021. " Invalid Company Code range
    ENDIF.
    IF ( p_tage1 > p_tage2 ) OR ( p_tage1 > p_tage3 ) OR
    ( p_tage1 > p_tage4 ).
    MESSAGE e999 WITH 'Column 1 greater'(004)
    'than Column# 2 or 3 or 4'(005).
    ENDIF.
    *column 2
    IF ( p_tage2 > p_tage3 ) OR ( p_tage1 > p_tage4 ).
    MESSAGE e999 WITH 'Column 2 greater'(006)
    'than Column# 3 or 4'(007).
    ENDIF.
    *column3
    IF ( p_tage3 > p_tage4 ).
    MESSAGE e999 WITH 'Column 3 greater'(008)
    'than Column#4'(009).
    ENDIF.
    ENDFORM. " validate_flds
    *& Form fetch_data
    Fetching Data from Database Tables
    FORM fetch_data .
    Date Range Population
    r_date1-sign = 'I'.
    r_date1-option = 'BT'.
    r_date1-low = p_allgst.
    r_date1-high = r_date1-low + p_tage1.
    APPEND r_date1.
    r_date2-sign = 'I'.
    r_date2-option = 'BT'.
    r_date2-low = r_date1-high + 1.
    r_date2-high = r_date1-low + p_tage2.
    APPEND r_date2.
    r_date3-sign = 'I'.
    r_date3-option = 'BT'.
    r_date3-low = r_date2-high + 1.
    r_date3-high = r_date1-low + p_tage3.
    APPEND r_date3.
    r_date4-sign = 'I'.
    r_date4-option = 'BT'.
    r_date4-low = r_date3-high + 1.
    r_date4-high = r_date1-low + p_tage4.
    APPEND r_date4.
    Select the Vendor Open Items data from BSIK
    SELECT l~lifnr
    l1~name1
    b~waers
    b~dmbtr
    b~zfbdt
    b~zbd1t
    b~zbd2t
    b~zbd3t
    b~belnr
    b~xblnr
    b~shkzg
    b~blart
    INTO CORRESPONDING FIELDS OF TABLE int_bsik
    FROM lfb1 AS l INNER JOIN lfa1 AS l1
    ON llifnr = l1lifnr
    INNER JOIN bsik AS b
    ON llifnr = blifnr AND
    lbukrs = bbukrs
    WHERE l~lifnr IN s_lifnr AND
    l~bukrs = p_bukrs and
    b~zfbdt le p_allgst.
    IF SY-SUBRC <> 0.
    MESSAGE i000 WITH 'No Data found'(027).
    ENDIF.
    Removing the date limit to get the due items in the past
    DELETE int_bsik WHERE
    ( blart NE 'RE' AND blart NE 'KR' ) OR
    shkzg NE 'H'.
    SORT int_bsik BY lifnr.
    ENDFORM. " fetch_data
    *& Form header
    Display the Report Columns
    FORM header .
    v_tage1 = p_tage1 + 1.
    v_tage2 = p_tage2 + 1.
    v_tage3 = p_tage3 + 1.
    v_fidd = p_tage1.
    v_sedd = p_tage2.
    v_thdd = p_tage3.
    v_fodd = p_tage4.
    MOVE v_fodd0(4) TO v_fodd1(3).
    v_fodd+0(1) = space.
    CONCATENATE '1 to'(010) v_fidd INTO v_fir.
    CONCATENATE v_tage1 ' to '(011) v_sedd INTO v_sec.
    CONCATENATE v_tage2 ' to '(011) v_thdd INTO v_thir.
    CONCATENATE v_tage3 ' to '(011) space v_fodd INTO v_four.
    Standard header
    clear: v_date1, v_str, v_str1, v_tage.
    write p_allgst to v_date1.
    Move p_tage4 to v_tage.
    concatenate '>' v_tage text-025 into v_str1.
    concatenate
    'Summary of Ageing Analysis for Vendor Open Invoices as on'(013)
    v_date1 into v_str separated by space.
    FORMAT COLOR OFF.
    WRITE : /1(168) sy-uline.
    FORMAT COLOR 1 INTENSIFIED.
    WRITE :/1 sy-vline, 13 sy-vline, 49 sy-vline,
    50(101) 'Invoices Due For(In Days)'(014) CENTERED,
    151 sy-vline, 168 sy-vline .
    WRITE :/1 sy-vline, 2(11) 'Vendor#'(015) CENTERED,
    13 sy-vline ,14(35) 'Vendor Name'(016) CENTERED,
    49 sy-vline,
    50(101) sy-uline,151 sy-vline,
    152(16) 'Total'(017) CENTERED,
    168 sy-vline.
    WRITE : /1 sy-vline,13 sy-vline, 49 sy-vline,
    50(16) v_fir CENTERED, 66 sy-vline,
    67(16) v_sec CENTERED, 83 sy-vline,
    84(16) v_thir CENTERED, 100 sy-vline,
    101(16) v_four CENTERED, 117 sy-vline,
    118(16) v_str1 centered, 134 sy-vline,
    135(16) 'Already Overdue'(018) CENTERED,151 sy-vline,
    168 sy-vline.
    FORMAT COLOR OFF.
    WRITE : /1(168) sy-uline.
    ENDFORM. " header
    *& Form basic_list
    Display the Basic List
    FORM basic_list .
    NEW-PAGE LINE-SIZE 168.
    LOOP AT int_bsik.
    CLEAR v_date.
    IF int_bsik-zbd3t <> ' '.
    v_date = int_bsik-zfbdt + int_bsik-zbd3t.
    ELSE.
    IF int_bsik-zbd2t <> ' '.
    v_date = int_bsik-zfbdt + int_bsik-zbd2t.
    ELSE.
    v_date = int_bsik-zfbdt + int_bsik-zbd1t.
    ENDIF.
    ENDIF.
    IF int_bsik-zbd1t = ' '.
    v_date = int_bsik-zfbdt.
    ENDIF.
    IF v_date IN r_date1.
    int_final-total1 = int_final-total1 + int_bsik-dmbtr.
    ELSEIF v_date IN r_date2.
    int_final-total2 = int_final-total2 + int_bsik-dmbtr.
    ELSEIF v_date IN r_date3.
    int_final-total3 = int_final-total3 + int_bsik-dmbtr.
    ELSEIF v_date IN r_date4.
    int_final-total4 = int_final-total4 + int_bsik-dmbtr.
    ELSEif v_date > r_date4-high.
    int_final-total5 = int_final-total5 + int_bsik-dmbtr.
    ELSEif v_date < p_allgst.
    int_final-total6 = int_final-total6 + int_bsik-dmbtr.
    ENDIF.
    AT END OF lifnr.
    v_flag = 1.
    ENDAT.
    IF v_flag = 1.
    int_final-lifnr = int_bsik-lifnr.
    int_final-name1 = int_bsik-name1.
    int_final-total = int_final-total1 + int_final-total2 +
    int_final-total3 + int_final-total4 + int_final-total5 +
    int_final-total6.
    APPEND int_final.
    v_gtotal1 = v_gtotal1 + int_final-total1.
    v_gtotal2 = v_gtotal2 + int_final-total2.
    v_gtotal3 = v_gtotal3 + int_final-total3.
    v_gtotal4 = v_gtotal4 + int_final-total4.
    v_gtotal5 = v_gtotal5 + int_final-total5.
    v_gtotal6 = v_gtotal6 + int_final-total6.
    v_gtotal = v_gtotal + int_final-total.
    WRITE: /1 sy-vline,
    2 int_final-lifnr COLOR 4 INTENSIFIED ON,
    13 sy-vline,
    14 int_final-name1 COLOR 4 INTENSIFIED ON,
    49 sy-vline.
    DATA : v_rem.
    v_rem = sy-tabix MOD 2.
    IF v_rem NE 0.
    FORMAT COLOR 2 INTENSIFIED.
    WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
    66 sy-vline,
    67 int_final-total2 CURRENCY int_bsik-waers,
    83 sy-vline,
    84 int_final-total3 CURRENCY int_bsik-waers,
    100 sy-vline,
    101 int_final-total4 CURRENCY int_bsik-waers,
    117 sy-vline,
    118 int_final-total5 CURRENCY int_bsik-waers,
    134 sy-vline,
    135 int_final-total6 CURRENCY int_bsik-waers,
    151 sy-vline,
    152 int_final-total CURRENCY int_bsik-waers,
    168 sy-vline.
    ELSE.
    WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
    66 sy-vline,
    67 int_final-total2 CURRENCY int_bsik-waers,
    83 sy-vline,
    84 int_final-total3 CURRENCY int_bsik-waers,
    100 sy-vline,
    101 int_final-total4 CURRENCY int_bsik-waers,
    117 sy-vline,
    118 int_final-total5 CURRENCY int_bsik-waers,
    134 sy-vline,
    135 int_final-total6 CURRENCY int_bsik-waers,
    151 sy-vline,
    152 int_final-total CURRENCY int_bsik-waers,
    168 sy-vline.
    ENDIF.
    FORMAT COLOR OFF.
    HIDE int_final.
    CLEAR int_final.
    v_flag = 0.
    ENDIF.
    AT LAST.
    WRITE : /1(168) sy-uline.
    FORMAT COLOR 3 INTENSIFIED.
    WRITE : /1 sy-vline, 2(47) 'GRAND TOTAL'(022) CENTERED,
    49 sy-vline, 50 v_gtotal1 CURRENCY int_bsik-waers,
    66 sy-vline, 67 v_gtotal2 CURRENCY int_bsik-waers,
    83 sy-vline, 84 v_gtotal3 CURRENCY int_bsik-waers,
    100 sy-vline,101 v_gtotal4 CURRENCY int_bsik-waers,
    117 sy-vline,118 v_gtotal5 CURRENCY int_bsik-waers,
    134 sy-vline,135 v_gtotal6 CURRENCY int_bsik-waers,
    151 sy-vline,152 v_gtotal CURRENCY int_bsik-waers,
    168 sy-vline.
    HIDE : v_gtotal1,
    v_gtotal2,
    v_gtotal3,
    v_gtotal4,
    v_gtotal5,
    v_gtotal6,
    v_gtotal.
    ENDAT.
    FORMAT COLOR OFF.
    ENDLOOP.
    WRITE : /1(168) sy-uline.
    ENDFORM. " basic_list
    *& Form line_selection
    When double clicked on the line display the seconday list
    FORM line_selection .
    NEW-PAGE LINE-SIZE 206.
    Sy-lsind = 1.
    DATA : v_rem,v_cnt LIKE sy-tabix.
    v_cnt = 0.
    SORT int_bsik BY belnr zfbdt.
    LOOP AT int_bsik WHERE lifnr EQ int_final-lifnr.
    v_rem = v_cnt MOD 2.
    CLEAR v_date.
    IF int_bsik-zbd3t <> ' '.
    v_date = int_bsik-zfbdt + int_bsik-zbd3t.
    ELSE.
    IF int_bsik-zbd2t <> ' '.
    v_date = int_bsik-zfbdt + int_bsik-zbd2t.
    ELSE.
    v_date = int_bsik-zfbdt + int_bsik-zbd1t.
    ENDIF.
    ENDIF.
    IF int_bsik-zbd1t = ' '.
    v_date = int_bsik-zfbdt.
    ENDIF.
    IF v_rem NE 0.
    format color 2 intensified.
    WRITE :/1 sy-vline, 2 int_bsik-belnr,
    12 sy-vline,13 int_bsik-lifnr,
    23 sy-vline,24 int_bsik-name1,
    59 sy-vline,60 int_bsik-xblnr,
    76 sy-vline,77 int_bsik-zfbdt,
    87 sy-vline.
    WRITE : 104 sy-vline,121 sy-vline,
    138 sy-vline,155 sy-vline,
    172 sy-vline, 189 sy-vline,
    190 int_bsik-dmbtr CURRENCY int_bsik-waers,
    206 sy-vline.
    IF v_date IN r_date1.
    v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
    WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date2.
    v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
    WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date3.
    v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
    WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date4.
    v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
    WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEif v_date > r_date4-high.
    v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
    WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEif v_date < p_allgst.
    v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
    WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ENDIF.
    format color off.
    ELSE.
    WRITE :/1 sy-vline, 2 int_bsik-belnr,
    12 sy-vline,13 int_bsik-lifnr,
    23 sy-vline,24 int_bsik-name1,
    59 sy-vline,60 int_bsik-xblnr,
    76 sy-vline,77 int_bsik-zfbdt,
    87 sy-vline.
    WRITE : 104 sy-vline,121 sy-vline,
    138 sy-vline,155 sy-vline,
    172 sy-vline,189 sy-vline,
    190 int_bsik-dmbtr CURRENCY int_bsik-waers,
    206 sy-vline.
    IF v_date IN r_date1.
    v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
    WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date2.
    v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
    WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date3.
    v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
    WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date4.
    v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
    WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEif v_date > r_date4-high.
    v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
    WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEif v_date < p_allgst.
    v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
    WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ENDIF.
    ENDIF.
    FORMAT COLOR OFF.
    v_cnt = v_cnt + 1.
    ENDLOOP.
    WRITE : /1(206) sy-uline.
    v_subtotal = v_subtotal1 + v_subtotal2 + v_subtotal3
    + v_subtotal4 + v_subtotal5 + v_subtotal6.
    FORMAT COLOR 3 INTENSIFIED.
    WRITE : /1 sy-vline,
    2(85) 'Total'(017) CENTERED CURRENCY int_bsik-waers ,
    87 sy-vline,
    88 v_subtotal1 CURRENCY int_bsik-waers,
    104 sy-vline,
    105 v_subtotal2 CURRENCY int_bsik-waers,
    121 sy-vline,
    122 v_subtotal3 CURRENCY int_bsik-waers,
    138 sy-vline,
    139 v_subtotal4 CURRENCY int_bsik-waers,
    155 sy-vline,
    156 v_subtotal5 CURRENCY int_bsik-waers,
    172 sy-vline,
    173 v_subtotal6 CURRENCY int_bsik-waers,
    189 sy-vline,
    190 v_subtotal CURRENCY int_bsik-waers,
    206 sy-vline.
    FORMAT COLOR OFF.
    WRITE : /1(206) sy-uline.
    CLEAR : v_subtotal,v_subtotal1,v_subtotal2,v_subtotal3,
    v_subtotal4,v_subtotal5,v_gtotal1,v_gtotal2,v_gtotal3,
    v_gtotal4, v_gtotal5,v_gtotal,v_subtotal6,v_gtotal6.
    ENDFORM. " line_selection
    *& Form header1
    Secondary List Header
    FORM header1 .
    Standard header
    clear: v_date1, v_str, v_str1, v_tage.
    write p_allgst to v_date1.
    Move p_tage4 to v_tage.
    concatenate '>' v_tage text-025 into v_str1.
    concatenate
    'Details of Ageing Analysis for Vendor Open Invoices as on'(024)
    v_date1 into v_str separated by space.
    FORMAT COLOR 1 intensified.
    WRITE :/1(206) sy-uline.
    WRITE :/1 sy-vline,12 sy-vline ,
    23 sy-vline,59 sy-vline,76 sy-vline,87 sy-vline,
    88(101) 'Invoices Due For(In Days)'(014) CENTERED,
    189 sy-vline,206 sy-vline.
    WRITE : /1 sy-vline, 2(10) 'Doc Number'(021) CENTERED,
    12 sy-vline, 13(10) 'Vendor#'(015) CENTERED,
    23 sy-vline, 24(35) 'Vendor Name'(016) CENTERED,
    59 sy-vline, 60(16) 'Ref invoice#'(019) CENTERED,
    76 sy-vline, 77(10) 'Inv dt'(020) CENTERED,
    87 sy-vline, 88(101) sy-uline,
    189 sy-vline,190(16) 'Total'(017) CENTERED,
    206 sy-vline.
    WRITE : /1 sy-vline, 12 sy-vline,
    23 sy-vline,59 sy-vline,
    76 sy-vline,87 sy-vline,
    88(16) v_fir CENTERED, 104 sy-vline,
    105(16) v_sec CENTERED, 121 sy-vline,
    122(16) v_thir CENTERED, 138 sy-vline,
    139(16) v_four CENTERED, 155 sy-vline,
    156(16) v_str1 CENTERED,
    172 sy-vline,
    173(16) 'Already Overdue'(018) CENTERED,
    189 sy-vline,
    206 sy-vline.
    format color off.
    WRITE : /1(206) sy-uline.
    ENDFORM. " header1

    Hi
    Account Payables(AP) data related vendor invoices is stored in BSIK and BSAK tables
    SO fetching the data from those tables for the given vendor and the bucket selected (as I told this ageing is calculated in daysbuckets) and display and the totals at the end of the vendor
    go through the code it is easily understandable as we are fetching data just  from table BSIK and vendor tables LFA1 LFB1.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • When attempting to perform updates, it asks for credit card information. I give it all the information its ask but then it tells me that the security code is invalid. I have rechecked it and rentered it several times still it tells me the code is wrong

    When attempting to perform updates on my iphone, it asks for credit card information. I give them the information directly from the card but then it tells me that the security code is invalid. I have rechecked the information several times which also includes reentering the card info and still it says its wrong. What do I do?

    Contact iTunes store support: http://www.apple.com/emea/support/itunes/contact.html.

  • How to stop the encoding ?plz see the code and correct it

    public class NewClass
        /** Creates a new instance of NewClass */
        public NewClass ()
            StateHelper sh=null;
            Processor p=null;
            try
                p=Manager.createProcessor (new URL ("file:///ring.wav"));
                sh = new StateHelper (p);
                p.configure ();
            catch (NoProcessorException ex)
                ex.printStackTrace ();
            catch (IOException ex)
                ex.printStackTrace ();
            p.setContentDescriptor (new FileTypeDescriptor (FileTypeDescriptor.MPEG_AUDIO));       
            TrackControl track[] = p.getTrackControls ();
            boolean encodingPossible = false;
            for (int i = 0; i < track.length; i++)
                try
                    track.setFormat (new AudioFormat (AudioFormat.MPEG));
    encodingPossible = true;
    catch (Exception e)
    track[i].setEnabled (false);
    if (!sh.realize (10000))
    System.exit (-1);
    DataSource source = p.getDataOutput ();
    MediaLocator dest = new MediaLocator ("file://ring1.mpg");
    DataSink filewriter = null;
    try
    filewriter = Manager.createDataSink (source, dest);
    filewriter.open ();
    filewriter.addDataSinkListener (new DataSinkListener ()
    public void dataSinkUpdate (DataSinkEvent e)
    if(e instanceof javax.media.datasink.EndOfStreamEvent)
    DataSink ds=e.getSourceDataSink ();
    try
    ds.stop ();
    System.out.println ("finished write");
    catch (IOException ex)
    ex.printStackTrace ();
    filewriter.start ();
    catch (NoDataSinkException e)
    System.exit (-1);
    catch (IOException e)
    System.exit (-1);
    catch (SecurityException e)
    System.exit (-1);
    p.start ();
    p.addControllerListener (new ControllerAdapter ()
    public void endOfMedia (EndOfMediaEvent e)
    Controller controller = (Controller) e.getSource ();
    controller.stop ();
    controller.deallocate ();
    System.out.println ("finished run through");
    public static void main (String[] args)
    new NewClass ();
    o/p is "finished run through",the EndOfStreamEvent never occurs.please correct if anything is wrong.when i manually stop the program then only the encoded file appears on the disk. this has to used from the other class and i cannot afford to use exit().help me.

    Try this - it seems to work
    public class NewClass
        Processor p = null;
        DataSink sink = null;
         /** Creates a new instance of NewClass */
        public NewClass ()
            try{
                p = Manager.createProcessor (new URL ("file:C:/WINDOWS/Media/Windows XP Startup.wav"));
                p.addControllerListener (new ControllerAdapter ()
                     public void configureComplete(ConfigureCompleteEvent e){
                        System.out.println ("ConfigureCompleteEvent");
                        Processor p = (Processor)e.getSourceController();
                        processConfigured(p);
                     public void realizeComplete(RealizeCompleteEvent e){
                        System.out.println ("RealizeCompleteEvent");
                        Processor p = (Processor)e.getSourceController();
                        processrealized(p);
                     public void controllerClosed(ControllerClosedEvent e){
                        System.out.println ("ControllerClosedEvent");
                     public void endOfMedia (EndOfMediaEvent e)
                        System.out.println ("EndOfMediaEvent");
                        Processor p = (Processor)e.getSourceController();
                        p.stop();
                     public void stop(StopEvent e){
                        System.out.println ("StopEvent");
                        Processor p = (Processor)e.getSourceController();
                        p.close();
                p.configure();
            }catch (NoProcessorException ex){
                 ex.printStackTrace ();
            }catch (IOException ex){
                 ex.printStackTrace ();
        private void processrealized(Processor p){
             MediaLocator dest = new MediaLocator("file:C:/Workspace/ring1.mpg");
             try{
                  sink = Manager.createDataSink(p.getDataOutput(), dest);
                 sink.addDataSinkListener(new DataSinkListener(){
                      public void dataSinkUpdate(DataSinkEvent e){
                           if(e instanceof EndOfStreamEvent){
                            System.out.println ("EndOfStreamEvent");
                                sink.close();
                  sink.open();
                  sink.start();
             }catch(Exception eX){
             p.start();
        private void processConfigured(Processor p){
            p.setContentDescriptor (new FileTypeDescriptor (FileTypeDescriptor.MPEG_AUDIO));       
            TrackControl track[] = p.getTrackControls ();
            boolean encodingPossible = false;
            for (int i = 0; i < track.length; i++){
                 try{
                      track.setFormat (new AudioFormat (AudioFormat.MPEG));
              encodingPossible = true;
         }catch (Exception e){
              track[i].setEnabled (false);
    p.realize();
    public static void main (String[] args)
    new NewClass ();
    `

  • Plz chk the query

    SELECT T0.[AcctName], T1.[Debit], T2.[U_SLRemark], T3.[RefDate], T3.[Number], T4.[Name], T5.[U_Project] FROM OACT T0  INNER JOIN JDT1 T1 ON T0.AcctCode = T1.Account INNER JOIN VPM4 T2 ON T0.AcctCode = T2.AcctCode INNER JOIN OJDT T3 ON T1.TransId = T3.TransId, [dbo].[@OSLA]  T4, [dbo].[@SLT1]  T5
    in output all the rows are repeating even i used distinct also
    plz help

    hai,
    Just try this,
    SELECT T0.AcctCode,T0.AcctName, T1.Debit, T2.U_SLRemark, T3.RefDate, T3.Number, T4.Name, T5.U_Project FROM OACT T0 INNER JOIN JDT1 T1 ON T0.AcctCode = T1.Account INNER JOIN VPM4 T2 ON T0.AcctCode = T2.AcctCode INNER JOIN OJDT T3 ON T1.TransId = T3.TransId, dbo.@OSLA T4, dbo.@SLT1 T5 group by T0.AcctCode
    Thanks.

  • Please chk the code

    hi
    SELECT  SINGLE objky
        FROM  nast
        INTO  lv_objky
       WHERE  kappl EQ 'EF'
         AND  objky EQ lv_var
         AND  spras EQ 'EN'
         AND  parnr IN ('s7dclnt200', 's7qclnt450', 's7pclnt450')
         AND  parvw EQ 'LS'.
      IF sy-subrc EQ 0.
    endif.
    this is my select query ..
    in database i have the entry but i m getting sy-subrc not equal to 0. please let me know...

    Hello Neha,
    Here the Variable lv_var  should be similar to the value in that table.
    Check this
    SELECT SINGLE objky
    FROM nast
    INTO lv_objky
    WHERE kappl EQ 'EF'
    AND objky EQ lv_var             " Chekc here
    AND spras EQ 'EN'
    AND parnr IN ('s7dclnt200', 's7qclnt450', 's7pclnt450')
    AND parvw EQ 'LS'.
    IF sy-subrc EQ 0.
    endif.
    REgards,
    Vasanth

  • My itones is not letter me uPdate my apps and also is asking me 4 me secury code of me credit card. But went I put me code is telling me the code Is wrong

    Somebody help me please

    Check out this article:
    iTunes Store: My credit card's security code or zip code does not match my bank's records
    http://support.apple.com/kb/TS1646

  • Plz check the code and tell me necessary  modifications

    report Z_PHANIBDC2
           no standard page heading line-size 255.
    include bdcrecx1.
    PARAMETERS:P_FILE   LIKE RLGRAP-FILENAME DEFAULT
    'C:Documents and Settingssarath.vempatiDesktopphani1.TXT' OBLIGATORY
    DATA: BEGIN OF RECORD1 OCCURS 0,
            LIFNR(018),
            BURKS(011),
            KTOKK(014),
            ANRED(014),
            NAME1(014),
            SURTL(014),
            STRAS(012),
            ORT01(040),
            LAND1(013),
            SPRAS(019),
            KUNNR(015),
            BANKL(012),
            BANKS(018),
            AKONT(022),
            ZTERM(012),
            MAHNA(016),
    END OF RECORD1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
       DEF_FILENAME           = 'P_FILE '
    *   DEF_PATH               = ' '
       MASK                   = ',*.*,*.*. '
       MODE                   = 'O'
       TITLE                  = 'GET FILENAME '
    IMPORTING
       FILENAME               = P_FILE
    *   RC                     =
    EXCEPTIONS
       INV_WINSYS             = 1
       NO_BATCH               = 2
       SELECTION_CANCEL       = 3
       SELECTION_ERROR        = 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.
    START-OF-SELECTION.
    *LOOP AT RECORD1 FROM 2.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    *   CODEPAGE                      = ' '
       FILENAME                      = 'P_FILE '
       FILETYPE                      = 'DAT'
    *   HEADLEN                       = ' '
    *   LINE_EXIT                     = ' '
    *   TRUNCLEN                      = ' '
    *   USER_FORM                     = ' '
    *   USER_PROG                     = ' '
    *   DAT_D_FORMAT                  = ' '
    * IMPORTING
    *   FILELENGTH                    =
      TABLES
        DATA_TAB                      = RECORD1
    EXCEPTIONS
       CONVERSION_ERROR              = 1
       FILE_OPEN_ERROR               = 2
       FILE_READ_ERROR               = 3
       INVALID_TYPE                  = 4
       NO_BATCH                      = 5
       UNKNOWN_ERROR                 = 6
       INVALID_TABLE_WIDTH           = 7
       GUI_REFUSE_FILETRANSFER       = 8
       CUSTOMER_ERROR                = 9
       NO_AUTHORITY                  = 10
       OTHERS                        = 11
      DATA : RECORD LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
      DATA : RECORD3 LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
      DATA : LIFNR1 LIKE LFA1-LIFNR.
      LOOP AT RECORD1.
        IF RECORD1-LIFNR <> ''.
          LIFNR1 = RECORD1-LIFNR.
          RECORD3-LIFNR = RECORD1-LIFNR.
          RECORD3-BURKS = record1-BURKS.
          APPEND RECORD3.
        ELSE.
          RECORD3-LIFNR = LIFNR1.
          RECORD3-BURKS = record1-BURKS.
          APPEND RECORD3.
        ENDIF.
      ENDLOOP.
      DELETE RECORD1 WHERE LIFNR = ''.
      RECORD[] = RECORD1[].
      DATA VAR1(15).
      DATA VAR2(15).
      DATA COUNT(2).
      DATA COUNT1(2) VALUE 1.
      DATA VAR3(16).
      DATA VAR4(16).
      DATA VAR5(16).
      DELETE ADJACENT DUPLICATES FROM RECORD COMPARING LIFNR BURKS.
    write:/ 'phani'.
    *IF SY-SUBRC <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    perform open_group.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  record1-lifnr.
    perform bdc_field       using 'RF02K-BUKRS'
                                  RECORD1-BURKS.
    perform bdc_field       using 'RF02K-KTOKK'
                                  RECORD1-KTOKK.
    perform bdc_field       using 'RF02K-REF_LIFNR'
                                  RECORD1-LIFNR.
    perform bdc_field       using 'RF02K-REF_BUKRS'
                                  RECORD1-BURKS.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELX1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-ANRED'
                                  'RECORD1-ANRED'.
    perform bdc_field       using 'LFA1-NAME1'
                                  'RECORD1-NAME1'.
    perform bdc_field       using 'LFA1-SORTL'
                                  'RECORD1-SORTL'.
    perform bdc_field       using 'record1-STRAS'
                                  'RECORD1-STRAS'.
    perform bdc_field       using 'LFA1-ORT01'
                                  'RECORD1-ORT01'.
    perform bdc_field       using 'LFA1-LAND1'
                                  'RECORD1-LAND1'.
    perform bdc_field       using 'LFA1-SPRAS'
                                  'RECORD1-SPRAS'.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-KUNNR'
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKL(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'LFBK-BANKS(01)'
                                  'IN'.
    perform bdc_field       using 'LFBK-BANKL(01)'
                                  'RECORD1-BANKL'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-AKONT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'XK01'.
    perform close_group.

    report Z_PHANIBDC2
           no standard page heading line-size 255.
    include bdcrecx1.
    DATA: BEGIN OF RECORD1 OCCURS 0,
            LIFNR(018),
            BURKS(011),
            KTOKK(014),
            ANRED(014),
            NAME1(014),
            SURTL(014),
            STRAS(012),
            ORT01(040),
            LAND1(013),
            SPRAS(019),
            KUNNR(015),
            BANKL(012),
            BANKS(018),
            AKONT(022),
            ZTERM(012),
            MAHNA(016),
    END OF RECORD1.
    <b>perform upload.</b>
    perform open_group.
    loop at recored.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  record1-lifnr.
    perform bdc_field       using 'RF02K-BUKRS'
                                  RECORD1-BURKS.
    perform bdc_field       using 'RF02K-KTOKK'
                                  RECORD1-KTOKK.
    perform bdc_field       using 'RF02K-REF_LIFNR'
                                  RECORD1-LIFNR.
    perform bdc_field       using 'RF02K-REF_BUKRS'
                                  RECORD1-BURKS.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELX1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-ANRED'
                                  'RECORD1-ANRED'.
    perform bdc_field       using 'LFA1-NAME1'
                                  'RECORD1-NAME1'.
    perform bdc_field       using 'LFA1-SORTL'
                                  'RECORD1-SORTL'.
    perform bdc_field       using 'record1-STRAS'
                                  'RECORD1-STRAS'.
    perform bdc_field       using 'LFA1-ORT01'
                                  'RECORD1-ORT01'.
    perform bdc_field       using 'LFA1-LAND1'
                                  'RECORD1-LAND1'.
    perform bdc_field       using 'LFA1-SPRAS'
                                  'RECORD1-SPRAS'.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-KUNNR'
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKL(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'LFBK-BANKS(01)'
                                  'IN'.
    perform bdc_field       using 'LFBK-BANKL(01)'
                                  'RECORD1-BANKL'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-AKONT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'XK01'.
    endloop.
    perform close_group.
    <b>form upload.</b>
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
       FILENAME                       = ' '
       FILETYPE                      = 'DAT'
      HEADLEN                       = ' '
      LINE_EXIT                     = ' '
      TRUNCLEN                      = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      DAT_D_FORMAT                  = ' '
    IMPORTING
      FILELENGTH                    =
      TABLES
        DATA_TAB                      = RECORD1
    EXCEPTIONS
       CONVERSION_ERROR              = 1
       FILE_OPEN_ERROR               = 2
       FILE_READ_ERROR               = 3
       INVALID_TYPE                  = 4
       NO_BATCH                      = 5
       UNKNOWN_ERROR                 = 6
       INVALID_TABLE_WIDTH           = 7
       GUI_REFUSE_FILETRANSFER       = 8
       CUSTOMER_ERROR                = 9
       NO_AUTHORITY                  = 10
       OTHERS                        = 11
      DATA : RECORD LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
      DATA : RECORD3 LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
      DATA : LIFNR1 LIKE LFA1-LIFNR.
      LOOP AT RECORD1.
        IF RECORD1-LIFNR <> ''.
          LIFNR1 = RECORD1-LIFNR.
          RECORD3-LIFNR = RECORD1-LIFNR.
          RECORD3-BURKS = record1-BURKS.
          APPEND RECORD3.
        ELSE.
          RECORD3-LIFNR = LIFNR1.
          RECORD3-BURKS = record1-BURKS.
          APPEND RECORD3.
        ENDIF.
      ENDLOOP.
      DELETE RECORD1 WHERE LIFNR = ''.
      RECORD[] = RECORD1[].
      DATA VAR1(15).
      DATA VAR2(15).
      DATA COUNT(2).
      DATA COUNT1(2) VALUE 1.
      DATA VAR3(16).
      DATA VAR4(16).
      DATA VAR5(16).
      DELETE ADJACENT DUPLICATES FROM RECORD COMPARING LIFNR BURKS.
    write:/ 'phani'.
    *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.

Maybe you are looking for

  • The iPod "iHazen" cannot be synced. You do not have enough access....

    privileges for this operation." When I attempt to plug my iPod into my macbook, it begins syncing then this happens: First, iTunes tells me the default "It could damage your ipod to disconnect it without ejecting it" message. Then I get: "The iPod "i

  • Branded Profit Centers- Feel free t take a stab at it.

    Hello All, I have a question that you might be able to answer based on your experience as CO consultants. Raw Materials that are used to produce each brand of Product are assigned to the specific branded profit centers. Beginnig n 2009, our company i

  • JTextPane and Paragraphs

    Hello I'm using JTextPane with an instance of DefaultStyledDocument. Now I have to add Paragraphes with code (not user input) but I haven't found any way to do it. Can anyone help? Thanxs Leander Eyer

  • Can't update iPod to 1.2 with iTunes 7.0

    Hey... I just recently installed iTunes 7, and I can use the music store just fine. However, when I try to update my iPod to version 1.2, I receive and error stating: "iTunes could not connect to the iPod update server because you are not connected t

  • Provider ABCS is throwing Error at the time of compilation.

    I am getting given error while compiling Provider ABCS, what could be the reason behind this error, I checked adf-config.xml file but line there are only 43 lines. Provider ABCS is invoking my Adapter Service which I have deployed successfuly. •