Skip to Content
author's profile photo Former Member
Former Member

Please help me to modify the following code !

SELECT VTEXT FROM TVKGGT

INTO CORRESPONDING FIELDS OF TABLE t_tvkggt

WHERE KDKGR = itab-kdkg1.

read table t_tvkggt with key kdkgr = t_tvkggt-kdkgr binary search.

itab-vtext2 = t_tvkggt-vtext.

I am getting corresponding values of vtext where itab has

values of kdkgr and also doesnt have any values of kakgr.

how to remove those values of vtext which doesnt have any value for kdkgr.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

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

    How about using DELETE statement before the READ.

    DELETE t_tvkggt WHERE kakgr IS INITIAL.
    
    READ TABLE....
    

    Kind Regards

    Eswar

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Have few doubts on your statement:

      read table t_tvkggt with key kdkgr = t_tvkggt-kdkgr binary search.
      

      How is t_tvkggt-kdkgr populated, if it is populated is it only the value of this field populated or the whole structure populated.

      When using BINARY SEARCH addition with READ statement, make sure the internal table is sorted.

      Regards

      Eswar

  • Posted on Jan 17, 2008 at 06:04 AM

    Hi,

    SELECT VTEXT FROM TVKGGT

    INTO CORRESPONDING FIELDS OF TABLE t_tvkggt

    WHERE KDKGR = itab-kdkg1.

    if sy-subrc = 0.

    delete t_tvkggt where vtext is initial.

    sort t_tvkggt by kdkgr.

    read table t_tvkggt with key kdkgr = t_tvkggt-kdkgr binary search.

    itab-vtext2 = t_tvkggt-vtext.

    endif.

    Regards,

    Sooness

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2008 at 06:17 AM

    Hi,

    select * from mara

    into table i_tab

    where matnr = 'ACC CABLE'.

    loop at i_tab where bstme NE ' ' .

    endloop.

    Check out with this one and inside loop ,

    you can transfer only those records which have bstme value.

    Apply for you case.

    Reward if helpful/.

    Thanks,

    Madhura

    Edited by: Madhura Nadgauda on Jan 17, 2008 7:19 AM

    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.