on 09-11-2014 12:10 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.