Application Development 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: 

Find The Feature level changes and highlight

Former Member
0 Kudos

Hi All,

previous Revno records and current Revno records, all records are in the history table <b>zibofh</b> for the feature change level.

Material change level records are in <b>zimvrh</b> material level history table.

Taking feature level as an example:

Get all related records from zibofh table to it_zibofh table, loop it_zibofh table to fill in the two temporary tables (pre_features and curr_features) in the loop. Then compare the two temporary tables and get the final write statements for the records in the curr_features table or you can use your stratagems how to write out the final result after you get the difference.

By comparing these two tables: (read table by a feature name)

Pre_features table

-


Rev# BOF_status Feature_name Qty PrimaryFtr

1 P ftr1 1 N

1 P ftr2 1 N

1 P ftr3 1 X

Curr_features table

-


Rev# BOF_status Feature_name Qty PrimaryFtr

2 A ftr1 2 N

2 A ftr2 1 X

2 A ftr3 1 X

2 P ftr4 1 N

You should be able to identify:

1. ftr1's BOF_status, and Qty are changed.

2. ftr2's BOF_status, and PrimaryFtr are changed.

3. ftr3's BOF_status, is changed.

4. ftr4 is a new ftr added in the BOF.

(it is possible that ftr4 is in pre_features table with status "D" or "O", then you still need to identify it as a new feature.)

After capturing the Revno 2 changes and using your stratagem to write them out, then move all records in curr_features table (Revno 2) into pre_features table, and read all Rev# 3 records in curr_features table to compare......utile go through all records in it_zibofh table.

anyone can help on this .........

i look forward to your reply

Regards

Sekhar

3 REPLIES 3

Former Member
0 Kudos

Please help me on this topic

send the sample code

with Regards

Raja Sekhar.T

andreas_mann3
Active Contributor
0 Kudos

Hi ,

1) loop table current

2) compare with table previous (read table)

3) the differenc append in table history

Andreas

Former Member
0 Kudos

Thank u Andreas,

data : itab like zibofh_v1 occurs 0 with header line.

data : itab_prev like zibofh_v1 occurs 0 with header line.

data : itab_curr like zibofh_v1 occurs 0 with header line.

data : itab1 like zimft occurs 0 with header line.

clear : itab, itab1.

refresh : itab , itab1.

select * from zimft into table itab1 where matnr in a1.

select * from zibofh_v1 into table itab where matnr in a1 and

vernm in b1 and

dmnnm in c1 and

upddt in d1.

sort itab by matnr ftrid verid.

loop at itab.

read table itab with key matnr = itab1-matnr

verid = itab1-verid

ftrid = itab1-ftrid

upddt = itab1-upddt binary search.

if sy-subrc ne 0.

move-corresponding itab to itab_curr.

append itab_curr.

clear itab_curr.

ENDIF.

endloop.

sort itab_curr by revnr matnr ftrid verid .

loop at itab_curr.

read table itab_curr with key matnr = itab-matnr

revnr = itab-revnr

upddt = itab-upddt binary search.

if sy-subrc ne 0.

format color 3.

write 😕 itab_curr-matnr,itab_curr-verid,itab_curr-ftrid,

itab_curr-recst,itab_curr-revnr,

itab_curr-ftrnm,itab_curr-pftfg,itab_curr-ftrqy,

itab_curr-vernm,itab_curr-upddt,itab_curr-updnm.

format color off.

else.

write 😕 itab_curr-matnr,itab_curr-verid,itab_curr-ftrid,

itab_curr-recst,itab_curr-revnr,

itab_curr-ftrnm,itab_curr-pftfg,itab_curr-ftrqy,

itab_curr-vernm,itab_curr-upddt,itab_curr-updnm.

endif.

endloop.

In the current Loop is not iterate

Plz send the sample code for this

i look forward to ur help

Regards

Raja Sekhar.T