TableControl - determine marked line

Hello,
i have a beginner question:
We show some data in a table control and want to delete the line from database which the user has selected.
Where and how do we have to identify the line to delete?
Thanks for help,
Andre Siegling

Hi,
The database table should contain a character field of length 1 (say mark) in addition to other fields.
In PAI , you have to loop like this.
PROCESS AFTER INPUT.
*itab is the name of the internal table with header line
  LOOP AT itab.
Marking the row to be deleted by using this field(mark)
    FIELD itab-mark MODULE check.
  ENDLOOP.
  MODULE user_command_9000.
declaration
here zzz_abc is the name of the database table which
should contain mark as one of the field
DATA : itab TYPE STANDARD TABLE OF zzz_abc WITH HEADER LINE.
CONTROLS: t_ctrl TYPE TABLEVIEW USING SCREEN '9000'.
MODULE check INPUT.
  MODIFY itab INDEX t_ctrl-current_line.
ENDMODULE.                 " CHECK  INPUT
MODULE user_command_9000 INPUT.
  DATA :lv_fcode LIKE sy-ucomm,    "Function Code
        lv_answer(1) type c.       "Storing the answer
  lv_fcode = sy-ucomm.
  CASE lv_fcode.
    WHEN 'DELETE'.
Setting the flag to make the table control in editable * mode after deleting the selected line
      flg = 'Y'.
Confirmation of delete
      CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
         TITLEBAR       = 'Confirm'
         text_question  = 'Are you sure to delete from database?'
         TEXT_BUTTON_1  = 'Yes'(001)
         TEXT_BUTTON_2  = 'No'(002)
        IMPORTING
         ANSWER         =  lv_answer.
      if lv_answer eq '1'.
Updating the database table from the internal table
        UPDATE zzz_abc FROM TABLE itab.
Deleting the selected row from the internal table
        DELETE itab WHERE mark = 'X'.
Deleting the selected row from the database table
        DELETE FROM itab WHERE mark = 'X'.
        MESSAGE s005 WITH 'Deleted Successfully'.
      ENDIF.
ENDMODULE.                 " USER_COMMAND_9000  INPUT
Message was edited by: Jayanthi Jayaraman
Message was edited by: Jayanthi Jayaraman

Similar Messages

  • Correct the marked line items in F-03

    Hi Experts,
    While using Tcode F-03 clear GL account  we are getting Error as Clear the marked line itmes. There were 4 lines with blue color ie. Foreign exchange difference a/c with zero value and we were not able to post the entry.
    How to overcome this issue.
    Thanks in advance
    Narayanan

    Dear:
                This is not an error. This is standard system configuration. System pop ups a message whenever there is some amount left as balance or arises to due foreign exchange difference in clearing transaction. You jst have to double clikc each line item with blue color and fill in the some as narration in text field. System does so to keep to let you keep track of partial invoices or exchange rate changes arising from time to time. Hope this will clear now.
    Regards

  • F-53, Simulate time getting message "Correct the marked line items"

    Hi All,
    While posting the outgoing payment (F-53),  at time of simulate I'm getting the message " correct the marked line items" & missing the vendor side line item but showing for enter amont( bank acccount line items) on screen.
    when I trying to do the second time, I observed that, process open item screen, amount entered & Assiged amount both showing minus(-)sign
    I guess the message getting because of the same sing(-) of vendor item & bank account,
    Can some one help me out to understanding the why it showing same sign and reslove the issue
    Thanks
    Ramakanth

    Hi Ravi,
    Yes, I have posted FB60 and in FBL1N showing credit balance of vendor but when clearing F-53 suprisingly showing wrong side amount I mean assigned amount( open item).
    Is there any configuration missing or any thing i missing is system.
    Thank you
    Ramakanth

  • Correct the Marked Line Items

    Hi,
    When  I do F-54 (Clear Vendor Down Paments) after doing entering amount in Transfer posting and when I stimulate and try to save it gives me message saying "Correct the Marked Line Items"  So it shows me on of the line itesm in blue color and when I double click it takes me to Item level and then I entered the Text and save the document. Then in FBL1N its gets clear by one document and the cleared document show its been open.
    Can some one explaing me I am doing some thing wrong .
    Regards,
    Arvind.

    Hi,
    What you are doing is absolutely right.
    When you make a downpayment using special gl indicator, the vendor line time gets posted to SPECIAL RECONCILIATION ACCOUNT instead of normal reconciliation account assigned in vendor master.
    F-54 is used for bringing the vendor line item from special recon account to normal recon account.
    So the same vendor gets debited (spl recon-cleared) and credited (normal recon-Open)
    This new credit items will be cleared with payment.
    Assign Points if useful
    Regards
    Raghu Ram.

  • Msg "Correct The Marked Line Items"

    FI Experts,
    I am trying to post an entry in GL when I try to save it tells me "Correct the Marked Line Items" I click on the blue items, it open up I do nothing but click save and I can post. This is fine when I have one entry to fix but not when I have multiple line items. The error does not tell me what exactly I have to correct.
    Anyone has any ideas?
    Edited by: Frank on Feb 4, 2009 2:26 PM

    Abdali,
    For some odd reason problam came back again, after I took Cost Center from required to Optional thru tcode OBC4.
    I then looked for another field that was requried this time an MM field I took it from reuired to Optional, and teh problem went away again. This has nothing to do with the message I am getting. I do see that the message always tells me to Correct The marked Line Item related to taxes"
    But here is teh info you requested
    SAP_APPL     600     0012     SAPKH60012     Logistics and Accounting
    Thank You for your help

  • POWL Easy - Getting the marked lines

    Hi,
    I have a surrounding WD component which embeds a POWL Easy.
    Now I want to get the marked lines in the POWL when triggering a POWL action.
    I implemented WD-Component Interface POWL_DETAIL_COMP_IF where method UPDATE_DETAIL_DATA is triggered
    when a POWL line is marked. Unfortunately this method only imports one single line.
    I tried also to implement an event handler for event POWL_FOLLOW_UP. But this event handler is never called,
    although I triggred a event (in debugging) in feeder class method IF_POWL_FEEDER~HANDLE_ACTION.
    Does anyone know, how the event handler method POWL_FOLLOW_UP can be called?
    Thank you and best regards, Edgar

    Hi Madhu,
    in my case the described solution is not working.
    I am using a Easy POWL which means that I am using the WD Component POWL_EASY in my main component
    and not POWL_UI_COMP (see also example WD component POWL_EASY_DEMO in your system).
    When I raise a portal event in IF_POWL_FEEDER~HANDLE_ACTION as decribed
    the method POWL_FOLLOW_UP  is not called, although I registered for this event in my main component.
    Best regads, Edgar

  • How to determine fixed line of table control using BDC program ?

    Dear All,
    I create program using BDC that contains table control.
    Unfortunately the table control line of BDC program will depend on the resolution of our PC setting.
    Sometime I have 2 lines, sometime 3 lines (in different PC).
    How to determine fixed line of table control?
    So it will never be confusing me whether I have 2 or 3 lines.
    Thnx - Regards,
    (Taufik K.)

    Hi Taufik,
    Check the table CTU_PARAMS and field DEFSIZE for setting fixed line of a table control.
    CALL TRANSACTION 'VA01' USING it_bdcdata
    OPTIONS FROM OPT
    MESSAGES INTO it_mesg.
    opt of type ctu_params.
    WA_CTU_PARAMS-DISMODE = 'N'. "no screen mode
    WA_CTU_PARAMS-UPDMODE = 'S'. "synchronus update
    WA_CTU_PARAMS-NOBINPT = 'X'.
    WA_CTU_PARAMS-NOBIEND = 'X'.
    WA_CTU_PARAMS-DEFSIZE = 'X'. "Default size
    Default size will play good role in terms of resoultion. in one system in table control you can see 10rows, but in others system it will show 20 records. it depends on resoultion. but when you set the default size then it will take same (default screen size) in all the systems when you run BDC.
    Reward if helps.
    Regards,
    Senthil
    Message was edited by: senthil kumar

  • TableControl: Check of marked line?

    Hi there,
    I have a problem with programming a table control in a z-transaction.
    I want to have a table control for selecting a transport request position... So it can only be selected one single line. I have defined a mark-column for this. The table is a global table in my program and I've generated the table control with the wizard from screen editor.
    But now I have the problem that I have to validate that the user selects exactly one line (ok, more than one is not possible by TC). But how can I implement this? I've tried to implement a module in PAI that makes a READ on the global table with key MARK = 'X'.
    If nothing is found, it shall bring an error-message.
    But my problem is now that the dynpro isn't anymore editable after this error-message, so the user has no chance to really check one line after getting the error.
    Here my coding:
    PROCESS AFTER INPUT.
    * Verlassen des Dynpros via Exit-Command
      MODULE exit_dynpro AT EXIT-COMMAND.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TC_TB_POS'
      LOOP AT gt_tb_pos.
        CHAIN.
          FIELD gs_tb_pos-mark.
          MODULE modify_tc ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
      MODULE tc_tb_pos_user_command.
    *&SPWIZARD: MODULE TC_TB_POS_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TC_TB_POS_CHANGE_COL_ATTR.
      MODULE check_mark.
    MODULE modify_tc INPUT.
      MODIFY gt_tb_pos FROM gs_tb_pos INDEX tc_tb_pos-current_line.
    ENDMODULE.             
    MODULE check_mark INPUT.
      READ TABLE gt_tb_pos
        INTO gs_sel_pos
        WITH KEY mark = 'X'.
      IF sy-subrc NE 0.
        MESSAGE e002(zh).
      ENDIF.
    ENDMODULE. 
    Thanks a lot for hints
    Regards
    Markus
    Edited by: Markus Glubka on Jul 18, 2008 10:38 AM

    Hi,
    you create one column for check boxs in table control. for examle
    table control containing 5 line items . if will click on 2 line or anywhere ,u can read that line only . go through bellow code.
    process ofter input.
    module read_table_control2 input.
    *&      Module  read_table_control2  INPUT
          text
    module read_table_control2 input.
    read table ivbrk into temp_ivbrk index tabc_102-current_line.
      if sy-subrc = 0 .
        modify ivbrk index tabc_102-current_line transporting  indic.
      else.
        append ivbrk.
      endif.
    endmodule.                 " read_table_control2  INPUT
    _other wise**_
    creat index in table control.
    module read_table_control input.
    *&      Module  read_table_control  INPUT
          text
    module read_table_control input.
      if index = 'X'.
        iexport-index = index.
        modify iexport index tabc_101-current_line  transporting  index.
      endif.
    endmodule.                 " read_table_control  INPUT
    this way u can read table conrtrol which line u want.
    Regards,
    Ramya

  • Schedule line number determination - Schedule line category CP(MRP)

    Hello All,
    I want to know on what basis schedule line numbers getting determined.
    Schedule line category: CP-MRP
    Sales order line items getting confirmed based on the Planned order--> production order created through MRP run.
    I have created sales order line item 1 with 100 quantities. for example I created today. RDD also today.
    3 production order created.
    Those production orders confirmation date as below.
    Production order 1 - 60 quantities - 14.04.2014
    Production order 2 - 30 quantities - 16.04.2014
    Production order 3: 10 quantities - 18.02.2014.
    There are four schedule lines for the line item 1.
    All the 4 lines showed as per the confirmation date order.
    But the schedule line numbers are not as per the above order.
    For example,
    Schedule line number   ----- delivery date ----- Confirmed qty
    1.                                         09.04.2014            0
    3.                                         14.04.2014            60
    2                                          16.04.2014           30
    4                                          18.04.2014            10
    On what basis this schedule numbers getting determined? Is there any standard procedure ?
    Why schedule line numbers not inline with the confirmed date?
    Let me know if you need more information.
    Thank you.
    Regards,
    Rakkimuthu C

    Hi,
    Schedule line number is the number that uniquely identifies the schedule line .
    Use When an item has more than one schedule line, the system automatically assigns a unique number to each line. The number is displayed in the details screens for schedule lines.
    Note The schedule line number serves internal purposes and does not, for example, determine the sequence of schedule lines in the overview screen. The schedule lines on the overview screen are sorted by date.
    The schedule line number will get created automatically by the system. I hope this will clarify your doubt. Thanking you.

  • How to determine the lines in a file?

    Hi,
    I have a VI that reads the lines in a file and then I am using a for loop to analyze the data.
    Is there a way to determine the number of lines in the file so that I can feed it in the N value of the for loop?
    I tried the command EOF in the read lines VI with no success.
    Let me know,
    Fede
    Attachments:
    file reader CAN v2.5.vi ‏114 KB

    I think I understand what you are saying.
    You think I should reorgabize the array witout using the shift registers and using the read from spreadsheet vi.
    I am not saving the same file.
    I am trying to save the data in 3 different formats. I am eliminating the time stamp and saving it in order to use later on in my graphs. Then I am saving the raw data before I concatenate the first 4 bits and after I concatenate the the first 4 bits.
    If I use autoindexing I will not need the shift registers,right? Can I then save the while the program is running or I have to save at the end of the process.
    I am familiar with operations with strings but I am still a bit weak on array and string working toghether.
    I attach what I am doing.
    Thanks
    Attachments:
    sensorlog1.txt ‏1 KB
    canwithtime.txt ‏1 KB
    log1.txt ‏1 KB

  • Business area not determined for line item?

    Hello All,
    I am trying to create a sales order. When I enter a line item and enter plant for the item, it gives me an error "Business area not determined for the line item #" and it does not accept the item.
    I have already checked in the enterprise structure in IMG that the business area is defined and assigned for this plant.
    Is there anything else need to be done? Do we have to define or assign the business area in material master?
    I would appreciate  if somebody can answer.
    Thanks.

    There are three rules for determining a business area:
    o   Rule 1: plant and division 
    o   Rule 2: for each sales area          
    o   Rule 3: for each plant and item division
    See what you are missing

  • Mark line in matrix with coloured value

    Dear All,
    Is it possible in UI to setting colour for a matrix's lines? Like for a item has special price the relevant line marked in blue.
    Thanks in advance.
    Nghia

    No, you cannot. When youll apply this settings to some cell (backcolor, forecolor, font,...), the whole column in matrix will have this settings. The only way is add to matrix one more column as picture type and show the proper color as image in this column.

  • ArcGIS Text: what determines single line vs. single letter?

    Hello! Please see the attached and notice that some text is presented as individual letters, and other text is presented as a single line (I have selected the text so you can see the vertices).  Clipping mask is released, everything is ungrouped. These labels have no difference I can find inside of ArcMap10, but something is clearly differentiating them in Illy.  Any ideas? And any idea how I can export to achieve grouping neither by letter nor phrase, but by individual whole word? Thank you!

    Thanks; I do appreciate the input!  ArcGIS is similar to a drafting program like AutoCAD in some ways, but its most distinguishing characteristic is its spatial awareness--its lines and points know where they are geographically, according to projections and grids and all that good geo stuff.  Think GPS, Google Maps, etc. "Mxd" is the file extension for a map document generated by Esri ArcGIS software, a leading developer/supplier of geospatial tools.  Thanks again for taking a look!

  • Logic of determining value for Inventory offsetting line item

    Hi,
    I want to know the following for the reversal of Process Order for materials for which the price control is 'S'.
    How the value for GBB (Inventory offsetting) is determined. I have observed it taking the weighted rate of the (Summation of the Total Actual Cost / Sumation of Actual Qunatity) * Reversal Quantity. The BSX line item is determined by Standard Price * Reversal Quantity
    The balance is posted in the Price difference.
    I want to know why this difference is determining tge line items.
    I have gone thru SAP Note 216080 in this regard but failed to understandard the basic resaon why this is happening.
    Regards
    Partha

    Dear colleague,
    you are right
    >note 422606:
    a) The manufactured material has price control 'S' (Standard price).
       Valuation is carried out for goods receipts using the standard
       price that is currently valid.
       For the reversal of goods receipts, the valuation of the debit of
       the order (offsetting entry to stock posting) is carried out
       using the price determined from the quotient of value of goods
       received and quantity of goods received. That is, all previous
       goods receipts are used for the valuation of the reversal of a
       goods receipt, but order settlements are not used.
    It is the standard system behaviour that the reversal of goods receipt
    for production order are not valuated with standard price. All previous
    goods receipts are used for the valuation of the reversal of a
    goods receipt.
    Goods receipts are always reversed with an average of the prices of
    all goods receipts in the order history. Therefore price differences
    may occur. This behaviour is as well explained in the attached
    note 49995 in the reasons and prerequisites step. As well you find
    an explanation in note's 422606 symptoms. the system tries to avoid the reversal
    with posted values no longer possible.
    If this replies your question ,please mark it as answered,
    best regards,
    maria

  • Possible to mark and unmark every line of the list (ALV

    Hi Experts,
    I would like to develop stock compensation report for a client my requirement as below.
    It must be possible to mark and unmark every line of the list (ALV). On top of the list a button (Create Sales Document) is needed. Pressing this button starts the creation of the sales documents for every line of the list which is marked. The button is only active when the simulation flag is initial!
    Since this is a working list it must be possible to double-click on each line and see the line item details. The line item details should be shown as a ALV list as well. The list contains the following fields:
    u2022     Sold-to (VBPA-KUNNR u2013 VBPA-PARVW = u2018AGu2019)
    u2022     Name of sold-to (VBPA- ADRNR u2013 VBPA-PARVW = u2018AGu2019  ADRC-NAME1)
    u2022     Ship-to (VBPA-KUNNR u2013 VBPA-PARVW = u2018WEu2019)
    u2022     Name of ship-to (VBPA- ADRNR u2013 VBPA-PARVW = u2018WEu2019  ADRC-NAME1)
    u2022     Material number (VBRP-MATNR)
    u2022     Material description (VBRP-ARKTX)
    u2022     Old Price List (determination see above)
    u2022     New Price List (determination see above)
    u2022     Compensation Value List (determination see above)
    u2022     Compensation Quantity List (determination see above)
    u2022     New Compensation Quantity List (determination see above)
    After pressing the creation button a sales document for every marked line is created. When this is finished a log is issued for every line. The log shows the following information:
    u2022     Sold-to (VBPA-KUNNR u2013 VBPA-PARVW = u2018AGu2019)
    u2022     Name of sold-to (VBPA- ADRNR u2013 VBPA-PARVW = u2018AGu2019  ADRC-NAME1)
    u2022     Ship-to (VBPA-KUNNR u2013 VBPA-PARVW = u2018WEu2019)
    u2022     Name of ship-to (VBPA- ADRNR u2013 VBPA-PARVW = u2018WEu2019  ADRC-NAME1)
    u2022     Sales document number or error message if no document is created
    How to create check boxes for eachline in the ALV output for mark or unmark purpsoe and how to create create sales document button in the output and how to create the sales order process . please help me out.
    Moderator message: more "spec dumping", please work yourself first on your requirement.
    Edited by: Thomas Zloch on Mar 29, 2011 4:32 PM

    hi
    i have a code for drop down list use this
    this code is for selection-screen deop-down list yu can add this same code in ALV
    REPORT  ZCHETANA_PRAC10                         .
    Type-pools: VRM.
    data: name type vrm_id,
          list_month type vrm_values,
          list_year type vrm_values,
          value type vrm_value.
    selection-screen: begin of block b with frame.
    parameter: p_year(10) type c as listbox visible length 10,
               p_month(10) type c as listbox visible length 10.
    selection-screen: end of block b.
    at selection-screen output.
    value-key = 'JAN'.
    value-text = 'JAN'.
    append value to list_month.
    value-key = 'FEB'.
    value-text = 'FEB'.
    append value to list_month.
    value-key = 'MAR'.
    value-text = 'MAR'.
    append value to list_month.
    value-key = 'APR'.
    value-text = 'APR'.
    append value to list_month.
    value-key = '1998'.
    value-text = '1998'.
    append value to list_year.
    value-key = '1999'.
    value-text = '1999'.
    append value to list_year.
    value-key = '2000'.
    value-text = '2000'.
    append value to list_year.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID                    = 'P_MONTH'
        VALUES                = list_month
    EXCEPTIONS
      ID_ILLEGAL_NAME       = 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.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID                    = 'P_YEAR'
        VALUES                = list_year
    EXCEPTIONS
      ID_ILLEGAL_NAME       = 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.
    start-of-selection.
    write:/ p_year,
           p_month.

Maybe you are looking for

  • What are the tables related to SD in PP relation tables if any

    what are the tables related to SD in PP relation tables if any

  • How can we maintain tetxs in webdynpro insted of hardcode

    Hi Experts,                 i am new for this webdynpro abap.how can we maintain tetxs in webdynpro insted of hardcode like text symbols in abap.we are using freaquently texts in message manager.in best practice we should not maintain hard code. guys

  • Opening and relink a doc in Indesign

    I am trying to take an Indesign document, as well as all of the elements linked to it, and drop it into a folder.(This part is already done) Once it is in this folder, I want to open the file and relink the elements via a script with no user interact

  • Upgrade to Lightroom CC 6 but not Photoshop CC

    I joined the $9.99 / month CC Photoshop & Lightroom program in Dec 2014. At that time I upgraded to Photoshop CC but didn't upgrade Lightroom. Now I want to get the new version of Lightroom, 6 CC. How do I do this?U

  • User Exit or BADI for IW31

    I would like to populate the cost center in work order to PR. Is there any user exit or BADI ? I had try IWO10009, it doesn't work. Please help on this. Thanks.