2008 Dec 03 4:32 AM
hi all,
i m making a report for T-code 'IE03' and i have to display grouping2(FGRU2) and its description in output with respect to Equipment number(EQUNR), but problem is that i m not getting the table relating to both fields. can anyone please help me as soon as possible plz.?
i have these fields in ITAB, so if i get any relation from grouping2 then our problem will be solved.
DATA : BEGIN OF itab OCCURS 0 ,
equnr TYPE itob-equnr , "Equipment No.
shtxt TYPE itob-shtxt , "Description
answt TYPE itob-answt , "Acquistn Value
inbdt TYPE itob-inbdt , "DATE
anlnr TYPE itob-anlnr , "ASSET
aufnr TYPE itob-aufnr , "ORDER NO.
*******New Addition
HERST type ITOB-HERST , "Manufacturer
mapar TYPE itob-mapar , "Manufacturer Part Number
serge TYPE itob-serge , "Manufacturer Serial Number
brgew TYPE itob-brgew , "WEIGHT
groes TYPE itob-groes , "DIMENSION
fgru2 TYPE efhm-fgru2 , "Grouping2
fgrtxt TYPE tcf13-fgrtxt, "GROUPING2 DESCRIPTION
END OF itab .
regards saurabh.
2008 Dec 03 4:48 AM
hi,
the relation you are looking for , ie EQUNR and FRUN2 availiable in the Table view M_EQUIW.
in this EQUI-EQUNR < --- > CRVE_B-EQUNR
CRVE_B-OBJTY<---->CRFH-OBJTY
in table CRFH you have FGRU2.
Hope this helps you
Raj
hi all,
i m making a report for T-code 'IE03' and i have to display grouping2(FGRU2) and its description in output with respect to Equipment number(EQUNR), but problem is that i m not getting the table relating to both fields. can anyone please help me as soon as possible plz.?
i have these fields in ITAB, so if i get any relation from grouping2 then our problem will be solved.
DATA : BEGIN OF itab OCCURS 0 ,
equnr TYPE itob-equnr , "Equipment No.
shtxt TYPE itob-shtxt , "Description
answt TYPE itob-answt , "Acquistn Value
inbdt TYPE itob-inbdt , "DATE
anlnr TYPE itob-anlnr , "ASSET
aufnr TYPE itob-aufnr , "ORDER NO.
*******New Addition
HERST type ITOB-HERST , "Manufacturer
mapar TYPE itob-mapar , "Manufacturer Part Number
serge TYPE itob-serge , "Manufacturer Serial Number
brgew TYPE itob-brgew , "WEIGHT
groes TYPE itob-groes , "DIMENSION
fgru2 TYPE efhm-fgru2 , "Grouping2
fgrtxt TYPE tcf13-fgrtxt, "GROUPING2 DESCRIPTION
END OF itab .
regards saurabh.
2008 Dec 03 4:48 AM
hi,
the relation you are looking for , ie EQUNR and FRUN2 availiable in the Table view M_EQUIW.
in this EQUI-EQUNR < --- > CRVE_B-EQUNR
CRVE_B-OBJTY<---->CRFH-OBJTY
in table CRFH you have FGRU2.
Hope this helps you
Raj
2008 Dec 03 4:49 AM
Hi u can use 'EQUIPMENT_READ' function module to get "EFHM-FGRU1" field value. You need to just pass "EQUNR" field value to "EQUI_NO" parameter.
Regards.
Amresh
2008 Dec 03 5:47 AM
hi amresh,
thnx for reply, i called that function module but its going for dump and saying 'type conflict error'.
so please check my code and help me.
code :
REPORT zpm_detail_new .
TABLES : itob, TCF13.
TYPE-POOLS : slis .
DATA : BEGIN OF itab OCCURS 0 ,
equnr TYPE itob-equnr , "Equipment No.
shtxt TYPE itob-shtxt , "Description
answt TYPE itob-answt , "Acquistn Value
inbdt TYPE itob-inbdt , "DATE
anlnr TYPE itob-anlnr , "ASSET
aufnr TYPE itob-aufnr , "ORDER NO.
*******New Addition
HERST type ITOB-HERST , "Manufacturer
mapar TYPE itob-mapar , "Manufacturer Part Number
serge TYPE itob-serge , "Manufacturer Serial Number
brgew TYPE itob-brgew , "WEIGHT
groes TYPE itob-groes , "DIMENSION
fgru2 TYPE efhm-fgru2 , "Grouping2
fgrtxt TYPE tcf13-fgrtxt, "GROUPING2 DESCRIPTION
END OF itab .
**----
ALV DECLERATION -
DATA : w_container TYPE scrfname VALUE 'CL_GRID',
w_cprog TYPE lvc_s_layo,
g_repid LIKE sy-repid,
w_save TYPE c,
w_exit TYPE c,
cl_grid TYPE REF TO cl_gui_alv_grid,
cl_custom_container TYPE REF TO cl_gui_custom_container,
it_fld_catalog TYPE slis_t_fieldcat_alv,
wa_fld_catalog TYPE slis_t_fieldcat_alv WITH HEADER LINE ,
layout TYPE slis_layout_alv,
col_pos LIKE sy-cucol ,
alvfc TYPE slis_t_fieldcat_alv.
***----
SELECTION SCREEN -
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
SELECT-OPTIONS : equnr FOR itob-equnr .
SELECTION-SCREEN : END OF BLOCK b1 .
***************************************************************************
PERFORM fill_catalog1 USING:
'EQUNR' 'ITAB' 'Equipment No.',
'SHTXT' 'ITAB' 'Description',
'ANSWT' 'ITAB' 'Cost' ,
'INBDT' 'ITAB' 'Comp. Date',
'ANLNR' 'ITAB' 'Asset No.',
'AUFNR' 'ITAB' 'Order Number',
'MAPAR' 'ITAB' 'Part Number',
'HERST' 'ITAB' 'Manufacturer' ,
'SERGE' 'ITAB' 'Manf Serial Num' ,
'BRGEW' 'ITAB' 'Weight' ,
'GROES' 'ITAB' 'Dimension',
'FGRTXT' 'ITAB' 'Grouping Des'.
******************************************************************************
SELECT equnr
shtxt
inbdt
answt
anlnr
aufnr
mapar
HERST
serge
brgew
groes INTO CORRESPONDING FIELDS OF TABLE itab FROM itob
WHERE equnr IN equnr.
IF sy-subrc <> 0 .
MESSAGE 'DATA NOT FOUND' TYPE 'I' .
ENDIF.
SORT itab BY equnr .
DELETE ADJACENT DUPLICATES FROM itab COMPARING equnr .
LOOP AT itab.
CALL function 'EQUIPMENT_READ'
exporting
I_HANDLE =
I_LOCK =
CHECK_AUTH = ' '
I_TCODE = ' '
equi_no = itab-equnr
EQUZ_NO = '000'
READING_DATE = '99991231'
X_XAKTYP = ' '
IMPORTING
EQUI =
EQKT =
EQUZ =
ILOA =
EQBS =
FLEET =
EFHM = itab-fgru2
EXCEPTIONS
AUTH_NO_BEGRP = 1
AUTH_NO_IWERK = 2
AUTH_NO_SWERK = 3
EQKT_NOT_FOUND = 4
EQUI_NOT_FOUND = 5
EQUZ_NOT_FOUND = 6
ILOA_NOT_FOUND = 7
AUTH_NO_INGRP = 8
AUTH_NO_KOSTL = 9
ERR_HANDLE = 10
LOCK_FAILURE = 11
AUTH_NO_BADI = 12
OTHERS = 13
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
********************************************************************************
layout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZPM_DETAIL'
is_layout = layout
it_fieldcat = it_fld_catalog
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*ENDFORM.
FORM fill_catalog1 USING p_fieldname TYPE any
p_ref_table TYPE any
p_scrtext TYPE any.
CLEAR : wa_fld_catalog.
wa_fld_catalog-fieldname = p_fieldname.
wa_fld_catalog-tabname = p_ref_table.
wa_fld_catalog-seltext_s = p_scrtext.
wa_fld_catalog-seltext_m = p_scrtext.
wa_fld_catalog-seltext_l = p_scrtext.
APPEND wa_fld_catalog TO it_fld_catalog.
ENDFORM. " fill_catalog1
regards saurabh.
2008 Dec 03 5:22 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |