Return Import  PO

Hi Friends,
While creating return Import PO.I am getting Error message  Negative delivery costs not allowed  if I delete Basic customs duty condition JCBD then their is no message. what is the reason for message and How can I solve this issue ?
Regards,
Chetan.

dear,
customs duty ur paying to customs officer (diff vendor)
he has nothing to do with ur rejection.u cannt recover the costums duty by return PO
thats why system issue u the message.
regards,
snb

Similar Messages

  • Taking Files Home Then Returning - Imported Graphics

    I'd be interested in techniques for copying Frame files from the office shared drive for homework purposes, then returning the files to the office, when those files have graphics imported by reference from the office shared drive.
    Right now all the graphics links get broken when I do this, and require painstaking reconstruction. Not worth the trouble.
    I use Frame 7.2 on Windows XP.

    These are good ideas. I'm not sure if Monica's will work for me because my office Frame and graphics files are on a network shared drive ("H"), and my home PC is self-contained (all files on C). I haven't tried it lately, but I think when the Frame files hunt for imported graphics at home they will look for an H drive. Is there a way around that?
    Accessing the office drives from home as Jack suggests is a possibility but our Citrix-based system has quirks that have always stymied my efforts.
    I think what I'm looking for is a way to "turn off" the imported graphics links before saving the Frame files to my jump drive. I can work without the graphics at home. Then I could turn them back on when I copy the files back onto the office network drive.
    Perhaps this is a wish list item....

  • Import material - Vendor returned(Indian scenario)

    Dear all,
    I have searched forum for returning imported material with no solution discussed in any of threads.
    It would be nice if any one writes a blog for above subject in indian scenario it will be useful for everyone.
    What will be standard procedure followed in sap for returning imported material to vendor ?
    For my case,please note,
    A. Material to be returned partially
    B.Excise credit(CVD & its cess's,AED) is already taken
    C.Vendor is already paid.
    I'm ready to provide further inputs if required.
    Your help is really appreciated
    Thanks in advance,
    Jeyakanthan

    hi
    i never tried returns of the imported goods and also don't know the legal issues for the following process
    1)ME21N - Create a Returns PO (Activate "Returns" indicator for PO line item)
    2. MIGO - Goods Receipt > Purchase Order (Returns PO) (Here system will hit Mvmt type "161" and you can also select Un-restricted/blocked stock from where you want to return the stock)
    3. J1IS u2013 Excise Invoice Other Movements
    Here click on u201Ccreateu201D button to create an outgoing excise invoice and reverse the CENVAT Amount.
    Here put all details as below and Press u201CEnteru201D.
    Ref.doc.type - MATD, Doc Number - Material document No of 161 mvmt, Doc Year, Series Group, Excise Group and Vendor
    Here check BED, ECS and SECess values to be reversed and click on u201CSaveu201D button to post the excise invoice.
    4. J1IV - Post and Print Outgoing Excise Invoice.
    5. MIRO - Credit memo w.r.t. Returns PO.
    i think this process may be acceptable,
    regards
    kunal

  • Import return

    hi sap guru
    I just want know return import material senario in sap ,how we can return import material back to vendor
    when creation of return po system showing nagative delivary cost  massage
    so how can i return import material to vendor and account entries should be revers properlly
    and what about custom duty and cvd cost they also revrs or not please clarify
    thank

    Hi
    Provide the complte error message you are getting in Return PO
    The Vendor can also be made using MB1B 124 or 122 mvt, followed by J1IS, MATD (this will give excise Invoice need to be send along with the material)
    Do you mainatin AED or SED seprate in your register?
    Is Invoice verification also done for the PO?
    Niti Narayan

  • Import  from Memory id is not working

    Hi All,
    In the program SAPF110V for Tcode : F110 , I have written an enhancement where when user clicks printout button then a popup will come which will ask for whether date should be printed in the check or not. for this i have used FM : POPUP_TO_CONFIRM . here i am exporting the value if user clicks no (value is 2 for NO).
    exoprt statemnt written :
    export l_v_answer from l_v_answer to memory ID 'ANS'.
    In the driver program for check printing i am importing the value .if value = 2 then i am clearing the date that has to be printed in the check.
    import stmt :
    Import l_v_answer to l_v_answer from memory ID 'ANS'.
    however the value is not getting imported here.
    not able to find the reason why the value is not getting picked with import. please let me know the solution.
    Thanks,
    Preethi.

    called program
    REPORT  ZTEST7.
    selection-screen begin of block b1.
    parameters: a like mara-matnr.
    selection-screen end of block b1.
    types: begin of tp_sel_tab.
          include structure zstr2.
    types: end of tp_sel_tab.
    data: t_sel_tab type standard table of tp_sel_tab with header line.
    data: w_t_sel_tab type tp_sel_tab.
    *call screen 9100.
    start-of-selection.
    select ernam from mara into corresponding fields of table t_sel_tab where matnr = a.
    export t_sel_tab to memory id 'ZTEST7'.
    loop at t_sel_tab into w_t_sel_tab.
    write:/ w_t_sel_tab-ernam.
    endloop.
    calling program
    REPORT  ZTEST8.
    *types: begin of tp_sel_tab.
         include structure zstr2.
    *types: end of tp_sel_tab.
    data: begin of t_sel_tab occurs 0,
          ernam like mara-ernam,
          end of t_sel_tab.
    data: begin of sel_tab occurs 0,
          ernam like mara-ernam,
          end of sel_tab.
    *data: t_sel_tab type standard table of tp_sel_tab.
    *types:  begin of tp_sel_tab1,
           ernam like mara-ernam,
    end of tp_sel_tab1.
    *data: sel_tab type standard table of tp_sel_tab .
    data: w_sel_tab type zstr2.
    submit ztest7 with a = '000000000000000939' and return.
    import  sel_tab = t_sel_tab from memory id 'ZTEST7'.
    loop at sel_tab into w_sel_tab..
    write:/ w_sel_tab-ernam.
    endloop.
    please reward points

  • ESYU: Importing Standard Purchase Orders에서 문제 발생시 진단 방법

    Purpose
    Oracle Purchasing - Version: 11.5.10.2 to 12.0.6
    Information in this document applies to any platform.
    ConcurrentProgram:POXPOPDOI - Import Standard Purchase Orders
    이 문서는 reader게 Importing Standard Purchase Orders 실행 중 갑자기 발생하는 issue에 대해 어떻게
    대응하는지에 대한 자세한 정보를 제공한다.
    Instroduction
    Purchase Document Open Interface는 다량의 Standard Purchase Order는 Oracle Purchasing으로 빨리
    import 할 수 있게 한다. Import process는 import 되어야 하는 document information을 PO interface tables에
    넣어주는 작업을 필요로하며, data를 validate 하고 application에 PO를 생성하거나 error message를 return 하는
    Import Standard Purchase Orders concurrent program을 실행한다.
    이 문서의 목적은 Importing Standard Purchase Orders에 관련된 process를 이해하거나 갑자기 발생한 문제의
    원인을 찾는데 도움을 주기 위함이다. PO import 문제는 일반적으로 interface tables에 입력된 불일치하는 data가
    원인이며, 일단 문제가 확인되면 Metalink는 비슷한 문제를 찾아주거나 Oracle Support에 Service Request를 log
    할 수 있다.
    Test case Information
    1. 아래 insert 문장을 이용하여 PO interface tables에 data를 입력:
    INSERT INTO po.po_headers_interface
    (interface_header_id,
    action,
    org_id,
    document_type_code,
    currency_code,
    agent_id,
    vendor_name,
    vendor_site_code,
    ship_to_location,
    bill_to_location,
    reference_num)
    VALUES
    (apps.po_headers_interface_s.NEXTVAL,
    'ORIGINAL',
    207, -- Seattle
    'STANDARD',
    'USD', -- Your currency code
    24, -- Your buyer id stock
    'Advanced Network Devices',
    'FRESNO',
    'V1- New York City', -- Your ship to
    'V1- New York City', -- Your bill to
    'Currency test') -- Any reference num
    INSERT INTO po.po_lines_interface
    (interface_line_id,
    interface_header_id,
    line_num,
    shipment_num,
    line_type,
    item,
    uom_code,
    quantity,
    --unit_price,
    promised_date,
    ship_to_organization_code,
    ship_to_location)
    VALUES
    (po_lines_interface_s.nextval,
    po_headers_interface_s.currval,
    1,
    1,
    'Outside processing',
    'Flooring OSP',
    'Ea',
    1,
    --17.50,
    '10-APR-2009',
    'V1',
    'V1- New York City' )
    INSERT INTO po.po_distributions_interface
    (interface_header_id,
    interface_line_id,
    interface_distribution_id,
    distribution_num,
    quantity_ordered,
    charge_account_id)
    VALUES
    (po_headers_interface_s.currval,
    po.po_lines_interface_s.CURRVAL,
    po.po_distributions_interface_s.NEXTVAL,
    1,
    1,
    12975) -- Your Charge Account Id
    2. Interface tables에 data가 insert 되었다면 import progra을 실행전 정보를 확인하기 위해 아래 query 문을 이용한다.
    a - Select * from PO_HEADERS_INTERFACE where INTERFACE_HEADER_ID=&headerid
    b - Select * from PO_LINES_INTERFACE where INTERFACE_HEADER_ID=&headerid
    c - Select * from PO_DISTRIBUTIONS_INTERFACE where INTERFACE_HEADER_ID=&headerid
    3. Data를 review 했으면 Import Standard Purchase Orders program을 실행한다.
    Parameter >>
    Default Buyer: Null
    Create or Update Items: No
    Approval Status: INCOMPLETE
    Batch Id: Null
    4. 만일 program에 문제가 있어 error가 발생한다면 error의 원인을 제공하기 위해 Purchasing Interface Error Report를
    실행할 수 있다.
    Parameter >>
    Source Program: PO_DOCS_OPEN_INTERFACE
    Purge Data: No
    만일 PO가 import 되지 않았다면 Puchasing Interface Errors Report와 동일한 정보를 보기 위해 Interface Errors table을
    아래 SQL을 이용하여 조회할 수 있다.
    SELECT * FROM PO_INTERFACE_ERRORS WHERE INTERFACE_TRANSACTION_ID ='&recordsinterfacetransid';
    Diagnostics
    Import Standard Purchase ORder process의 troubleshoot 도움을 위해 아래 Diagnostics과 Reports를 이용한다.
    1. Diagnostics Tool : Oracle Purchasing Purchasing Documents Open Interface Data Collection Test
    (please refer to Note 224887.1 for assistance)
    이 Diagnostics는 import program에 의해 import 되는 data를 validate 할 것이며 missing 되거나 맞지않는 정보를 highlight 한다.
    이 Tool은 interface tables에 있는 맞지 않거나 불완전한 data의 자세한 정보를 제공할 수 있다.
    Error는 PO를 import 할 때 발생한 문제 분석을 시도하는데 매우 유익하므로 SR을 log시 이 Diagnostic output을 upload 하는
    것을 권장한다.
    2. Purchasing Interface Errors Report
    이 report는 Oracle Purchasing에서 사용가능하며 Import Standard Purchase Orders program을 실행시 발생하는
    error를 강조한다.
    Tracing
    11.5.10 이상의 version에서 Import Standard Purchase Orders program의 trace를 생성:
    1. Navigate to System Administrator responsibility
    2. Navigate to Profiles->System
    3. Query the Profile Option Concurrent: Allow Debugging and set it to Yes at User level
    4. Navigate to Purchasing responsibility
    5. From the Requests form, choose the Import Standard Purchase Orders program and set the required Parameters
    6. Click the Debug button
    7. Check the SQL Trace checkbox and specify Trace with Binds and Waits
    8. Submit the Concurrent program
    9. Retrieve the trace file created.
    Logging
    Import Standard Purchase Orders program의 FND Deug Log 생성:
    1. Log_seq를 아래 SQL을 이용하여 확인.
    select max(log_sequence) from fnd_log_messages;
    2. Set the following profiles at the user level:
    FND: Debug Log Enabled = YES
    FND: Debug Log Filename = NULL
    FND: Debug Log Level = STATEMENT
    FND: Debug Log Module = %
    3. Run Import Standard Purchase Orders program
    4. Using a SQL client run the following query :
    Select * from fnd_log_messages
    where log_sequence > &log_seq_noted_above
    order by log_sequence;
    이 query의 output은 Import Standard Purchase Orders program이 실행 중 발생한 error를 표시한다.
    Reference
    Note 781351.1

  • EXPORT IMPORT  STATEMENT NOT WORKING

    hI
       I AM USING THE FOLLOWING STATEMENT BUT THE VALUES ARE NOT COMING IN THE TABLE ACTOR_TAB1
    SUBMIT ZDISPLAY3 WITH P_MFRNR = P_MFRNR
                       WITH P_GFELD = P_GFELD AND RETURN
    IMPORT ACTOR_TAB1 = ACTOR_TAB1 FROM  MEMORY ID 'KAKAL_INS'.
    IN REPORT ZDISPLAY3 I AM USING THE FOLLOWING STATEMENT
      EXPORT ACTOR_TAB = ACTOR_TAB TO MEMORY ID 'KAKAL_INS'.
    IN INTERNAL TABLE ACTOR_TAB1 VALUE IS NOT COMING CAN ANY BODY TELLY WHY VALUE IS NOT GETTING POPULATED

    Hi kota,
    1. When u use memory id, make sure of the
    following points.
    a) The memory id is SAME as the variable name
    b) Memory id should be in CAPITAL
    c) When u want to import,
    the variable name should be same as original one,
    and should be declared in the same fashion only.
    regards,
    amit m.

  • Import Problem

    Hi all,
    I am creating an import routine that runs from 10g oracle form.
    In the form I create scripts and a par file to create the user, and grab details then use HOST to run the scripts and then call .
    It all works fine apart from the actual import (imp.exe).
    The above is pretty irrelevent with regards to query but wanted to let you know the reason for the below!
    I get the following:
    Connected to: Oracle Database 10g Release 10.2.0.3.0 - Production
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    IMP-00008: unrecognized statement in the export file:
    . importing TEST's objects into TESTSYSTEMThen it hangs and does not proceed with the import.
    If i import via our server that holds the database it works fine. but not thought the 10g app server.
    Any help much appreciated

    On App server
    db returns
    Oracle Database 10g Release 10.2.0.3.0 - Production
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Productionimp.exe returns
    Import: Release 10.1.0.5.0 - Production on Wed Aug 19 16:17:43 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.In DB
    db returns
    Oracle Database 10g Release 10.2.0.3.0 - Production
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Productionimp returns
    Import: Release 10.2.0.3.0 - Production on Wed Aug 19 16:21:26 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.How do i upgrade my imp.exe? as DB version seem the same?

  • Importing of XML

    Hi,
    I seem to have a problem with my importing of my custom XML. The import statement I'm using is as follows:
    import c:\oracle\jdev\jdevbin\jdev\myprojects\oracle\apps\fnd\umx\userAdmin\webui -rootdir c:\oracle\jdev\jdevbin\jdev\myprojects\ -mmddir C:\oracle\JDev\jdevbin\jdev\lib\ext\jrad\config\mmd -userId 1 -rootPackage /oracle/apps/fnd/umx -username apps -password apps -dbconnection "(description = (address = (protocol = xxx.world)(host = dbserver)(port = dbserver_port))(connect_data = (sid = dbsid)))" -jdk13
    it returns import successful. But when I run the sql commands to check whether it has imported. It returns no document found.
    set serveroutput on
    exec jdr_utils.printDocument('/oracle/apps/fnd/umx/userAdmin/webui/approverPG')
    Am I doing something wrong? All I can think of is that I'm using the dbserver instead of the webserver... i should be using the webserver?
    Cheers

    Try with
    import c:\oracle\jdev\jdevbin\jdev\myprojects\oracle\apps\fnd\umx\userAdmin\webui\approverPG' -rootdir c:\oracle\jdev\jdevbin\jdev\myprojects\ -mmddir C:\oracle\JDev\jdevbin\jdev\lib\ext\jrad\config\mmd -userId 1 -rootPackage "" -username apps -password apps -dbconnection "(description = (address = (protocol = xxx.world)(host = dbserver)(port = dbserver_port))(connect_data = (sid = dbsid)))" -jdk13
    Added Page Name .
    and Remove value of -rootPackage
    Thanks.

  • ESYU: Order Import를 통해 기존 Order를 reference 하는 RMA Order를 생성하는 방법

    Purpose
    Oracle Order Management - Version: 11.5.9 to 12.0.5
    Information in this document applies to any platform.
    Order Import를 통해 기존 존재하는 Order를 reference 하는 RMA Order의 생성 방법을 알아본다.
    Solution
    Order Import interface의 header와 line에 data를 insert 하기 위해 아래 script를 이용한다.
    INSERT INTO OE_HEADERS_IFACE_ALL (
    order_source_id
    ,orig_sys_document_ref
    ,creation_date
    ,created_by
    ,last_update_date
    ,last_updated_by
    ,operation_code
    ,sold_to_org_id
    ,order_type_id
    ,booked_flag
    VALUES
    1227 --order_source_id
    ,'123456' --orig_sys_document_ref
    ,sysdate --creation_date
    ,-1 --created_by
    ,sysdate --last_update_date
    ,-1 --last_updated_by
    ,'INSERT' --operation_code
    ,1005 --sold_to_org_id
    ,1436 --order_type_id
    ,'Y' --booked_flag
    INSERT INTO OE_LINES_IFACE_ALL (
    order_source_id
    ,orig_sys_document_ref
    ,orig_sys_line_ref
    ,inventory_item_id
    ,ordered_quantity
    ,operation_code
    ,created_by
    ,creation_date
    ,last_updated_by
    ,last_update_date
    ,return_reason_code
    ,return_context
    ,return_attribute1
    ,return_attribute2
    VALUES
    1227 --order_source_id
    ,'123456' --orig_sys_document_ref
    ,'1' --orig_sys_line_ref
    ,249 --inventory_item_id
    ,10 --ordered_quantity
    ,'INSERT' --operation_code
    ,-1 --created_by
    ,sysdate --creation_date
    ,-1 --last_updated_by
    ,sysdate --last_update_date
    ,'CANCELLATION' --return_reason_code
    ,'ORDER' --referencing a sales order
    ,'157638' --header_id of referenced order
    ,'256619' --line_id of referenced line
    commit;
    API guide와 eTRAM을 참조하여 귀사의 testcase에 알맞게 위 insert script를 수정하거나 다른 columns을 add 한다.
    위 모든 interface tables의 order_source_id에는 당신의 order_source_id 값을 입력한다.
    위 모든 interface tables의 orig_sys_document_ref에는 각각의 order에 대한 unique 값을 입력한다.
    Interface table에 값을 insert 하면 Order Import Concurrent program을 실행한다.
    - Navigate to Orders, Returns -> Import Orders -> Order Import Request
    - Select your Order Source from the LOV in the parameters form.
    - Submit the concurrent request.
    Reference
    Note 746668.1

  • ESYU: Order Import를 통해 간단한 ATO Model을 위한 Order를 생성하는 방법

    Purpose
    Oracle Order Management - Version: 11.5.9 to 12.0.5
    Information in this document applies to any platform.
    아래와 같은 구조를 갖는 간단한 ATO model을 위한 order를 order import를 통해 생성하는 방법에 대해 알아본다.
    ATO Model (542851)
    |- ATO Option Class (542852)
    |--Option Item (152840)
    Solution
    Order Import interface table에 header와 lines을 입력하는 아래 script를 이용한다.
    Interface tables에 data insert 후 Order Import concurrent program을 실행한다.
    INSERT INTO OE_HEADERS_IFACE_ALL (
    order_source_id
    ,orig_sys_document_ref
    ,creation_date
    ,created_by
    ,last_update_date
    ,last_updated_by
    ,operation_code
    ,sold_to_org_id
    VALUES (
    1227 --order_source_id
    ,'12345' --orig_sys_document_ref
    ,sysdate --creation_date
    ,-1 --created_by
    ,sysdate --last_update_date
    ,-1 --last_updated_by
    ,'INSERT' --operation_code
    ,1005 --sold_to_org_id
    INSERT INTO OE_LINES_IFACE_ALL (
    order_source_id
    ,orig_sys_document_ref
    ,orig_sys_line_ref
    ,inventory_item_id
    ,ordered_quantity
    ,operation_code
    ,created_by
    ,creation_date
    ,last_updated_by
    ,last_update_date
    ,top_model_line_ref
    ,item_type_code
    VALUES (
    1227 --order_source_id
    ,'12345' --orig_sys_document_ref
    ,'1' --orig_sys_line_ref
    ,542851 --inventory_item
    ,1 --ordered_quantity
    ,'INSERT' --operation_code
    ,-1 --created_by
    ,sysdate --creation_date
    ,-1 --last_updated_by
    ,sysdate --last_update_date
    ,'1' --top_model_line_ref
    ,'MODEL' --item_type_code
    INSERT INTO OE_LINES_IFACE_ALL (
    order_source_id
    ,orig_sys_document_ref
    ,orig_sys_line_ref
    ,inventory_item_id
    ,ordered_quantity
    ,operation_code
    ,created_by
    ,creation_date
    ,last_updated_by
    ,last_update_date
    ,top_model_line_ref
    ,link_to_line_ref
    ,item_type_code
    VALUES (
    1227 --order_source_id
    ,'12345' --orig_sys_document_ref
    ,'2' --orig_sys_line_ref
    ,542852 --inventory_item_id
    ,1 --ordered_quantity
    ,'INSERT' --operation_code
    ,-1 --created_by
    ,sysdate --creation_date
    ,-1 --last_updated_by
    ,sysdate --last_update_date
    ,'1' --top_model_line_ref
    ,'1' --link_to_line_ref
    ,'CLASS' --item_type_code
    INSERT INTO OE_LINES_IFACE_ALL (
    order_source_id
    ,orig_sys_document_ref
    ,orig_sys_line_ref
    ,inventory_item_id
    ,ordered_quantity
    ,operation_code
    ,created_by
    ,creation_date
    ,last_updated_by
    ,last_update_date
    ,top_model_line_ref
    ,link_to_line_ref
    ,item_type_code
    VALUES (
    1227 --order_source_id
    ,'12345' --orig_sys_document_ref
    ,'3' --orig_sys_line_ref
    ,152840 --inventory_item_id
    ,1 --ordered_quantity
    ,'INSERT' --operation_code
    ,-1 --created_by
    ,sysdate --creation_date
    ,-1 --last_updated_by
    ,sysdate --last_update_date
    ,'1' --top_model_line_ref
    ,'2' --link_to_line_ref
    ,'OPTION' --item_type_code
    ); commit;
    - Orders, Returns -> Import Orders -> Order Import Request
    - Parameter form의 Order Source LOV에서 Order Source를 선택
    - Submit the concurrent request.
    Reference
    Note 746677.1

  • Preferences import generates exception.

    Hi!
    So, here is a newbie question:
    Is it possible to use the new preferences API together with JDeveloper9i?
    When I create a simple new project, using J2SE1.4 and do something like this:
    try
    Preferences.importPreferences( new FileInputStream( "C:\\JDev9i\\jdev\\mywork\\System.xml" ) );
    catch (Exception ex)
    ex.printStackTrace();
    everything works okay. When I try to use the very same lines in my JClient client project, accessing a BC4J module in local deployment (no app server), I get an exception:
    java.lang.ClassCastException: oracle.xml.parser.v2.DTD
         at java.util.prefs.XmlSupport.importPreferences(XmlSupport.java:182)
         at java.util.prefs.Preferences.importPreferences(Preferences.java:1138)
         at test.Untitled1.<init>(Untitled1.java:38)
         at test.Untitled1.main(Untitled1.java:68)
    Has anyone else experienced this? In my simple project it works, in my real project I get an exception. The Oracle XML parser is not part of either project.
    Thanx in advance for your help!
    Sascha Herrmann

    I think there are a couple of things going on here.
    [list=1]
    [*] is that while parsing the Text.xml file, our XML parser is opening the DTD referenced in the DOCTYPE which it must do to see if the DTD has any default attribute values which need to be included in the parsed tree representation).
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE preferences SYSTEM 'http://java.sun.com/dtd/preferences.dtd'>
    <preferences EXTERNAL_XML_VERSION="1.0">
      <root type="user">
        <map />
        <node name="Test">
          <map>
            <entry key="TestEntry" value="true" />
          </map>
        </node>
      </root>
    </preferences>If you don't have your proxy server set correctly, then the attempt to fetch the DTD at it's SYSTEM id URI: http://java.sun.com/dtd/preferences.dtd will hang, and then ultimately fail.
    [*] There is a bug in the JDK 1.4 java.util.prefs.XmlSupport class at line 183:
    ((Element)doc.getChildNodes().item(1)).getAttribute("EXTERNAL_XML_VERSION");.
    where they are making a (bold, and bad) assumption that the 2nd child node of the document object IS the document element. This is not necessary true, and in fact with both Oracle XML Parser 9.0.2 and Apache Xerces 2.1.0 that I tested, it's a bad assumption since both of these JAXP 1.1 compliant XML Parsers fail the simple test example class of:
    import java.io.FileInputStream;
    import java.util.prefs.Preferences;
    public class Test {
    public static void main(String[] args) throws Throwable {
          Preferences.importPreferences(
                        new FileInputStream( "C:\\temp\\sacha\\PrefsTest\\Test.xml" ) );
          System.out.println("ok");
    At line 183 when XmlSupport tries to cast the 2nd child of the document node to (Element), Xerces 2.1.0 fails with
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl.
    and Oracle XML Parser 9.0.2 fails with:
    java.lang.ClassCastException: oracle.xml.parser.v2.DTD.
    they should have written instead:
    String xmlVersion = doc.getDocumentElement().getAttribute("EXTERNAL_XML_VERSION");.
    instead of what they did.
    [list]
    Of course, it works OK when you use the Sun Crimson XML parser which is included by default in the JDK 1.4, and apparently that's the only one they tested.
    However, JClient requires the Oracle XML Parser so you need to use the Oracle XML Parser implementation of JAXP 1.1 (which should work fine, except for this bug). I patched the java.util.XmlSupport class, and prepended my fixed version of this class to the System classpath by adding the following Java VM command line parameter:
    -Xbootclasspath/p:C:\temp\xmlsupportfix\classes.
    and then I'm able to run your Client example with no problems.
    Not sure if Sun knows about this bug, but I'll look into it.
    I've attached my patched version of this JDK 1.4 class. I changed like 183 and line 192 (which had another use of the "bad assumption" DOM code.) Here it is:
    * @(#)XmlSupport.java  1.10 01/12/03
    * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    package java.util.prefs;
    import java.util.*;
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.*;
    import org.apache.crimson.tree.*;
    * XML Support for java.util.prefs. Methods to import and export preference
    * nodes and subtrees.
    * @author  Josh Bloch and Mark Reinhold
    * @version 1.10, 12/03/01
    * @see     Preferences
    * @since   1.4
    class XmlSupport {
        // The required DTD URI for exported preferences
        private static final String PREFS_DTD_URI =
            "http://java.sun.com/dtd/preferences.dtd";
        // The actual DTD corresponding to the URI
        private static final String PREFS_DTD =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
            "<!-- DTD for preferences -->"               +
            "<!ELEMENT preferences (root) >"             +
            "<!ATTLIST preferences"                      +
            " EXTERNAL_XML_VERSION CDATA \"0.0\"  >"     +
            "<!ELEMENT root (map, node*) >"              +
            "<!ATTLIST root"                             +
            "          type (system|user) #REQUIRED >"   +
            "<!ELEMENT node (map, node*) >"              +
            "<!ATTLIST node"                             +
            "          name CDATA #REQUIRED >"           +
            "<!ELEMENT map (entry*) >"                   +
            "<!ATTLIST map"                              +
            "  MAP_XML_VERSION CDATA \"0.0\"  >"         +
            "<!ELEMENT entry EMPTY >"                    +
            "<!ATTLIST entry"                            +
            "          key CDATA #REQUIRED"              +
            "          value CDATA #REQUIRED >"          ;
         * Version number for the format exported preferences files.
        private static final String EXTERNAL_XML_VERSION = "1.0";
         * Version number for the internal map files.
        private static final String MAP_XML_VERSION = "1.0";
         * Export the specified preferences node and, if subTree is true, all
         * subnodes, to the specified output stream.  Preferences are exported as
         * an XML document conforming to the definition in the Preferences spec.
         * @throws IOException if writing to the specified output stream
         *         results in an <tt>IOException</tt>.
         * @throws BackingStoreException if preference data cannot be read from
         *         backing store.
         * @throws IllegalStateException if this node (or an ancestor) has been
         *         removed with the {@link #removeNode()} method.
        static void export(OutputStream os, final Preferences p, boolean subTree)
            throws IOException, BackingStoreException {
            if (((AbstractPreferences)p).isRemoved())
                throw new IllegalStateException("Node has been removed");               
            XmlDocument doc = new XmlDocument();
            doc.setDoctype(null, PREFS_DTD_URI, null);
            Element preferences =  (Element)
                doc.appendChild(doc.createElement("preferences"));
            preferences.setAttribute("EXTERNAL_XML_VERSION", EXTERNAL_XML_VERSION);
            Element xmlRoot =  (Element)
            preferences.appendChild(doc.createElement("root"));
            xmlRoot.setAttribute("type", (p.isUserNode() ? "user" : "system"));
            // Get bottom-up list of nodes from p to root, excluding root
            List ancestors = new ArrayList();
            for (Preferences kid = p, dad = kid.parent(); dad != null;
                                       kid = dad, dad = kid.parent()) {
                ancestors.add(kid);
            Element e = xmlRoot;                       
            for (int i=ancestors.size()-1; i >= 0; i--) {
                e.appendChild(doc.createElement("map"));
                e = (Element) e.appendChild(doc.createElement("node"));
                e.setAttribute("name", ((Preferences)ancestors.get(i)).name());
            putPreferencesInXml(e, doc, p, subTree);
            doc.write(os);
         * Put the preferences in the specified Preferences node into the
         * specified XML element which is assumed to represent a node
         * in the specified XML document which is assumed to conform to
         * PREFS_DTD.  If subTree is true, create children of the specified
         * XML node conforming to all of the children of the specified
         * Preferences node and recurse.
         * @throws BackingStoreException if it is not possible to read
         *         the preferences or children out of the specified
         *         preferences node.
        private static void putPreferencesInXml(Element elt, Document doc,
                   Preferences prefs, boolean subTree) throws BackingStoreException
            Preferences[] kidsCopy = null;
            String[] kidNames = null;
            // Node is locked to export its contents and get a
            // copy of children, then lock is released,
            // and, if subTree = true, recursive calls are made on children
            synchronized (((AbstractPreferences)prefs).lock) {
                // Check if this node was concurrently removed. If yes
                // remove it from XML Document and return.
                if (((AbstractPreferences)prefs).isRemoved()) {
                    elt.getParentNode().removeChild(elt);
                    return;
                // Put map in xml element           
                String[] keys = prefs.keys();
                Element map = (Element) elt.appendChild(doc.createElement("map"));
                for (int i=0; i<keys.length; i++) {
                    Element entry = (Element)
                        map.appendChild(doc.createElement("entry"));
                    entry.setAttribute("key", keys);
    // NEXT STATEMENT THROWS NULL PTR EXC INSTEAD OF ASSERT FAIL
    entry.setAttribute("value", prefs.get(keys[i], null));
    // Recurse if appropriate
    if (subTree) {
    /* Get a copy of kids while lock is held */
    kidNames = prefs.childrenNames();
    kidsCopy = new Preferences[kidNames.length];
    for (int i = 0; i < kidNames.length; i++)
    kidsCopy[i] = prefs.node(kidNames[i]);
    // release lock
    if (subTree) {
    for (int i=0; i < kidNames.length; i++) {
    Element xmlKid = (Element)
    elt.appendChild(doc.createElement("node"));
    xmlKid.setAttribute("name", kidNames[i]);
    putPreferencesInXml(xmlKid, doc, kidsCopy[i], subTree);
    * Import preferences from the specified input stream, which is assumed
    * to contain an XML document in the format described in the Preferences
    * spec.
    * @throws IOException if reading from the specified output stream
    * results in an <tt>IOException</tt>.
    * @throws InvalidPreferencesFormatException Data on input stream does not
    * constitute a valid XML document with the mandated document type.
    static void importPreferences(InputStream is)
    throws IOException, InvalidPreferencesFormatException
    try {
    Document doc = load(is);
    String xmlVersion =
    // SPM - Fix bad assumption of getChildNodes().item(1)
    doc.getDocumentElement().getAttribute("EXTERNAL_XML_VERSION");
    if (xmlVersion.compareTo(EXTERNAL_XML_VERSION) > 0)
    throw new InvalidPreferencesFormatException(
    "Exported preferences file format version " + xmlVersion +
    " is not supported. This java installation can read" +
    " versions " + EXTERNAL_XML_VERSION + " or older. You may need" +
    " to install a newer version of JDK.");
    // SPM - Fix bad assumption of getChildNodes().item(1)
    Element xmlRoot = (Element)doc.getDocumentElement().getChildNodes().item(0);
    Preferences prefsRoot =
    (xmlRoot.getAttribute("type").equals("user") ?
    Preferences.userRoot() : Preferences.systemRoot());
    ImportSubtree(prefsRoot, xmlRoot);
    } catch(SAXException e) {
    throw new InvalidPreferencesFormatException(e);
    * Load an XML document from specified input stream, which must
    * have the requisite DTD URI.
    private static Document load(InputStream in)
    throws SAXException, IOException
    Resolver r = new Resolver();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setIgnoringElementContentWhitespace(true);
    dbf.setValidating(true);
    dbf.setCoalescing(true);
    try {
    DocumentBuilder db = dbf.newDocumentBuilder();
    db.setEntityResolver(new Resolver());
    db.setErrorHandler(new EH());
    return db.parse(new InputSource(in));
    } catch (ParserConfigurationException x) {
    throw new Error(x);
    * Recursively traverse the specified preferences node and store
    * the described preferences into the system or current user
    * preferences tree, as appropriate.
    private static void ImportSubtree(Preferences prefsNode, Element xmlNode) {
    NodeList xmlKids = xmlNode.getChildNodes();
    int numXmlKids = xmlKids.getLength();
    * We first lock the node, import its contents and get
    * child nodes. Then we unlock the node and go to children
    * Since some of the children might have been concurrently
    * deleted we check for this.
    Preferences[] prefsKids;
    /* Lock the node */
    synchronized (((AbstractPreferences)prefsNode).lock) {
    //If removed, return silently
    if (((AbstractPreferences)prefsNode).isRemoved())
    return;
    // Import any preferences at this node
    Element firstXmlKid = (Element) xmlKids.item(0);
    ImportPrefs(prefsNode, firstXmlKid);
    prefsKids = new Preferences[numXmlKids - 1];
    // Get involved children
    for (int i=1; i < numXmlKids; i++) {
    Element xmlKid = (Element) xmlKids.item(i);
    prefsKids[i-1] = prefsNode.node(xmlKid.getAttribute("name"));
    } // unlocked the node
    // import children
    for (int i=1; i < numXmlKids; i++)
    ImportSubtree(prefsKids[i-1], (Element)xmlKids.item(i));
    * Import the preferences described by the specified XML element
    * (a map from a preferences document) into the specified
    * preferences node.
    private static void ImportPrefs(Preferences prefsNode, Element map) {
    NodeList entries = map.getChildNodes();
    for (int i=0, numEntries = entries.getLength(); i < numEntries; i++) {
    Element entry = (Element) entries.item(i);
    prefsNode.put(entry.getAttribute("key"),
    entry.getAttribute("value"));
    * Export the specified Map<String,String> to a map document on
    * the specified OutputStream as per the prefs DTD. This is used
    * as the internal (undocumented) format for FileSystemPrefs.
    * @throws IOException if writing to the specified output stream
    * results in an <tt>IOException</tt>.
    static void exportMap(OutputStream os, Map map) throws IOException {
    XmlDocument doc = new XmlDocument();
    doc.setDoctype(null, PREFS_DTD_URI, null);
    Element xmlMap = (Element) doc.appendChild(doc.createElement("map"));
    xmlMap.setAttribute("MAP_XML_VERSION", MAP_XML_VERSION);
    for (Iterator i = map.entrySet().iterator(); i.hasNext(); ) {
    Map.Entry e = (Map.Entry) i.next();
    Element xe = (Element)
    xmlMap.appendChild(doc.createElement("entry"));
    xe.setAttribute("key", (String) e.getKey());
    xe.setAttribute("value", (String) e.getValue());
    doc.write(os);
    * Import Map from the specified input stream, which is assumed
    * to contain a map document as per the prefs DTD. This is used
    * as the internal (undocumented) format for FileSystemPrefs. The
    * key-value pairs specified in the XML document will be put into
    * the specified Map. (If this Map is empty, it will contain exactly
    * the key-value pairs int the XML-document when this method returns.)
    * @throws IOException if reading from the specified output stream
    * results in an <tt>IOException</tt>.
    * @throws InvalidPreferencesFormatException Data on input stream does not
    * constitute a valid XML document with the mandated document type.
    static void importMap(InputStream is, Map m)
    throws IOException, InvalidPreferencesFormatException
    try {
    Document doc = load(is);
    Element xmlMap = (Element) doc.getChildNodes().item(1);
    // check version
    String mapVersion = xmlMap.getAttribute("MAP_XML_VERSION");
    if (mapVersion.compareTo(MAP_XML_VERSION) > 0)
    throw new InvalidPreferencesFormatException(
    "Preferences map file format version " + mapVersion +
    " is not supported. This java installation can read" +
    " versions " + MAP_XML_VERSION + " or older. You may need" +
    " to install a newer version of JDK.");
    NodeList entries = xmlMap.getChildNodes();
    for (int i=0, numEntries=entries.getLength(); i<numEntries; i++) {
    Element entry = (Element) entries.item(i);
    m.put(entry.getAttribute("key"), entry.getAttribute("value"));
    } catch(SAXException e) {
    throw new InvalidPreferencesFormatException(e);
    private static class Resolver implements EntityResolver {
    public InputSource resolveEntity(String pid, String sid)
    throws SAXException
    if (sid.equals(PREFS_DTD_URI)) {
    InputSource is;
    is = new InputSource(new StringReader(PREFS_DTD));
    is.setSystemId(PREFS_DTD_URI);
    return is;
    throw new SAXException("Invalid system identifier: " + sid);
    private static class EH implements ErrorHandler {
    public void error(SAXParseException x) throws SAXException {
    throw x;
    public void fatalError(SAXParseException x) throws SAXException {
    throw x;
    public void warning(SAXParseException x) throws SAXException {
    throw x;

  • Not Printing the Content of Object:SOme Garbage Value on Screen

    i have made one program of Vehicle class which adds and prints the Details of Vehicles in the ArrayList but it always showa the Garbage Value in return.
    import java.util.*;
    import java.awt.*;
    import java.lang.*;
    import java.io.*;
    public class Vehicle
         private int reg_no;
         private String model_name;
         private int model_no;
         private int yr_manufacture;
         private String veh_type;
         private int price;
         private int weight;
         private String veh_status;
         public ArrayList vehicles;
         static BufferedReader keyboard = new BufferedReader (new InputStreamReader (System.in));
         public Vehicle()
              //super();          
              vehicles=new ArrayList(10);
         public Vehicle(int regno,String mo_name,int mo_no,int year_manu,String type_veh,int cost,int weight,String status)
         this.reg_no=regno;
         this.model_name=mo_name;
         this.model_no=mo_no;
         this.yr_manufacture=year_manu;      
         this.veh_type=type_veh;
         this.price=cost;
         this.weight=weight;
         this.veh_status=status;
         public void addVehicle() throws IOException
              int regno;
              String mo_name;
              int mo_no;
              int year_manu;
              String type_veh;
              int weight=0;
              int no_person;
              int cargo;
              int cost;
              String status;
              String confirm;
              int countvehicle=0;
              //start of do-while loop
              do {
                   System.out.print("Input the Vehicle Registration Number(Integer):");
                   regno=Integer.parseInt(keyboard.readLine().trim());
                   System.out.print("Input the Vehicle Make(String)eg. Mercedes,Ferrari,BMW etc: ");
                   mo_name=keyboard.readLine();
                   System.out.print("Input the Vehicle Model(Integer): ");
                   mo_no=Integer.parseInt(keyboard.readLine().trim());
                   System.out.print("Input the Vehicle Manufactured Year(Integer): ");
                   year_manu=Integer.parseInt(keyboard.readLine().trim());
                   System.out.print("Input the Vehicle Type:(CAR/BUS/TRUCK)");
                   type_veh=keyboard.readLine();
                   System.out.print("Where do u want this Vehicle to be Loaded:(Type F or I)?");
                   status =keyboard.readLine();
                        if(countvehicle>6 && status.equals("I"))
                        System.out.println("Sorry.........Ferry is Overloaded your Vehicle will be Loacally on the Island");
                        status="Island";
                        System.out.println("Vehicle in Island");
                        else
                             System.out.println("Vehicle loaded on to Ferry");
                             status="Ferry";
                   //decide the weight Factor for the Vehicle
                   if(type_veh.equals("CAR"))
                        weight=1500;                
                   else if(type_veh.equals("BUS"))      
                        System.out.print("Input the boarding No of Person in Bus: ");
                        no_person=Integer.parseInt(keyboard.readLine().trim());
                        weight=(10000+(no_person*75));// Assuming the weight of one Person is 75kg.
                   else if(type_veh.equals("TRUCK"))
                        System.out.print("Input the Truck Cargo Load: ");
                        cargo=Integer.parseInt(keyboard.readLine().trim());
                        weight=(4500+cargo);                
                   System.out.print("Input the Vehicle Price: ");
                   cost=Integer.parseInt(keyboard.readLine().trim());
                   Vehicle regVehicle= new Vehicle (regno,mo_name,mo_no,year_manu,type_veh,cost,weight,status);
                   vehicles.add(regVehicle);//Add to the Vector
                   regVehicle.printall();
                   //Saving the Added Object in File
                   /*try
                             FileOutputStream f_out = new FileOutputStream("Added.txt");                    
                             ObjectOutputStream obj_out = new ObjectOutputStream(f_out);
                             obj_out.writeObject(vehicles.add(regVehicle));
                        catch (FileNotFoundException e)
                             System.err.println("Error:"+ e.getMessage());
                        catch (IOException e)
                             System.err.println("Error:"+ e.getMessage());
                   countvehicle++;
                   System.out.print ("Add a new vehicle (y or n)? ");
                   System.out.flush();      
         confirm= keyboard.readLine();
                   } while (confirm.equals("y")); //end of do while loop
         public Vehicle getVehicle(int index) throws IOException
              return (Vehicle)vehicles.get(index);
         public int getRegNo() throws IOException
              return reg_no;               
         public Vehicle lookUpVehicle (int accnos)throws IOException
    //start of for loop
              for(int i=0;i<vehicles.size();i++)
              //checks if the information entered are correct using an if statement
              if((((Vehicle)vehicles.get(i)).getRegNo()) == accnos)
                   return ((Vehicle)vehicles.get(i));
    return null;
         public void printDetails()throws IOException
              System.out.println("--------Vehicle Details------------ ");
         for(int i=0;i<vehicles.size();i++)
              System.out.println(" " + getVehicle(i));           
         //System.out.println("\n\n");
         //return ((Vehicle)elements());*/
         /*Iterator it = vehicles.iterator();
              while (it.hasNext())
                   System.out.println(it.next());
         public void printall()
              System.out.println(reg_no);
              System.out.println(model_name);
              System.out.println(model_no);
              System.out.println(weight);
    }

    sohamdave wrote:
    what toString will contain in them.i didn't get you there.it is the whole data type-casted to String or only object type-casted to StringSimply return a String representation of the Vehicle object; frequently the String contains the member variable values, e.g.
    public String toString() {
       return model_name+" "+veh_type;
    }The List toString() method itself invokes your method when the List itself needs to be printed.
    kind regards,
    Jos

  • Mail program doubt

    i have used this program for sending mail through SAP.It has two options.First for sending as an html attachement,second for plain text inline with the body of the message.Actually i need the message in html format inline with the body of the message itself(not as an attachement)
    In simple words the body of the message want to be in html format,not an attachement..
    *& Report  ZMAIL                                                       *
    report  zmail                                   .
    tables: soos1.
    *type-pools: sbdst.
    parameters: report like varis-report obligatory.
    parameters: variant like varis-variant obligatory.
    parameters:reptitle like soos1-recrem  obligatory.
    select-options: recnam for soos1-recrem  obligatory.
    *{   INSERT         EDPK900415                                        1
    selection-screen skip 1.
    selection-screen begin of block b1 with frame title text-001.
    selection-screen begin of line.
    parameters: r1 radiobutton group g1.
    selection-screen comment:5(40) text-003 for field r1.
    selection-screen position 35.
    selection-screen end of line.
    selection-screen begin of line.
    parameters: r2 radiobutton group g1.
    selection-screen comment: 5(40) text-002 for field r2.
    selection-screen end of line.
    selection-screen end of block b1.
    *}   INSERT
    data: begin of html_tab occurs 0.
            include structure w3html.
    data: end of html_tab.
    data : it_pack_list  like soxpl occurs 0 with header line.
    data: begin of html_tab_converted occurs 0,
                line(255) type c,
              end of html_tab_converted.
    data:  listobject like abaplist occurs 20 with header line.
    data:  abap_list like abaplist occurs 20 with header line.
    data: icontab(32) occurs 10 with header line.
    data: lineno type i, length type i, size type i,
          l_filename like rlgrap-filename.
    data: icon_wa  type icon,
          internal type icon-internal,
          existing type c.
    data: my_bds type ref to cl_bds_document_set,
          key    type sbdst_object_key,
          files  type sbdst_files,
          wa     type bapifiles.
    data: filename type string,
          filefilter type string,
          path type string,
          fullpath type string.
    data: user_action type i.
    data: cur_guicopdepage(4) type c.
    data: gui_codepage(4) type n,        " added for message 500824
          is_unicode type rststype-sel_ok.
    data: convert_output type xstring,
          convert_buffer type xstring.
    data i type i.
    data tablength type i.
    data dummy type i.
    data list_index like  sy-lsind .
    data begin of new_pack_list occurs 10.
            include structure soxpl.
    data end of new_pack_list.
    data : owner like soud-usrnam.
    data: fg_sysdli like sonv-flag,
    fg_folrg like soxdl-folrg,
    dli_tab_save like soxdl occurs 20 with header line.
    data: rec_count like sy-tabix.
    data: object_type like sood-objtp value 'RAW'.
    data: object_hd_change like sood1 occurs 0 with header line.
    data: objcont like soli occurs 0 with header line.
    data: attcont_tab like soli occurs 0 with header line.
    data: atthead_tab like soli  occurs 0 with header line.
    data  so_ali like soli occurs 100 with header line.
    data  document_data like sodocchgi1.
    data  msg_text(80) type c.           "Message text
    data:  length type i, size type i.
    data  profile like soprd.
    data  subrc like sy-subrc value 0.
    data  so_ali_hex type standard table of solix.   "note 604603
    data: objpara like selc occurs 0 with header line.
    data: objparb like soop1 occurs 0 with header line.
    data: receivers like soos1 occurs 0 with header line.
    *data: receivers like soos5 occurs 0 with header line.
    data: r_dliq type c. "Shared Distrbution List
    data: r_dlip type c. "Private Distrbution list
    data: rep_title(50) type c. "Report Title
    data : begin of dis_lst occurs 10. "Internal table to store DL
            include structure sodm1.
    data : end of dis_lst.
    data : begin of listtab occurs 100. "Internal Table for List CONTAINER
            include structure abaplist.
    data : end of listtab.
    data : begin of downtab occurs 1,
    line(255),
    end of downtab.
    data ls_cnt type n.
    data:begin of it_mailid occurs 0,
         mailid(100), "  TYPE ZSENDINT_MAILID-MAILID,
         end of it_mailid.
    data c1.
    c1 = ' '.
    shift reptitle left deleting leading c1.
    *SELECT MAILID FROM ZSENDINT_MAILID INTO TABLE IT_MAILID WHERE SUBJECT = REPTITLE AND FLAG <> 'X'.
    "IF SY-SUBRC = 0.
    "CLEAR RECNAM.
    "REFRESH RECNAM.
    "LOOP AT IT_MAILID.
    "MOVE 'I' TO RECNAM-SIGN.
    "MOVE 'EQ' TO RECNAM-OPTION.
    "MOVE IT_MAILID-MAILID TO RECNAM-LOW.
    "APPEND RECNAM.
    "ENDLOOP.
    "ENDIF.
    *S.KARTHIKRAJA 07.10.2006
    call function 'LIST_FREE_MEMORY'
      tables
        listobject = listobject
      exceptions
        others     = 1.
    submit (report)
    using selection-set variant
                     exporting list to memory and return.
    import listobject from memory id '%_LIST'.
    if listobject[] is initial.
      exit.
    endif.
    call function 'WWW_HTML_FROM_LISTOBJECT'
           exporting
                  REPORT_NAME   =
                template_name = 'WEBREPORTING_REPORT'
           tables
                html          =  html_tab
                listobject    =  listobject
                listicons     =  icontab.
    call function 'LIST_TO_ASCI'
      exporting
        list_index         = -1
      tables
        listasci           = downtab
        listobject         = listobject
      exceptions
        empty_list         = 1
        list_index_invalid = 2
        others             = 3.
    call function 'TABLE_COMPRESS'       "Schneller Tabellencopy
          tables
               in         = listobject
               out        = so_ali.      "note 604603
               out        = so_ali_hex.   "note 604603
    call function 'SO_SOLIXTAB_TO_SOLITAB'           "note 604603
         exporting
              ip_solixtab = so_ali_hex[]
         importing
              ep_solitab  = so_ali[].
    call function 'SO_DLI_LIST_READ_XDL'
    exporting
    private = 'X'
    public = 'X'
    subscript = 'X'
    tables
    dli_display_tab = dli_tab_save
    exceptions
    communication_failure = 1
    dl_list_no_entries = 2
    owner_not_exist = 3
    system_failure = 4
    x_error = 5
    parameter_error = 6
    others = 7.
    call function 'SO_DLI_EXPAND'
    exporting
    system_dli = fg_sysdli
    convert = 'X'
    tables
    member = dis_lst
    objpara = objpara
    objparb = objparb
    exceptions
    active_user_not_exist = 1
    communication_failure = 2
    component_not_available = 3
    dl_name_not_exist = 4
    folder_not_exist = 5
    folder_no_authorization = 6
    forwarder_not_exist = 7
    object_not_exist = 8
    object_no_authorization = 9
    operation_no_authorization = 10
    owner_not_exist = 11
    parameter_error = 12
    recurrency_exist = 13
    substitute_not_active = 14
    substitute_not_defined = 15
    system_failure = 16
    x_error = 17
    others = 18.
    refresh receivers.
    clear receivers.
    move sy-datum  to receivers-rcdat .
    move sy-uzeit  to receivers-rctim.
    refresh object_hd_change.
    object_hd_change-objla = sy-langu. "Language
    object_hd_change-objcp = ' '. " Object can be changed byUSER
    object_hd_change-objsns = 'F'. " Msg Sensitivity private orbusiness
    object_hd_change-objdes = reptitle.
    object_hd_change-objnam = object_hd_change-objdes.
    append object_hd_change.
    if r1 = 'X'.
      move html_tab[] to objcont[].
    else.
      move downtab[] to objcont[].
    endif.
    describe table objcont lines i.
    it_pack_list-head_start = 1.
    it_pack_list-head_num = 0.
    it_pack_list-body_start = 1.
    it_pack_list-body_num = i.
    it_pack_list-OBJTP = 'RAW'.
    move variant to it_pack_list-objnam.
    move variant to it_pack_list-objdes.
    move 'HTM' to it_pack_list-file_ext.
    append it_pack_list.
    loop at html_tab.
      call function 'SCP_TRANSLATE_CHARS'
        exporting
          inbuff           = html_tab
          outcode          = gui_codepage
          csubst           = 'X'
          substc_space     = 'X'
          substc           = '00035'
        importing
          outbuff          = convert_output
        exceptions
          invalid_codepage = 1
          internal_error   = 2
          cannot_convert   = 3
          fields_bad_type  = 4
          others           = 5.
      concatenate convert_buffer convert_output into convert_buffer in
      byte mode.
    endloop.
    i = 0.
    describe field html_tab_converted length tablength in byte mode.
    while i < xstrlen( convert_buffer ).
      dummy = xstrlen( convert_buffer ) - i.
      if tablength > dummy.
        html_tab_converted-line = convert_buffer+i(dummy).
      else.
        html_tab_converted-line = convert_buffer+i(tablength).
      endif.
      i = i + tablength.
      append html_tab_converted.
    endwhile.
    receivers-sel = 'X'.
    receivers-sndex = ' '. "
    receivers-sndpri = '1'. "Priority of the message
    receivers-deliver = ' '.
    receivers-not_deli = ' '.
    receivers-read = ' '.
    receivers-recnam = 'U-'.
    receivers-mailstatus = 'E'.
    receivers-sortclass = '5'.
    receivers-recesc = 'U'. " U means Internet Address
    receivers-SAP_BODY = 'X'.
    receivers-sndart = 'INT'.
    loop at recnam.
      receivers-adr_name = recnam-low.
      receivers-recextnam = recnam-low.
      append receivers.
    endloop.
    owner = sy-uname.
    if r1  = 'X'.
      call function 'SO_OBJECT_SEND'
      exporting
    object_hd_change = object_hd_change
      object_type = object_type
      outbox_flag = 'X'
      owner = owner
      sender = sy-uname
      tables
      receivers = receivers
    packing_list = it_pack_list
      att_cont = objcont
      att_head = atthead_tab
      exceptions
      active_user_not_exist = 1
      communication_failure = 2
      component_not_available = 3
      folder_not_exist = 4
      folder_no_authorization = 5
      forwarder_not_exist = 6
      note_not_exist = 7
      object_not_exist = 8
      object_not_sent = 9
      object_no_authorization = 10
      object_type_not_exist = 11
      operation_no_authorization = 12
      owner_not_exist = 13
      parameter_error = 14
      substitute_not_active = 15
      substitute_not_defined = 16
      system_failure = 17
      too_much_receivers = 18
      user_not_exist = 19
      x_error = 20
      others = 21.
    else.
      call function 'SO_OBJECT_SEND'
       exporting
      object_hd_change = object_hd_change
       object_type = object_type
       outbox_flag = 'X'
       owner = owner
       sender = sy-uname
       tables
       objcont = objcont
       receivers = receivers
       exceptions
       active_user_not_exist = 1
       communication_failure = 2
       component_not_available = 3
       folder_not_exist = 4
       folder_no_authorization = 5
       forwarder_not_exist = 6
       note_not_exist = 7
       object_not_exist = 8
       object_not_sent = 9
       object_no_authorization = 10
       object_type_not_exist = 11
       operation_no_authorization = 12
       owner_not_exist = 13
       parameter_error = 14
       substitute_not_active = 15
       substitute_not_defined = 16
       system_failure = 17
       too_much_receivers = 18
       user_not_exist = 19
       x_error = 20
       others = 21.
    endif.
    commit work.
    call function 'SO_DEQUEUE_UPDATE_LOCKS'.

    i have not gone thru your source code fully.
    maintain the text in Tcode SO10.
    use the fn module READTEXT* to read the contents of the text.
    cheers
    jayanthi.K

  • Trouble creating a open items report (BSID and BSAD tables)

    Hi guys,
    im creating a report that must display open items for an especific date, and i do it very well with a query from BSID table.
    The problem comes when u use a date on the past, example last week.
    if u do that, the items are now closed and are no longer stored in BSID table, so i think that they must be now in BSAD table, but i dont know how to relate wich ones are recently closed...
    i also tried to do a query from BSAD with augdt >= last week date, and i almost get the items that i needed(this items plus the ones from BSID), but is not exactly because u can close an item with a date in the past..
    is there any way to relate that 2 tables, or what exactly happens when an items change from bsid to bsad??
    any ideas?

    Hi;
    I think the best way to recive the necessary information is using logical data base DDF.  You can use report RFITEMAR to see how use the logical data base.
    Some months ago I've read the data in my report in following way:
    1. make Z-copy of report RFITEMAR
    2. in Z-copy after end-of-selection insert
    export it_pos to memory id 'POS_TABLE'.
    3. In your report write a form similar to my form below:
    *&      Form  submit_zrfitemar
    FORM submit_zrfitemar  tables    rkunnr  type trgr_kunnr
                                     it_pos  type it_rfposxext
                           using     ibukrs  type bukrs
                                     idatsd  type sy-datum.
       data: rspar    type table of rsparams,
             l_rspar  type rsparams,
             l_pos    type rfposxext,
             akunnr  type kunnr.
       l_rspar-selname = 'DD_KUNNR'.
       l_rspar-kind    = 'S'.
       loop at rkunnr.
           move-corresponding rkunnr to l_rspar.
           if l_rspar-high = ''.
               l_rspar-option  = 'EQ'.
               else.
               l_rspar-option  = 'BT'.
           endif.
           append l_rspar to rspar.
        endloop.
        clear: l_rspar.
        l_rspar-selname = 'DD_BUKRS'.
        l_rspar-kind    = 'S'.
        l_rspar-sign    = 'I'.
        l_rspar-option  = 'BT'.
        l_rspar-low  = ibukrs.
        append l_rspar to rspar.
        clear: l_rspar.
        l_rspar-selname = 'PA_STIDA'.
        l_rspar-kind    = 'S'.
        l_rspar-sign    = 'I'.
        l_rspar-option  = 'BT'.
        l_rspar-low  = idatsd.
        append l_rspar to rspar.
        clear: it_pos[].
      submit ZRFITEMAR
      with selection-table rspar
      and return.
      import it_pos from memory id 'POS_TABLE'.
    ENDFORM.                    " submit_zrfitemar
    You find the necessary data in table IT_POS.
    JS
    Edited by: John Smith on Oct 9, 2008 5:42 PM

Maybe you are looking for