on 10-18-2007 12:10 AM
I have an infoobject in my target cube that i have to populate with an attribute of the infoobject in the source cube. However no data is maintained for that attribute in the master data table of the source info object. It is maintained in a seperate table. How do i write a routine to populate the target infoobject from the source info object which is inturn reading the table.
Target Info Object: ZMAT_GRP (ZMAT_GRP is a attribute of ZMATERIAL)
Source Info Object: ZMATERIAL (Master data table/BIC/PZMATERIAL, but no data is maintained for ZMAT_GRP)
Table in which data is maintained for ZMAT_GRP: ZMAT_SUMMARY.
Thanks,
Rashmi
Is the ZMAT_SUMMARY table existing on R/3 side or BW ?
If BW you can have a lookup in start routine or endroutine of your cube to populate the Material group.
select ZMAT_GRP from ZMAT_SUMMARY where MATERIAL EQ ZMATERIAL(of cube).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If i understand your requirement correctly you want to write MAT_GRP value from MAT_SUMMARY table by looking at MATERIAL value.
Try below code in your update routine and let me know
DATA: T_ZMAT_SUMMARY TYPE STANDARD TABLE OF ZMAT_SUMMARY WITH HEADERLINE.
DATA: V_ZMAT_SUMMARY LIKE ZMAT_SUMMARY-/BIC/ZMAT_GRP.
CLEAR V_ZMAT_SUMMARY.
READ TABLE T_ZMAT_SUMMARY WITH KEY /BIC/ZMATERIAL = COMM_STRUCTURE-/BIC/ZMATERIAL BINARY SEARCH.
IF SY_SUBRC <>0.
RETURNCODE = 4.
MONITOR-msgid = 'RSM'.
MONITOR-msgty = 'W'.
MONITOR-msgno = '799'.
MONITOR-msgv1 = 'ZMAT_GRP: MATERIAL GROUP '.
MONITOR-msgv2 = COMM_STRUCTURE-/BIC/ZMATERIAL.
MONITOR-msgv3 = ' cannot be found'.
APPEND MONITOR.
EXIT.
ELSE.
RESULT = T_ZMAT_SUMMARY-/BIC/ZMAT_GRP.
I think this should work.
If you have any errors, just let me know.
Cheers
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is this, the key fileds in the table (MAT_SUMMARY) is the also an attribute of ZMATERIAL but ZMATERIAL itself is not the key and the attribute that i have to populate by the transfer routine is an attribute of ZMATERIAL.
Basically the look up table and the master data tables have different keys.
So how would my transfer routine look like,
Let me know if you would need more information
Thanks,
Rashmi
User | Count |
---|---|
85 | |
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.