Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reg ALV grid display

Hi Expert,

I am facing simple problem regarding alv display.

While retrieving data, records are shown in internal table (It_final), but it doesn't goes to alv display in output.

The code is:

FORM merge_data .

SORT it_qasr BY probenr prueflos vorglfnr.

LOOP AT it_qasr INTO wa_qasr.

w_mittelwert = wa_qasr-mittelwert.

READ TABLE it_qapp INTO wa_qapp WITH KEY prueflos = wa_qasr-prueflos

vorglfnr = wa_qasr-vorglfnr

probenr = wa_qasr-probenr.

wa_final-userd1 = wa_qapp-userd1.

wa_final-usert1 = wa_qapp-usert1.

wa_final-userc1 = wa_qapp-userc1.

SHIFT wa_final-userc1 LEFT DELETING LEADING '0'.

wa_final-userc2 = wa_qapp-userc2.

READ TABLE it_plmk INTO wa_plmk WITH KEY merknr = wa_qasr-merknr

plnnr = wa_mapl-plnnr.

  • plnkn = wa_qasr-vorglfnr " changed by DEVK909452

READ TABLE it_qpmt INTO wa_qpmt WITH KEY mkmnr = wa_plmk-verwmerkm.

READ TABLE it_qpct INTO wa_qpct WITH KEY codegruppe = wa_qasr-gruppe1

code = wa_qasr-code1.

TRANSLATE wa_qpmt-mkmnr TO UPPER CASE.

IF wa_qpmt-mkmnr CS 'RQZMOI'.

wa_qpmt-mkmnr = 'MOIS_Q'.

ENDIF.

IF wa_qpmt-mkmnr CS 'RIOSI+AL'.

wa_qpmt-mkmnr = 'SIAL_IR'.

ENDIF.

CASE wa_qpmt-mkmnr.

WHEN 'MOIS_Q'.

wa_final-MOIS_Q = w_mittelwert.

WHEN 'SIAL_IR'.

wa_final-SiAl_IR = w_mittelwert.

WHEN 'SHIFT'.

wa_final-shift = wa_qpct-kurztext.

WHEN 'MATERIAL'.

wa_final-material = wa_qpct-kurztext.

ENDCASE.

APPEND wa_final TO it_final.

CLEAR wa_final.

FORM alv_display .

*fieldcatalog template with 105 fields

PERFORM sub_make_field_cat1 USING :

'1' 'USERD1' 'DATE',

'2' 'MATERIAL' 'MATERIAL',

'3' 'USERC2' 'SOURCE',

'4' 'USERC1' 'LOCATION',

'5' 'USERT1' 'TIME',

'6' 'SHIFT' 'SHIFT',

'7' 'MATERIAL' 'MATERIAL',

'8' 'SHIFT' 'SHIFT',

'9' 'MOIS_Q' 'MOISTURE-Q',

'10' 'SI_Q' 'SILICA-Q',

'11' 'AL_Q' 'ALUMINA-Q',

'12' 'FO_Q' 'FERRIC OXIDE-Q',

'13' 'SIZE_Q' 'SIZE-Q',

'14' 'MOIS_IR' 'MOISTURE-IR',

'15' 'TIRON_IR' 'TOTAL IRON-IR',

'16' 'SI_IR' 'SILICA-IR',

'17' 'AL_IR' 'ALUMINA-IR',

'18' 'SIAL_IR' 'SILICA + ALUMINA-IR',

'19' 'P_IR' 'PHOSPHOROUS-IR',

'20' 'L_O_I_IR' 'LOSS ON IGNITION-IR',

'21' 'MN_IR' 'MANGANESS-IR',

'22' 'TITOX_IR' 'TITANIUM OXIDE-IR',

'23' 'ALK_IR' 'ALKALIES-IR',

'24' 'SUL_IR' 'SULPHUR-IR',

'25' 'TIND_IR' 'TUMBLER INDEX-IR',

'26' 'ABBIND_IR' 'ABBRATION INDEX-IR',

'27' 'BDEN_IR' 'BULK DENSITY-IR',

'28' 'SIZE_IR' 'SIZE-IR',

'29' 'MOIS_IRF' 'MOISTURE-IRF',

'30' 'TIRON_IRF' 'TOTAL IRON-IRF',

'31' 'SI_IRF' 'SILICA-IRF',

'32' 'AL_IRF' 'ALUMINA-IRF',

'33' 'P_IRF' 'PHOSPHOROUS-IRF',

'34' 'L_O_I_IRF' 'LOSS ON IGNITION-IRF',

'35' 'MOIS_COKE' 'MOISTURE-COKE',

'36' 'VOL_MAT_COKE' 'VOLATILE MATTER-COKE',

'37' 'ASH_COKE' 'ASH-COKE',

'38' 'FIX_CA_COKE' 'FIXED CARBON-COKE',

'39' 'SUL_COKE' 'SULPHUR-COKE',

'40' 'P_COKE' 'PHOSPHOROUS-COKE',

'41' 'ALK_COKE' 'ALKALIES-COKE',

'42' 'SI_COKE' 'SILICA-COKE',

'43' 'AL_COKE' 'ALUMINA-COKE',

'44' 'FEO_COKE' 'FERRIC OXIDE-COKE',

'45' 'CAO_COKE' 'CALCIUM OXIDE-COKE',

'46' 'MGO_COKE' 'MAGNESIUM OXIDE-COKE',

'47' 'PPOX_COKE' 'PHOSPHOROUS PENTAOXIDE-COKE',

'48' 'SIZE_COKE' 'SIZE-COKE',

'49' 'MOIS_LS' 'MOISTURE-LS',

'50' 'SI_LS' 'SILICA-LS',

'51' 'AL_LS' 'ALUMINA-LS',

'52' 'FEO_LS' 'FERRIC OXIDE-LS',

'53' 'CAO_LS' 'CALCIUM OXIDE-LS',

'54' 'MGO_LS' 'MAGNESIUM OXIDE-LS',

'55' 'ALK_LS' 'ALKALIES-LS',

'56' 'SIZE_LS' 'SIZE-LS',

'57' 'MOIS_LSF' 'MOISTURE-LSF',

'58' 'SI_LSF' 'SILICA-LSF',

'59' 'AL_LSF' 'ALUMINA-LSF',

'60' 'FEO_LSF' 'FERRIC OXIDE-LSF',

'61' 'CAO_LSF' 'CALCIUM OXIDE-LSF',

'62' 'MGO_LSF' 'MAGNESIUM OXIDE-LSF',

'63' 'SIZE_LSF' 'SIZE-LSF',

'64' 'MOIS_D' 'MOISTURE-D',

'65' 'SI_D' 'SILICA-D',

'66' 'AL_D' 'ALUMINA-D',

'67' 'FEO_D' 'FERRIC OXIDE-D',

'68' 'CAO_D' 'CALCIUM OXIDE-D',

'69' 'MGO_D' 'MAGNESIUM OXIDE-D',

'70' 'ALK_D' 'ALKALIES-D',

'71' 'SIZE_D' 'SIZE-D',

'72' 'MOIS_DF' 'MOISTURE-DF',

'73' 'SI_DF' 'SILICA-DF',

'74' 'AL_DF' 'ALUMINA-DF',

'75' 'FEO_DF' 'FERRIC OXIDE-DF',

'76' 'CAO_DF' 'CALCIUM OXIDE-DF',

'77' 'MGO_DF' 'MAGNESIUM OXIDE-DF',

'78' 'SIZE_DF' 'SIZE-DF',

'79' 'MOIS_MO' 'MOISTURE-MO',

'80' 'SI_MO' 'SILICA-MO',

'81' 'AL_MO' 'ALUMINA-MO',

'82' 'TIRON_MO' 'TOTAL IRON-MO',

'83' 'MN_MO' 'MANGENESE-MO',

'84' 'P_MO' 'PHOSPHAROUS-MO',

'85' 'ALK_MO' 'ALKALIES-MO',

'86' 'SIZE_MO' 'SIZE-MO',

'87' 'MOIS_STR' 'MOISTURE-STR',

'88' 'SI_STR' 'SILICA-STR',

'89' 'AL_STR' 'ALUMINA-STR',

'90' 'TIRON_STR' 'TOTAL IRON-STR',

'91' 'FO_STR' 'FERROUS OXOIDE-STR',

'92' 'P_STR' 'PHOSPHAROUS-STR',

'93' 'CAO_STR' 'CALCIUM OXIDE-STR',

'94' 'MGO_STR' 'MAGNESIUM OXIDE-STR',

'95' 'TIND_STR' 'TUMBLER INDEX-STR',

'96' 'ABBIND_STR' 'ABBRATION INDEX-STR',

'97' 'CAOSIO2_STR' 'CAO / SIO2-STR',

'98' 'SI_SLG' 'SILICA-SLG',

'99' 'AL_SLG' 'ALUMINA-SLG',

'100' 'FEO_SLG' 'FERRIC OXIDE-SLG',

'101' 'CAO_SLG' 'CALCIUM OXIDE-SLG',

'102' 'MGO_SLG' 'MAGNESIUM OXIDE-SLG',

'103' 'MNO_SLG' 'MANGANESE OXIDE-SLG',

'104' 'FO_SLG' 'FERROUS OXIDE-SLG',

'105' 'BAS_SLG' 'BASICITY-SLG'.

is_layout-zebra = 'X'.

is_layout-colwidth_optimize = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'USER_COMMAND'

is_layout = is_layout

it_fieldcat = it_fieldcat

i_save = 'X'

is_variant = gs_variant

TABLES

t_outtab = it_final

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. " ALV_DISPLAY

form SUB_MAKE_FIELD_CAT1 using p_col TYPE char3

p_fnam TYPE char30

p_text TYPE char30.

is_fieldcat-col_pos = p_col.

is_fieldcat-fieldname = p_fnam.

is_fieldcat-seltext_m = p_text.

APPEND is_fieldcat TO it_fieldcat.

endform. " SUB_MAKE_FIELD_CAT1

This is the code i have.

In debugging, i found data in internal table (it_final). But, it doesn't display in output.

Please help me in this regard?

Thanks in advance....

Sai..

Edited by: Sai Babu on Sep 16, 2008 3:07 PM

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question