cancel
Showing results for 
Search instead for 
Did you mean: 

start routine on 0equipment

Former Member
0 Kudos

Hi

we are having a transformation which runs from a datasource(source) to DSO(Target)....The source has a filed called TIDNR wich is a Technical Identification number ..and the target DSO has 0equipment which needs to be populated using a start routine..

The logic is TIDNR is an attribute for masterdata info object 0equipment .. now i need to populate 0equipment(in DSO) looking up against  masterdata on TIDNR .

Can you please suggest me the code as iam confused from where i should be reading masterdata for 0equipment from? i mean we have various tables in Masterdata/Texts tab of the masterdata infoobject(like M table,Ptable,Qtable.Ytable)

Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member185177
Contributor
0 Kudos

Hi Ravi,

Please follow the below steps.

1.  Fetch the data from the Ptable of the info object 0equipment in to an internal table.

2.  Sort the internal table on TIDNR.

3.  If source_package[] is not initial.

            loop into source_package into wa_spkg.

                   i_idx = sy-tabix.

                    read table itab(0equiment) into wa_itab with key TIDNR = wa_spkg-TIDNR

                              binary  search.

                     if sy-subrc = 0.

                         wa_spkg-0equipment =  wa_itab-0equipment.

                        modify source_package from wa_spkg index l_idx transporting 0equipment.

                     endif.

                  clear: wa_spkg, wa_itab.

              endloop.

endif.

So make sure before going to paste this code that you need to declare the data declaration part along with internal tables and work areas.

Note:-  Please change the field names as per your data.

Regards,

Krishna Chaitanya.

Former Member
0 Kudos

Thanks KC...

Answers (2)

Answers (2)

former_member183012
Active Contributor
0 Kudos

Hi Ravi,

0equipment is coming from source? If yes then you can use read master data rule type to populate any attribute?

Regards,

Ganesh Bothe

Former Member
0 Kudos

Thanks GB...

RamanKorrapati
Active Contributor
0 Kudos

Hi,

You need to read P master data table.

condition will be like this way.

Source_package-TIDNR = <p table name>-TIDNR then fill 0equipment from p Table.

When to read from master data we need to use objectversion = A(active).

You may need abap expert.

Take abaper help and develop proper format code by using above logic.

Thanks

Former Member
0 Kudos

Thanks Ram for your quick reply....