Skip to Content

Deep for statment

Hi All ,


I am testing below example found in web .

I am getting no result into lt_final table as there are no values in lt_makt table . Can somebody suggest that how to validate tables are initial or not .

DATA(lt_final) = VALUE ty_t_final( FOR ls_ekpo IN lt_ekpo
FOR ls_ekko IN lt_ekko FROM line_index( lt_ekko[ ebeln = ls_ekpo-ebeln ] )
WHERE ( ebeln = ls_ekpo-ebeln )
FOR ls_makt IN lt_makt FROM line_index( lt_makt[ matnr = ls_ekpo-matnr ] )
WHERE ( matnr = ls_ekpo-matnr )
FOR ls_t001w IN lt_t001w FROM line_index( lt_t001w[ werks = ls_ekpo-werks ] )
WHERE ( werks = ls_ekpo-werks )
LET ls_final = VALUE ty_final(
lifnr = ls_ekko-lifnr
maktx = ls_makt-maktx
name1 = ls_t001w-name1 )
IN ( CORRESPONDING #( BASE ( ls_final ) ls_ekpo ) ) ).

Regards,

Srikanth

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on May 08 at 03:40 PM

    Hi All ,

    Thank you all for reply so quickly ..i attached the code in notepad .

    Here my question is

    -> lt_final table is not filling becuase in my system lt_makt is Initial.

    I am thinking that lt_fina tab is not filling because lt_makt is initial . is this correct ?.

    Is there any way to check lt_makt is not initial or not .



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 09 at 10:17 AM
    -1

    Thank you all.

    thank you so much for suggestion . your comments are really help full .

    is there any possibilty of share best example for parallel cursor with new 7.4 or 7.5 features .


    Thank you so much again.

    SrikanthSuvarna.

    Add a comment
    10|10000 characters needed characters exceeded

    • You ask:

      is there any possibility of share best example for parallel cursor with new 7.4 or 7.5 features .

      No, it's bad practice, but maybe you didn't understand my first answer, so sorry to repeat myself: it seems that you tried to implement so-called "parallel cursor" using nested table iterations, but that's slower than doing it with classic ABAP because you cannot exit the loops at "key breaks". This is exactly this kind of situation where so-called "new ABAP" should not be used.

      Another example where "new ABAP" should not be used, is to update existing variables. Constructor expressions are for constructing, not updating (of course, you could re-construct by duplicating and altering the original value, but you understand that it's slower and so should not be used, especially for huge internal tables).

      I hope you understand what I mean.

      NB: Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.

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.