‎2007 Mar 15 10:01 PM
hi,
I got the out put with alv grid.. I put one menu bar in alv. when I am going with print preview option it is giving me errors
can any one guide me how to solve this problem
SIRI
‎2007 Mar 15 10:04 PM
Hi,
What is the error message you are getting?
Did you copy the standard sap status and created new one?
Thanks,
Naren
‎2007 Mar 15 10:04 PM
‎2007 Mar 15 10:08 PM
hi
here is the error message.....
The current statement only supports character-type data objects.
Error in ABAP application program.
The current ABAP program "SAPLKKBL" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
In statement
"STRLEN( obj )..."
the argument "obj" can only take a character-type data object.
In this case, the operand "obj" has the non-character type "P".
how to solve it....
‎2007 Mar 15 10:11 PM
‎2007 Mar 15 10:17 PM
here is the internal table declaration
Types: begin of t_ekko,
ebeln type ekko-ebeln,
aedat type ekko-aedat,
ekgrp type ekko-ekgrp,
ekorg type ekko-ekorg,
lifnr type ekko-lifnr,
ebelp type ekpo-ebelp,
menge type ekpo-menge,
meins type ekpo-meins,
matnr type ekpo-matnr,
lgort type mard-lgort,
idnlf type ekpo-idnlf,
TXZ01 type ekpo-TXZ01,
lgpbe type mard-lgpbe,
LGOBE TYPE T001L-LGOBE,
MENGE1 TYPE EKES-MENGE,
wemng type eket-wemng,
end of t_ekKo.
and field catelog is here
*&----
*& Form build_fieldcatalog
*&----
text
*----
--> p1 text
<-- p2 text
*----
form build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'PO NUMBER'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'EBELN'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'PO DATE'.
fieldcatalog-col_pos = 1.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'AEDAT'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EKGRP'.
fieldcatalog-seltext_m = 'PUR GRP/BUYER'.
fieldcatalog-col_pos = 2.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'EKGRP'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EKORG'.
fieldcatalog-seltext_m = 'PUR ORG.'.
fieldcatalog-col_pos = 3.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'EKORG'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'LIFNR'.
fieldcatalog-seltext_m = 'VENDOR NO'.
fieldcatalog-col_pos = 4.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'LIFNR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO LINE'.
fieldcatalog-col_pos = 5.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'EBELP'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'ORD QTY'.
fieldcatalog-col_pos = 6.
fieldcatalog-REF_TABNAME = 'EKET'.
fieldcatalog-REF_FIELDNAME = 'MENGE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'UNIT'.
fieldcatalog-col_pos = 8.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'MEINS'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'MATERIAL'.
fieldcatalog-col_pos = 9.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'MATNR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TXZ01'.
fieldcatalog-seltext_m = 'DESCRIPTION'.
fieldcatalog-col_pos = 10.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'TXZ01'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'IDNLF'.
fieldcatalog-seltext_m = 'VEND MAT'.
fieldcatalog-col_pos = 11.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'IDNLF'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'LGPBE'.
fieldcatalog-seltext_m = 'ST.LOC SHELF BIN'.
fieldcatalog-col_pos = 12.
fieldcatalog-outputlen = 6.
fieldcatalog-REF_TABNAME = 'MARD'.
fieldcatalog-REF_FIELDNAME = 'LGPBE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'LGOBE'.
fieldcatalog-seltext_m = 'ST.LOC DESCRIPTION'.
fieldcatalog-col_pos = 13.
fieldcatalog-REF_TABNAME = 'T001L'.
fieldcatalog-REF_FIELDNAME = 'LGOBE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
IF BLIND = ' '. " if the check box is not checked.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'QTY TO RECEIVE'.
fieldcatalog-col_pos = 14.
fieldcatalog-REF_TABNAME = 'EKES'.
fieldcatalog-REF_FIELDNAME = 'MENGE1'.
fieldcatalog-rollname = 'MENGE_D'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'WEMNG'.
fieldcatalog-seltext_m = 'QTY RECEIVED'.
fieldcatalog-col_pos = 15 .
fieldcatalog-decimals_out = 0.
fieldcatalog-no_zero = 'X'.
fieldcatalog-REF_TABNAME = 'EKET'.
fieldcatalog-REF_FIELDNAME = 'WEMNG'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endif.
LOOP AT fieldcatalog INTO ls_int_fcat.
ls_int_fcat-col_pos = syst-tabix.
MODIFY fieldcatalog FROM ls_int_fcat INDEX syst-tabix.
ENDLOOP.
LOOP AT fieldcatalog INTO ls_int_fcat.
CHECK ls_int_fcat-fieldname EQ 'EBELN'
OR ls_int_fcat-fieldname EQ 'LIFNR'.
ls_int_fcat-hotspot = 'X'.
MODIFY fieldcatalog FROM ls_int_fcat TRANSPORTING hotspot.
ENDLOOP.
endform. " build_fieldcatalog
form display_alv_report.
DATA:USER_COMMAND TYPE slis_formname,
SET_PF_STATUS TYPE slis_formname.
SET_PF_STATUS = 'ZSTANDARD_FULLSCREEN'.
USER_COMMAND = 'ALV_USER_COMMAND'.
data: gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
is_layout = gd_layout
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
it_events = gt_events
is_print = gd_prntparams
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat
i_save = 'A'
tables
t_outtab = it_ekko
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. " DISPLAY_ALV_REPORT
‎2007 Mar 15 10:13 PM
Hi,
I think this issue is regarding field-catalog internal table..Make sure the field catalog internal table is populated correctly with the correct field names that matches the internal table field names...
Thanks,
Naren
‎2007 Mar 15 10:21 PM
Hi,
Try fixing mentioned in the bold..
In the field catalog..
IF BLIND = ' '. " if the check box is not checked.
fieldcatalog-fieldname = '<b>MENGE1</b>'.
fieldcatalog-seltext_m = 'QTY TO RECEIVE'.
fieldcatalog-col_pos = 14.
fieldcatalog-REF_TABNAME = 'EKES'.
fieldcatalog-REF_FIELDNAME = '<b>MENGE</b>'.
fieldcatalog-rollname = 'MENGE_D'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
Thanks,
Naren
‎2007 Mar 15 10:25 PM
‎2007 Mar 15 10:28 PM
Naren
Even though I am getting the same error
some more description of the error...
Program SAPLKKBL
Include LKKBLF99
Row 3,897
Module type (FORM)
Module Name GEN_FIELD_OUT2
using edit mask gs_fc-edit_mask.
if gs_fc-inttype ca 'NnIiPpBbSs'. "Y6DK037693
condense gs_out-hlpchar.
endif.
gs_out-hlplen = strlen( gs_out-hlpchar ).
ei NUMC führende '0' und ' ' nicht berücksichtigen
lseif gs_fc-tech_form = 6.
write m_multibyte is initial. "Y6DK037551
data:
bolded line is error point
‎2007 Mar 15 10:57 PM
‎2007 Mar 15 10:59 PM
Hi,
I tried the same code it works fine for me..If I give MENGE1 in the ref_fieldname I am getting the short dump as you mentioned..But if I remove it..The code is working fine..
parameters: blind as checkbox.
type-pools: slis.
Types: begin of t_ekko,
ebeln type ekko-ebeln,
aedat type ekko-aedat,
ekgrp type ekko-ekgrp,
ekorg type ekko-ekorg,
lifnr type ekko-lifnr,
ebelp type ekpo-ebelp,
menge type ekpo-menge,
meins type ekpo-meins,
matnr type ekpo-matnr,
lgort type mard-lgort,
idnlf type ekpo-idnlf,
TXZ01 type ekpo-TXZ01,
lgpbe type mard-lgpbe,
LGOBE TYPE T001L-LGOBE,
MENGE1 TYPE EKES-MENGE,
wemng type eket-wemng,
end of t_ekKo.
data: t_ekko_1 type table of t_ekko WITH HEADER LINE.
t_ekko_1-EBELN = '909090'.
t_ekko_1-aedat = SY-DATUM.
t_ekko_1-ekgrp = '001'.
t_ekko_1-ekorg = '0001'.
t_ekko_1-lifnr = 'TEST'.
t_ekko_1-ebelp = '000010'.
t_ekko_1-menge = '1'.
t_ekko_1-meins = 'EA'.
t_ekko_1-matnr = 'TEST'.
t_ekko_1-lgort = 'TEST'.
t_ekko_1-idnlf = 'TEST'.
t_ekko_1-TXZ01 = 'TEST'.
t_ekko_1-lgpbe = 'TEST'.
t_ekko_1-LGOBE = 'TEST'.
t_ekko_1-MENGE1 = '1'.
t_ekko_1-wemng = '1'.
APPEND T_EKKO_1.
data: fieldcatalog type slis_t_fieldcat_alv with header line.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'PO NUMBER'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'EBELN'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'PO DATE'.
fieldcatalog-col_pos = 1.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'AEDAT'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EKGRP'.
fieldcatalog-seltext_m = 'PUR GRP/BUYER'.
fieldcatalog-col_pos = 2.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'EKGRP'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EKORG'.
fieldcatalog-seltext_m = 'PUR ORG.'.
fieldcatalog-col_pos = 3.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'EKORG'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'LIFNR'.
fieldcatalog-seltext_m = 'VENDOR NO'.
fieldcatalog-col_pos = 4.
fieldcatalog-REF_TABNAME = 'EKKO'.
fieldcatalog-REF_FIELDNAME = 'LIFNR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO LINE'.
fieldcatalog-col_pos = 5.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'EBELP'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'ORD QTY'.
fieldcatalog-col_pos = 6.
fieldcatalog-REF_TABNAME = 'EKET'.
fieldcatalog-REF_FIELDNAME = 'MENGE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'UNIT'.
fieldcatalog-col_pos = 8.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'MEINS'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'MATERIAL'.
fieldcatalog-col_pos = 9.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'MATNR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TXZ01'.
fieldcatalog-seltext_m = 'DESCRIPTION'.
fieldcatalog-col_pos = 10.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'TXZ01'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'IDNLF'.
fieldcatalog-seltext_m = 'VEND MAT'.
fieldcatalog-col_pos = 11.
fieldcatalog-REF_TABNAME = 'EKPO'.
fieldcatalog-REF_FIELDNAME = 'IDNLF'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'LGPBE'.
fieldcatalog-seltext_m = 'ST.LOC SHELF BIN'.
fieldcatalog-col_pos = 12.
fieldcatalog-outputlen = 6.
fieldcatalog-REF_TABNAME = 'MARD'.
fieldcatalog-REF_FIELDNAME = 'LGPBE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'LGOBE'.
fieldcatalog-seltext_m = 'ST.LOC DESCRIPTION'.
fieldcatalog-col_pos = 13.
fieldcatalog-REF_TABNAME = 'T001L'.
fieldcatalog-REF_FIELDNAME = 'LGOBE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
IF BLIND = ' '. " if the check box is not checked.
<b>fieldcatalog-fieldname = 'MENGE1'.
fieldcatalog-seltext_m = 'QTY TO RECEIVE'.
fieldcatalog-col_pos = 14.
fieldcatalog-REF_TABNAME = 'EKES'.
fieldcatalog-REF_FIELDNAME = 'MENGE'.
fieldcatalog-rollname = 'MENGE_D'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.</b>
fieldcatalog-fieldname = 'WEMNG'.
fieldcatalog-seltext_m = 'QTY RECEIVED'.
fieldcatalog-col_pos = 15 .
fieldcatalog-decimals_out = 0.
fieldcatalog-no_zero = 'X'.
fieldcatalog-REF_TABNAME = 'EKET'.
fieldcatalog-REF_FIELDNAME = 'WEMNG'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endif.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
exporting
IT_FIELDCAT = fieldcatalog[]
TABLES
t_outtab = t_ekko_1
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.
Thanks,
Naren