Regarding how to delete the record in internal table

Hi experts ,
how to delete the record in intarnal table after validating the data,
if record contains invalid fields?
i am giving my code see this and give me the answer?
loop at it_data into wa_data .
Validate  Cost Center
    READ TABLE it_kostl INTO wa_kostl WITH KEY kostl = wa_data-kostl BINARY SEARCH.
    IF sy-subrc NE 0.
      PERFORM update_error_log USING wa_data
                                     text-004.
    ENDIF.
Validate source file material ( material number )
loop at it_mara into wa_mara .
  read table it_ausp into wa_ausp with key atwrt = wa_data-i_matnr .
           if sy-subrc NE 0 .
   PERFORM update_error_log USING wa_data
                                       text-002.
delete it_data-objek .
     else.
  read table it_mara into wa_mara with key  matnr = wa_ausp-objek .
       if sy-subrc EQ 0 .
       wa_data-objek = wa_mara-matnr.
       wa_data-matkl = wa_mara-matkl.
     ENDIF.
     Modify it_data from wa_data  .
  endif.
*endloop.
Validate unit of measure (unit)
    READ TABLE it_t006 INTO wa_t006 WITH KEY msehi = wa_data-unit .
    IF sy-subrc NE 0.
      PERFORM update_error_log USING wa_data
                                     text-003.
    endif.
Validate delivery location ( storage location )
    READ TABLE it_lgort INTO wa_lgort WITH KEY del_loc = wa_data-del_loc.
    IF sy-subrc NE 0.
      PERFORM update_error_log USING wa_data
                                     text-001.
         if wa_data-flag ='x' .
      delete it_data from  wa_data .
    endif.
    ENDIF.
endloop.

Hi Naren,
First get the index number of the IT_data table and store it in one variable whose declaration like this.
data: tabix type sy-tabix.
while reading the internal table it_data set the tabix variable.
tabix = sy-tabix.
Instead of  the above use below one.
Delete it_data-objek
Use the Below statement it will delete  the row from the internal table.
Delete it_data-objek index tabix
Thanks,
Chidanand

Similar Messages

  • How to delete the records from custom table???

    My requirement is,
    I have a custom table, assume as ZABC, I have updated this by my custom program, This data having table can be extracted by BI etract program(Assume ZZZ). Here I am not writing any code for extracting data from table to BI extract program, That they will do by BI extract program. But I want to write the code for
    <b>Cleanup of Z table—delete records 30 days after the BI data extractor has run.</b>
    How this is possible suggest me any method having for these???
    Thanks Sanju

    Hell Sanjana,
    Ask your basis people to do the clean up after  30 days. If you want the clean up only to be done 30 days after BI extract has been done, then u need some sort of indicator to say that BI Extract has been done , like  flag and date in a custom table which will be set as soon as extract is done. Then based on that info u need to delete a the records.
    Regards

  • How to delete blank records in internal table

    Hi.
    please tell me how can i delete blank records in an internal table.
    thnx

    In that case
    Suppose you have 10 fields in internal table and if any of them is blank, you need to delete record.
    Try this command
    delete itab where field1 is initial or
                      field2 is initial or
                      field10 is initial.

  • How to delete the entries in internal table

    Hi Experts,
    I have 2 internal tables ,
    if i find any same entries of 2 internal tables,  i have to delete that entries in first internal table.
    Regards,
    Srinivasu

    hi check this..
    report .
    data:begin of itab occurs 0,
         f1 type c ,
         f2 type i,
         end of itab .
    data:begin of itab1 occurs 0,
         f1 type c ,
         end of itab1 .
         itab-f1 = 'A'.
         itab-f2 = 12.
         append itab .
         itab-f1 = 'b'.
         itab-f2 = 12.
         append itab .
         itab-f1 = 'c'.
         itab-f2 = 12.
         append itab .
         itab1-f1 = 'A'.
         append itab1 .
    loop at itab1 .
    read table itab with key f1 = itab1-f1 .
    if sy-subrc  = 0.
    delete itab where  f1 = itab1-f1 .
    endif .
    endloop.
    loop at itab.
    write:/ itab-f1,itab-f2.
    endloop.

  • How to delete the records from database table without using work area

    Hi all,
    The purpose of the down program is to delete the entire contents from all the tables. The deletion of the table should be in sorted manner. Is there any other way to write the code more efficiently,
    TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
    DELETE ZFFMCTL_AP.
    IF SY-SUBRC = 0.
    DELETE ZFFMMHDR_AP.
    IF SY-SUBRC = 0.
    DELETE ZFFM_CHANGE_LOG.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_AR.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_AR.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_JV.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_JV.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_SKF.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_SKF.
    IF SY-SUBRC = 0.
    DELETE ZFINVOICE_DETAIL.
    IF SY-SUBRC = 0.
    DELETE ZFFMMASTER.
    IF SY-SUBRC = 0.
    DELETE ZFFMLOGREAD_CLUS.
    IF SY-SUBRC = 0.
    DELETE ZFFMCTL.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    Waiting for response,
    Thanks in advance
    John

    Write this way....
    TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
    DELETE ZFFMCTL_AP.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMMHDR_AP.
    CHECK SY_SUBRC = 0.
    DELETE ZFFM_CHANGE_LOG.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_AR.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_AR.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_JV.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_JV.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_SKF.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_SKF.
    CHECK SY_SUBRC = 0.
    DELETE ZFINVOICE_DETAIL.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMMASTER.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMLOGREAD_CLUS.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMCTL.

  • How to delete  the record  of saved HRA Details...

    Hi Experts,
    I have put the details of HRA Correctly.But while updating HRA In 0008 Infotype i wrongly updated the wagetype,How should i change the Wagetype.
    When i m trying to delete it is showing  RECORD CAN NOT BE DELETED (TIME CONSTRAINT 1).
    How can delete the record.
    Thanking u .
    Sai

    Hi
         Hope doing well ........ No need to delete any infotype but u can go to PA30 and in change mode their u can delete the wagetype which is wrongly entered
    Rajeshk

  • How to delete a record from BSEG table

    Dear Experts,
    How to delete a record from BSEG table.
    If there possible to delete some records from transparent table ?
    Please help.
    Regards,
    Tan

    Hi,
    Deleting a record from a standard table can be done only if table maintenance exists - Cehck tcode - SM30.  But it is not advisable to delete records, coz the records may be dependent on many other tables.  If u delete in a single place, there may be chance that inconsistency in the data happens and hence will affect ur financial statements.
    Pls. assign points, if useful
    Regards,
    Sridevi

  • How to Delete a Column in Internal Table

    Hi All,
    Does any one know ,How to Delete a Column in Internal Table?

    Hi,
       For deleting the column in the internal table, you have to eliminate the field which you want to delete.
    loop at itab into wa.
      move corresponding wa to wa1.
    append wa1 to itab1.
    clear wa1.
    clear wa.
    endloop.
    wa1 is the workarea without the field which you want to delete.
    itab1 is the internal table which consists of the deleted column.

  • How to delete the data from partition table

    Hi all,
    Am very new to partition concepts in oracle..
    here my question is how to delete the data from partition table.
    is the below query will work ?
    delete from table1 partition (P_2008_1212)
    we have define range partition ...
    or help me how to delete the data from partition table.
    Thanks
    Sree

    874823 wrote:
    delete from table1 partition (P_2008_1212)This approach is wrong - as Andre pointed, this is not how partition tables should be used.
    Oracle supports different structures for data and indexes. A table can be a hash table or index organised table. It can have B+tree index. It can have bitmap indexes. It can be partitioned. Etc.
    How the table implements its structure is a physical design consideration.
    Application code should only deal with the logical data structure. How that data structure is physically implemented has no bearing on application. Does your application need to know what the indexes are and the names of the indexes,in order to use a table? Obviously not. So why then does your application need to know that the table is partitioned?
    When your application code starts referring directly to physical partitions, it needs to know HOW the table is partitioned. It needs to know WHAT partitions to use. It needs to know the names of the partitions. Etc.
    And why? All this means is increased complexity in application code as this code now needs to know and understand the physical data structure. This app code is now more complex, has more moving parts, will have more bugs, and will be more complex to maintain.
    Oracle can take an app SQL and it can determine (based on the predicates of the SQL), which partitions to use and not use for executing that SQL. All done totally transparently. The app does not need to know that the table is even partitioned.
    This is a crucial concept to understand and get right.

  • Sending email after deleting the records in a table

    Hi
    I am deleting the records in a table. After deleting the records,
    i want to send an email to another person. I am planning to follow this steps.
    1. Create a trigger on the table(AFTER DELETE ON table FOR EACH ROW)
    to copy the deleted records to temporary table.
    2. Read the temporary table and send an email.
    Is there any other way we can do with out creating temporary table ?.
    Govind

    I don't know what you plan to use to send the mail but here's a solution that would work.
    -- Create a send mail procedure
    create or replace procedure send_mail (
    sender      IN VARCHAR2,
    recipient   IN VARCHAR2,
    message     IN VARCHAR2)
    IS
      mailhost VARCHAR2(30) := 'localhost';
      mail_conn utl_smtp.connection;
    BEGIN
    mail_conn :=  utl_smtp.open_connection(mailhost, 25);
      utl_smtp.helo(mail_conn, mailhost);
      utl_smtp.mail(mail_conn, sender);
      utl_smtp.rcpt(mail_conn, recipient);
      utl_smtp.data(mail_conn, message);
      utl_smtp.quit(mail_conn);
    END;
    /-- Create the trigger to email deleted rows
    create or replace trigger email_del_rows
    after delete on <table>
    for each row
    declare
    msg varchar2(2000);
    begin
    msg := 'COL1  COL2  COMPANY NAME  DATE'||chr(10);
    msg := msg||:old.col1||'    '||:old.col2||'    '||:old.company_name||'       '||:old_date|| chr(10);
    msg := msg||'END OF FILE';
    send_mail('SENDER','[email protected]',msg);
    end;
    /You can make it look pretty but you get the basic idea.

  • How to increase the length of internal table dynamically

    How to increase the length of internal table dynamically depending on the number of fields fetched into the internal table ?
    The requirement code :
    types: begin of t_data,
             form          like zscr_data_hdr-form,
             werks         like zscr_data_hdr-werks,
             matnr         like zscr_data_hdr-matnr,
             verid         like zscr_data_hdr-verid,
             lot           like zscr_data_hdr-lot,
             lot_qty       like zscr_data_hdr-lot_qty,
             udate         like zscr_data_hdr-udate,
             utime         like zscr_data_hdr-utime,
             zuser         like zscr_data_hdr-zuser,
             processed     like zscr_data_hdr-processed,
             defect        like zscr_defect_data-defect,
             vornr         like zscr_route_data-vornr,
             fld1          like zscr_defect_data-defect_val,
             fld2          like zscr_defect_data-defect_val,
             fld3          like zscr_defect_data-defect_val,
             fld4          like zscr_defect_data-defect_val,
             fld5          like zscr_defect_data-defect_val,
             fld6          like zscr_defect_data-defect_val,
             fld7          like zscr_defect_data-defect_val,
             fld8          like zscr_defect_data-defect_val,
             fld9          like zscr_defect_data-defect_val,
             fld10         like zscr_defect_data-defect_val,
             fld11         like zscr_defect_data-defect_val,
             fld12         like zscr_defect_data-defect_val,
             fld13         like zscr_defect_data-defect_val,
             fld14         like zscr_defect_data-defect_val,
             fld15         like zscr_defect_data-defect_val,
             fld16         like zscr_defect_data-defect_val,
             fld17         like zscr_defect_data-defect_val,
             fld18         like zscr_defect_data-defect_val,
             fld19         like zscr_defect_data-defect_val,
             fld20         like zscr_defect_data-defect_val,
             fld21         like zscr_defect_data-defect_val,
             fld22         like zscr_defect_data-defect_val,
             fld23         like zscr_defect_data-defect_val,
             fld24         like zscr_defect_data-defect_val,
             fld25         like zscr_defect_data-defect_val,
             fld26         like zscr_defect_data-defect_val,
             fld27         like zscr_defect_data-defect_val,
             fld28         like zscr_defect_data-defect_val,
             fld29         like zscr_defect_data-defect_val,
             fld30         like zscr_defect_data-defect_val,
             fld31         like zscr_defect_data-defect_val,
             fld32         like zscr_defect_data-defect_val,
             fld33         like zscr_defect_data-defect_val,
             fld34         like zscr_defect_data-defect_val,
             fld35         like zscr_defect_data-defect_val,
             fld36         like zscr_defect_data-defect_val,
             fld37         like zscr_defect_data-defect_val,
             fld38         like zscr_defect_data-defect_val,
             fld39         like zscr_defect_data-defect_val,
             fld40         like zscr_defect_data-defect_val,
             fld41         like zscr_defect_data-defect_val,
             fld42         like zscr_defect_data-defect_val,
             fld43         like zscr_defect_data-defect_val,
             fld44         like zscr_defect_data-defect_val,
             fld45         like zscr_defect_data-defect_val,
             fld46         like zscr_defect_data-defect_val,
             fld47         like zscr_defect_data-defect_val,
             fld48         like zscr_defect_data-defect_val,
             fld49         like zscr_defect_data-defect_val,
             fld50         like zscr_defect_data-defect_val,
             fld51         like zscr_defect_data-defect_val,
             fld52         like zscr_defect_data-defect_val,
             fld53         like zscr_defect_data-defect_val,
             fld54         like zscr_defect_data-defect_val,
             fld55         like zscr_defect_data-defect_val,
             fld56         like zscr_defect_data-defect_val,
             fld57         like zscr_defect_data-defect_val,
             fld58         like zscr_defect_data-defect_val,
             fld59         like zscr_defect_data-defect_val,
             fld60         like zscr_defect_data-defect_val,
             fld61         like zscr_defect_data-defect_val,
             fld62         like zscr_defect_data-defect_val,
             fld63         like zscr_defect_data-defect_val,
             fld64         like zscr_defect_data-defect_val,
             fld65         like zscr_defect_data-defect_val,
             fld66         like zscr_defect_data-defect_val,
             fld67         like zscr_defect_data-defect_val,
             fld68         like zscr_defect_data-defect_val,
             fld69         like zscr_defect_data-defect_val,
             fld70         like zscr_defect_data-defect_val,
             fld71         like zscr_defect_data-defect_val,
             fld72         like zscr_defect_data-defect_val,
             fld73         like zscr_defect_data-defect_val,
             fld74         like zscr_defect_data-defect_val,
             fld75         like zscr_defect_data-defect_val,
             fld76         like zscr_defect_data-defect_val,
             fld77         like zscr_defect_data-defect_val,
             fld78         like zscr_defect_data-defect_val,
             fld79         like zscr_defect_data-defect_val,
             fld80         like zscr_defect_data-defect_val,
             fld81         like zscr_defect_data-defect_val,
             fld82         like zscr_defect_data-defect_val,
             fld83         like zscr_defect_data-defect_val,
             fld84         like zscr_defect_data-defect_val,
             fld85         like zscr_defect_data-defect_val,
             fld86         like zscr_defect_data-defect_val,
             fld87         like zscr_defect_data-defect_val,
             fld88         like zscr_defect_data-defect_val,
             fld89         like zscr_defect_data-defect_val,
             fld90         like zscr_defect_data-defect_val,
             fld91         like zscr_defect_data-defect_val,
             fld92         like zscr_defect_data-defect_val,
             fld93         like zscr_defect_data-defect_val,
             fld94         like zscr_defect_data-defect_val,
             fld95         like zscr_defect_data-defect_val,
             fld96         like zscr_defect_data-defect_val,
             fld97         like zscr_defect_data-defect_val,
             fld98         like zscr_defect_data-defect_val,
             fld99         like zscr_defect_data-defect_val,
             fld100         like zscr_defect_data-defect_val,
             fld101         like zscr_defect_data-defect_val,
             fld102         like zscr_defect_data-defect_val,
             fld103         like zscr_defect_data-defect_val,
             fld104         like zscr_defect_data-defect_val,
             fld105         like zscr_defect_data-defect_val,
             fld106         like zscr_defect_data-defect_val,
             fld107         like zscr_defect_data-defect_val,
             fld108         like zscr_defect_data-defect_val,
             fld109         like zscr_defect_data-defect_val,
             fld110         like zscr_defect_data-defect_val,
             fld111         like zscr_defect_data-defect_val,
             fld112         like zscr_defect_data-defect_val,
             fld113         like zscr_defect_data-defect_val,
             fld114         like zscr_defect_data-defect_val,
             fld115         like zscr_defect_data-defect_val,
             fld116         like zscr_defect_data-defect_val,
             fld117         like zscr_defect_data-defect_val,
             fld118         like zscr_defect_data-defect_val,
             fld119         like zscr_defect_data-defect_val,
             fld120         like zscr_defect_data-defect_val,
             fld121         like zscr_defect_data-defect_val,
             fld122         like zscr_defect_data-defect_val,
             fld123         like zscr_defect_data-defect_val,
             fld124         like zscr_defect_data-defect_val,
             fld125         like zscr_defect_data-defect_val,
             fld126         like zscr_defect_data-defect_val,
             fld127         like zscr_defect_data-defect_val,
             fld128         like zscr_defect_data-defect_val,
             fld129         like zscr_defect_data-defect_val,
             fld130         like zscr_defect_data-defect_val,
             fld131         like zscr_defect_data-defect_val,
             fld132         like zscr_defect_data-defect_val,
             fld133         like zscr_defect_data-defect_val,
             fld134         like zscr_defect_data-defect_val,
             fld135         like zscr_defect_data-defect_val,
             dayst         like zscr_data_hdr-dayst,
           end of t_data.
    In this fld1 to fld135 are defined in internal table.
    But if the number of fields are more than 135 then the program is going to short dump.
    Some times fld1 to fid170 or more fields will be there in my internal table.
    Please suggest me how to make my requirement dynamic and display this data fetched into this internal table onto a .XLS file in the presentation server ?

    Hi
    You can try to use the type string:
    form like zscr_data_hdr-form,
    werks like zscr_data_hdr-werks,
    matnr like zscr_data_hdr-matnr,
    verid like zscr_data_hdr-verid,
    lot like zscr_data_hdr-lot,
    lot_qty like zscr_data_hdr-lot_qty,
    udate like zscr_data_hdr-udate,
    utime like zscr_data_hdr-utime,
    zuser like zscr_data_hdr-zuser,
    processed like zscr_data_hdr-processed,
    defect like zscr_defect_data-defect,
    vornr like zscr_route_data-vornr,
    fieldxx type string,
    dayst like zscr_data_hdr-dayst,
    end of t_data.
    So you can save you informations of every fld<n> concatenating their values into fieldxx.
    Max

  • How to delete the record in Table

    Hi Guru's,
    i have Table which contain no.of Records.
    i want to deleted one record. if i go to Table maint.Generator....from table itself..
    how to do that... when we deleting the record. can we create new TR for that?
    can anybody tell me.
    Thanks in Advance,
    venkat

    Hi,
    it is answered, here for my table there is no Table Maint.Generator.
    i just explained how i have done it.
    i just simply gone into Debug mode. there
    code = Dele.
    i have given. then i came out from debug mode to Table. there i just got Delete button on application tool bar.
    i selected the record then icliked on Delete button.
    it is got deleted.
    But it is not asking for any new Transport Request.
    Regards,
    Venkat

  • HOW to delete the records in CO1P?

    Hi all:
    When i close the PO,i find the PO have CO1P records.However ,the PO has been settled. Then how can i  delete the records in CO1P for this PO.

    Dear,
    CO1P:
    Normally the Goods Movement errors are updated in Table AFFW - Goods Movements with Errors from Confirmations and in transaction COGI.
    If the table is locked during background using update control for the confirmation then the errors are recorded in CO1P.
    COFC:
    Used for Reprocessing of errors in confirmation related to actual cost calculations.
    Please run CORUPROC Program.
    Please check this link also for further help
    http://help.sap.com/saphelp_46c/helpdata/en/e3/7cd32396f611d1b5a60000e8359890/frameset.htm
    Regards,
    R.Brahmankar

  • How to delete the record in the file present in the application server?

    Hi,
      I have two questions.
      i) How can I delete a record based on some condition in the recordx in the file that is present in the application server?
      ii) How can I lock the users whiel one user is accessing the file on the application server?
    Thanks in advance.
    Suvan

    Hi,
    If u want a frequent deletion this approach to delete a record from a file will havee unnecesary copy of records from one file to another and deletion of one file and renaming activities.
    Instead what u can do is Add and field del_flag to ur record structure.
    If u want to delete the record from a file just mark this del_flag as 'X'.
    While processing u can have a loop like
    loop at it_XXX where del_flag <> 'X'.
    endloop.
    This will logically delete the record.
    When u r to finish the application at that time only perform this copying / deleting / and renaing activity
    Hope this helps.
    Cheers,
    Nitin

  • How to delete the records with routine Z_AFRP4_DELETE as note [418584|

    Hello Gurus,
    I don't want to transfer data into HR and want to delete the records in table AFRP4 to business complete the Maintenance Orders
    Component version- EHP7 for SAP ERP 6.0
    Component-EA-APPL
    Release-617
    how can I delete these records
    Thanks fro Help
    AM

    Hello All,
    I found the solution, I copied the code in correction instruction number 0000282352 and create the report as programme  Z_AFRP4_DELETEand the executed
    *$*$----------------------------------------------------------------$*$*
    *$ Correction Inst.         0120061532 0000282352                     $*
    *$--------------------------------------------------------------------$*
    *$ Valid for       :                                                  $*
    *$ Software Component   SAP_APPL   SAP Application                    $*
    *$  Release 40B          All Support Package Levels                   $*
    *$  Release 45B          All Support Package Levels                   $*
    *$  Release 46B          All Support Package Levels                   $*
    *$  Release 46C          All Support Package Levels                   $*
    *$  Release 470          All Support Package Levels                   $*
    *$  Release 500          All Support Package Levels                   $*
    *$  Release 600          All Support Package Levels                   $*
    *$  Release 602          All Support Package Levels                   $*
    *$  Release 603          All Support Package Levels                   $*
    *$  Release 604          All Support Package Levels                   $*
    *$  Release 605          All Support Package Levels                   $*
    *$  Release 606          All Support Package Levels                   $*
    *$--------------------------------------------------------------------$*
    *$ Changes/Objects Not Contained in Standard SAP System               $*
    *$*$----------------------------------------------------------------$*$*
    *& Object          REPS Z_AFRP4_DELETE
    *& Object Header   PROG Z_AFRP4_DELETE
    *& REPORT Z_AFRP4_DELETE
    REPORT  Z_AFRP4_DELETE .
    * This report deletes confirmation records from table AFRP4 that are
    * not longer needed. Run it without update flag first !!
       tables: afrp4.
       data: lt_afrp4 like afrp4 occurs 0,
             ls_afrp4 like afrp4.
       selection-screen begin of block order with frame.
       select-options: zorders for afrp4-aufnr.   "order number
       selection-screen end   of block order.
       parameters: update as checkbox.
       select * from afrp4 into table lt_afrp4
                    where aufnr in zorders.
       if lt_afrp4[] is initial.
         format color col_normal.
         write: 'No HR confirmation background records read.'.
         exit.
       endif.
       format color col_heading.
       write: /5 'Order', 25 'Confirmation', 45 'Counter'.
       skip.  uline.  skip.
    * show corrections
       loop at lt_afrp4 into ls_afrp4.
         format color col_normal.
         write: /5 ls_afrp4-aufnr, 25 ls_afrp4-rueck, 45 ls_afrp4-rmzhl.
       endloop.
    * update on data base table
       if not update is initial.
         skip.  uline.  skip.
         delete afrp4 from table lt_afrp4.
         if sy-subrc is initial.
           format color col_positive.
           write: 'HR-records deleted successfull'.
         else.
           format color col_negative.
           write: 'Error when trying to update data base table AFRP4.'.
         endif.
       endif.

Maybe you are looking for

  • Problem in activating the data source using a web service

    Hi all, I have created a web service with Logical and Source System names and i have selected nothing in the Type and Release. Activated the created web service. Later i tried creating a data source based on this web service source system and tried a

  • Increasing Email Size Limits for some users

    Hi All, For some users (management) i needed to arrange that they are able to send bigger files then the default 10MB limit to each other. I used this procedure to do so, https://www.simple-talk.com/sysadmin/exchange/increasing-email-size-limits-for-

  • Generating PDF file using FOP API in Web Dynpro

    Hi experts, I would like to generate PDF files from a WebDynpro application without using Adobe Interactive forms. I think that I can export context data to XML stream and then apply XSLT transformation to produce XSLFO format and then pass it to xlf

  • Function module to find out DATA BASE size, free space, used size

    Is there any function module to find out DATA BASE , free space, used size FM that gives all the details of the Date base what data base, what is the size, free space, used space etc... instead of writing case by case for each data base. based on  CA

  • Export von Bilder

    Der Export der Bilder funktioniert nicht mehr. Es erscheint die Meldung: "Ein intener Fehler ist aufgetreten ?:0 attempt to perform arithmetic on a nil value". Interessanterweise funktioniert der Export zwischendurch wieder. Was ist zu tun?