on 01-09-2015 10:42 AM
Hi Gurus,
I have a data flow where I have DSO1, DSO2 and DSO3.
DSO3 is a Translation table
ZCountry | ZCOM_CODE | 0Comp_code |
DE | 2000 | 1000 |
GB | 2010 | 1010 |
US | 2030 | 1030 |
In DSO1, I have field ZCountry XX which has ZCom-Code 2-series, and in DSO2, I have 0COMP_CODE (1-series).
DSO3 is a translation DSO where we do mapping between, ZComp codes 2-series and 0Company codes 1-series based on ZCountry.
Scenario: I need a Transf. Rountine ABAP code Between DSO1 and DSO2 where we take e.g. Country DE from DSO1 with Company code "2000", and give result Company code "1000" for Country DE in DSO2.
Could you please help me with this? Thanks in advance!
Hi Zalmay,
Can you please share how you have solved issue so that it can helpful others.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil,
I used this document, it was very well defined and staright forward.
Thank you guys for the tips and help!
I solved the issue.
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zalmay,
Scenario: I need a Transf. Rountine ABAP code Between DSO1 and DSO2 where we take e.g. Country DE from DSO1 with Company code "2000", and give result Company code "1000" for Country DE in DSO2.
Declaration part in Start Routine.
Steps
1) Create internal table for DSO3 to hold below infomation.
ZCountry | ZCOM_CODE | 0Comp_code |
DE | 2000 | 1000 |
GB | 2010 | 1010 |
US | 2030 | 1030 |
2) Write select statement to pull zcountry zcom_code 0comp_code all records where DSO3-country = source_package country and
dso3 zcom_code = source_package-zcom_code.
3) and update in internal table of DSO3 which is created in step 1
4) goto individual routine and read internal table dso3 based on source_package-country and source-package-zcom_code with READ TABLE statement.,
if sy-subrc eq 0
result = dso3- 0comp_code.
endif.
Please try this,.
Regards,
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Zalamay,
Can you Please elaborate your requirement a bit more with an example,so that to have a better idea, are you trying to do any lookup on DSO1 to get fill data into DSO2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil,
ZCountry | ZCOM_CODE | 0Comp_code |
DE | 2000 | 1000 |
GB | 2010 | 1010 |
US | 2030 | 1030 |
DSO1: KeyField: ZCountry, and 0CalDay
DSO1: DataFields: Status, 0calyear
We dont have ZComp_code in DSO1.
DSO2: Keyfield: Zcountry and 0Calday
DSO2, Datafield: Company Code, Status, 0calyear
Based on ZCountry XX, e.g. DE where ZComp_Code is 2000 in (DSO3) we want to populate 1000 into DSO2 0Comp_Code.
I hope i have explained it well.
Hi Zalmay,
Try this below code in order to populate comp_code data in DSO3.
types: begin of ty_temp,
zcountry type /bic/zcountry,
comp_code type 0comp_code,
end of ty_temp.
data : itab type table of ty_temp,
wa type ty_temp.
select /bic/zcountry 0comp_code from /bic/zdso300 into table itab for all enteris
where zcountry = result_package-/bic/zcountry.
loop at result_package assigning <result_fields>.
read table itab into wa with key zcountry = <result_fields>-/bic/zcountry.
<result_fields>-0comp_code = wa-comp_code.
endloop.
I jsut given rough code code,this may give an idea to you.
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.