WSo2 BDC to delete line item in table control

Hi all,
My requirement is to delete material from wso2 table control.
The only way to delete a line item in this table control is to select the line in table control and delete it.
The recording doesnt captures any selection of row.
Any input on how to caputre particular row ??
Please dont send me links to work with table control in bdc
Regards
Bhanu

DaveL  wrote:
  I am not aware of any way to make the BDC delete the row, other than by running in 'A'-all mode and letting the user step through each screen and delete the rows that should be deleted.
Well , if the user has to run it in "A" all screen mode why a BDC is required
DaveL  wrote:
Deleting them from the table control would obviously have no effect upon the database table though, would it....it would just hide a row from view in this particular table control
Really ? Well it will delete it from database too i dont know what makes you think that it wont be deleted from database.
Anways i have figured out how to capture row selection in BDC .
Thanks for your reply it proves nothing i guess

Similar Messages

  • Dynamically picking the line item of table control

    Hi all,
    Can u suggest me a way to dynamically picking the no of line item in the table control displayed.
    Regards,
    Ashutosh Kumar

    Hi Ashutosh,
    In BDC case, what you can do is use the "position button" instead of finding the number of lines on the table control.
    Or else you can use call transaction with 'Options addition'
    eg:
    Call transaction parameters
          clear gs_options.
    <b>      gs_options-defsize = 'X'. "Default size</b>
          gs_options-dismode = 'N'.
          gs_options-updmode = 'S'.
               call transaction 'VI02' using t_bdcdata
                                       "mode 'N'
                                     "update 'S'
                                     options from gs_options
                                   messages into t_messages.
    Please let us know why do you want to know the number of lines on the Table control.If the above answer doesn't satisfy you.
    Regards,
    Ravi

  • How to get First line item in Table control for BDC.

    Hi,
    I have a requirement while creating the return order from the reference Sales order for BOM.
    Once I compare the line items and delete the items not to be returned, I want to read the first line item which in fact is header, to make some changes.
    How to read  this as cursor points to the last line item.
    -B S B

    Hi Bsb,
    What is exactly unclear to you? =POPO will give a popup screen in which you can enter the order position number. This number will then be on the top of the table which means you can refer to it in BDC with "(01)".
    Regards,
    John.

  • Copy of a line item in table control

    Save Our Environment. Save Yourself.
    Hi All,
    Firstly, I have an invoice number on one screen 0050. When I enter one invoice number and ENTER, it'll take me to screen 0100 in which there is a table control having some 10 columns. This will be a display of the line items of that particular invoice number.
    Now, in these columns 2 will be editable and all the rest non-editable. Now, based on some condition, when the user tries to save these entries after inputting some values into those editable fields, I need to make a copy of the same line (means with all same values).
    Can somebody please tell me whether this is possible? I tried searching in SCN, but was not clear with some solutions.
    Thanks a lot.
    - I'm not an environmentalist.  I'm an Earth warrior.

    HI,
    You can use GET CURSOR LINE LINE_NO this will give you the sy-index so that you can read the itab like
    read table itab index line_no. This is one option and second is if you have row selector.
    read table itab with key mark = 'X'.
    If you want the Row contents befor the PAI triggers
    [Check this Thread|Table Control dynamic F4;
    Hope this is clear to you.
    Regards
    Ram

  • Setting line item of table control

    I need to allow the user to enter a line item number 10, 20, 30 ... and then the cursor is set to that line item in the table control

    Any one please.

  • How to create BDC for Deletion of Records in Table Control in BDC for PFCG

    I have transcation PFCG and have to go to roles of users there.We will upload the users who has to be deleted and it should delete it from the PFCG in one go .Howcan I create a program to delete from the table .If i delete directly from DB table it doesnt show in SAP log how or Who deleted it  and the client wants this log which is needed for accountability.
    Pls HELP.
    George

    Hi
    You can only indicate the user and all profiles of the user will be deleted.
    DATA: BEGIN OF T_DEL_USR OCCURS 0,
                     USERNAME LIKE  BAPIBNAME-BAPIBNAME,
          END   OF T_DEL_USR.
    DATA T_RESULT TYPE STANDARD TABLE OF BAPIRET2
    WITH HEADER LINE.
    After loading the users to be deleted:
    LOOP AT T_DEL_USR.
      CALL FUNCTION 'SUSR_BAPI_USER_PROFILES_DELETE'
        EXPORTING
           USERNAME = T_DEL_USR-USERNAME
        TABLES
            RETURN =  T_RESULT.
    ENDLOOP.
    I'm not sure but perhaps u have to use bapi for commit too: BAPI_TRANSACTION_COMMIT
    Max

  • How to pick the value of the line item in table control

    My screen.
    I have designed table control by referring internal table without using wizard.
    I have placed button inside of that table control.
    my requirement is by clicking the button it ll show the value of the line inside of the table control.
    I have used "get cursor...".
    But the problem is "it ll show only the cursor value of the front screen, if suppose i scroll the value of table control at the time also, it ll show the cursor value of the screen, it ll not show the exact value of the cursor inside of the table control.

    Wrong Forum Anand......!

  • 2LIS_02_ITM deleted line items are not reflected in BW

    Hi,
    Our current Data flow 2LIS_02_ITM-->DSO-->CUBE.
    I am analyzing a Invoice, When it is created 01.04.2014 it has got 10 Line Items and all the data is load to BW,Invoice with 10 Line items.
    In ECC I can now see the same Invoice only got 5 line items and from change log I can see 5 line items are deleted on 15.04.2014.These changes are not reflected in BW.In BW invoice data still shows 10 line items.
    If I perform setup table job and ECC RSA3 for that invoice I am getting only 5.
    I believe it’s something to do with 0RECORDMODE,Can you please let me know how to fix this in BW.
    Thanks

    Yes this is a known behavior in case of deltas.
    For Deleted line items Rocancel field will have an entry with R.
    To handle this you need to map ROCANCEL field in Technical group of transformation (Between Datasource to DSO) with 0Recordmode.
    Once you will do that then after activating the data in DSO it will nullify the records and deleted order or item will not appear.
    Regards,
    AL

  • Deleting line items in sales order.

    Hi All,
    I got as issue while creating the order.
    issue:
    I try creatin an order by deleting some of the line items and the customer got the credit check. when i tried chek in the debug mode the deleted line items are not reflecting in the internal table.
    Is there any user exit availble thru which i can delete the line items from internal table on the basis of UPDKZ ffield?.
    Regards,
    Neslin.
    Edited by: neslin on Jan 16, 2008 8:21 AM

    Hi,
    This is the standard SAP behaviour.
    ...Seems development inside a relevant include is the only fix to achieve this.
    Regards,
    Anubhav

  • How to get report for deleted line items from sales orders

    Dear FRIENDS,
    please infirm the t.code or report for viewing the deleted line items from sales ordrers.
    Kindly do the neeedful.
    regards,
    N.M.PAWAR

    Hi,
    With transaction SE16 you can view table CDHDR for header changes and
    CDPOS for item changes. This includes deletion.
    OR
    GO to VA03 - Display Sales order -> Put order no : don't press enterbutton. -> Go to Enviornment -> changes -> You will get details
    Date ItmNo. SLNo Action
    Hope this help please close the thread if answers

  • Not able to delete line items using BAPI_OUTB_DELIVERY_CHANGE

    Hi,
        Not able to delete line items of a delivery using BAPI 'BAPI_OUTB_DELIVERY_CHANGE', with thte below code and even return parameter has zero messages.
    I have even checked existing below posting.
    https://www.sdn.sap.com/irj/scn/logon?redirect=http%3a%2f%2fforums.sdn.sap.com%2fthread.jspa%3fthreadid%3d782509
    Below is the code that i am using.........
    *wa1-deliv_numb = wa_lips-vbeln.
    wa1-deliv_item = wa_lips-posnr.
    APPEND wa1 to item_data.
    wa-deliv_numb = vbeln_so .
    wa-deliv_item = l_item.
    wa-del_item = 'X'.
    APPEND wa TO item_control.
    w_header_data-deliv_numb = vbeln_so .
    w_header_control-deliv_numb = vbeln_so .
    w_delivery = vbeln_so .
    *w_header_control-dlv_del = 'X'. "Delete whole Delivery
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
      EXPORTING
        header_data    = w_header_data
        header_control = w_header_control
        delivery       = w_delivery
      TABLES
       item_data      = item_data
        item_control   = item_control
        return         = return.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    I have even  tried uncommenting item_data parameter but not able to delete line item.....i am able to delete whole delivery but not line items .........can any one of u help me in resolving this issiue plz ???
    Regards,
    M, Manohar

    Kindly use WS_DELIVERY_UPDATE to delete the items
    Sample code:
    L_VBKOK-VBELN_VL = vbeln_so.
    clear l_vbpok.
             refresh l_vbpok.
             l_vbpok-vbeln_vl = vbeln_so
             l_vbpok-posnr_vl = wa_deliv_item.
             l_vbpok-lips_del = c_x.
             append l_vbpok.
             set update task local.
             call function 'WS_DELIVERY_UPDATE'
               exporting
                 vbkok_wa = l_vbkok
                 commit   = ' '
                 delivery = lv_delivery
               tables
                 vbpok_tab = l_vbpok
               exceptions
                 others   = 0.
             commit work and wait.

  • Deleted line  item not display in Print preview

    Dear All ,
                                    Pl guide that when i delete the line item from a P.O then this deleted item is not visible in Print Preview .pl help what are the exact setting due to which i can know why this del item is not coming in Print Preview.
    Rgds ,
    Rajeev
    Edited by: sap11 on Feb 11, 2009 10:37 AM

    HI,
    Using the standard programm and print form the system works as follows:
    When you will create a new Purchase order with two line item. System
    will create new message record with  Change message flag (NAST-AENDE) as
    space and processing status (NAST-VSTAT) as  0 "not processed".
    After this if you will output the message using ME9F then system will
    update the message processing status NAST-VSTAT as 1 "Successfully
    processed".
    When you will delete line item 10, at that time system will create
    one more message record with indicator Change message flag
    (NAST-AENDE = X ) and processing status 0 "not processed".
    Now system contains two message records in table NAST, one for which
    processing has been done and one change message record for which
    processing has not been done.
    If you will run ME9F with processing status 0 then this means you
    wants to output the change message record means you wants to inform
    your vendor that item 10 has been deleted. That's why system show
    line item 10 but you can notice in print preview, system mentions that
    item 10 has been cancelled.
    If you will run the message with processing status as 1 then this is
    not change message output means system will show you latest print
    of purchasing document and thus will not show line item 10.
    Please take the print out of both message record and you can see the
    difference.
    I hope this information helps!
    Best Regards,
    Arminda Jack

  • 2LIS_11_VAITM - Deleted Line Items

    I am having an issue with sales order line items that have been deleted.
    I load my data using 2LIS_11_VAITM into a DSO EDW Layer. I then pass this up to another DSO layer. I noticed that users were deleting line items from Orders and this was causing me an issue in my data. To remove the problem I have linked ROCANCEL to 0RECORDMODE in the Technical rule up to my EDW layer and now in my EDW layer the line item goes completely when it is deleted out of the ERP system ad the deletion is passed into BW.
    I got the idea for this from here Deleted line item appears in BI report
    My problem lies in the layer above where I am still left with a line in the DSO relating to the deleted line. But the KF are zero. Is there anyway to also get this line to be deleted out as per my EDW layer?
    Thanks,
    Joel

    Hi Joel,
    What is not completely clear to me is what happens in the first DSO. Are the deleted records removed from the active table or are the key figures set to 0?
    Furthermore, what is update rule for key figures: overwrite or addition (in the transformation to both DSOs)?
    The record mode is indeed the crucial factor. It must become clear which one is delivered by the DataSource: 'R' for a reversed record or a 'D' for an entire deletion? And what is the record mode in the update to second DSO?
    Best regards,
    Sander

  • BAPI_SALESORDER_CHANGE [delete line item and update ]

    LOOP AT itab_ch .
      *IF itab_ch-itm_number = selpos1 AND  delflag = 'X'.*
    *     Delete Line items
        s_order_header_inx-updateflag = 'U'.
        i_order_item_in-itm_number = itab_ch-itm_number.
       schedule_lines-itm_number = itab_ch-itm_number.
        schedule_lines-sched_line = zsd_tab_z-etenr.
        schedule_lines-req_qty = itab_ch-target_qty.
        i_order_item_inx-updateflag = 'D'.
        i_order_item_inx-itm_number = itab_ch-itm_number.
      schedule_linesX-itm_number = itab_ch-itm_number.
      schedule_linesx-sched_line = zsd_tab_z-etenr.
      schedule_linesx-req_qty = 'X'.
      APPEND schedule_lines.
      APPEND schedule_linesx.
        APPEND: i_order_item_in, i_order_item_inx.
    ELSE.
        if itab_ch-item_categ = 'ZFRS'.
    s_order_header_inx-updateflag = 'U'.
        i_order_item_in-itm_number = itab_ch-itm_number.
        i_order_item_in-target_qty =  itab_ch-target_qty.
    schedule_lines-itm_number = itab_ch-itm_number.
    schedule_lines-sched_line = zsd_tab_z-etenr.
        schedule_lines-req_qty = itab_ch-target_qty.
        i_order_item_inx-updateflag = 'U'.
        i_order_item_inx-itm_number = itab_ch-itm_number.
         i_order_item_inx-target_qty =  itab_ch-target_qty.
    schedule_linesX-itm_number = itab_ch-itm_number.
    schedule_linesx-sched_line = zsd_tab_z-etenr.
      schedule_linesx-req_qty = 'X'.
      APPEND schedule_lines.
      APPEND schedule_linesx.
        APPEND: i_order_item_in, i_order_item_inx.
        ENDIF.
        ENDIF.
          ENDLOOP.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument     = vbap-vbeln
        order_header_in   = s_order_header_in
        order_header_inx  = s_order_header_inx
        behave_when_error = 'P'
      TABLES
        return            = it_return
        order_item_in     = i_order_item_in
        order_item_inx    = i_order_item_inx
       schedule_lines     = schedule_lines
       schedule_linesx    = schedule_linesx.
    here line item is delete perfect but when i use  updateflag = 'U'  for other line itme then
    quantity is not modify
    Code Formatted by: Alvaro Tejada Galindo on Dec 26, 2008 10:26 AM

    DATA: s_order_header_in LIKE bapisdh1.
      DATA: s_order_header_inx LIKE bapisdh1x.
      DATA: BEGIN OF i_order_item_in OCCURS 0.
              INCLUDE STRUCTURE bapisditm.
      DATA: END   OF i_order_item_in.
      DATA: BEGIN OF i_order_item_inx OCCURS 0.
              INCLUDE STRUCTURE bapisditmx.
      DATA: END   OF i_order_item_inx.
      DATA: BEGIN OF it_return OCCURS 0.
              INCLUDE STRUCTURE bapiret2.
      DATA: END OF it_return.
      DATA: BEGIN OF i_sched OCCURS 10.
      INCLUDE STRUCTURE bapischdl.
      DATA: END OF i_sched.
      DATA: BEGIN OF i_schedx OCCURS 10.
      INCLUDE STRUCTURE bapischdlx.
      DATA: END OF i_schedx.
    LOOP AT itab_ch .
    s_order_header_inx-updateflag = 'U'.
    IF itab_ch-itm_number = selpos1 AND  delflag = 'X'.
    Delete Line items
        i_order_item_in-itm_number = itab_ch-itm_number.
        i_order_item_in-TARGET_QTY = itab_ch-target_qty.
        i_order_item_inx-updateflag = 'D'.
        i_order_item_inx-itm_number = itab_ch-itm_number.
        i_order_item_inx-TARGET_QTY  = 'X'.
        APPEND: i_order_item_in, i_order_item_inx.
      Fill schedule line flags
      i_sched-itm_number = itab_ch-itm_number.
      i_sched-sched_line = '0001'.
      APPEND i_sched.
      i_schedx-itm_number  = itab_ch-itm_number.
      i_schedx-sched_line  = '0001'.
      i_schedx-updateflag  = 'D'.
      APPEND i_schedx.
    ELSE.
    *****UPDATE TIEM.
      if itab_ch-item_categ = 'ZFRS' .
      Fill schedule lines
      i_sched-itm_number = itab_ch-itm_number.
      i_sched-sched_line = '0001'.
      i_sched-req_qty    = itemdiv.
      APPEND i_sched.
      Fill schedule line flags
      i_schedx-itm_number  = itab_ch-itm_number.
      i_schedx-sched_line  = '0001'.
      i_schedx-updateflag  = 'U'.
      i_schedx-req_qty     = 'X'.
      APPEND i_schedx.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF errorflag IS INITIAL.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument     = vbap-vbeln
        order_header_in   = s_order_header_in
        order_header_inx  = s_order_header_inx
        behave_when_error = 'P'
      TABLES
        return            = it_return
        order_item_in     = i_order_item_in
        order_item_inx    = i_order_item_inx
       schedule_lines     = i_sched
       schedule_linesx    = i_schedx.
      ENDIF.
      LOOP AT it_return.
    READ TABLE it_return WITH KEY NUMBER = '233'.
          IF sy-subrc = 0.
         CONCATENATE it_return-message  INTO zmsg.
          MESSAGE i000(38) WITH it_return-message .
          EXIT.
           ENDIF.
    ENDLOOP.

  • BADI: ME_PROCESS_REQ_CUST  Detecting a Deleted Line Item?

    I have implemented this BADI for mapping and for defaulting GL Account Numbers that we read in a custom ZMAPPING_Table. All of my gl account mapping logic is in the 'PROCESS_ACCOUNT' method in this BADI. Just an FYI, there is some code in the 'PROCESS_ITEM' method in this BADI, for another process, as well.
    It is important that I keep track of the line items and their related GL Account Numbers, Material Groups, and all other line item data entered data during the create and change of a Purchase Requisition in a global internal table during runtime. It is working well.
    The issue is that I need to identify when a line item is being deleted in the P.R. during runtime Then,  I can delete the entry in the internal table as well.  When I delete a line item in the P.R. the logic always seems to break in the 'PROCESS_ITEM' method, and never the 'PROCESS_ACCOUNT' method.
    Is there a delete line item indicator, variable, flag, or field, that I can check during runtime in the 'PROCESS_ITEM' method in my ABAP code to see if a line item is in the process of being deleted in the P.R.? it would probably be easiest to validate this in the 'PROCESS_ITEM' method during runtime since we have some code in this method, and it always enters that logic when a line item is deleted. Below are the objects that are being read. If someone has the answer, I'd sure be happy to get the OO code for it as well, since I am still getting my feet wet with OO.
      Thank-You, Tom M.
    INCLUDE mm_messages_mac. "useful macros for message handling
      DATA: ls_mereqitem   TYPE mereq_item,
            l_matkl        TYPE t023-matkl.
      CLEAR: ls_mereqitem.
      ls_mereqitem   = im_item->get_data( ).
      l_matkl = ls_mereqitem-matkl.
      CONDENSE l_matkl.
    * Check if user is using an OLD material group
      DATA: ls_t023  TYPE t023.
      CLEAR: ls_t023.
      SELECT SINGLE begru
        FROM t023
        INTO ls_t023-begru
        WHERE matkl = l_matkl.
      CASE ls_t023-begru.
        WHEN 'OLD'.
    * PRJ0010029 Begin of Change
          IF sy-tcode = 'ME52N'  OR
             sy-tcode = 'ME52'.
            mmpur_message_forced 'W' 'ME' '303' text-002 text-003 '' ''.
          ELSE.
            mmpur_message_forced 'E' 'ME' '303' text-002 text-003 '' ''.
          ENDIF.
    * PRJ0010029 End   of Change
        WHEN OTHERS.
      ENDCASE.
    * PRJ0010029 - End
    Edited by: Tom Matys on Oct 6, 2011 4:55 PM
    Edited by: Tom Matys on Oct 6, 2011 4:55 PM

    You can check the value of the field LOEKZ of the PR item MEREQ_ITEM.
    DATA: ls_mereqitem   TYPE mereq_item.
    ls_mereqitem   = im_item->get_data( ).
    if ls_mereqitem-LOKEZ = 'X'.  " Item deleted
    endif.
    Regards,
    [Naimesh Patel|http://help-abap.zevolving.com/]

Maybe you are looking for