Data in table EINE is incorrect

Hi, i found this weird question when exporting info record.
When i use SE11 to display table EINE, i found that the value of field NETPR,PRDAT is different from the one when i use ME13 to display info record.
The situation is like this, for example , info record A has two validity period, one is 10 eur / 1 ea from 2009.01.01 to 2009.01.24 , the other is 20 eur / 1 ea from 2009.01.25 to 2010.03.31. I can see netprice field is 20 and valid-to field is 2010.03.31 in ME13. BUT in table EINE, NETPR and PRDAT is 10 and 2009.01.24 separately!
More examples, info record B has only one validity period  which is 30 eur / 1 ea from 2009.01.25 to 2010.03.31. I can see netprice field is 30 and valid-to field is 2010.03.31 in ME13. BUT in table EINE, NETPR and PRDAT is 0 and 2009.01.24 separately!
I create 2 info records like A & B in DEV environment, and find data in ME13 and EINE is the same, only in PRD those fields are not corresponding.
Could anyone give me some advice go deep into this question?
Thanks!
Wesley

Thanks Jurgen,
I run RM06INP0 ,then field NETPR , PRDAT become the same as what i see in ME13 now.
But I still don't understand why in ME13 it was different from table field value , even though i pressed F1 for help and it showed me it did comes from EINE-NETPR & EINE-PRDAT.
I wonder if the reason is like this. Though F1-online-help shows it comes from EINE, but in fact it calculate the net price and valid-to date from data of other tables before it display in ME13. So even though the data in EINE is incorrect, but in ME13 it is correct.
Wesley

Similar Messages

  • Updating NETPR field of table EINE using BAPI

    Hello All,
    I have a requirement to update info record data in tables EINE, EINA, KONP. The fields to be updated are KSCHL, KBETR and NETPR. I am able to successfully update KBETR and KSCHL fields using bapi BAPI_PRICES_CONDITIONS. But I am unable to find any field in the bapi structures that would update NETPR field.
    Request you to please suggest how can I update NETPR successfully in table EINE.
    Thanks in advance.
    Anand

    Hi Anand,
                         Use the Function Module 'ME_DIRECT_INPUT_INFORECORD' to update/change the info record values.
    Pass the netpr value in ls_eine structure.
    To get better understanding on using this function module, please have a look on this link
    Create new inforecord with standard-condition via FM
    Regards,
    Arun Prasath Kumar.
    Edited by: Arun Prasath Kumar on Jan 17, 2011 12:09 PM

  • Net Price of Info record appearing in table EINE for Invalid dates

    Dear Expert
    Net Price ( Purchasing data view ) for Info record should be zero if Info record  is not having valid price ( not within Validity dates) but still its appearing in Table EINE,please advice why this is happening ?how to resolve this problem

    Hi,
    Please check the OSS note 369511. You need to run program RM06INPO AFTER the validity has become active.
    BR,
    Patil

  • The row structure of the table BANFTAB is incorrect

    Dear Experts,
    I get right here the error message
    The row structure of the table BANFTAB is incorrect
    ZBANFN is a table type and has the line tab BANFN.
    Can you pls tell me what is wrong here ?
    FUNCTION Z_CHANGE_EBAKZ_FLAG.
    *"*"Lokale Schnittstelle:
    *"  CHANGING
    *"     VALUE(BANFTAB) TYPE  ZBANFN
      data lt_eban type table of eban.
      data ls_eban type eban.
      SELECT * FROM eban into table lt_eban where BANFN IN BANFTAB AND EBAKZ EQ 'X'.
      IF SY-SUBRC IS INITIAL.
        LOOP AT lt_eban INTO ls_eban .
          ls_eban-EBAKZ = ' '.
          modify eban from ls_eban.
        ENDLOOP.
      ENDIF.
    ENDFUNCTION.

    Hello,
    You have to use a ranges table in this case.
    FUNCTION Z_CHANGE_EBAKZ_FLAG.
    *"*"Lokale Schnittstelle:
    *"  CHANGING
    *"     VALUE(BANFTAB) TYPE  ZBANFN
      data:lt_eban type table of eban.
      data:ls_eban type eban.
    data:
    l_r_banfn type range of banfn,
    l_wa_banfn like line of l_r_banfn,
    l_wa_banftab like likne of BANFTAB.
    loop at banftab into l_wa_banftab.
    l_wa_banfn-sign = 'I'.
    l_wa_banfn-option = 'EQ'.
    l_wa_banfn-low = l_wa_banftab-banfn.
    append l_wa_banfn into l_r_banfn.
    clear l_wa_banfn.
    endloop.
      SELECT * FROM eban into table lt_eban
      where
      BANFN IN L_R_BANFN "BANFN IN BANFTAB
    AND EBAKZ EQ 'X'.
      IF SY-SUBRC IS INITIAL.
        LOOP AT lt_eban INTO ls_eban .
          ls_eban-EBAKZ = ' '.
          modify eban from ls_eban.
        ENDLOOP.
      ENDIF.
    ENDFUNCTION.
    or you can use FOR ALL ENTRIES :
    FUNCTION Z_CHANGE_EBAKZ_FLAG.
    *"*"Lokale Schnittstelle:
    *"  CHANGING
    *"     VALUE(BANFTAB) TYPE  ZBANFN
      data lt_eban type table of eban.
      data ls_eban type eban.
      SELECT * FROM eban into table lt_eban
      FOR ALL ENTRIES IN BANFTAB "--> Add this
      where BANFN = BANFTAB-BANFN
      AND EBAKZ EQ 'X'.
      IF SY-SUBRC IS INITIAL.
        LOOP AT lt_eban INTO ls_eban .
          ls_eban-EBAKZ = ' '.
          modify eban from ls_eban.
        ENDLOOP.
      ENDIF.
    ENDFUNCTION.
    Try this & let me know in case of any issues.
    BR,
    Suhas
    Edited by: Suhas Saha on Feb 10, 2009 5:43 PM

  • Add segment in Idocs Error Idocs Document date 00.00.0000 is incorrect in item

    Hi every body ,
    I have the  idocs WMMBXY with error  <Document date 00.00.0000 is incorrect in item >
    because one segment is missing E1MBXYH in this idocs
    How can i add this segment  <E1MBXYH > to process my idocs
    Thank you

    Thank you for your feedback 
    Now i have add the segment  E1MBXYH and the date wich was missing , i prossec l'idoc in forground , and i have an other error <<Please check table 158 : entry WE19 does not exist>>
    here the screen shot , did you know how i can solve this ??.

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to populate data in table control  .

    hi all,
    i put matnr no. in screen no. 103
    validation is done at that screen only.
    now when i want to modify dat record
    when i put matnr no. at screen 103
    so how i will get all  data of dat number to table control screen.

    Hi Darshan,
       Here is a detailed description of how to update data in table controll.
      Updating data in table control
    The ABAP language provides two mechanisms for loading the table control with data from the internal table and then storing the altered rows of the table control back to the internal table.
    Method 1: Read the internal table into the Table Control in the screenu2019s flow logic.  Used when the names of the Table Control fields are based on fields of the internal table.
    Method 2: Read the internal table into the Table Control in the module pool code. Used when the names of the Table Control fields are based on fields of the database table.
    Method 1 (table control fields = itab fields)
    In the flow logic we can read an internal table using the LOOP statement. Define the reference to the relevant able control by specifying WITH CONTROL <ctrl>
    Determine which table entry is to be read by specifying CURSOR <ctrl>-CURRENT_LINE.
    After the read operation the field contents are placed in the header line of the internal table. If the fields in the table control have the same name as the internal they will be filled automatically. Otherwise we need to write a module to transfer the internal table fields to the screen fields.
    We must reflect any changes the user makes to the fields of the table control in the internal table otherwise they will not appear when the screen is redisplayed after PBO processing, (eg, after the user presses Enter or scrolls) However, this processing should be performed only if changes have actually been made to the screen fields of the table control (hence the use of the ON REQUEST)
    PROCESS BEFORE OUTPUT.
    LOOP AT ITAB_REG WITH CONTROL TCREG
    CURSOR TCREG-CURRENT_LINE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP AT ITAB_REG.
    MODULE MODIFY_ITAB_REG.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Method 2 (table control fields = dict. fields)
    If using a LOOP statement without an internal table in the flow logic, we must read the data in a PBO module which is called each time the loop is processed.
    Since, in this case, the system cannot determine the number of internal table entries itself, we must use the EXIT FROM STEP-LOOP statement to ensure that no blank lines are displayed in the table control if there are no more corresponding entries in the internal table.
    PROCESS BEFORE OUTPUT.
    LOOP WITH CONTROL TCREG.
    MODULE READ_ITAB_REG.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL TCREG.
    CHAIN.
    FIELD: ITAB_REG-REG,
    ITAB_REG-DESC.
    MODULE MODIFY_ITAB_REG
    ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE READ_ITAB_REG OUTPUT.
    READ TABLE ITAB_REG INDEX TCREG-CURRENT_LINE.
    IF SY-SUBRC EQ 0.
    MOVE-CORRESPONDING ITAB_REREG TO TCREG.
    ELSE.
    EXIT FROM STEP-LOOP.
    ENDIF.
    ENDMODULE.
    MODULE MODIFY_ITAB_REG INPUT.
    MOVE-CORRESPONDING TCREG TO ITAB_REG.
    MODIFY ITAB_REG INDEX
    TCREG-CURRENT_LINE.
    ENDMODULE.
    Updating the internal table
    Method 1
    PROCESS AFTER INPUT.
    LOOP AT ITAB_REG.
    CHAIN.
    FIELD: ITAB_REG-REG,
    ITAB_REG-DESC.
    MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    ITAB_REG-MARK = u2018Xu2019.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Method 2
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL TCREG.
    CHAIN.
    FIELD: TCREG-REG,
    TCREG-DESC.
    MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    MOVE-CORRESPONDING TCREG TO ITAB_REG.
    ITAB_REG-MARK = u2018Xu2019.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Updating the database
    MODULE USER_COMMAND_100.
    CASE OK_CODE.
    WHEN u2018SAVEu2019.
    LOOP AT ITAB-REG.
    CHECK ITAB_REG-MARK = u2018Xu2019.
    MOVE-CORRESPONDING ITAB_REG TO TCREG.
    UPDATE TCREG.
    ENDLOOP.
    WHEN u2026
    u2026
    ENDCASE.
    ENDMODULE.
    Hope this will solve your problem.
    Regards,
    Pavan.
    Edited by: PAVAN CHANDRASEKHAR GANTI on Aug 3, 2009 12:48 PM

  • Open HUB ( SAP BW ) to SAP HANA through DB Connection data loading , Delete data from table option is not working Please help any one from this forum

    Issue:
    I have SAP BW system and SAP HANA System
    SAP BW to SAP HANA connecting through a DB Connection (named HANA)
    Whenever I created any Open Hub as Destination like DB Table with the help of DB Connection, table will be created at HANA Schema level ( L_F50800_D )
    Executed the Open Hub service without checking DELETING Data from table option
    Data loaded with 16 Records from BW to HANA same
    Second time again executed from BW to HANA now 32 records came ( it is going to append )
    Executed the Open Hub service with checking DELETING Data from table option
    Now am getting short Dump DBIF_RSQL_TABLE_KNOWN getting
    If checking in SAP BW system tio SAP BW system it is working fine ..
    will this option supports through DB Connection or not ?
    Please follow the attachemnet along with this discussion and help me to resolve how ?
    From
    Santhosh Kumar

    Hi Ramanjaneyulu ,
    First of all thanks for the reply ,
    Here the issue is At OH level ( Definition Level - DESTINATION TAB and FIELD DEFINITION )
    in that there is check box i have selected already that is what my issue even though selected also
    not performing the deletion from target level .
    SAP BW - to SAP HANA via DBC connection
    1. first time from BW suppose 16 records - Dtp Executed -loaded up to HANA - 16 same
    2. second time again executed from BW - now hana side appaended means 16+16 = 32
    3. so that i used to select the check box at OH level like Deleting data from table
    4. Now excuted the DTP it throws an Short Dump - DBIF_RSQL_TABLE_KNOWN
    Now please tell me how to resolve this ? will this option is applicable for HANA mean to say like , deleting data from table option ...
    Thanks
    Santhosh Kumar

  • Unable to see data in Table in smartform

    Hi all,
    I need to create a smartform where I have to print the header details at the start and then below that details for all line items for a particular document.
    so i have data ;ike :
    Header data :
    field 1 : field 2:
    Field3 : field4:
    field5: field6:
    Item data :
    field1 field2 field3 field4 --> Item 1
    field1 field2 field3 field4 -->Item 2
    field 1 field2 field3 field4 -->Item3
    For the Header data,Im planning to use a template in a secondary window.
    However for the item data,i need to use a table (As i know the no of records only at runtime).Also another reason for usng table would be that I dont need the header on each flloowing page but only the Line item details on the following pages.
    Now my ques is :
    1.I hav ecreated the form and put some constant /texts to just test the form.I am able to see the texts/data in the header data.However  Im unable to see the data for the Item i.e. in the TABLE.
    I have used template for Header details which I can see.
    I dont know what Im doing wrong.Is it because in the DATA tab under TABLES,I have given an interna table but there is no data in the table?
    I have defined only 1 line type in  my table an dthat has 4 cells (as I need to print 4 item fields under the Item data)
    PLease let me know what I am doig wrong because of which Im unable to see the item data in table form.
    Thanks!

    Hi,
    Have you used any exists?
    in exists is there any system date kind?
    Can you try to run your report thru RSRT and use debug option there.
    before reporting please check your all connected targets have data for reporting.
    mean at targets-->request tab, reporting symbol was there or not.
    Any master data objects included in multi provider?
    if yes then please check those, if any ACR was running then it may cause you.
    if possible try to develop simple query with as per needs(mean to see 2015 data only).
    As my guess selections/filters migth be hidden, please check those.
    Thanks

  • No data in table TRFCQDATA  when update IM in ECC after EWM PGR

    Hi Experts,
    In our client system, when Inbound delivery (Customer Return) has been completed PGR in EWM, ECC system cannot be updated in IM stock and  occurs an error :No data in Table TRFCQDATA(Internal) via SMQ2 query it.
    Who can advise how to solve it?
    Many thanks!
    Julia

    Thanks Sathish!
    Yes, after re-regisiering manually, the queue will be processing.
    However we need all qRFC queue can be automatically processed immediately, not manally.
    Who can advise what setting we are missing ?
    Thanks & Best regards,
    Julia

  • No Data in Table

    I Drag and drop a view node into UIX page from Data Control Palette. Run, But I get empty table in html. Why no data in table?

    or even if you execute it from struts it may still now show the data. The reason is unknown.
    Bugs in JDev/UIX

  • How to stored data after clicking checkbox in data base table

    REPORT  ZT                                      .
    TYPE-pools: slis.
    tables:mkpf,mseg,mard,COWB_COMP,ZTABLE.
    Types:BEGIN OF tp_data,
         mblnr LIKE mseg-mblnr,
         matnr LIKE mseg-matnr,
         werks LIKE mard-werks,
         lgort LIKE mard-lgort,
         lgpbe LIKE mard-lgpbe,
         charg LIKE mseg-charg,
         bwart LIKE mseg-bwart,
         budat LIKE mkpf-budat,
         menge LIKE mseg-menge,
         meins LIKE mseg-meins,
         kostl LIKE mseg-kostl,
         aufnr LIKE mseg-aufnr,
         rsnum LIKE mseg-rsnum,
         endkz like COWB_COMP-endkz,
    END OF tp_data,
    tp_tbl_data TYPE STANDARD TABLE OF tp_data.
    MODIFIED*******************
    DATA: WA TYPE TP_DATA.
    MODIFIED*******************
    *data: t_data like Y00_MM_ISSUE_DAT occurs 0 with header line.
    Constants
    Data objects (variable declarations and definitions)
    Report data to be shown.
    DATA: it_data TYPE STANDARD TABLE OF tp_data.
    MODIFIED*******************
    DATA : V_REPID LIKE SY-REPID.
    MODIFIED*******************
    Heading of the report.
    DATA: t_heading TYPE slis_t_listheader.
    *========================== Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:smblnr FOR mseg-mblnr MODIF ID m1,
                  smatnr FOR mseg-matnr MODIF ID m2,
                  swerks FOR mard-werks MODIF ID m3,
                  slgort FOR mard-lgort MODIF ID m4,
                  slgpbe FOR mard-lgpbe MODIF ID m5,
                  scharg FOR mseg-charg MODIF ID m6,
                  sbwart FOR mseg-bwart MODIF ID m7,
                  skostl FOR mseg-kostl MODIF ID m8,
                  saufnr FOR mseg-aufnr MODIF ID m9,
                  srsnum FOR mseg-rsnum MODIF ID m10.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS:pre RADIOBUTTON GROUP radi USER-COMMAND ucomm DEFAULT 'X',
              pse RADIOBUTTON GROUP radi,
              bps RADIOBUTTON GROUP radi.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETER:layout TYPE i.
    SELECTION-SCREEN END OF BLOCK b3.
    MODIFIED*******************
    INITIALIZATION.
    V_REPID = sy-repid.
    MODIFIED*******************
    *=========================== Event Blocks
    AT selection-SCREEN.
    start-OF-selection.
    PERFORM get_data USING it_data.
    END-OF-selection.
    PERFORM build_alv USING it_data t_heading.
    *=========================== Subroutines
    *&      Form  get_data
          Gets the information to be shown in the report.
    FORM get_data USING t_data TYPE tp_tbl_data.
    SELECT msegmblnr msegmatnr mardwerks mardlgort mard~lgpbe
    msegcharg msegbwart mkpf~budat
       msegmenge  msegmeins msegkostl msegaufnr mseg~rsnum
    INTO CORRESPONDING FIELDS OF TABLE t_data
    FROM mseg
    JOIN mard ON mardmatnr EQ msegmatnr
                  JOIN mkpf ON msegmblnr EQ mkpfmblnr
                  WHERE mseg~matnr IN smatnr.
    ENDFORM.                    " get_data
    *&      Form  build_alv
          Builds and display the ALV Grid.
    FORM build_alv USING t_data TYPE tp_tbl_data
         t_heading  TYPE slis_t_listheader.
    ALV required data objects.
    DATA: w_title   TYPE lvc_title,
           w_comm    TYPE slis_formname,
           w_status  TYPE slis_formname,
           x_layout  TYPE slis_layout_alv,
           t_event    TYPE slis_t_event,
           t_fieldcat TYPE slis_t_fieldcat_alv,
           t_sort     TYPE slis_t_sortinfo_alv.
    REFRESH t_fieldcat.
    REFRESH t_event.
    REFRESH t_sort.
    CLEAR x_layout.
    CLEAR w_title.
    Field Catalog
    PERFORM set_fieldcat2 USING:
           1 'MBLNR' 'MBLNR' 'MSEG' space space space space space space
    space space space space space space t_fieldcat ,
           2 'MATNR' 'MATNR' 'MSEG' space space space space space space
    space space space space space space  t_fieldcat ,
           3 'WERKS' 'WERKS' 'MARD' space space space space space space
    space space space space space space  t_fieldcat,
           4 'LGORT' 'LGORT' 'MARD' space space space space space space
    space space space space space space t_fieldcat ,
           5 'LGPBE' 'LGPBE' 'MARD' space space space space space space
    space space space space space space t_fieldcat ,
           6 'CHARG' 'CHARG' 'MSEG' space space space space space space
    space space space space space space t_fieldcat ,
           7 'BWART' 'BWART' 'MSEG' space  space space space space space
    space space space space space space t_fieldcat,
           8 'BUDAT' 'BUDAT' 'MKPF' space  space space space space space
    space space space space space space t_fieldcat,
           9 'MENGE' 'MENGE' 'MSEG' space  space space space space space
    space space space space space space t_fieldcat,
           10 'MEINS' 'MEINS' 'MSEG' space  space space space space space
    space space space space space space t_fieldcat,
           11 'KOSTL' 'KOSTL' 'MSEG' space  space space space space space
    space space space space space space t_fieldcat,
           12 'AUFNR' 'AUFNR' 'MSEG' space  space space space space space
    space space space space space space t_fieldcat,
           13 'RSNUM' 'RSNUM' 'MSEG' space  space space space space space
    space space space space space space t_fieldcat,
       14 'ENDKZ' 'ENDKZ' 'COWB_COMP' space space 'select' 'Select this row' 'Sel' 'Select this row' space space space 'X' 'X' space t_fieldcat.
    Layout
    x_layout-zebra = 'X'.
    Top of page heading
    PERFORM set_top_page_heading USING t_heading t_event.
    Events
    PERFORM set_events USING t_event.
    GUI Status
    w_status = ''.
    User commands
    w_comm   = 'USER_COMMAND'.
    Order
    Example
    PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.
    PERFORM set_order USING 'MBLNR' 'IT_DATA' 'X' space 'X' t_sort.
    PERFORM set_order USING 'EBELN' 'IT_DATA' 'X' space 'X' t_sort.
    PERFORM set_order USING 'EBELP' 'IT_DATA' 'X' space space t_sort.
    Displays the ALV grid
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program       = V_REPID
       it_fieldcat              = t_fieldcat
       is_layout                = x_layout
       it_sort                  = t_sort
       i_callback_pf_status_set = w_status
       i_callback_user_command  = w_comm
       i_save                   = 'X'
       it_events                = t_event
       i_grid_title             = w_title
    TABLES
       t_outtab                 = t_data
    EXCEPTIONS
       program_error            = 1
       OTHERS                   = 2.
    IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM.                    " build_alv.
    *&      Form  set_top_page_heading
          Creates the report headings.
    FORM set_top_page_heading USING t_heading TYPE slis_t_listheader
         t_events  TYPE slis_t_event.
    DATA: x_heading TYPE slis_listheader,
           x_event   TYPE LINE OF slis_t_event.
    Report title
    CLEAR t_heading[].
    CLEAR x_heading.
    x_heading-typ = 'H'.
    x_heading-info = 'Reporte Prueba'(001).
    APPEND x_heading TO t_heading.
    Program name
    CLEAR x_heading.
    x_heading-typ = 'S'.
    x_heading-KEY = 'Program: '.
    x_heading-info = sy-repid.
    APPEND x_heading TO t_heading.
    User who is running the report
    CLEAR x_heading.
    x_heading-typ = 'S'.
    x_heading-KEY = 'User: '.
    x_heading-info = sy-uname.
    APPEND x_heading TO t_heading.
    Date of execution
    CLEAR x_heading.
    x_heading-typ = 'S'.
    x_heading-KEY = 'Date: '.
    WRITE sy-datum TO x_heading-info.
    APPEND x_heading TO t_heading.
    Time of execution
    CLEAR x_heading.
    x_heading-typ = 'S'.
    x_heading-KEY = 'Time: '.
    WRITE sy-uzeit TO x_heading-info.
    APPEND x_heading TO t_heading.
    Top of page event
    x_event-name = slis_ev_top_of_page.
    x_event-FORM = 'TOP_OF_PAGE'.
    APPEND x_event TO t_events.
    ENDFORM.
    *&      Form  set_events
          Sets the events for ALV.
          The TOP_OF_PAGE event is alredy being registered in
          the set_top_page_heading subroutine.
    FORM set_events USING t_events TYPE slis_t_event.
    DATA: x_event   TYPE LINE OF slis_t_event.
    Example
    clear x_event.
    x_event-name = .
    x_event-form = .
    append x_event to t_event.
    ENDFORM.
    *&      Form  set_order
          Adds an entry to the order table.
    FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot
         t_sort TYPE slis_t_sortinfo_alv.
    DATA: x_sort TYPE slis_sortinfo_alv.
    CLEAR x_sort.
    x_sort-fieldname = p_fieldname.
    x_sort-tabname   = p_tabname.
    x_sort-UP = p_up.
    x_sort-down = p_down.
    x_sort-subtot = p_subtot.
    APPEND x_sort TO t_sort.
    ENDFORM.                    "set_order
    *&      Form  set_fieldcat2
          Adds an entry to the field catalog.
    FORM set_fieldcat2 USING p_colpos p_fieldname p_ref_fieldname
    p_ref_tabname
         p_outputlen p_noout
         p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
         p_hotspot p_showasicon p_checkbox p_edit
         p_dosum
         t_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: wa_fieldcat TYPE slis_fieldcat_alv.
    CLEAR wa_fieldcat.
    General settings
    wa_fieldcat-fieldname = p_fieldname.
    wa_fieldcat-col_pos = p_colpos.
    wa_fieldcat-no_out = p_noout.
    wa_fieldcat-HOTSPOT = p_hotspot.
    wa_fieldcat-CHECKBOX = p_checkbox.
    wa_fieldcat-ICON = p_showasicon.
    wa_fieldcat-do_sum = p_dosum.
    Set reference fieldname, tablenam and rollname.
    If p_ref_tabname is not given, the ref_fieldname given is a data
    *element.
    If p_ref_tabname is given, the ref_fieldname given is a field of a
    *table. In case ref_fieldname is not given, it is copied from the
    *fieldname.
    IF p_ref_tabname IS INITIAL.
       wa_fieldcat-rollname =   p_ref_fieldname.
    ELSE.
       wa_fieldcat-ref_tabname = p_ref_tabname.
       IF p_ref_fieldname EQ space.
         wa_fieldcat-ref_fieldname =   wa_fieldcat-fieldname.
       ELSE.
         wa_fieldcat-ref_fieldname =   p_ref_fieldname.
       ENDIF.
    ENDIF.
    Set output length.
    IF NOT p_outputlen IS INITIAL.
       wa_fieldcat-outputlen = p_outputlen.
    ENDIF.
    Set text headers.
    IF NOT p_seltext_m IS INITIAL.
       wa_fieldcat-seltext_m = p_seltext_m.
    ENDIF.
    IF NOT p_seltext_l IS INITIAL.
       wa_fieldcat-seltext_l = p_seltext_l.
    ENDIF.
    IF NOT p_seltext_s IS INITIAL.
       wa_fieldcat-seltext_s = p_seltext_s.
    ENDIF.
    IF NOT p_reptext_ddic IS INITIAL.
       wa_fieldcat-reptext_ddic = p_reptext_ddic.
    ENDIF.
    IF NOT p_ddictxt IS INITIAL.
       wa_fieldcat-ddictxt = p_ddictxt.
    ENDIF.
    Set as editable or not.
    IF NOT p_edit IS  INITIAL.
       wa_fieldcat-INPUT     = 'X'.
       wa_fieldcat-EDIT     = 'X'.
    ENDIF.
    APPEND wa_fieldcat TO t_fieldcat.
    ENDFORM.                   "set_fieldcat2
    *&      Form  top_of_page
          Called on top_of_page ALV event.
          Prints the heading.
    FORM top_of_page.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
         i_logo             = 'TRVPICTURE04'
       it_list_commentary = t_heading.
    ENDFORM.                    " alv_top_of_page
    *&      Form  user_command
          Called on user_command ALV event.
          Executes custom commands.
    FORM user_command USING r_ucomm     LIKE sy-ucomm
         rs_selfield TYPE slis_selfield.
    case sy-ucomm.
    WHEN '&DATA_SAVE'.
    LOOP AT IT_DATA INTO WA WHERE ENDKZ = 'X'.
       IF WA-ENDKZ = 'X'.
    *******MODIFIED*********************************
    U DELETE THIS CODE N USER UR INSERT CODE TO CHECK
    SY-MSGV1 = WA-MBLNR.                              " U CAN DELETE
    SY-MSGV2 = WA-MATNR.                              " U CAN DELETE
    MESSAGE ID 'BC_BOR' TYPE 'I' NUMBER '888'          " U CAN DELETE
            WITH SY-MSGV1 SY-MSGV2. " U CAN DELETE
    *******MODIFIED*********************************
       INSERT ZTABLE.
       ENDIF.
    endloop.
    ENDCASE.
    ENDFORM.                    "user_command
    this is my code, database will stored in fields only.data is empty,
    how to slove that one,send any sugestion.

    Hi Lakshmi,
           Can u explain briefly what is ur requirement. U mean to say that after clicking the checkbox in data base table or Screen?
    Regards,
      Jayaram...

  • How to delete a single data from table using control file

    I want delete a single row data from table using sql loder control file
    Edited by: 977940 on Dec 19, 2012 9:00 PM

    977940 wrote:
    I want delete a single row data from table using sql loder control file
    Edited by: 977940 on Dec 19, 2012 9:00 PMWhy?
    And how do you imagine this happening with sqlloader?
    The entire purpose of sqlloader is to load data (hence, the name sql*loader*) into a table from an external source. If you want to delete rows from a table, you use the sql DELETE statement.
    What is the business problem you are trying to solve?

  • Fetch data from table and generate attachment than mail it.

    Hello Experts,
    From couple of day I am searching on Google for a better database procedure that will help me to get data from tables and generate attachment and mail it but i fail.
    My Scenario is:
    I have a query that will fetch almost 5000 records from database tables. Each record has almost 75 characters
    select a.location_code,
                   a.item_code,
                   b.description item_desc,
                   to_char(a.manufact_date,'ddMonyy')mfg,
                   to_char((a.manufact_date + nvl(b.expiry_period,0)),'ddMonyy')expr,
                   to_char((a.manufact_date + nvl(b.qurantine_period,0)),'ddMonyy')qrtn,
                   round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) days_elapsed,
                   a.closing_balance_posted quantity
              from wms_stock_current_balance_v a, wms_item_setup_mast b
             where a.closing_balance > 0
               and a.item_code = b.item_code
               and a.loc_type in ('RACKING','PICKING','QUICKA','BUNDLED')
               and nvl(b.qurantine_period,0) > 0
               and round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) <= 0
          order by a.item_code, a.location_code;
    Sample data of above query is
    LOCATION_CODE
    ITEM_CODE
    ITEM_DESC
    MFG
    Expiry
    Quarantine
    Days Elapse
    Quantity
    13DL2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    14DL0
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    23-Feb-10
    3-Apr-14
    7-Jun-13
    -119
    134
    14DL2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    23-Feb-10
    3-Apr-14
    7-Jun-13
    -119
    160
    14DR2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    23-Feb-10
    3-Apr-14
    7-Jun-13
    -119
    20
    14LL2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    17ER2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    17GL2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    17SL0
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    17-Feb-10
    28-Mar-14
    1-Jun-13
    -125
    64
    18QL0
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    23-Feb-10
    3-Apr-14
    7-Jun-13
    -119
    160
    19AR5
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    17-Feb-10
    28-Mar-14
    1-Jun-13
    -125
    160
    19DL1
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    19JR0
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    17-Feb-10
    28-Mar-14
    1-Jun-13
    -125
    60
    19TL1
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    20GR2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    40
    36FL3
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    18-Feb-10
    29-Mar-14
    2-Jun-13
    -124
    65
    19UR0
    000000000000000F0591
    COMFORT WHITE 24ML*300
    28-Oct-09
    28-Oct-11
    1-May-11
    -887
    1
    12SL1
    000000000000000F0593
    COMFORT PINK 24ML*300
    28-Oct-09
    28-Oct-11
    1-May-11
    -887
    42
    12SR1
    000000000000000F0593
    COMFORT PINK 24ML*300
    28-Oct-09
    28-Oct-11
    1-May-11
    -887
    42
    14OR1
    000000000000000F0593
    COMFORT PINK 24ML*300
    28-Oct-09
    28-Oct-11
    1-May-11
    -887
    8
    36EL4
    000000000000000F0594
    CLEAR HF DECRASE 5M*360
    14-Feb-10
    14-Feb-11
    12-Oct-10
    -1088
    14
    13VL1
    000000000000000F0595
    CLEAR COM SFT CRE 5*360
    8-Feb-10
    8-Feb-11
    6-Oct-10
    -1094
    160
    14ER0
    000000000000000F0595
    CLEAR COM SFT CRE 5*360
    8-Feb-10
    8-Feb-11
    6-Oct-10
    -1094
    105
    Database Info
    Oracle 10g
    Version 10.2.0.1.0

    Look at the sample code for generating a CSV file that I've just posted in response to a similar question:
    Re: How to execute a proc and spool files in a database job
    And the use the search button in this forum to find sample code for sending a CLOB as a plain/text e-mail attachment using UTL_SMTP.

  • Data in table is huge so performance is reduced

    Hi all,
    I have a tables in the oracle database where the number of records in the table is huge ie 6 years of data,due to which when i generate the report the retrieval of data is slow.
    How to increase the performance,so that the report can be generate fast.
    Thanks in advance

    Thank you for polluting TWO forums with the exact same request.
    Please stick to the thread with answers in it.
    Data in table is huge so performance is reduced

Maybe you are looking for