on 06-20-2011 12:02 PM
Hello,
I have to modify the 2LIS_03_BF -> 0IC_C03 , because i ve got some specific data to add in this transformation.
I would like to use some data which are present in an ODS during the transformation in a endroutine.
How can i fetch the ODS in ABAP ( the key of my ODS in Material number) ?
Thanks for your reply
Gilles F
I just write this code from your template, thanks for your response. It s working fine.
I ve just have to make some modification about table name, what is the difference /BIC/ and /BIO
TYPES : BEGIN OF ty_MATERIAL,
MATERIAL TYPE /BI0/OIMATERIAL,
ZKPEINH TYPE /BIC/OIZKPEINH,
ZKNETPR TYPE /BIC/OIZKNETPR,
ZKTMNG TYPE /BIC/OIZKTMNG,
END OF ty_MATERIAL.
DATA : it_MATERIAL TYPE STANDARD TABLE OF ty_MATERIAL.
DATA : WA_MATERIAL TYPE ty_MATERIAL.
SELECT MATERIAL /BIC/ZKPEINH /BIC/ZKNETPR /BIC/ZKTMNG FROM /BIC/AZODPXMCH00
INTO TABLE it_MATERIAL
FOR ALL ENTRIES IN RESULT_PACKAGE
WHERE
MATERIAL = RESULT_PACKAGE-MATERIAL.
SORT it_MATERIAL BY MATERIAL.
DELETE ADJACENT DUPLICATES FROM it_MATERIAL COMPARING
MATERIAL.
LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
READ TABLE it_MATERIAL
WITH KEY MATERIAL = <RESULT_FIELDS>-MATERIAL
INTO WA_MATERIAL BINARY SEARCH.
IF SY-SUBRC = 0.
<RESULT_FIELDS>-/BIC/ZKPEINH = WA_MATERIAL-ZKPEINH.
<RESULT_FIELDS>-/BIC/ZKNETPR = WA_MATERIAL-ZKNETPR.
<RESULT_FIELDS>-/BIC/ZKNETPR = WA_MATERIAL-ZKTMNG.
ENDIF.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do we have that material number in ur cube 0IC_C03 ??
IF yes go ahead and create a end rountine for transformation 2LIS_03_BF -> 0IC_C03 and
Use this template to write endroutine.
TYPES : BEGIN OF ty_MATERIAL,
MATERIAL TYPE /BI0/OIMATERIAL,
ZPRDAG TYPE /BIC/OIZPRDAG, ( example field which u want from DSO)
END OF ty_MATERIAL.
DATA : it_MATERIAL TYPE STANDARD TABLE OF ty_MATERIAL.
DATA : WA_MATERIAL TYPE ty_MATERIAL.
SELECT MATERIAL /BIC/ZPRDAG FROM /BI0/ADSO(give DSO active table)
INTO TABLE it_MATERIAL
FOR ALL ENTRIES IN RESULT_PACKAGE
WHERE
MATERIAL = RESULT_PACKAGE-MATERIAL AND
OBJVERS = 'A'.
SORT it_MATERIAL BY MATERIAL.
DELETE ADJACENT DUPLICATES FROM it_MATERIAL COMPARING
MATERIAL.
LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
READ TABLE it_MATERIAL
WITH KEY MATERIAL = <RESULT_FIELDS>-MATERIAL
INTO WA_MATERIAL BINARY SEARCH.
IF SY-SUBRC = 0.
<RESULT_FIELDS>-DSOfield = WA_MATERIAL-/BIC/ZPRDAG.
ENDIF.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.