cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Abap/4 code

Former Member
0 Kudos

hai

pls tell me abap/4 code in detailly ..........

<b>data : begin of str_equipment occurs 0,

equipment like /bi0/mequipment-equipment,

/bic/zpmtechid like /bi0/mequipment-/bic/zpmtechid,

/bic/zpmleasst like /bic/mzpmleasst-/bic/zpmleasst,

end of str_equipment.

data: int_equipment2 like str_equipment occurs 0 with header line.

data: int_equipment1 like str_equipment occurs 0 with header line.

field-symbols: <l_source> like line of datapak.

clear : int_equipment2, int_equipment1.

refresh : int_equipment2, int_equipment1.

loop at datapak assigning <l_source>.

move <l_source>-peaasst to int_equipment1-/bic/zpmtechid.

append int_equipment1.

endloop.

delete int_equipment1 where /bic/zpmtechid is initial.

select equipment /bic/zpmtechid from /bi0/pequipment into

corresponding fields of table

int_equipment2 for all entries in int_equipment1

where objvers = 'A' and

/bic/zpmtechid = int_equipment1-/bic/zpmtechid.

delete int_equipment2 where /bic/zpmtechid is initial.

delete adjacent duplicates from int_equipment2.

sort int_equipment2 by /bic/zpmtechid.</b>

ps tell me

i ll assing the points

bye

rizwan

Accepted Solutions (0)

Answers (3)

Answers (3)

sachin_kulshrestha2
Active Contributor
0 Kudos

Hi,

1. It is a fields symbol . It is used in a reference to pointer concept which means it will be not storeing the value it will be referencing that value.

2. Select will list out those data set from /bi0/pequipment table where object bersion is A and value of bic/zpmtechid exist in int_equipment1 table i.e (For ALL enteries).

Which mean each data set from /bi0/pequipment table will be checked for object version and will check against all enteries of bic/zpmtechid in table int_equipment1 table.

Hope this helps!!!

Message was edited by: Sachin Kulshrestha

Former Member
0 Kudos

hai

txs for giving ur reply .

just tell me what it means

1) field-symbols: <l_source> like line of datapak.

2)select equipment /bic/zpmtechid from /bi0/pequipment into

corresponding fields of table

int_equipment2 <b>for all entries</b> in int_equipment1

where objvers = 'A' and

/bic/zpmtechid = int_equipment1-/bic/zpmtechid.

here what is the means of 'for all entries' and pls tell me the 'select' statament in detail yar...

txs

rizwan

sachin_kulshrestha2
Active Contributor
0 Kudos

Hi,

1. begin of str_equipment occurs 0 defines internal table with structure of the table as fields

equipment like /bi0/mequipment-equipment,

/bic/zpmtechid like /bi0/mequipment-/bic/zpmtechid,

/bic/zpmleasst like /bic/mzpmleasst-/bic/zpmleasst,

2.int_equipment1, int_equipment2 are defined as internal table whoes structure is same as internal table str_equipment

3.Field symbols is defined which will be working as refernce pointer means value can be accessed any where.

4.Internal table int_equipment1, int_equipment2 are cleared.

5.loop will iterate and assing you datapack value to <l_source>

6. inside the loope the value is transfered from <l_source>-peaasst to int_equipment1-/bic/zpmtechid

and appended into internal table

Loop will iterate for all the datapackage.

7. Delete will delete all the enteries from int_equipment1 table where /bic/zpmtechid value will be blank

8.Select is fired on /bi0/pequipment table and values is stored into the internal table int_equipment2 for values satisfiying the condition objvers = 'A' and

/bic/zpmtechid = int_equipment1-/bic/zpmtechid.

9. Delete will delete all the enteries from int_equipment2 table where /bic/zpmtechid value will be blank

10. Duplicate values are remove from the int_equipment2

11. Sorting is done on int_equipment2 by /bic/zpmtechid.

Hope this helps!!!