Skip to Content

need to deletion code to be correction

  • Move all data from it_currinp to it_temp

  • delete from it_currinp where posnr = vbap-psnr

  • delete form it_temp where posr <> vbap-posnr

  • call function 'ZCPD_POPUP_FOR_INPUT'


    i_vbeln = vbap-vbeln

    i_posnr = vbap-posnr


    t_curr = it_temp.

    sort it_temp by posnr.

    • move from it_temp into it_currinp

    it_currinp[] = it_temp[].

    ********************************this is with header line

    loop at it_temp where posnr <> vbap-posnr

    delete it_temp index sy-tabix.

    modify it_temp.


    ***************************this is with out header line

    loop at it_currinp into wa_currinp where posnr is initial.

    delete it_currinp index sy-tabix.

    modify it_currinp.


    need to correct

    Add a comment
    10|10000 characters needed characters exceeded

    Assigned Tags

    Related questions

    1 Answer

    • author's profile photo Former Member
      Former Member
      Posted on Jan 30, 2008 at 05:50 AM


      Requirement is not clear. why r u trying to deleting and modifying the same record from internal table?

      If you want to remove same posnr records from it_temp. then check below logic.

      loop at it_temp where posnr = vbap-posnr

      delete it_temp. (sy-tabix is not required)


      Ex2: If you want to modify the posnr value whose value is zero, then follow below logic.

      loop at it_currinp where posnr is initial.

      it_currinp-posnr = '0010'.

      modify it_currinp TRANSPORTING posnr.


      Add a comment
      10|10000 characters needed characters exceeded

    Before answering

    You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
    You must be Logged in to submit an answer.

    Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.