Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

fetch records

Former Member
0 Likes
466

hi,

i have records in my internal table as

a001  b001   abc  123  232  232 434 556
                     asd  343 454 454 545 898
                     sds  546 656 676 767 676
c002  d003   abc  256 896 459 789
                     asd 565 865 785 412
                     sds 865 265 554 023
r002  f003    abc  256 896 459 789
                     asd 565 865 785 412
                     sds 865 265 554 023

Now i want to copy these records into another int. table. only the sds records should be fetched records.

final int. table shoud be as:

a001  b001   sds  546 656 676 767 676
          c002  d003   sds 865 265 554 023
          r002  f003     sds 865 265 554 023

How to do this..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
431

Loop at itab into wa1.

ifwa1- f1 is not initial.

wa2-f1 = wa1-f1.

wa2-f2 = wa1-f2.

wa2-f3 = wa1-f3.

endif.

if wa1-f4 is not initial.

move the remaining fields to wa2.

endif.

if wa2-f1 is initial OR

wa2-f2 is initial OR

remaining fields

wa2-f8 is initial.

CONTINUE.

else.

append wa2 to itab2.

CLEAR wa2.

endloop.

Regards,

Nikhil

Edited by: Nikhil V Kumar on Jul 29, 2010 11:37 PM

3 REPLIES 3
Read only

Former Member
0 Likes
432

Loop at itab into wa1.

ifwa1- f1 is not initial.

wa2-f1 = wa1-f1.

wa2-f2 = wa1-f2.

wa2-f3 = wa1-f3.

endif.

if wa1-f4 is not initial.

move the remaining fields to wa2.

endif.

if wa2-f1 is initial OR

wa2-f2 is initial OR

remaining fields

wa2-f8 is initial.

CONTINUE.

else.

append wa2 to itab2.

CLEAR wa2.

endloop.

Regards,

Nikhil

Edited by: Nikhil V Kumar on Jul 29, 2010 11:37 PM

Read only

0 Likes
431

Hi,

Int. table records are as follow:

rbukrs prctr text a01 a02 a03 a04 a05 a06 a07

2593 ZE0201 Before Tax 0 100.00- 0 0 0 68.95- Tax Rate 0 0 0 0 0 After Tax 0 0 0 0 0 0

2591 ZE0202 Before Tax 0 100.00- 0 0 0 68.95- Tax Rate 0 0 0 0 0 After Tax 0 0 0 0 0 0

Now i want records in another int. table only the after tax record should be picked along with rbukrs and prctc values as:

2593 ZE0201 After Tax 0 0 0 0 0 0

2591 ZE0202 After Tax 0 0 0 0 0 0

if i do loop at itab with where cond'n as text = corporate tax i'm able to fill the itab2 but i'm not getting rbukrs and prctr values .how to get bukrs and prctr values

pls help..

Thanks.

Read only

0 Likes
431

hi,

int table is this way

rbukrs	prctr	text	a01	a02	a03	a04	a05	a06	
2593	ZE0201	Before Tax	0	100.00-	0	0	0	68.95-		                     Tax Rate	0	0	0	0	0	0		                     afer Tax	0	0	0	0	0	0