Problem in fetching data by using loop.

Hello Friends,
i have to create one report based upon item wise.
Based upon item wise i have displayed Total stock qty and
then item wise GRPO details with Qty data.
I have created Stored procedure for this.
Now i have kept one column RestQty which is basically used to
display rest quantity based upon the data of Total Stock Qty and GRPO quantity.
To Implement this logic i have used loop condition but its not returning correct
qty on Rest Qty column.
Rest Qty should work like this:-
Item aaaaa
If Total Quantity = 28
GRPO Quantity = 40(First GRPO Qty),
          7(second last GRPO Qty), &
          3 (Last GRPO Quantity)
Now Total quantity always first check with Last GRPo Qty,
it means 28 > 3 then 3 comes to Rest Qty col.
then Total quantity check with second Last GRPo Qty,
it means 28 > 7 + 3(Last GRPo Qty) then 7 comes to Rest qty col.
then Total quantity first check with first GRPo Qty,
it means 28 > 40(first grpo qty) + 7 + 3, its not satisfied,
hence it should display 28 - (7+3) = 18 in rest qty col.
if we sum Rest qty column for Item aaaa then it should equal to Total Qty for particular item.
so its should work for Item aaaa, based upon this other items should work like this.
so i only need to correct the data of Rest Qty col, other are ok.
Please help me to correct this query.
Regards,

SELECT OITM.ItemCode,OITM.ItemName,sum(OITW.onhand) as onhand,abc.basenum as GRPONo, abc.docdate as GRPODate,
(select top 1 docrate from opdn where docentry = abc.baseentry and docnum = abc.basenum) as GRPORate,
(select  sum(quantity) from pdn1 where docentry = abc.baseentry and abc.itemcode = itemcode) As GRPOQty,null,
(select top 1 price from pdn1 where docentry = abc.baseentry and abc.itemcode = itemcode) As GRPOUnitPrice,
(select distinct top 1 opch.docnum from opch inner join pch1 on opch.docentry = pch1.docentry
where pch1.baseentry = abc.baseentry) as APInvNo,
(select distinct top 1 opch.docdate from opch inner join pch1 on opch.docentry = pch1.docentry
where pch1.baseentry = abc.baseentry) as APInvDt,
(select distinct top 1 opch.u_dodamt from opch inner join pch1 on opch.docentry = pch1.docentry
where pch1.baseentry = abc.baseentry) as APInvDocRate
FROM OITW
INNER JOIN OITM ON OITW.ItemCode = OITM.ItemCode
INNER JOIN OITB ON OITM.ItmsGrpCod = OITB.ItmsGrpCod
left join sri1 as abc on OITW.ItemCode = abc.ItemCode
WHERE(OITW.OnHand <> 0 Or oitw.iscommited <> 0 Or oitw.onorder <> 0 Or oitw.minstock <> 0)
AND (OITW.ItemCode IN (SELECT pdn1.ItemCode FROM Opdn
inner join pdn1 on opdn.docentry = pdn1.docentry
where opdn.series = 314 or opdn.series = 94 or opdn.series = 663))and (abc.Direction = 0)
AND (abc.LineNum =(SELECT MAX(LineNum) AS Expr1 FROM  SRI1
WHERE (ItemCode = abc.ItemCode) AND (SysSerial = abc.SysSerial))) AND basetype = 20
and abc.docdate >= (@FromDate) and abc.docdate <= (@ToDate)
group by OITM.ItemCode,OITM.ItemName, oitm.suppcatnum,
abc.basenum, abc.sysserial, abc.baseentry, abc.basenum, abc.docdate,
oitm.ItmsGrpcod, oitb.ItmsGrpNam, abc.baseentry, abc.SysSerial, abc.ItemCode,oitw.itemcode
order by OITM.ItemName,abc.basenum

Similar Messages

  • Swing Applet in JSP: problem with fetching data from database

    i am facing a problem while fetching data from database using Swing Applet plugged in a JSP page.
    // necessary import statements
    public class NewJApplet extends javax.swing.JApplet {
    private JLabel jlblNewTitle;
    private Vector vec;
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    NewJApplet inst = new NewJApplet();
    frame.getContentPane().add(inst);
    ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
    frame.pack();
    frame.setVisible(true);
    public NewJApplet() {
    super();
    initGUI();
    private void initGUI() {
    try {
    this.setSize(542, 701);
    this.getContentPane().setLayout(null);
    jlblTitle = new JLabel();
    this.getContentPane().add(jlblTitle);
    jlblTitle.setText("TITLE");
    jlblTitle.setBounds(197, 16, 117, 30);
    jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
    jlblNewTitle = new JLabel();
    this.getContentPane().add(jlblNewTitle);
    Vector vecTemp = getDBDatum(); // data fetched fm DB r stored here.
    jlblNewTitle.setText(vecTemp.get(1).toString());
    jlblNewTitle.setBounds(350, 16, 117, 30);
    jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));
    } catch (Exception e) {
    e.printStackTrace();
    }//end of initGUI()
    private Vector getDBDatum() {
    // fetches datum from oracle database and stores it in a vector
    return lvecData;
    }//end of getDBDatum()
    }//end of class
    in index.jsp page i have included the following code for calling this applet:
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
    width="600" height="300">
    <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>
    if i view it in using AppletViewer it runs perfectly and display the data in JLabel. (ie, both jlblTitle and jlblNewTitle).(ie, DATA FETCHES FROM db AND DISPLAYS PROPERLY)
    BUT IF I CLICK ON INDEX.JSP, ONLY jlblTitle APPEARS. jlblnNewTitle WILL BE BLANK(this label name is supposed to fetch from database)
    EVERY THING IS DISPAYING PROPERLY EXCEPT DATA FROM DATABASE!!!
    i signed the applet as follows :
    grant {
    permission java.security.AllPermission;
    Can any body help me to figure out the problem?

    This is the Swing Applet java code
    import java.awt.Dimension;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Vector;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.JScrollPane;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.SwingConstants;
    public class HaiApplet extends javax.swing.JApplet {
         private JLabel     jlblTitle;
         private JLabel     jlblNewTitle;
         private Vector     vec;
         * main method to display this
         * JApplet inside a new JFrame.
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              NewJApplet inst = new NewJApplet();
              frame.getContentPane().add(inst);
              ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
              frame.pack();
              frame.setVisible(true);
         public HaiApplet() {
              super();
              initGUI();
         private void initGUI() {
              try {               
                   this.setSize(542, 701);
                   this.getContentPane().setLayout(null);
                        jlblTitle = new JLabel();
                        this.getContentPane().add(jlblTitle);
                        jlblTitle.setText("OMMS");
                        jlblTitle.setBounds(197, 16, 117, 30);
                        jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
                        jlblTitle.setHorizontalAlignment(SwingConstants.CENTER);
                        jlblTitle.setForeground(new java.awt.Color(0,128,192));
                        jlblNewTitle = new JLabel();
                        this.getContentPane().add(jlblNewTitle);
                        Vector vecTemp = getDBDatum();
                        jlblNewTitle.setText(vecTemp.get(1).toString());
                        jlblNewTitle.setBounds(350, 16, 117, 30);
                        jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));     
              } catch (Exception e) {
                   e.printStackTrace();
         }//end of initGUI()
         private Vector getDBDatum() {
              Vector lvecData = new Vector(10,5);
              Connection lcon = null;
              Statement lstmt = null;
              ResultSet lrsResults = null;
              String lstrSQL = null;
              String lstrOut = null;
              try {
                   OmmsDBConnect db = new OmmsDBConnect();
                   lcon = db.connectDb();
                   lstmt = lcon.createStatement(lrsResults.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   lstrSQL = "select DT_ID from P_DATATABLES";
                   lrsResults = lstmt.executeQuery(lstrSQL);        
                   int i = 0;
                   lrsResults.last();
                   int length = lrsResults.getRow();
                   System.out.println(length);
                   lrsResults.beforeFirst();
                   int recCount = 0;
                   while (lrsResults.next()) {
                        recCount++;
                        lvecData.addElement(new String(lrsResults.getString("DT_ID")));
                   //     System.out.println("ID :  " + lrsResults.getString(1));
                        i++;
                   }System.out.println("here 3 out fm while");
              catch(SQLException e) {
                   System.out.print("SQLException: ");
                   System.out.println(e.getMessage());
              catch(Exception ex) {
                   lstrOut = "Exception Occured " + ex.getMessage();
              finally {
                   try {
                        lrsResults.close();
                        lstmt.close();
                        lcon.close();
                        System.out.println("[DONE]");
                   catch(Exception e) {
                        System.out.println(e);
             }//end of finally
              return lvecData;
         }//end of getDBDatum()
    }//end of classOfcourse the above code compiles and runs well. in Applet Viewer
    I plugged the above Swing Applet in a JSP page index.jsp
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
                   width="600" height="300">
         <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>Every thing is working fine in AppletViewer...But if i view this in any browser, then only the jlblTitle is displaying. jlblNewTitle is not displaying(this label name is actually fetching from thedatabase)
    can any body help me regarding this matter.? Thx in Advance.

  • I have Problem in fetching data from CONTROL BLOCK

    Sir,
    I am facing problem in fetching data from control block.
    Asif.

    is your control-block a filter-block for the detail-block?
    Do you want to see only the detail-data of the user-id you have displayed in the master?

  • Problem in Fetching data using RFC FM from NON SAP system

    Hi All,
    Need help from experts on data transfer using RFC from a non SAP system/database. I have creasted the destination in sm59.
    I have created a function module too which has an import parameter as a query and export parameter as an internal table.
    No when i test run this function module it returns some entries. But when I call this FM in a program it throws a dump 'rfc_external_abort' .  Here is what the call to FM looks like in my program. Please guide me on this.
    Thanks in advance,
    Saket.
    DATA : lv_query TYPE string,
           it_gddbdata TYPE ZC9_TAB_SOLMAN_XI_RFC.
    lv_query = 'SELECT *  FROM GDDB.VW_GDDB_PERSONS WHERE LASTNAME = ''''A'''''.
    CALL FUNCTION 'Z_C9_SOLMAN_XI_GDDBCON'
    DESTINATION  'D39'
      EXPORTING
        in_sql_query       = lv_query
    IMPORTING
       ET_GDDB_DATA       = it_gddbdata

    Hi,
    your question..
    DATA : lv_query TYPE string,
    it_gddbdata TYPE ZC9_TAB_SOLMAN_XI_RFC.
    lv_query = 'SELECT * FROM GDDB.VW_GDDB_PERSONS WHERE LASTNAME = ''''A'''''.
    CALL FUNCTION 'Z_C9_SOLMAN_XI_GDDBCON'
    DESTINATION 'D39'
    EXPORTING
    in_sql_query = lv_query
    IMPORTING
    ET_GDDB_DATA = it_gddbdata
    you are telling that you are fetching the data  from non sap system  using RFC function module.. how it is possible..you canot fetch the data from non SAP system using RFC FM alone.. you have to use the concept BAPI.. it will work..
    I hope this will help  you..
    Regards,
    Kiran

  • Facing  problem in fetching data

    hello everyone ,
    can anyone help me out  frm the problem , i need to fetch  data in alv  report (  likp-vbeln  ,lips-vgbel , likp-kunnr , vbpa-lifnr , vbrp-vgbel,vbuk-fkstk,vbrk-kunrg, vbrk-fkart and lfa1-name1 )  using  input parameter lips-vbeln or likp-vbeln .every time  i stuck in  select querries  for  fetching fieds  of   vbpa vbrk  vbrp vbuk and lfa1 .
    i am new to this forum excuse for  any mistake  regarding the rules and restriction .
    ranjan

    Moderator message - Welcome to SCN.
    Please read Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!! and How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Thread locked.
    Rob

  • GUI_UPLOAD problem if input data is using Excel

    Hi , Some one can answer this quick question.
    While i am using GUI_upload  i am not able to recieve the data properly.
    GUI UPLOAD From Data
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = lvs_filenm
        FILETYPE                      = 'ASC'
    HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
    its not working  properly . can i give any has field separtor like 'X'
    And i copied the same data  in excel to text file. GUI_upload is working fine and data is exactly coming in to the internal table.
    GUI UPLOAD From Data
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = lvs_filenm
        FILETYPE                      = 'DAT'
        HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
    Any one can help me out in this regard. Client wants to use GUI_upload functional module only...

    Hi vamsi,
                  I will send sample code along with flat file.I will attach flat file at the end of program check it once.This program works fine for me for XLS FILE.
    *& Report  YBDC_UPLOAD_MM01_XLS                                        *
    *&  DEVELOPER  : KIRAN KUMAR.G                                         *
    *&  PURPOSE    : MAKE CHANGES TO DOWNLOADED FILE AND UPLOAD THE FILE   *
    *&  CREATION DT: 3/12/2007                                             *
    *&  REQUEST    : ERPK900035                                            *
    REPORT  YBDC_UPLOAD_MM01_XLS.
    Tables
    TABLES : mara. "General Material Data
    Global BDCDATA Structure and MESSAGE Structure
    DATA: gt_bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE,
          gt_msgtab  LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    Global Variables
    DATA: gv_infile  TYPE string,
          gv_msg     TYPE string,
          gv_update  VALUE 'A'.
    Internal Table
    DATA:  BEGIN OF gt_data OCCURS 0,
             matnr(20), "Material Number
             mbrsh(20), "Account Group
             mtart(20), "Material Type
             meins(20), "Base Unit Of Measure
             maktx(20), "Material Description
           END OF gt_data.
    Selection-screen
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_file LIKE rlgrap-filename,
                p_mode.
    SELECTION-SCREEN : END OF BLOCK b1.
    Select the File
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM fetch_file.
    START-OF-SELECTION.
    Fetch Data From XLS File
      PERFORM fetch_data.
    Fetch Data From XLS File
      PERFORM delete_headerinfo.
    Fetch Data From XLS File
      PERFORM place_data.
    *&      Form  fetch_file
          text
    -->  p1        text
    <--  p2        text
    FORM fetch_file .
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
      FIELD_NAME          = ' '
       IMPORTING
         file_name           = p_file.
      gv_infile = p_file.
    ENDFORM.                    " fetch_file
    *&      Form  fetch_data
          text
    -->  p1        text
    <--  p2        text
    FORM fetch_data .
      refresh : gt_data. "Clear Body Of the Internal Table
      clear   : gt_data. "Clear Header Line
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = gv_infile
         filetype                      = 'ASC'
         has_field_separator           = 'X'
        HEADER_LENGTH                 = 0
        READ_BY_LINE                  = 'X'
        DAT_MODE                      = ' '
      IMPORTING
        FILELENGTH                    =
        HEADER                        =
        TABLES
          data_tab                      = gt_data
       EXCEPTIONS
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         OTHERS                        = 17
      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.                    " fetch_data
    *&      Form  place_data
          text
    -->  p1        text
    <--  p2        text
    FORM place_data .
      LOOP AT gt_data.
        PERFORM bdc_dynpro      USING 'SAPLMGMM' '0060'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RMMG1-MATNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=AUSW'.
        PERFORM bdc_field       USING 'RMMG1-MATNR'
                                       gt_data-matnr.
        PERFORM bdc_dynpro      USING 'SAPLMGMM' '0070'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'MSICHTAUSW-DYTXT(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_field       USING 'MSICHTAUSW-KZSEL(01)'
                                      'X'.
        PERFORM bdc_dynpro      USING 'SAPLMGMM' '4004'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BU'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'MAKT-MAKTX'.
        PERFORM bdc_field       USING 'MAKT-MAKTX'
                                       gt_data-maktx.
        PERFORM bdc_field       USING 'MARA-MTPOS_MARA'
                                      'NORM'.
        CALL TRANSACTION 'MM02' USING gt_bdcdata MODE p_mode
                                      UPDATE     gv_update
                                      MESSAGES   INTO gt_msgtab.
    *For Error Messages Handling.
        LOOP AT gt_msgtab.
          CALL FUNCTION 'FORMAT_MESSAGE'
            EXPORTING
              id        = sy-msgid
              lang      = sy-langu
              no        = sy-msgno
              v1        = sy-msgv1
              v2        = sy-msgv2
              v3        = sy-msgv3
              v4        = sy-msgv4
            IMPORTING
              msg       = gv_msg
            EXCEPTIONS
              not_found = 1
              OTHERS    = 2.
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          IF sy-tabix = 1.
            WRITE: / 'Process Log' COLOR 3.
          ENDIF.
          WRITE:/ gv_msg.
        ENDLOOP.
        REFRESH gt_msgtab.
        REFRESH gt_bdcdata.
      ENDLOOP.
    ENDFORM.                    " place_data
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR gt_bdcdata.
      gt_bdcdata-program  = program.
      gt_bdcdata-dynpro   = dynpro.
      gt_bdcdata-dynbegin = 'X'.
      APPEND gt_bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR gt_bdcdata.
      gt_bdcdata-fnam = fnam.
      gt_bdcdata-fval = fval.
      APPEND gt_bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  delete_headerinfo
          text
    -->  p1        text
    <--  p2        text
    FORM delete_headerinfo .
      DELETE gt_data INDEX 1.
    ENDFORM.                    " delete_headerinfo
                         FLAT FILE
    *MATERIAL NUMBER     INDUSTRY SECTOR     MATERIAL TYPE     BASE UNIT OF
    *MEASURE     MATERIAL DESCRIPTION
    *806     M     FERT     CM     IRON
    *807     M     HALB     KG     STEEL
    *808     M     HAWA     KG     IRON
    Award points if helpful.
    Kiran Kumar.G.A

  • Problem with Filtering Data by Using "Greater Than" in APD

    Dear Experts,
      First of all, I am a novice of SAP Data Mining. I try to filter data in APD by using the 'Restrict Amont of Data (the Filter Icon).' My problem is really simple. I don't know how to filter data which have value greater than a constant.
    For example, I try to keep only records which have a quantity greater than 1000.
      At the selection option in the single value tab, I found only the '=' option. The options like '>', '<', '>=', etc are not found. Could anyone suggest me please?

    I do appreciate your prompt response.
    Seemingly, using the interval is our best solution, though it is not best for our customers.
    Having already gone through the note you gave me, in fact, it is really pertinent. Unfortunately, our support package is now 13, and it is extremely difficult to retest our system if we decide to apply the support package 16.
    Are there any other solution?
    By the way, you deserve my point.

  • Problem: Z table data updates using SM30

    Hi,
    I have a requirement, while updating records in a Z table
    using SM30 Transaction.
    The Structure of the table is below:
    APMOD    Primary Key   Char(3)
    KONST    Primary Key   Char(20)
    ENDDA    Primary Key   DATS
    BEGDA    Non Key       DATS   
    and some other non key fields....
    Problem:  This table should act something like Infotype in HR.  I mean Delimition of Records while creating or changeing the existing record.
    Say there is a record
    APMOD = OGMT
    KONST = Organization Management
    BEGDA = 01/01/2004
    ENDDA = 12/31/9999
    Whenever i am Inserting a new record with key
    APMOD = OGMT and KONST = 'Organization Management'
    and BEGDA = '01/01/2006'.
    First it should update the old record with
    BEGDA = 01/01/2004 and ENDDA = 12/31/2005
    Then the new record needs to be inserted with
    BEGDA = 01/01/2006 and ENDDA = 12/31/9999.
    How can I achieve this using SM30? Can we write our own code somewhere? If yes Where and How?  Or is there any settings available for this requirement?
    I can write a Z program to update this Table, but i should achieve this using SM30 only.
    Let me know if you need any additional info. 
    Regards,
    Sudhakar.

    Hi Sudhakar,
    1. I tried the same at my end. It works fantastic !
       In  SM30 it shows
       'Delimit' Button
       'Expand <--> Collapse' Button.
        and accordingly delmits the records.
    2. in SE11,
       Use the menu
       Utilities ---> Table Maintenance Generator
       and finally build a table maintenance
       to use in SM30.
    3. When u use in SM30,
       u will achieve what u want.
    4. Just make sure your field
       ENDDA has the data element ENDDA
       in table definition.
      It should also be key.
    5. After this ENDDA column,
       there should be no other key column
      ( not even BEGDA)
    I Hope it helps.
    Regards,
    Amit M.

  • Problem in fetching data for Tcode QA03

    Hi,
    I am working on a report in which i have to pick up the dates for a material i.e. when it is MIGO is done and when it is moved to unrestricted stock.
    Till now i am fetching up the data from MSEG nad MKPF where i am getting the data w.r.t. movement types(101,321).
    Now the problem is ,i had checked that when i execute Tcode QA03 there is a option of checking the log of it where i found that is shows the value that the purticular value has been moved to unretricted stcok..
    The problem is it is storing the value in table RSTXT and field name TXLINE. How can i pick up the value for it and moreover it doesnot have the movt.type mentioned in it? Should i pick the value from MSEG n MKPF or make my logic through QALS and
    RSTXT.
    Please provide me some information about it...

    Hi Firends,
    I had developed a code for it now,but the problem is i am facing right now is when try to have difference between dates and time of both mvt.types 101 and 321,there comes a problem that it is not able to calculate the diiference as the data of both present in the seperate lines of the itab. Is there anyway that it can be  calculated.
    Here is the link to the code which i had created, please tell me  where i can rectify the error  :-
    I am really facing the problem in it.. plzz check the code whether it is corect or not?
    http://docs.google.com/View?id=dngp529_4grr2ctf6
    Edited by: nav009 on Nov 6, 2009 9:43 AM

  • Problem while Sending data concurrently using Evsnd function.

    Hi All,
    i am trying to send data from input schudule using evsnd function.
    As per a test scenerio.
    User 1: one user( cantains all bas members) , opens the input schudule  , waits for and hour  and do planning for few basmemebers and  then submit the data.
    User 2:another user ( subset of all base members) ,opens input schudule  ,do planning and submits the data.
    Now when  user 1 Sumits the data , it overwrites the value of user 2.
    is there is any way by which we can restrict user 1 of sending those value only that he/she  changed.
    Edited by: Tapeshwar Singh Bagal on Mar 11, 2009 11:02 AM

    First, I'd strongly encourage you to use EVDRE instead of EVSND, as it gives a lot better control over many aspects of the input schedule.
    As to your point, EVDRE definitely will only send back to the server the cells which have changed. It's been a few releases since I used EVSND (and its behavior may have changed some in the meantime), but if I recall correctly, it also does some of this same checking.
    Another option to consider is to make the input schedule smaller (fewer accounts or entities or products or whatever your dimensions), and split it into two pieces, one for each of the business processes that the 2 users are performing.
    If the 2 users are maintaining the same intersection of data, and performing the same business process (acting as a team, for example) then BPC has limited ability to support "checking out for edit" or locking the data for one user, in a way that prevents another user from changing it. The "park n go" feature does this in a way, but it's something that the user needs to do intentionally. That doesn't sound like your User 1 scenario of waiting for an hour before submitting -- probably when they opened it up, they thought it would only take 2 minutes, but then the phone rang, and then an email.... and then finally they finish it an hour or 8 later.

  • Problem in fetching data

    hi
    I M FACING STRANGE PROBLEM.
    WHEN I GIVE SIMPLE "SELECT * FROM TABLE@DBLINK" COMMAND IT GIVES NOT ERROR. ALSO ON THE MOTHER SCHEMA IT RUNS FINE. BUT WHEN I USE THIS COMMAND OVER OTHER DATABASE WITH DBLINK LIKE I MENTIONED HERE BELOW, A VERY STRANGE ERROR COMES.
    PLEASE HELP IF SOME ONE HAS GAUGHT THROUG THIS ...?
    COMMAND IS:-
    SQLWKS> SELECT DISTINCT P.SALES_CONTRACT_NUM, P.SCHEDULE_NUM
    2> FROM PROCESSING_SCHEDULE@MARK P
    3> ORDER BY 1
    4>
    SALES_CONTRACT_NUM SCHEDULE_N
    ORA-01114: IO error writing block to file 1027 (block # 9609)
    ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed.
    O/S-Error: (OS 9609) DNS zone already exists.
    ORA-01114: IO error writing block to file 1027 (block # 9609)
    ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed.
    O/S-Error: (OS 9609) DNS zone already exists.
    ORA-02063: preceding 8 lines from MARK

    FURTHOR MORE TO MY EARLIER QUERY, I FOUND THAT, ERROR COMES WHEN I USE DISTINCT KEYWORD, OTHER WISE IT EXECUTES WELL.
    IS THERE SOME BUG WITH DISTINCT KEYWORK
    ???

  • Problem in fetching data from 0025IT

    Hello...
    Here we are working on One Page Profile and when i had made enteries in dev server  for employee first aparaisal in infotype 25 , it has shown one record correctly.But in the table HRP1001 , it created two records with same  dates and ratings but created two different object ids for the same record. It is showing same two record in the smartform also.
    Please advice me how to solve this problem...
    Thanks and Regards
    Shivangi...

    Hello Experts ,
    I have the problem regarding Infotype25 . I am working on one page profile , for that i have maintain new entry for an employee in infotype 25.In PA30 ,the record is maintained correctly but in the table HRP1001 it has shown two duplicate records with different object ids.Please help me how can i get the single record in that table .
    Thanks and Regards,
    Shivangi

  • Linked Server Problem while SQL Data Transfer using Non-sys Admin Account

    Hi Team,
    I've an issue while transferring the data from ServerA to ServerB. I've made the ServerB as "Linked Server" to Server A. Pre requisite like:
    1) SQL Account is been created on ServerB.
    2) Timeout settings for remote connections is set to "No Timeout".
    When I execute the below script using Query Window, It executes successfully:
    Insert into ServerB.DBName.dbo.TableName1
    Select * from dbo.TableName1
    But when I execute the same step by creating a SQL Job, it fails with the below error message:
    Message
    Executed as user: DomainName\UserName. Named Pipes Provider: Could not open a connection to SQL Server [1450]. [SQLSTATE 42000] (Error 1450)  OLE DB provider "SQLNCLI" for linked server "ServerB" returned message "Login
    timeout expired". [SQLSTATE 01000] (Error 7412)  OLE DB provider "SQLNCLI" for linked server "ServerB" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005,
    this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". [SQLSTATE 01000] (Error 7412).  The step failed.
    Could you please help me in fixing the above error message and I can transfer the SQL Data between 2 Servers.
    Thank You
    Sridhar D Naik

    Sridhar,
    Is this still an issue?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Problems obtaining POST data / content using Sockets

    Hi,
    I have a servlet which needs to listen on a specific port for HTTP post requests.
    At present I have the following code:
    try{
       inputStream=client.getInputStream();
       streamReader=new InputStreamReader(inputStream);
       reader=new BufferedReader(streamReader);
    }catch(IOException e){
       //Write error entry in the log file.
    //Get the request and HOPEFULLY the params...
    try{
       System.out.println("encoder "+streamReader.getEncoding());
       for (String thisLine = reader.readLine();thisLine!=null;thisLine = reader.readLine()){
          if (thisLine!=null){
         System.out.println(thisLine);
    }     This produces the following....
    POST /sms HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-
    powerpoint, application/vnd.ms-excel, application/msword, */*
    Referer: http://localhost/test.html
    Accept-Language: en-gb
    Content-Type: application/x-www-form-urlencoded
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
    Host: 127.0.0.1:9999
    Content-Length: 74
    Connection: Keep-Alive
    Cache-Control: no-cache
    I can see that the content is there 74 bytes of it, and it is encoded application/x-www-form-urlencoded, however I don't understand what I need to do to get the FORM information???????
    It works fine if it is an HTTP Get, however I have to get it to work with a POST.
    Can Anyone help??????????
    Thanks
    Glenn

    client is a java.net.Socket.
    Found some further information:
    I'm actually getting an exception I've just noticed from the log files see below:
    java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read
         at java.net.SocketInputStream.socketRead(Native Method)
         at java.net.SocketInputStream.read(Unknown Source)
         at java.net.SocketInputStream.read(Unknown Source)
         at java.io.InputStreamReader.fill(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at com.nokia.wap.server.IM.service.hd.run(hd.java:108)
    the offending line in my code from above is line 108:
    for (String thisLine = reader.readLine();thisLine!=null;thisLine = reader.readLine()){though i'm not sure if this is a code problem / when I close the html browser and hence cancel the http request?!
    sorry to add to the situation. :o(

  • Problems in fetching date to be set in setWhereClause

    Hi,
    In my OAF page there is a date combo which is populated by a VO.
    By default the date combo shows the date in a format 03-Sep-2011.
    So when I set the where clause in my code before doing vo.executeQuery, I set the where clause in as:
    vo.setWhereClause("My_DATE =To_Date('"+SelectedDate+"','DD-Mon-YYYY')).
    So it works fine.
    But if someone goes to the preferences and changes the date format as 03-09-2011 then it sends the same date as DD-MM-YYYY format and my where clause fails.
    Is there any solution to it so that whatever date format the user selects in Preference, it shall not affect my above where clause.
    Regards
    Hawker

    Hawker,
    As your below statement will always expect the selectedDate value in the DD-Mon-YYYY format, so whenever you will pass something other than this format it will fail.
    You need to first connvert the Date into below format then set it to the SelectedDate. This will rectify your issue.
    vo.setWhereClause("My_DATE =To_Date('"SelectedDate"','DD-Mon-YYYY')).
    {code}
    Regards,
    Gyan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for