No field catalog found error
in alv grid display ,cant we use REUSE_ALV_FIELDCATALOG_MERGE if the o/p internal table is formed by joining 2 or more tables.
Hi
U can use REUSE_ALV_FIELDCATALOG_MERGE for any internal table.
If u r gettin the error 'no field catalog found' try passing the program name in the exporting parameter INCLUDE_NAME.
Refer the foll code:
*& Report ZALV *
REPORT zalv .
TYPE-POOLS SLIS.
TABLES: vbrk,
vbrp,
likp,
lips,
vbak,
vbap.
DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: BEGIN OF tbl_inv OCCURS 10,
vbeln LIKE vbrk-vbeln,
erdat LIKE vbrk-erdat,
kunnr LIKE vbrk-kunrg,
sfakn LIKE vbrk-sfakn,
xblnr LIKE vbrk-xblnr,
posnr LIKE vbrp-posnr,
vgbel LIKE vbrp-vgbel,
vgpos LIKE vbrp-vgpos,
aubel LIKE vbrp-aubel,
aupos LIKE vbrp-aupos,
matnr LIKE vbrp-matnr,
arktx LIKE vbrp-arktx,
werks LIKE vbrp-werks,
END OF tbl_inv,
BEGIN OF tbl_sales OCCURS 10,
vbeln LIKE vbak-vbeln,
erdat LIKE vbak-erdat,
kunnr LIKE vbak-kunnr,
posnr LIKE vbap-posnr,
kwmeng LIKE vbap-kwmeng,
END OF tbl_sales,
BEGIN OF tbl_lips OCCURS 10,
vbeln LIKE lips-vbeln,
posnr LIKE lips-posnr,
lfimg LIKE lips-lfimg,
meins LIKE lips-meins,
END OF tbl_lips.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_werks FOR vbrp-werks OBLIGATORY.
PARAMETERS p_vkorg LIKE vbrk-vkorg OBLIGATORY. "Sales Organisation
SELECT-OPTIONS : s_vtweg FOR vbrk-vtweg,
"Distribution channel
s_spart FOR vbrk-spart, "Division
s_erdat FOR vbrk-erdat OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
IF s_vtweg IS INITIAL AND s_spart IS INITIAL.
SELECT p~vbeln
p~erdat
p~kunrg
p~sfakn
p~xblnr
q~posnr
q~vgbel
q~vgpos
q~aubel
q~aupos
q~matnr
q~arktx
q~werks
iNTO TABLE tbl_inv
FROM vbrk AS p
JOIN vbrp AS q
ON pvbeln = qvbeln
WHERE p~erdat IN s_erdat
AND p~vkorg = p_vkorg.
ELSEIF s_vtweg IS INITIAL.
SELECT p~vbeln
p~erdat
p~kunrg
p~sfakn
p~xblnr
q~posnr
q~vgbel
q~vgpos
q~aubel
q~aupos
q~matnr
q~arktx
q~werks
INTO TABLE tbl_inv
FROM vbrk AS p
JOIN vbrp AS q
ON pvbeln = qvbeln
WHERE p~erdat IN s_erdat
AND p~vkorg = p_vkorg
AND p~spart IN s_spart.
ELSEIF s_spart IS INITIAL.
SELECT p~vbeln
p~erdat
p~kunrg
p~sfakn
p~xblnr
q~posnr
q~vgbel
q~vgpos
q~aubel
q~aupos
q~matnr
q~arktx
q~werks
INTO TABLE tbl_inv
FROM vbrk AS p
JOIN vbrp AS q
ON pvbeln = qvbeln
WHERE p~erdat IN s_erdat
AND p~vkorg = p_vkorg
AND p~vtweg IN s_vtweg.
ELSE.
SELECT p~vbeln
p~erdat
p~kunrg
p~sfakn
p~xblnr
q~posnr
q~vgbel
q~vgpos
q~aubel
q~aupos
q~matnr
q~arktx
q~werks
INTO TABLE tbl_inv
FROM vbrk AS p
JOIN vbrp AS q
ON pvbeln = qvbeln
WHERE p~erdat IN s_erdat
AND p~vkorg = p_vkorg
AND p~vtweg IN s_vtweg
AND p~spart IN s_spart.
ENDIF.
WRITE 'Number of entries:'.
DESCRIBE TABLE tbl_lips LINES sy-tfill.
WRITE sy-tfill.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = 'ZALV'
I_INTERNAL_TABNAME = 'TBL_INV'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = 'ZALV'
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = 'ZALV_68416'
TABLES
t_outtab = tbl_inv
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.
Message was edited by:
Vasudha L
Similar Messages
-
Problem with field catalog after upgrade from 4.0
Hi experts,
We have recently upgraded from CRM 4.0 to 5.2.
I am now experiencing a problem with generation of a transport request for field catalog in transaction CTFC_CRM. I can generate the field catalog without errors.
The problem is that when I want to create the transport request in our dev system a pop up appears saying "Create object directory entry". Here I have to enter a package for some of the fields in the field catalog. The special thing is that the fields are not custom fields but rather SAP standard fields (using standard data elements). For example field BZIRK.
These are SAP standard fields but they are not standard in the field catalog. In 4.0 I did not get this prompt but this has apparently changed from 5.0.
What do I do? I guess if I need to create the objects I will need to use an SAP standard package. But how do I know what package to use?
Any comments or suggestions will be highly appreciated.
Best regards,
AndersHi,
If you did just install database, then you use Embed PL/SQL Gateway.
See this guide
Upgrading Oracle Application Express in Oracle Database Express Edition
I think you have not run step 5 script apxldimg.sql
Regards,
Jari -
How do I define Field-Catalog and Event-Catalog in OOPs ALV
Hi All,
This is the piece of the code on which I'm working upon. This program is giving an exception "No Field-Catalog Found".
I'm new to OOPs ALV. Could anybody please tell me how to define the field-catalog and event-catalog in this.
module PBO output.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container EXPORTING CONTAINER_NAME = 'CCCONTAINER'.
CREATE OBJECT g_grid EXPORTING I_PARENT = g_custom_container.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING I_STRUCTURE_NAME = 'IT_MATERIAL'
is_layout = layout
CHANGING IT_OUTTAB = gt_it_material.
ENDIF.
endmodule.
Regards,
Saurabhhi,
chk this sampl ceode.
TYPE-POOLS: slis.
CLASS lcl_event_receiver DEFINITION DEFERRED.
TABLES : zmpets_shipactiv, zmpets_chargebk, zmpets_shiphdr.
DATA : BEGIN OF int_crb OCCURS 0,
sel TYPE char1,
icon TYPE icon_d,
pernr LIKE zmpets_cil-pernr,
vorna LIKE pa0002-vorna,
movreason LIKE zmpets_shiphdr-movreason,
shipdocnum LIKE zmpets_chargebk-shipdocnum,
createdon LIKE zmpets_chargebk-createdon,
chargeamount LIKE zmpets_chargebk-chargeamount,
version LIKE zmpets_shipactiv-version,
activity LIKE zmpets_shipactiv-activity,
vendor LIKE zmpets_shiphdr-vendor,
smtp_addr LIKE adr6-smtp_addr,
empperid LIKE zmpets_167doc-empperid,
celltab TYPE lvc_t_styl,
END OF int_crb.
DATA : int_crb_ver LIKE int_crb OCCURS 0 WITH HEADER LINE.
DATA : int_crb_mail LIKE int_crb OCCURS 0 WITH HEADER LINE.
DATA : int_shipactiv LIKE zmpets_shipactiv OCCURS 0 WITH HEADER LINE.
DATA: gt_fieldcatalog TYPE lvc_t_fcat.
DATA : wf_flag TYPE i.
DATA : wf_res TYPE c.
DATA : wf_tabix TYPE sy-tabix.
DATA: BEGIN OF int_sin OCCURS 0,
shipdocnum LIKE zmpets_chargebk-shipdocnum,
shipdocnum LIKE zmpets_shipactiv-petsdocnumber,
END OF int_sin.
DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
DATA: doc_chng LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
DATA l_num(3).
DATA: ok_code LIKE sy-ucomm,
w_repid LIKE sy-repid,
wl_sno TYPE i VALUE 0,
w_max TYPE i VALUE 100,
wf_layout TYPE lvc_s_layo,
cont_on_main TYPE scrfname VALUE 'GRID_CONTROL',
cont_on_dialog TYPE scrfname VALUE 'GRID_CONTROL',
grid1 TYPE REF TO cl_gui_alv_grid,
grid2 TYPE REF TO cl_gui_alv_grid,
custom_container1 TYPE REF TO cl_gui_custom_container,
custom_container2 TYPE REF TO cl_gui_custom_container,
event_receiver TYPE REF TO lcl_event_receiver,
lt_exclude TYPE ui_functions,
ls_celltab TYPE lvc_s_styl,
lt_celltab TYPE lvc_t_styl.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-001.
PARAMETERS : p_cash AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b3.
PERFORM fieldcatalog_init USING gt_fieldcatalog[].
Selection-Screen----
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
SELECT-OPTIONS:s_chdate FOR zmpets_chargebk-createdon,
s_pernr FOR zmpets_shiphdr-pernr,
s_mvrsn FOR zmpets_shiphdr-movreason,
s_sin FOR zmpets_chargebk-shipdocnum NO INTERVALS
NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK b1.
PERFORM f_clear_fields.
CALL SCREEN 100.
CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive,
handle_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
PRIVATE SECTION.
ENDCLASS. "lcl_event_receiver DEFINITION
CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_toolbar.
§ 2.In event handler method for event TOOLBAR: Append own functions
by using event parameter E_OBJECT.
DATA: ls_toolbar TYPE stb_button.
append a separator to normal toolbar
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO e_object->mt_toolbar.
CLEAR ls_toolbar.
new button -
MOVE 'PROCESSED' TO ls_toolbar-function.
MOVE icon_execute_object TO ls_toolbar-icon.
MOVE 'Process the Record'(110) TO ls_toolbar-quickinfo.
MOVE ' Process '(200) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD. "handle_toolbar
METHOD handle_user_command.
§ 3.In event handler method for event USER_COMMAND: Query your
function codes defined in step 2 and react accordingly.
DATA: lt_rows TYPE lvc_t_row.
CASE e_ucomm.
WHEN 'PROCESSED'.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'N'
textline1 = 'Do you want to process the selected documents?'
TEXTLINE2 = ' '
titel = 'Process Documents'
START_COLUMN = 25
START_ROW = 6
CANCEL_DISPLAY = 'X'
IMPORTING
answer = wf_res.
*--IF THE USER CONFIRMS 'YES',
IF wf_res = 'J'.
PERFORM f_modify_activity.
CALL METHOD grid1->refresh_table_display.
PERFORM SENDINGMAIL.
ENDIF.
ENDCASE.
ENDMETHOD. "handle_user_command
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
MODULE pbo_100 OUTPUT
MODULE pbo_100 OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
w_repid = sy-repid.
IF custom_container1 IS INITIAL.
*get the data from charge back table
PERFORM select_table_chb.
create a custom container control for our ALV Control
CREATE OBJECT custom_container1
EXPORTING
container_name = cont_on_main
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc NE 0.
add your handling, for example
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = w_repid
txt2 = sy-subrc
txt1 = 'The control could not be created'(510).
ENDIF.
CREATE OBJECT grid1
EXPORTING i_parent = custom_container1.
Set a titlebar for the grid control
wf_layout-grid_title = 'Charge Back'(100).
allow to select multiple lines
wf_layout-sel_mode = 'C'.
wf_layout-stylefname = 'CELLTAB'.
Exclude all edit functions in this example since we do not need them:
PERFORM exclude_tb_functions CHANGING lt_exclude.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
is_layout = wf_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
it_toolbar_excluding = lt_exclude
IT_HYPERLINK =
IT_ALV_GRAPHICS =
CHANGING
it_outtab = int_crb[]
it_fieldcatalog = gt_fieldcatalog.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_user_command FOR grid1.
SET HANDLER event_receiver->handle_toolbar FOR grid1.
CALL METHOD grid1->set_toolbar_interactive.
ENDIF. "IF grid1 IS INITIAL
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = grid1.
ENDMODULE. "pbo_100 OUTPUT
MODULE pai_100 INPUT
MODULE pai_100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
PERFORM f_clear_fields.
LEAVE PROGRAM.
WHEN 'CANCEL'.
PERFORM f_clear_fields.
LEAVE TO SCREEN 0.
WHEN 'BACK'.
PERFORM f_clear_fields.
LEAVE TO SCREEN 0.
ENDCASE.
CLEAR ok_code.
ENDMODULE. "pai_100 INPUT
**& Form select_table_chb
text
FORM select_table_chb.
IF p_cash = 'X'.
*Consider the pending documents also.
*get the documents which are not processed yet,
*Doctype -> 06 = Charge Back document type.
SELECT zmpets_shiphdrpernr pa0002vorna
zmpets_shiphdrmovreason zmpets_chargebkshipdocnum
zmpets_chargebkcreatedon zmpets_chargebkchargeamount
zmpets_shipactivversion zmpets_shipactivactivity
zmpets_shiphdr~vendor
adr6~smtp_addr
zmpets_167doc~empperid
INTO CORRESPONDING FIELDS OF TABLE int_crb_ver
FROM zmpets_chargebk
JOIN zmpets_shiphdr
ON zmpets_chargebkshipdocnum = zmpets_shiphdrshipdocno
JOIN zmpets_shipactiv
ON zmpets_chargebkshipdocnum = zmpets_shipactivpetsdocnumber
JOIN pa0002
ON zmpets_shiphdrpernr = pa0002pernr
JOIN lfa1
ON lfa1lifnr = zmpets_shiphdrvendor
JOIN adr6
ON adr6addrnumber = lfa1adrnr
JOIN zmpets_167doc
ON zmpets_167docpernr = pa0002pernr
WHERE zmpets_shipactiv~doctype = '06'
zmpets_shipactiv~activity NE '30'
ZMPETS_CHARGEBK~CREATEDON IN s_chdate
AND ZMPETS_SHIPHDR~pernr IN s_pernr
AND ZMPETS_SHIPHDR~MOVREASON IN s_mvrsn
AND ZMPETS_CHARGEBK~SHIPDOCNUM IN s_sin
AND zmpets_chargebk~loekz NE 'X'
AND zmpets_shipactiv~loekz NE 'X'
AND zmpets_shiphdr~loekz NE 'X'.
IF sy-subrc <> 0.
*Message is 'No Pending Documents Available.'.
MESSAGE s196(zm050).
ELSE.
LOOP AT int_crb_ver.
*Not yet processed. set to red
int_crb_ver-icon = '@0A@'.
MODIFY int_crb_ver.
ENDLOOP.
PERFORM f_filter_data_pending.
ENDIF.
ELSE.
*Get the document details from pa0002,zmpets_shipactiv,ZMPETS_CHARGEBK
*table.
*Consider document type as '01' during the selection.
*Doctype -> 06 = Charge Back document type.
SELECT zmpets_shiphdrpernr pa0002vorna zmpets_shiphdr~movreason
zmpets_chargebkshipdocnum zmpets_chargebkcreatedon
zmpets_chargebkchargeamount zmpets_shipactivversion
zmpets_shipactivactivity zmpets_shiphdrvendor
*adr6~smtp_addr
zmpets_167doc~empperid
INTO CORRESPONDING FIELDS OF TABLE int_crb_ver
FROM zmpets_chargebk
JOIN zmpets_shiphdr
ON zmpets_chargebkshipdocnum = zmpets_shiphdrshipdocno
JOIN zmpets_shipactiv
ON zmpets_chargebkshipdocnum = zmpets_shipactivpetsdocnumber
JOIN pa0002
ON zmpets_shiphdrpernr = pa0002pernr
JOIN lfa1
ON lfa1lifnr = zmpets_shiphdrvendor
JOIN adr6
ON adr6addrnumber = lfa1adrnr
JOIN zmpets_167doc
ON zmpets_167docpernr = pa0002pernr
WHERE zmpets_chargebk~createdon IN s_chdate
AND zmpets_shiphdr~pernr IN s_pernr
AND zmpets_shiphdr~movreason IN s_mvrsn
AND zmpets_chargebk~shipdocnum IN s_sin
AND zmpets_shipactiv~activity NE '30'
AND zmpets_shipactiv~doctype = '06'
AND zmpets_chargebk~loekz NE 'X'
AND zmpets_shipactiv~loekz NE 'X'
AND zmpets_shiphdr~loekz NE 'X'.
IF sy-subrc <> 0.
*Message is 'No Charge Back Documents Available.'.
MESSAGE s201(zm050).
ELSE.
PERFORM f_filter_data.
ENDIF.
ENDIF.
ENDFORM. "select_table_chb
*& Form UPDATE_RECORDS
text
--> p1 text
<-- p2 text
FORM update_records TABLES p_et_index_rows
STRUCTURE lvc_s_row.
DATA: ls_selected_line LIKE lvc_s_row,
lf_row_index TYPE lvc_index.
LOOP AT p_et_index_rows INTO ls_selected_line.
lf_row_index = ls_selected_line-index.
ENDLOOP.
ENDFORM. " UPDATE_RECORDS
**& Form fieldcatalog_init
text
-->P_GT_FIELDCATALOG[] text
FORM fieldcatalog_init USING lt_fieldcatalog TYPE lvc_t_fcat.
DATA: ls_fieldcatalog TYPE lvc_s_fcat.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'SEL'.
ls_fieldcatalog-tabname = 'INT_CRB'.
ls_fieldcatalog-datatype = 'C'.
ls_fieldcatalog-col_pos = 1.
ls_fieldcatalog-edit = 'X'.
ls_fieldcatalog-reptext = 'Select for Processing'.
ls_fieldcatalog-coltext = 'Select for Processing'.
ls_fieldcatalog-seltext = 'Select for Processing'.
ls_fieldcatalog-tooltip = 'Select for Processing'.
ls_fieldcatalog-checkbox = 'X'.
ls_fieldcatalog-key = 'X'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'ICON'.
ls_fieldcatalog-tabname = 'INT_CRB'.
ls_fieldcatalog-datatype = 'CHAR'.
ls_fieldcatalog-col_pos = 2.
ls_fieldcatalog-intlen = '4'.
ls_fieldcatalog-reptext = 'Status'.
ls_fieldcatalog-coltext = 'Status'.
ls_fieldcatalog-seltext = 'Status'.
ls_fieldcatalog-tooltip = 'Status'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'PERNR'.
ls_fieldcatalog-tabname = 'INT_CRB'.
ls_fieldcatalog-datatype = 'NUMC'.
ls_fieldcatalog-col_pos = 2.
ls_fieldcatalog-intlen = '8'.
ls_fieldcatalog-reptext = 'Employee Number'.
ls_fieldcatalog-coltext = 'Employee Number'.
ls_fieldcatalog-seltext = 'Employee Number'.
ls_fieldcatalog-tooltip = 'Employee Number'.
ls_fieldcatalog-key = 'X'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'VORNA'.
ls_fieldcatalog-tabname = 'INT_CRB'.
ls_fieldcatalog-col_pos = 3 .
ls_fieldcatalog-datatype = 'CHAR'.
ls_fieldcatalog-outputlen = '20'.
ls_fieldcatalog-reptext = 'Employee Name'.
ls_fieldcatalog-coltext = 'Employee Name'.
ls_fieldcatalog-seltext = 'Employee Name'.
ls_fieldcatalog-tooltip = 'Employee Name'.
ls_fieldcatalog-key = 'X'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'MOVREASON'.
ls_fieldcatalog-tabname = 'INT_CRB'.
ls_fieldcatalog-col_pos = 4.
ls_fieldcatalog-datatype = 'NUMC'.
ls_fieldcatalog-outputlen = '10'.
ls_fieldcatalog-reptext = 'Move Reason'.
ls_fieldcatalog-coltext = 'Move Reason'.
ls_fieldcatalog-seltext = 'Move Reason'.
ls_fieldcatalog-tooltip = 'Move Reason'.
ls_fieldcatalog-key = 'X'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'SHIPDOCNUM'.
ls_fieldcatalog-tabname = 'INT_CRB'.
ls_fieldcatalog-datatype = 'NUMC'.
ls_fieldcatalog-outputlen = '10'.
ls_fieldcatalog-col_pos = 5.
ls_fieldcatalog-reptext = 'Shipping Document Number'.
ls_fieldcatalog-coltext = 'Shipping Document Number'.
ls_fieldcatalog-seltext = 'Shipping Document Number'.
ls_fieldcatalog-tooltip = 'Shipping Document Number'.
ls_fieldcatalog-key = 'X'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'CREATEDON'.
ls_fieldcatalog-tabname = 'INT_CRB'.
ls_fieldcatalog-col_pos = 6.
ls_fieldcatalog-datatype = 'DATS'.
ls_fieldcatalog-outputlen = '8'.
ls_fieldcatalog-reptext = 'Created On'.
ls_fieldcatalog-coltext = 'Created On'.
ls_fieldcatalog-seltext = 'Created On'.
ls_fieldcatalog-tooltip = 'Created On'.
ls_fieldcatalog-DO_sum = 'X'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'CHARGEAMOUNT'.
ls_fieldcatalog-tabname = 'INT_CRB'.
ls_fieldcatalog-col_pos = 7.
ls_fieldcatalog-datatype = 'CURR'.
ls_fieldcatalog-outputlen = '13'.
ls_fieldcatalog-reptext = 'Charge Back Amount'.
ls_fieldcatalog-coltext = 'Charge Back Amount'.
ls_fieldcatalog-seltext = 'Charge Back Amount'.
ls_fieldcatalog-tooltip = 'Charge Back Amount'.
ls_fieldcatalog-DO_sum = 'X'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
ENDFORM. "fieldcatalog_init
*& Form f_modify_activity
Modify the activity to 79 in zmpets_shipaciv table.
--> p1 text
<-- p2 text
FORM f_modify_activity .
REFRESH int_crb_mail.
int_crb_mail[] = int_crb[].
*All the document number which is to be processed is stored in
*the internel table 'INT_SIN'.
LOOP AT int_crb INTO int_crb.
IF int_crb-sel ='X'.
MOVE int_crb-shipdocnum TO int_sin.
APPEND int_sin.
CLEAR int_sin.
*Removing the processed documents.
DELETE int_crb.
ENDIF.
CLEAR int_crb.
ENDLOOP.
*Get the details from shipactiv table.
IF int_sin[] IS NOT INITIAL.
SELECT * FROM zmpets_shipactiv
INTO TABLE int_shipactiv
FOR ALL ENTRIES IN int_sin
WHERE petsdocnumber = int_sin-shipdocnum.
*Modify the activity code, version, actual date and last changed date.
SORT int_shipactiv BY petsdocnumber version DESCENDING.
CLEAR wf_tabix.
LOOP AT int_shipactiv.
wf_tabix = sy-tabix.
AT NEW petsdocnumber.
READ TABLE int_shipactiv INDEX wf_tabix.
int_shipactiv-activity = '030'.
int_shipactiv-version = int_shipactiv-version + 1.
int_shipactiv-actdate = sy-datum.
int_shipactiv-lastchangedby = sy-uname.
int_shipactiv-lastchangedt = sy-datum.
*Modify the data base table
MODIFY zmpets_shipactiv FROM int_shipactiv.
ENDAT.
CLEAR int_shipactiv.
AT LAST.
*Message is 'Data Processed Successfully.'.
MESSAGE s203(zm050).
ENDAT.
ENDLOOP.
*-send mail to the vendor and employee that the shipment is cleared for
LOOP AT int_crb_mail WHERE sel = 'X'.
PERFORM f_send_mail.
ENDLOOP.
REFRESH int_crb_mail.
CALL SELECTION-SCREEN 1000.
ELSE.
*Message is 'No Data Selected for Processing.'.
MESSAGE s200(zm050).
ENDIF.
ENDFORM. " f_modify_activity
*& Form f_clear_fields
text
--> p1 text
<-- p2 text
FORM f_clear_fields .
CLEAR int_crb.
CLEAR int_crb_ver.
CLEAR int_sin.
REFRESH int_crb.
REFRESH int_crb_ver.
REFRESH int_sin.
CLEAR int_shipactiv.
REFRESH int_shipactiv.
CLEAR wf_flag.
CLEAR wf_tabix.
ENDFORM. " f_clear_fields
*& Form f_filter_data
text
--> p1 text
<-- p2 text
FORM f_filter_data .
*Take the latest Version Data.
*take all the activities, including the activity '30'.
then put the details in internal table 'INT_CRB'.
SORT int_crb_ver BY shipdocnum version DESCENDING.
CLEAR wf_tabix.
CLEAR int_crb.
REFRESH int_crb.
LOOP AT int_crb_ver.
wf_tabix = sy-tabix.
AT NEW shipdocnum.
READ TABLE int_crb_ver INDEX wf_tabix.
MOVE-CORRESPONDING int_crb_ver TO int_crb.
APPEND int_crb.
CLEAR int_crb.
ENDAT.
ENDLOOP.
IF int_crb[] IS INITIAL.
*Message is 'No Records Available.'.
MESSAGE s202(zm050).
ELSE.
CLEAR wf_tabix.
LOOP AT int_crb.
wf_tabix = sy-tabix.
REFRESH lt_celltab.
ls_celltab-fieldname = 'SEL'.
IF int_crb-activity = '030'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
*status becomes green. ie processed
int_crb-icon = '@08@'. "Green
ELSE.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
*status set to red. ie not yet processed
int_crb-icon = '@0A@'. "Red
ENDIF.
INSERT ls_celltab INTO TABLE lt_celltab.
INSERT LINES OF lt_celltab INTO TABLE int_crb-celltab.
MODIFY int_crb INDEX wf_tabix.
ENDLOOP.
ENDIF.
ENDFORM. " f_filter_data
*& Form f_filter_data
text
--> p1 text
<-- p2 text
FORM f_filter_data_pending.
*Take the latest Version Data.
*take all the activities, including the activity '30'.
*then filter it with out the activities '30' and having the lastest
*version. then put the details in internal table 'INT_CRB'.
SORT int_crb_ver BY shipdocnum version DESCENDING.
CLEAR wf_tabix.
CLEAR int_crb.
REFRESH int_crb.
LOOP AT int_crb_ver.
wf_tabix = sy-tabix.
AT NEW shipdocnum.
READ TABLE int_crb_ver INDEX wf_tabix.
IF int_crb_ver-activity NE '030'.
MOVE-CORRESPONDING int_crb_ver TO int_crb.
APPEND int_crb.
CLEAR int_crb.
ENDIF.
ENDAT.
ENDLOOP.
IF int_crb[] IS INITIAL.
*Message is 'No Records Available.'.
MESSAGE s202(zm050).
ENDIF.
ENDFORM. " f_filter_data_pending
*& Form EXCLUDE_TB_FUNCTIONS
text
<--P_LT_EXCLUDE text
FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
DATA ls_exclude TYPE ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_cut.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_undo.
APPEND ls_exclude TO pt_exclude.
ENDFORM. " EXCLUDE_TB_FUNCTIONS
*& Form f_send_mail
text
--> p1 text
<-- p2 text
FORM f_send_mail .
*store the vendor name, vendor email id , employee name and employee
*email id in the internal table int_crb
Creation of the document to be sent
CLEAR doc_chng.
REFRESH objpack.
REFRESH objhead.
REFRESH reclist.
REFRESH objtxt.
File Name
doc_chng-obj_name = 'SHIPMENT'.
Mail Subject
CONCATENATE 'Shipment Document No.' int_crb_mail-shipdocnum
'Cleared.'
INTO doc_chng-obj_descr SEPARATED BY ' '.
Mail Contents
objtxt-line = 'Hi,'.
APPEND objtxt.
objtxt-line = ' '.
APPEND objtxt.
CONCATENATE 'Shipment Document Number ' int_crb_mail-shipdocnum
' cleared for move.' INTO objtxt-line SEPARATED BY ' '.
APPEND objtxt.
objtxt-line = ' '.
APPEND objtxt.
CLEAR objtxt.
objtxt-line = 'Regards '.
APPEND objtxt.
objtxt-line = ' '.
APPEND objtxt.
objtxt-line = 'SAP '.
APPEND objtxt.
CLEAR objtxt.
APPEND objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN(
objtxt ).
Creation of the entry for the compressed document
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
Completing the recipient list
target recipent
CLEAR reclist.
reclist-receiver = int_crb_mail-empperid. "employee email ID
"wf_empperid.
reclist-express = 'X'.
reclist-rec_type = 'U'.
APPEND reclist.
copy recipents
CLEAR reclist.
reclist-receiver = 'anversha.shahul@'."int_crb_mail-smtp_addr
reclist-express = 'X'.
reclist-rec_type = 'U'.
reclist-copy = 'X'.
APPEND reclist.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
COMMIT WORK.
SUBMIT rsconn01
WITH mode = 'INT'
WITH output = ' '
AND RETURN.
ENDFORM. " f_send_mail
rgds
anver
pls mark hlpful answers -
Error ,Field catalog not found while doing billing with DP90
Dear Guru's
while doing billing with DP90 transaction code.i have given service order no xxxx and execute.Then i received the below error
Field catalog not found , Message no. 0K530.Kindly help me in solving the issue.
Thank u
S Babuhi naga suribabu,
I am also facing same issue. can you please help, where to check the configuration for this issue -
Sap upgrade-Error when using DP90-OK 530-field catalog not found
Hello,
We are upgrading from 4.6c to mySAP ERP 2004 version. In 4.6c, we are using VA90 to create a sales order from service order to bill the customer. However in mySAP ERP 2004 version, VA90 does not exist. So we created DP profile and are using transaction code DP90 to create billling request for the service order. However, System gives an error 'Field catalog not found'. The diagnosis says that -The field catalog cannot be determined because the output table structure name was not specified.
Please help us how to solve the above problem.
Thanks
Malahi mala,
did you see SAP-message 442170?
it is all about conversion VA90/DP90.
hope this helps.
br,
matthias
Message was edited by: Matthias Leitner -
ALV Display - Error in field catalog
Hi ,
I am facing a problem in ALV... Field catalot is not getting populated... I am getting a message field catalog not found...
Can anyone please help me....... <URGENT DOES NOT EXIST HERE>...
I am enclosing my code also.. please go thourh it and help it....
REPORT ZINVENTORY
LINE-SIZE 120
LINE-COUNT 64.
MESSAGE-ID Z2
NO STANDARD PAGE HEADING..
type-pools : slis.
Tables *
tables: zasset,
anla,
itob,
equi.
data: v_repid LIKE sy-repid.
Selection Screen *
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .
SELECT-OPTIONS : S_bukrs FOR anla-bukrs OBLIGATORY ,
S_kostl FOR itob-kostl .
SELECTION-SCREEN : END OF BLOCK B1 .
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETERS: p_screen RADIOBUTTON GROUP gr1,
p_list RADIOBUTTON GROUP gr1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b2.
Internal Tables *
types: BEGIN OF ty_zasset, " occurs 0,
equnr like zasset-equnr,
ANLN1 LIKE zasset-ANLN1, " Asset number
ANLN2 LIKE zasset-ANLN2, " Sub Asset number
BUKRS LIKE zasset-BUKRS, " Company Code
KOSTL like zasset-kostl,
SCANNEDBY type zasset-scannedby,
SCANNINGDATE type zasset-SCANNINGDATE,
SCANNINGTIME type zasset-scanningtime,
UPDATEDATE type zasset-updatedate,
UPDATETIME type zasset-updatetime,
END OF ty_zasset.
DATA: wa_zasset TYPE ty_zasset.
DATA: it_zasset TYPE TABLE OF ty_zasset with header line..
types: BEGIN OF ty_zasset1, " occurs 0,
equnr TYPE equi-equnr,
ANLN1 LIKE anla-ANLN1, " Asset number
ANLN2 LIKE anla-ANLN2, " Sub Asset number
BUKRS LIKE anla-BUKRS, " Company Code
ernam like anla-ernam,
erdat like anla-erdat,
KOSTL like anlz-kostl,
SCANNEDBY type zasset-scannedby,
SCANNINGDATE type zasset-SCANNINGDATE,
SCANNINGTIME type zasset-scanningtime,
UPDATEDATE type zasset-updatedate,
UPDATETIME type zasset-updatetime,
END OF ty_zasset1.
DATA: wa_zasset1 TYPE ty_zasset1.
DATA: it_zasset1 TYPE TABLE OF ty_zasset1 with header line..
types: BEGIN OF ty_zasset2, " occurs 0,
equnr like itob-equnr,
ANLNr LIKE itob-ANLNr, " Asset number
ANLuN LIKE itob-ANLuN, " Sub Asset number
BUKRS LIKE itob-BUKRS, " Company Code
timbi like itob-timbi,
kostl like itob-kostl,
KOSTL like anlz-kostl,
SCANNEDBY type zasset-scannedby,
SCANNINGDATE type zasset-SCANNINGDATE,
SCANNINGTIME type zasset-scanningtime,
UPDATEDATE type zasset-updatedate,
UPDATETIME type zasset-updatetime,
END OF ty_zasset2.
DATA: wa_zasset2 TYPE ty_zasset2.
DATA: it_zasset2 TYPE TABLE OF ty_zasset2 with header line..
types: begin of ty_final , "occurs 0,
equnr like itob-equnr,
anln1 like anla-anln1,
anln2 like anla-anln2,
bukrs like anla-bukrs,
ernam
erdat
kostl like itob-kostl,
end of ty_final.
DATA: wa_final TYPE ty_final.
DATA: it_final TYPE TABLE OF ty_final with header line..
*DATA: it_zasset TYPE TABLE OF ty_zasset.
*data: it_zasset1 type table of ty_zasset1.
*data:wa_zasset type ty_zasset.
*data:wa_zasset1 type ty_zasset1.
Flags and Variables *
DATA : F_ERROR. " Flag for No Data
*pop field cat for f7
data: V_SYREPID LIKE SY-REPID,
IT_FLDCAT type slis_t_fieldcat_alv , "with header line,
wa_fldcat type slis_fieldcat_alv.
*DATA : IT_FLDCATS TYPE SLIS_T_FIELDCAT_ALV.
data: itab_events type slis_t_event,
wa_events type slis_alv_event.
*data: wa_layout type slis_layout_alv.
DATA : IT_COMMENTS TYPE SLIS_T_LISTHEADER,
WA_COMMENTS TYPE SLIS_LISTHEADER.
DATA : IT_SORTINFO TYPE SLIS_T_SORTINFO_ALV,
WA_SORTINFO TYPE SLIS_SORTINFO_ALV.
Initialization *
initialization.
SY-REPID = V_REPID.
At Selection Screen *
AT SELECTION-SCREEN.
PERFORM validation.
Start Of Selection *
start-of-selection.
perform select_data.
IF P_LIST = 'X'.
perform get_field_catalog.
PERFORM MODIFYFIELDCAT.
perform get_events.
perform write_comments.
perform grid_display.
*perform list_display.
ENDIF.
IF sy-subrc = 0.
IF p_list = 'X'.
loop at it_final.
perform get_events.
endloop.
endif.
endloop.
else.
*endif.
End Of Selection *
END-OF-SELECTION.
*perform display_Recorsds.
*loop at zasset.
*& Form validation
text
--> p1 text
<-- p2 text
FORM validation.
*Local variables.
DATA:
lv_bukrs type anla-bukrs,
lv_kostl type itob-kostl,
lv_anln1 TYPE anla-anln1, "MAterial Number
lv_anln2 TYPE anla-anln2.
*Validation for company code
if not s_bukrs is initial.
select single bukrs from anla
into lv_bukrs
where bukrs in s_bukrs.
if sy-subrc <> 0.
*Message used : Invalid company code.
endif.
endif .
Validation for cost center
if not s_kostl is initial.
select single kostl from itob
into lv_kostl
where kostl in s_kostl.
if sy-subrc <> 0.
*Message used : Invalid company code.
endif.
endif .
ENDFORM. " validation
*& Form display
text
--> p1 text
<-- p2 text
FORM display.
write :/15 it_final-anln1,
it_final-anln2,
sy-vline.
*-bukrs,
it_zasset-anln1.
ENDFORM. " display
*& Form get_field_catalog
text
--> p1 text
<-- p2 text
FORM get_field_catalog.
*REFRESH IT_FLDCAT.
*CLEAR IT_FLDCAT.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = V_REPID
I_INTERNAL_TABNAME = 'IT_FINAL'
I_INCLNAME = V_REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = IT_FLDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
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. " get_field_catalog
*& Form get_events
text
--> p1 text
<-- p2 text
FORM get_events.
WA_COMMENTS-TYP = 'H'.
WA_COMMENTS-KEY = 'THIS IS THE HEADING.'.
WA_COMMENTS-INFO = 'LIST OF SALES ORDERS'.
APPEND WA_COMMENTS TO IT_COMMENTS.
ENDFORM. " get_events
*& Form grid_display
text
--> p1 text
<-- p2 text
FORM grid_display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'FIRST PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = 'LIST OF FLIGHT DETAILS'
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = it_fldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = itab_events
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
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. " grid_display
*& Form write_comments
text
--> p1 text
<-- p2 text
FORM write_comments.
WA_COMMENTS-TYP = 'H'.
WA_COMMENTS-KEY = 'THIS IS THE HEADING.'.
WA_COMMENTS-INFO = 'LIST OF SALES ORDERS'.
APPEND WA_COMMENTS TO IT_COMMENTS.
ENDFORM. " write_comments
*& Form select_data
text
--> p1 text
<-- p2 text
FORM select_data.
clear: it_zasset, it_zasset[].
select equnr "bukrs
anln1
anln2
bukrs
KOSTL
SCANNEDBY
SCANNINGDATE
SCANNINGTIME
UPDATEDATE
UPDATETIME
into table it_zasset "(g_anln1,g_anln2)
from zasset
where bukrs = zasset-bukrs..
and kostl = zasset-kostl.
if sy-subrc = 0.
sort it_zasset by anln1 anln2.
endif.
append it_zasset.
clear it_zasset1.
select
equnr
anln1
anln2
bukrs
ernam
erdat
bukrs
KOSTL
SCANNEDBY
SCANNINGDATE
SCANNINGTIME
UPDATEDATE
UPDATETIME
into table it_zasset1 "(g_anln1,g_anln2)
from anla
where bukrs = it_zasset-bukrs.
WHERE BUKRS IN S_BUKRS.
and kostl = anla-kostl.
if sy-subrc = 0.
select equnr
anlnr
anlun
bukrs
timbi
kostl
into table it_zasset2
from itob
for all entries in it_zasset1
where bukrs = it_zasset1-bukrs
WHERE anlnr = it_zasset1-anln1.
endif.
APPEND IT_ZASSET1.
IF SY-SUBRC = 0.
*loop at it_zasset1 into wa_zasset1.
loop at it_ZASSET1 into wa_zasset1.
move wa_zasset1-bukrs to wa_final-bukrs.
move wa_zasset1-anln1 to wa_final-anln1.
move wa_zasset1-anln2 to wa_final-anln2.
append wa_final to it_final.
endloop.
ENDIF.
sort it_final.
*LOOP AT IT_FINAL.
*ENDLOOP.
*ENDIF.
*if sy-subrc = 0.
*loop at it_zasset into wa_asset.
*read table it_zasset into wa_asset with key anln2 = wa_asset-anln2
*binary search.
*read table it_final into wa_final with key anln2 = wa_final-anln2
*binary search.
*if wa_asset-anln2 = wa_final-anln2.
*write : / 'error'.
*endif.
If sy-subrc <> 0.
f_error = 'X'.
write : 'No data Exists for the given selection in FA table'.
else.
loop at it_final.
perform display.
endloop.
records exits in anla table also.
endif.
ENDFORM. " select_data
*& Form MODIFYFIELDCAT
text
--> p1 text
<-- p2 text
FORM MODIFYFIELDCAT.
LOOP AT IT_FLDCAT INTO WA_FLDCAT.
CASE WA_FLDCAT-FIELDNAME.
WHEN 'EQUNR'.
WA_FLDCAT-COL_POS = 1.
WA_FLDCAT-SELTEXT_L = 'aSSET'.
WHEN 'ANLN1'.
wa_FLDCAT-KEY = 'X'.
WA_FLDCAT-COL_POS = 5.
WA_FLDCAT-SELTEXT_L = 'aSSET'.
WHEN 'ANLN2'.
WA_FLDCAT-KEY = 'X'.
WA_FLDCAT-COL_POS = 6.
wa_FLDCAT-HOTSPOT = 'X'.
WHEN 'BUKRS'.
WA_FLDCAT-CURRENCY = 'INR'.
WA_FLDCAT-SYMBOL = 'X'.
ENDCASE.
MODIFY IT_FLDCAT FROM WA_FLDCAT.
*IT_FLDCAT-fieldname = 'EQUNR'.
IT_FLDCAT-seltext_m = 'DOCUM_TYPE'.
IT_FLDCAT-col_pos = 1.
IT_FLDCAT-outputlen = 10.
IT_FLDCAT-emphasize = 'X'.
IT_FLDCAT-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append IT_FLDCAT TO IT_FLDCAT.
IT_FLDCAT-fieldname = 'ANLN1'.
IT_FLDCAT-seltext_m = 'DOCUM_TYPE'.
IT_FLDCAT-col_pos = 1.
IT_FLDCAT-outputlen = 10.
IT_FLDCAT-emphasize = 'X'.
IT_FLDCAT-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append IT_FLDCAT TO IT_FLDCAT.
ENDLOOP.
ENDFORM. " MODIFYFIELDCAT
*& Form list_display
text
--> p1 text
<-- p2 text
*FORM list_display.
*CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = V_SYREPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'FRM_USER_COMMAND'
I_STRUCTURE_NAME =
IS_LAYOUT = wa_layout
IT_FIELDCAT = IT_FLDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = ITAB_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
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. " list_display
Edited by: Craig Cmehil on Jul 18, 2008 10:01 AMThe problem is with this...
types: begin of ty_final , "occurs 0,
equnr like itob-equnr,
anln1 like anla-anln1,
anln2 like anla-anln2,
bukrs like anla-bukrs,
ernam
erdat
kostl like itob-kostl,
end of ty_final.
DATA: wa_final TYPE ty_final.
DATA: it_final TYPE TABLE OF ty_final with header line.
when you are using Fieldcatalog merge you have to avoid using the TYPES Declaration of the internal table.
Instead of that you can do this
data: begin of it_final occurs 0,
equnr like itob-equnr,
anln1 like anla-anln1,
anln2 like anla-anln2,
bukrs like anla-bukrs,
ernam
erdat
kostl like itob-kostl,
end of it_final. -
Field catalog not found...
hi all,
when i try to create billing request for a service order (using dp90), i am getting the following message :
Field catalog not found
Message no. 0K530
Diagnosis
The field catalog cannot be determined because the output table
structure name was not specified.
what can i do?I assume this error happens when you save the billing document, and it is a billing output issue. As said, you could verify this by removing all outputs before saving, and afterwards in change mode add them again one by one to figure out which is failing. Alternatively use the blue i icon to analyze the outputs.
Transaction NACE can be used for output setup across all modules. If the assumption regarding billing is correct, we are dealing with application V3. Mark this in the left side. Press 'output types' button and check the output types you saw in the billing document by double clicking. On the 'General data' is the access sequence assigned. Double click that. Probably will multiple output types be attached to the same access sequence. Mark the access sequence, and unfold the 'Accesses' to the left. Check out the condition tables in the Tab column. All condition tables below 599 is standard and probably OK. Note down the high numbers.
Go back to the initial screen of NACE. With the application (V3) marked, select EDIT - CONDITION TABLES in the menu.
Check each of the used condition tables here. Use utilities - Generate in the menu. Mark all boxes and execute. You can even select the entire range 500-999 at one time if you prefer. At least one condition table should give errors in the generation. -
Hello there,
I am having problem changing a classic ABAP report to ALV as am hitting the error "field catalog not found".
I am using this 2 functions to help me convert it to ALV format.
and a snippet from my code :
MODIFY gt_i_data FROM wa_i_data TRANSPORTING priokx.
ENDLOOP .
gt_report[] = gt_i_data[].
perform f_assign_alv.
perform f_display_alv.
1.f_assign_alv
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = c_repid
i_internal_tabname = 'GT_REPORT'
i_inclname = c_repid
CHANGING
ct_fieldcat = gt_fieldcat.
2._display_alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_grid_title = v_grid_title
is_layout = v_layout
it_fieldcat = gt_fieldcat
TABLES
t_outtab = GT_REPORT
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
I noticed during debug,inside 'REUSE_ALV_GRID_DISPLAY' the possible location of error cud be at :
if i_screen_start_column is initial and -
>all these values are empty
i_screen_start_line is initial and
i_screen_start_column is initial and
i_screen_end_line is initial.
gt_grid-flg_popup = space.
call screen 500. else. -
>point of error
gt_grid-flg_popup = 'X'.
call screen 700
starting at i_screen_start_column i_screen_start_line
ending at i_screen_end_column i_screen_end_line.
endif.
Need your expert advice, please guide.Thanks so much!!Hi Neesha,
If you are using FM 'REUSE_ALV_FIELDCATALOG_MERGE', during data/types declaration, you have to use the LIKE keyword and not the TYPE keyword.
If you use TYPE, the fieldcat will not be populated.
DATA: BEGIN OF GT_REPORT OCCURS 0,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
werks LIKE ekpo-werks,
menge LIKE ekpo-menge,
netpr LIKE ekpo-netpr,
peinh LIKE ekpo-peinh,
netwr LIKE ekpo-netwr,
END OF GT_REPORT.
Regards,
Jovito.
Edited by: dsouzajovito on Jan 10, 2011 11:32 AM -
Error in Building Field catalog
HI ,
I have my own defined struture and passed it to the FM Reuse_alv_fieldcatalog_merge with a single quotations and also tried with capital letters .
After executing it , it says field catalog not found.
PLease tell me how to rectify this error.
Thanks,
Ahmed.I believe you declared the structure in DDIC i.e. it is a Global Structure in your SAP Server....if same is not the case..you would get this error.
Follow this to use this FM:
http://www.sap-img.com/fu015.htm -
When I use Field catalog merge I get an error
i Get a runtime error where it says the internal table passes to field catalog marge has a different fields than I_INTERNAL_TABNAME . What could be the problem.
Thank youAre you passing the internal table name and field name as the same or different and also check the data type of the fieldcatalog internal table that you are passing to this FM
Check this code for ur reference.
REPORT ZMK_SHIPMENT_ALV
no standard page heading
line-size 105
line-count 50(5)
message-id zz.
TABLES *
tables : vttk, "Shipment Header
vttp, " Shipment Item
lips. " Delivary Item
***TYPE-POOLS *
type-pools : slis.
*WORK AREAS *
Work area for field catalog table
data : wa_fldcat type slis_fieldcat_alv.
Work area for Events table
data : wa_events type slis_alv_event.
Work area for layout.
data : wa_layout type slis_layout_alv.
*INTERNAL TABLES *
Shimpment Details
data : begin of itab occurs 0,
tknum like vttk-tknum,
shtyp like vttk-shtyp,
tpnum like vttp-tpnum,
vbeln like vttp-vbeln,
end of itab.
data : begin of itab1 occurs 0,
vbeln like lips-vbeln,
posnr like lips-posnr,
matnr like lips-matnr,
lfimg like lips-lfimg,
meins like lips-meins,
end of itab1.
For field catalog table
data : it_fldcats type slis_t_fieldcat_alv.
For Events table
data : it_event type slis_t_event.
For layout.
data : it_layout type slis_layout_alv.
For field catalog table
data : it_fldcats1 type slis_t_fieldcat_alv.
For Events table
data : it_event1 type slis_t_event.
data : v_repid like sy-repid.
*Data Declaration
data: v_index type sy-index,
v_vbeln like lips-vbeln.
*SELECT-OPTIONS
selection-screen begin of block b with frame title text-001.
select-options : s_tknum for vttk-tknum .
selection-screen end of block b.
*INITIALIZATION
initialization.
v_repid = sy-repid.
*START-OF-SELCTION
start-of-selection.
perform populate-data.
sort itab by tknum.
top-of-page.
write : 'Shipment wise Delivary Report'.
end-of-selection.
perform build-fieldcatalog.
perform modify-fieldcatalog.
perform build-events.
perform modify-events.
perform set-layout.
perform set-pfstatus.
perform list-display.
*& Form populate-data
Retrives the Shipment data depending on the selection criteria *
FORM populate-data.
select vttk~tknum
vttk~shtyp
vttp~tpnum
vttp~vbeln
into table itab
from vttk
join vttp
on vttptknum = vttktknum
where vttk~tknum in s_tknum.
if sy-subrc <> 0.
message e999 with 'NO DATA FOUND'.
exit.
endif.
ENDFORM. " populate-data
*& Form build-fieldcatalog
text
--> p1 text
<-- p2 text
form build-fieldcatalog.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = v_repid
i_internal_tabname = 'ITAB'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
changing
ct_fieldcat = it_fldcats
exceptions
inconsistent_interface = 1
program_error = 2
others = 3
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. " BUILD-FIELDCATALOG
*& Form build-events
text
--> p1 text
<-- p2 text
FORM build-events.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = it_event
EXCEPTIONS
LIST_TYPE_WRONG = 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. " build-events
*& Form set-layout
text
--> p1 text
<-- p2 text
FORM set-layout.
wa_layout-zebra = 'X'.
wa_layout-colwidth_optimize = 'X'.
wa_layout-no_colhead = space.
wa_layout-no_vline = space.
ENDFORM. " set-layout
*& Form list-display
text
--> p1 text
<-- p2 text
FORM list-display.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME =
IS_LAYOUT = wa_layout
IT_FIELDCAT = it_fldcats
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = it_event
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
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. " list-display
*& Form modify-fieldcatalog
text
--> p1 text
<-- p2 text
FORM modify-fieldcatalog.
loop at it_fldcats into wa_fldcat.
case wa_fldcat-fieldname.
when 'TKNUM'.
wa_fldcat-seltext_l = 'Ship No.'.
wa_fldcat-col_pos = 1.
wa_fldcat-ddictxt = 'L'.
when 'SHTYP'.
wa_fldcat-seltext_l = 'Ship Type'.
wa_fldcat-col_pos = 2.
wa_fldcat-ddictxt = 'L'.
when 'TPNUM'.
wa_fldcat-seltext_l = 'Item No.'.
wa_fldcat-col_pos = 3.
wa_fldcat-ddictxt = 'L'.
when 'VBELN'.
wa_fldcat-seltext_l = 'Delivary No.'.
wa_fldcat-hotspot = 'X'.
wa_fldcat-col_pos = 4.
wa_fldcat-ddictxt = 'L'.
endcase.
modify it_fldcats from wa_fldcat.
endloop.
ENDFORM. " modify-fieldcatalog
*& Form modify-events
text
--> p1 text
<-- p2 text
form modify-events.
read table it_event with key name =
slis_ev_top_of_page into wa_events.
if sy-subrc = 0.
wa_events-form = 'HEADER-OF-REPORT'.
modify it_event from wa_events index sy-tabix.
clear wa_events.
endif.
read table it_event with key name =
slis_ev_end_of_page into wa_events.
if sy-subrc = 0.
wa_events-form = 'FOOTER-OF-REPORT'.
modify it_event from wa_events index sy-tabix.
clear wa_events.
endif.
endform. " modify-events
*& Form HEADER-OF-REPORT
text
--> p1 text
<-- p2 text
FORM HEADER-OF-REPORT.
write : 'Shipment Wise Delivary Report'.
ENDFORM. " HEADER-OF-REPORT
*& Form FOOTER-OF-REPORT
text
--> p1 text
<-- p2 text
FORM FOOTER-OF-REPORT.
write : 'End of Report'.
ENDFORM. " FOOTER-OF-REPORT
*& Form USER_COMMAND
User command for Calling Transaction VT03N, Execute and Refresh
FORM user_command USING p_ucomm LIKE sy-ucomm
p_selfield TYPE slis_selfield.
V_INDEX = P_SELFIELD-TABINDEX. " holds the selected table index
CASE p_ucomm.
WHEN '&IC1'.
IF p_selfield-fieldname eq 'VBELN'.
perform secondary_list.
ENDIF.
ENDCASE.
ENDFORM. " USER_COMMAND
*& Form secondary_list
text
--> p1 text
<-- p2 text
FORM secondary_list.
perform get_data1.
perform build-fieldcatalog1.
perform modify-fieldcatalog1.
perform build-events1.
perform modify-events1.
perform set-layout.
perform set-pfstatus.
perform list-display1.
ENDFORM. " secondary_list
*& Form build-fieldcatalog1
text
--> p1 text
<-- p2 text
FORM build-fieldcatalog1.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = v_repid
i_internal_tabname = 'ITAB1'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
changing
ct_fieldcat = it_fldcats1
exceptions
inconsistent_interface = 1
program_error = 2
others = 3
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. " build-fieldcatalog1
*& Form modify-fieldcatalog1
text
--> p1 text
<-- p2 text
FORM modify-fieldcatalog1.
loop at it_fldcats into wa_fldcat.
case wa_fldcat-fieldname.
when 'VBELN'.
wa_fldcat-seltext_l = 'Delivary No.'.
wa_fldcat-col_pos = 1.
wa_fldcat-ddictxt = 'L'.
when 'POSNR'.
wa_fldcat-seltext_l = 'Item No'.
wa_fldcat-col_pos = 2.
wa_fldcat-ddictxt = 'L'.
when 'MATNR'.
wa_fldcat-seltext_l = 'Material'.
wa_fldcat-col_pos = 3.
wa_fldcat-ddictxt = 'L'.
when 'LFIMG'.
wa_fldcat-seltext_l = 'Quantity'.
wa_fldcat-col_pos = 4.
wa_fldcat-ddictxt = 'L'.
when 'MEINS'.
wa_fldcat-seltext_l = 'Unit of Measure'.
wa_fldcat-col_pos = 5.
wa_fldcat-ddictxt = 'L'.
endcase.
modify it_fldcats from wa_fldcat.
endloop.
ENDFORM. " modify-fieldcatalog1
*& Form build-events1
text
--> p1 text
<-- p2 text
FORM build-events1.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = it_event1
EXCEPTIONS
LIST_TYPE_WRONG = 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. " build-events1
*& Form modify-events1
text
--> p1 text
<-- p2 text
FORM modify-events1.
read table it_event1 with key name =
slis_ev_top_of_page into wa_events.
if sy-subrc = 0.
wa_events-form = 'HEADER_OF_REPORT_2'.
modify it_event1 from wa_events index sy-tabix.
clear wa_events.
endif.
ENDFORM. " modify-events1
*& Form list-display1
text
--> p1 text
<-- p2 text
FORM list-display1.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME =
IS_LAYOUT = wa_layout
IT_FIELDCAT = it_fldcats1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = it_event1
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = itab1
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. " list-display1
*& Form get_data1
text
--> p1 text
<-- p2 text
FORM get_data1.
READ TABLE itab INDEX V_INDEX.
v_vbeln = itab-vbeln.
select vbeln
posnr
matnr
lfimg
meins
from lips
into table itab1
where vbeln eq v_vbeln.
ENDFORM. " get_data1
*& Form header_of_report_2
text
--> p1 text
<-- p2 text
FORM header_of_report_2.
write: 'Delivary item list'.
ENDFORM. " header_of_report_2
*-- callling a transaction code by passing the initial screen value.
*& Form USER_COMMAND
form user_command using p_ucomm like sy-ucomm
p_selfield type slis_selfield.
data : l_index like sy-index,
l_refbn like cooi-refbn.
l_index = p_selfield-tabindex. " holds the selected table index
clear l_refbn.
case p_ucomm.
when '&IC1'.
clear l_refbn.
read table it_outtab index l_index.
if sy-subrc eq 0.
l_refbn = it_outtab-refbn.
if not l_refbn is initial.
set parameter id 'BES' field l_refbn.
call transaction 'ME23' and skip first screen.
endif.
else.
message e999 with text-014.
endif.
endcase.
endif. -
Error in updating ALV field catalog in selection tool for Planning Book
Hi ,
I am Implementing BADI '/SAPAPO/SDP_SELECTOR' to upload Custom Fields Data in Planning Book Selection Window under APO Location Product. These Custom Fields are maintained in Custom Table.So from Table whatever Custom Fields are availabe all the fields needs to be available in for selection. Once selection is done the same data to be uploaded into Planning Book.
This BADI is working Fine upto 4 fields but if any extra fields are added in the table 'Error in updating ALV field catalog in selection tool' error Pop Up is coming. Here i am using Folloowing Methods
1). INIT_OBJECT_LIST
2). F4
3). LOC_PROD_VALUE_LIST
Please help on the same if u have any idea or clue.
Thanks.Hi Srinivas!
Where did you get your implementation from?
It would be nice if you could debug your code!
For the F4 method, have you seen this note?
Note 544904 - Sample source code f.BAdI /SAPAPO/SDP_SELECTOR ('F4'method)
Also check this note. It contains selection modifications in the BAdI:
Note 376902 - SDP selector: Basis corrections for BADI
I do not know your release and support package in your SCM, but you can find a lot of notes related to this BAdI.
Thank you!
Will
SCM Support Consultant -
Error in updating ALV field catalog in selection
Dear all,
I'm trying to use the standard transaction /SAPAPO/TSKEYFMAIN in order to check the TS values.
After filling the selection variant, the system shows the following error:
'Error in updating ALV field catalog in selection'
Could you please provide me with further details about the error? What could be the possible solution to avoid it?
Many thanks,
SMHi Marius,
thanks for your answer.
I would like to use the /SAPAPO/TSKEYFMAIN transaction to check massively the values in the time series KFs and not just the consistency of them.
So do you know any other transaction to do it or do you have an idea about the error of /SAPAPO/TSKEYFMAIN?
Thanks for your help!
SM -
Field Catalog Not Found in ALV
Hi Experts,
I am trying to exceute the below code its shows the Field CataLog Not Found
Code is:
TYPE-POOLS:slis.
TABLES:ekpo,mseg.
TYPES: BEGIN OF ty_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
END OF ty_ekpo.
TYPES: BEGIN OF ty_mseg,
ebeln TYPE mseg-ebeln,
ebelp TYPE mseg-ebelp,
matnr TYPE mseg-matnr,
menge TYPE mseg-menge,
bwart TYPE mseg-bwart,
END OF ty_mseg.
TYPES: BEGIN OF ty_final,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
qtysup TYPE MENGE_D,
qtyact TYPE MENGE_D,
qtyrej TYPE MENGE_D,
END OF ty_final.
DATA: it_mseg TYPE TABLE OF ty_mseg WITH HEADER LINE,
it_ekpo TYPE TABLE OF ty_ekpo WITH HEADER LINE,
it_final TYPE TABLE OF ty_final WITH HEADER LINE.
DATA: wa_fieldcat TYPE slis_fieldcat_alv,
it_fieldcat TYPE slis_t_fieldcat_alv.
DATA:wa_mseg LIKE LINE OF it_mseg,
wa_ekpo LIKE LINE OF it_ekpo ,
wa_final LIKE LINE OF it_final.
SELECT-OPTIONS: p_ebeln FOR ekpo-ebeln.
START-OF-SELECTION.
SELECT ebeln ebelp matnr menge FROM ekpo
INTO TABLE it_ekpo
WHERE ebeln IN p_ebeln.
IF it_ekpo[] IS NOT INITIAL.
SELECT ebeln ebelp matnr menge bwart FROM mseg
INTO TABLE it_mseg
FOR ALL ENTRIES IN it_ekpo[]
WHERE ebeln EQ it_ekpo-ebeln
AND ebelp EQ it_ekpo-ebelp
AND bwart EQ '122'.
ENDIF.
LOOP AT it_mseg .
READ TABLE it_ekpo WITH KEY ebeln = it_mseg-ebeln.
IF sy-subrc EQ 0.
it_final-qtyrej = it_mseg-menge.
it_final-qtysup = it_ekpo-menge.
it_final-ebeln = it_mseg-ebeln.
it_final-ebelp = it_mseg-ebelp.
ENDIF.
IF sy-subrc EQ 0.
it_final-qtyact = ( it_final-qtysup ) - ( it_final-qtyrej ).
ENDIF.
APPEND it_final.
ENDLOOP.
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-tabname = 'IT_FINAL'.
wa_fieldcat-seltext_l = 'Purchase Doc'.
wa_fieldcat-seltext_m = wa_fieldcat-seltext_l.
wa_fieldcat-seltext_s = wa_fieldcat-seltext_l.
wa_fieldcat-col_pos = 1.
wa_fieldcat-outputlen = 10.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'EBELP'.
wa_fieldcat-tabname = 'IT_FINAL'.
wa_fieldcat-seltext_l = 'Item'.
wa_fieldcat-seltext_m = wa_fieldcat-seltext_l.
wa_fieldcat-seltext_s = wa_fieldcat-seltext_l.
wa_fieldcat-col_pos = 2.
wa_fieldcat-outputlen = 5.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'QTYSUP'.
wa_fieldcat-tabname = 'IT_FINAL'.
wa_fieldcat-seltext_l = 'QuatitySupply'.
wa_fieldcat-seltext_m = wa_fieldcat-seltext_l.
wa_fieldcat-seltext_s = wa_fieldcat-seltext_l.
wa_fieldcat-col_pos = 3.
wa_fieldcat-outputlen = 13.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'QTYACT'.
wa_fieldcat-tabname = 'IT_FINAL'.
wa_fieldcat-seltext_l = 'QualityAccepted'.
wa_fieldcat-seltext_m = wa_fieldcat-seltext_l.
wa_fieldcat-seltext_s = wa_fieldcat-seltext_l.
wa_fieldcat-col_pos = 4.
wa_fieldcat-outputlen = 13.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'QTYREJ'.
wa_fieldcat-tabname = 'IT_FINAL'.
wa_fieldcat-seltext_l = 'QualityRejected'.
wa_fieldcat-seltext_m = wa_fieldcat-seltext_l.
wa_fieldcat-seltext_s = wa_fieldcat-seltext_l.
wa_fieldcat-col_pos = 5.
wa_fieldcat-outputlen = 13.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
DATA: repid LIKE sy-repid.
repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
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.
Thanks In Advance
PoornaHi,
pass parametrs as it is given below...
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT =
IT_FIELDCAT = it_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
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.
Thanks & Regards
Ashu -
"Field Catalog not found" ...problem in ALV reporting !!
Hi,
When i execute my report program where in I generate a Selection screen, I am able to select the values in the selection screen. Once I click on the execute button I get the message
"Field Catalog not found"...
The elabore message is
"Field Catalog cannot be determined becaus the output table structure name was not specified"
Where am I wrong ??
Find below my code ...
*& Report Z_MIGO_TXJCD_REPORT
REPORT Z_MIGO_TXJCD_REPORT.
TYPE-POOLS: slis.
TABLES: makt,mseg,zmigo_extend,ttxj,mkpf.
DATA: BEGIN OF migo_data OCCURS 0,
matnr LIKE mseg-matnr,
werks LIKE mseg-werks,
lgpla LIKE mseg-lgpla,
bwart LIKE mseg-bwart,
menge LIKE mseg-menge,
dmbtr LIKE mseg-dmbtr,
budat LIKE mkpf-budat,
txjcd LIKE zmigo_extend-txjcd,
END OF migo_data.
DATA: it_cat TYPE slis_t_fieldcat_alv,
wa_lay TYPE slis_layout_alv.
FIELD-SYMBOLS: <fs_cat> LIKE LINE OF it_cat.
SELECT-OPTIONS: so_matnr FOR makt-matnr,
so_budat FOR mkpf-budat,
so_werks FOR mseg-werks,
so_lgpla FOR mseg-lgpla,
so_bwart FOR mseg-bwart,
so_txjcd FOR ttxj-txjcd.
START-OF-SELECTION.
SELECT amatnr awerks algpla abwart
amenge admbtr bbudat ctxjcd INTO TABLE
migo_data
FROM mseg AS a INNER JOIN mkpf AS b ON amblnr = bmblnr INNER JOIN
zmigo_extend AS c ON amblnr = cmblnr
WHERE a~matnr IN so_matnr
AND b~budat IN so_budat
AND a~werks IN so_werks
AND a~lgpla IN so_lgpla
AND a~bwart IN so_bwart
AND c~txjcd IN so_txjcd.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-cprog
i_internal_tabname = 'migo_data'
i_inclname = sy-cprog
CHANGING
ct_fieldcat = it_cat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
LOOP AT it_cat ASSIGNING <fs_cat>.
CLEAR <fs_cat>-key.
ENDLOOP.
wa_lay-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_grid_title = 'MIGO report with Tax Jurisdiction Code'
is_layout = wa_lay
it_fieldcat = it_cat
TABLES
t_outtab = migo_data
EXCEPTIONS
program_error = 1
OTHERS = 2.Give 'migo_data' in uppercase as ''MIGO_DATA'.
-
Error in field catalog in ALV grid display using classes at do_sum = "X'.
Hi,
I'm using classes in ALV Grid display.
the code for the field catalog is going to dump because of the statement in the field catalog for field 'netwr',do_sum = 'X'.
that do_sum = 'X' is not working and going to dump when executed.with out that do_sum it is working fine. the error in dump analysys is showing sap standard incude LSLVCF01.
assign component
<ls_fieldcat>-fieldname of structure rt_data to <g_field>.
if sy-subrc ne 0.
message x000(0k).
endif.
sy-subrc is 4 when the program is being executed.
CODE:
FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
ls_fcat-fieldname = 'VBELN1'.
ls_fcat-ref_field = 'VBELN'.
ls_fcat-ref_table = 'VBRK'.
ls_fcat-coltext = 'Invoice No'.
ls_fcat-seltext = 'Invoice No'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'BUDAT'.
ls_fcat-ref_table = 'BKPF'.
ls_fcat-coltext = 'Invoice Date'.
ls_fcat-seltext = 'Invoice Date'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'NETWR'.
ls_fcat-ref_field = 'NETWR'.
ls_fcat-ref_table = 'VBRK'.
ls_fcat-coltext = 'Value of Invoice'.
ls_fcat-seltext = 'Value of Invoice'.
ls_fcat-datatype = 'CURR'.
ls_fcat-do_sum = 'X'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
ENDFORM.
can u please look in the code and rectify the error,
would appeciate ur response.
regards,
veera.Hi,
try this..
ls_fcat-fieldname = 'NETWR'.
ls_fcat-ref_field = 'NETWR'.
ls_fcat-ref_table = 'VBRK'.
ls_fcat-coltext = 'Value of Invoice'.
ls_fcat-seltext = 'Value of Invoice'.
ls_fcat-datatype = 'CURR'.
ls_fcat-do_sum = 'X'.
<b>ls_fcat-cfieldname = 'WAERS'.</b>
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
Regards
vijay
Maybe you are looking for
-
I've never had a problem with Firefox before (although I've had trouble with flash player). When I was notified a few days ago that the upgrade to 3.6.11 was available I downloaded it, or thought I did. Now I recall seeing a message several times of
-
How to stop info and start loop over when file not found.
I have a program that I want to run in a loop as long as there are files in a certain dir. When all the files have been read they are moved to another dir. I want this program to have a continuous loop but when the "read characters from file.vi" is s
-
Hme0:DLPI link does not exist
hello guys, This is my first post in this forum....I've installed Solaris 10 recently in my ia64 pc. I've encountered a problem configuring my network to create a pppoe connection to my ISP. To add a network interface I issued the following command:
-
My company need to encrypt all the files on the server. This is due to client (government) requirements that we have to meet, as we hold personal data. I've looked at software like PGP Desktop and TrueCrypt, but they don't seem to offer much for netw
-
10.4.9 Update, Permissions repair, & Enterprise deployment
Greetings, I maintain 40 Macs in an advertising office, 12 are Mac Pros, the rest mostly G5s with a few late gen G4s doing various tasks. Using ARD I can push updates out usually fairly easily to all of them. But, in a case like this update, everywhe