on 05-17-2013 8:51 AM
Hi All,
We have a new database view "ZPPV_MARASPEKOZ" which reads data from "MARA" and "ZPP_OBE_SPEK" tables with 6 key fields "MANDT", "ZFIRMA", "ZSPEK", "ZOBESAYAC", "ZREVIZYON", "ZMTIP" on R/3 side. What I need is to add some of the fields from ZPPV_MARASPEKOZ to data source of 0MATERIAL's attributes 0MATERIAL_ATTR. Required fields are "ZURUNTIPI","ZKALINLIK", "znomboy", "znomen", "ZBASKITUR", "ZBOMBETUR", "ZOTOCAMTIP".
Does anyone have any idea
Oya.
1. Goto RSA6
2. Find 0material_attr data source and click on the 'Enhance extraction structure' button in the tool bar...
3. Create an append structure and add the required fields
4. Activate the structure
5. Create a customer exit code to populate the values for these fields
sample code :
CASE I_DATASOURCE.
WHEN '0MATERIAL_ATTR'.
LOOP AT I_T_DATA INTO L_S_MARA.
L_TABIX = SY-TABIX.
SELECT SINGLE * FROM MARA WHERE MATNR = L_S_MARA-MATNR.
IF SY-SUBRC = 0.
L_S_MARA-ZZETXT = MARA-ZZETXT.
L_S_MARA-ZZVWBR = MARA-ZZVWBR.
L_S_MARA-ZZWVB = MARA-ZZWVB.
L_S_MARA-ZZNTNR = MARA-ZZNTNR.
L_S_MARA-ZZATNR = MARA-ZZATNR.
L_S_MARA-ZZOTNR = MARA-ZZOTNR.
L_S_MARA-ZZNTQM = MARA-ZZNTQM.
L_S_MARA-ZZOPGR = MARA-ZZOPGR.
MODIFY I_T_DATA FROM L_S_MARA INDEX L_TABIX.
ENDIF.
ENDLOOP.
ENDCASE.
i.e. this code is not optimized for performance please get help of an abaper for optimizing this code...
Hope you have already have CMOD project where you can write the code...
If not follow the below steps
1. Goto CMOD
2.create a project by selecting Enhancement assigment radio button and save it
3. Give the enhancement name as RSAP0001 save and go back
4. click components
5. click exitsaplrsap_002 in case of master data and write the above code...
Hope this helps you...
Thanks,
Nithesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oya,
I think you have two options. One option is you can create a new datasource using your view, and upload your master data material (just as 0employee, an infoobject may be uploaded from many datasources). The other option is enhancing the datasource 0material_attr. You can add the required code in customer exit in R/3. What I suggest is the first option.
Hope it helps
Yasemin...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oya,
There are many how to enhance a datasource documents in sdn, you may search as well. One is in the link below, if you face any trouble let us know.
Hope it helps
Yasemin...
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.