We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE: RE:[sap-dev] reading all rows from an internal table for all rows in another internal table

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by horacio zapettini
on Mar 26 at 3:36 PM
Mark this reply as helpfulMark as helpful
(sorry for the delay... It's been a busy day)

I agree with that. Good Commenting is THE WAY. (I don't know why... but sap standard code hasn't enough comments ;).

Now, have you debuged generic code? (even worse, have you debuged code with field-symbols and assign statements?) Have you ever faced a side effect of the code you're running (i.e. you're looping at a table whilst the contents are being changed and you don't see the modify table ...)
IMO, if you can simplify the code, go for it as well as it's clear enough or as well as it is documented. But always remember that someone else will read the code, will have to debug the code and perhaps will have to make changes to it. (there's nothing wrong with read the code. But debug... and/or change is a bit different).

I don't mean to argue here. Each one has his/her own way to work and we're far away from answering the original post. Anyone that wants to talk about best practices and practical points of view to join my network or to open a new thread and we'll tell our ideas there. (there used to be an specific place to post our thoughts and nowadays we have the lounge at toolbox page.).

Horacio .

________________________________
De: sapwes via sap-dev [mailto:sap-dev@Groups.ITtoolbox.com]
Enviado el: Viernes, 26 de Marzo de 2010 10:29 a.m.
Para: Horacio Zapettini
Asunto: RE:[sap-dev] reading all rows from an internal table for all rows in another internal table

[http://userimages.toolbox.com/user/b_1514866.jpg]

Posted by sapwes (Jack)
on Mar 26 at 9:31 AM

[http://images.ittoolbox.com/vt/icons/vote.png]Mar k as helpful<http://it.toolbox.com/api/ContentVote/34009 47/1/1/>

Nev:

ABAP HELP says this about create data.
type can be any data type from the ABAP Dictionary - especially the structure of a database table, a public data type of a global class, or any data type of the same program that has already been defined with TYPES and that is either more specific than or identical to the static type of dref.
So it doesn't need to be DDIC, just typed.
I looked at the ALV table classes too but something steered me this way.
HZ:
Good commenting is a fine way to make sure code is easy to maintian regardless of the complexity and I would argue well crafted generic coding that replaces miles of copy-paste-edit style coding simplifies maintenance as well.
Wes


---------------Original Message---------------
From: rinikalsi
Sent: Saturday, March 20, 2010 11:43 AM
Subject: reading all rows from an internal table for all rows in another internal table

> Hi ,I have a requirement in which i want to read all the rows of an internal table for the set of values existing in another internal table
> BElow is a sample code
>
> Example Code :
> TYPES : BEGIN OF ty1,
> field1(10),
> field2(20),
> END OF ty1 .
>
> TYPES : begin of ty2 ,
> field1(10) ,
> END OF ty2.
>
> DATA : it_ty1 TYPE TABLE OF ty1 WITH HEADER LINE.
> DATA : it_ty2 TYPE TABLE OF ty2 WITH HEADER LINE.
>
> it_ty1-field1 = 'abc'.
> it_ty1-field2 = 'abc'.
> APPEND it_ty1 .
>
> it_ty1-field1 = 'def'.
> it_ty1-field2 = 'abc'.
> APPEND it_ty1 .
>
> it_ty1-field1 = 'bgh'.
> it_ty1-field2 = 'abc'.
> APPEND it_ty1 .
>
> it_ty2-field1 = 'abc'.
> APPEND it_ty2.
> it_ty2-field1 = 'dsf'.
> APPEND it_ty2.
>
> Now i want to select all the rows from it_ty1 for all the rows existing in it_ty2 .Is there any statement like select for all entries which can help me do so.
__.____._
Copyright © 2010 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
horacio zapettini
SAP Development Helper

Posted helpful replies on 5 threads in a group to earn a Bronze Achievement
_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language