on 02-11-2009 2:33 AM
Is it possible to enhance vendor field (LIFNR) into datasource Network plan: Costs 0CO_OM_NTW_1 and Network Activity: Costs 0CO_OM_NWA_1 in R/3 side? If yes, which is the possible way to enhance it so that I can get vendor data in PS_C07 for available in reporting. I will remark points for your answer. Thanks!
I created append structure and add one new field ZZLINFR. Choose AUFNR and FISCPER as well as KOKRS as key mapping fields. The code like below. Really thanks your great help.
Data: l_s_iccstntw LIKE iccstntw.
CASE i_datasource.
WHEN ' 0CO_OM_NTW_1.
Loop AT c_t_data INTO l_s_iccstntw.
l_tabix = sy-tabix.
SELECT SINGLE linfr FROM mseg INTO l_s_iccstntw-zzlinfr
WHERE aufnr = l_s_iccstntw-aufnr
AND gjahr = l_s_iccstntw-fiscper+0(4)
AND kokrs = l_s_iccstntw-kokrs.
MODIFY c_t_data FROM l_s_iccstntw INDEX l_tabix.
ENDLOOP.
WHEN OTHERS.
EXIT.
ENDCASE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Here see the sample code which for Vendor for different DS, so chnage the below code as per your requirement.
DATA: i_s_data_wbs6 LIKE icwbscsta1.
WHEN '0CO_OM_WBS_6'.
LOOP AT c_t_data INTO i_s_data_wbs6.
l_tabix = sy-tabix.
SELECT SINGLE lifnr ebeln INTO (i_s_data_wbs6-lifnr,i_s_data_wbs6-zzebeln) FROM
mseg WHERE
mblnr = i_s_data_wbs6-refbn.
IF sy-subrc = 0.
MODIFY c_t_data FROM i_s_data_wbs6 INDEX l_tabix.
ENDIF.
ENDLOOP.
In my case I can use bseg or mseg, so which one is best one, and why? If the mapping field is not the index of the table, I think it will cause some performance issue during data loading. Any suggestion? It seems that datasource 0FI_GL_4 which contain AUFNR, LIFNR, BUKRS..., is it possible to use 0FI_GL_4 as one of the datasources for PS_C07 in order to add vendor information(LIFNR) into PS_C07? Thanks for your suggestion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I modified again like below:
Data: l_s_iccstntw LIKE iccstntw,
l_s_iccstnwa LIKE iccstnwa.
WHEN '0CO_OM_NTW_1'.
Loop AT c_t_data INTO l_s_iccstntw.
l_tabix = sy-tabix.
SELECT SINGLE linfr FROM mseg INTO l_s_iccstntw-zzlinfr
WHERE aufnr = l_s_iccstntw-aufnr
AND gjahr = l_s_iccstntw-fiscper+0(4)
AND kokrs = l_s_iccstntw-kokrs.
IF sy-subrc = 0.
MODIFY c_t_data FROM l_s_iccstntw INDEX l_tabix.
ENDIF.
ENDLOOP.
WHEN '0CO_OM_NWA_1'.
Loop AT c_t_data INTO l_s_iccstnwa.
l_tabix = sy-tabix.
SELECT SINGLE linfr FROM mseg INTO l_s_iccstnwa-zzlinfr
WHERE aufnr = l_s_iccstnwa-aufnr
AND gjahr = l_s_iccstnwa-fiscper+0(4)
AND kokrs = l_s_iccstnwa-kokrs.
IF sy-subrc = 0.
MODIFY c_t_data FROM l_s_iccstnwa INDEX l_tabix.
ENDIF.
ENDLOOP.
WHEN OTHERS.
EXIT.
ENDCASE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For example, I paste all components information of structure ICCSTNWA below, I try to find a table which has some fields that can be matched with components of structure ICCSTNWA, however I can not find the right table. It seems LFB1 and LFA1 both are not correct one. Does someone have the same issue? Thanks for your input.
Structure:ICCSTNWA
FISCVAR
FISCPER
KOKRS
PSPID
POSID
AUFNR
VORNR
VTYPE
VTDETAIL
VTSTAT
VERSN
KSTAR
SEKNZ
RSPOBART
RSPAROBVAL
VALUTYP
MEASTYPE
SWKPP
SWKDP
SWG
SMEG
WAERS
CURTYPE
MEINH
GUID
CPR_GUID
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. But, which table should I select during enhancement? And this table should include vendor information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does someone has an idea, how to write ABAP code to enhance LIFNR into datasource in this case? Please give a simple example. Thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi dreshof Kalsfwa,
/people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
Thanks,
Vijay.
Both of these datasources are based on extract structures ICCSTNTW and ICCSTNWA .Enhance these two extract structures with append structure and add field LIFNR and write code in user exit "EXIT_SAPLRSAP_001" to populate the same
Regenerate datasource and unhide the lifnr field in RSA6.Test in RSA3
Edited by: Phanindra Kumar Chittavajhula on Feb 11, 2009 4:06 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.