09-22-2008 5:42 AM
Hello abap Gurus,
My Zdevelopment reports shows the runtime errors due to
changes in this function module :-
ZCFM_HIDE_INITIALFIELD_ALV
So anybody pls. suggest me what i can do for this.I m attaching the coding also.
FUNCTION ZCFM_HIDE_INITIALFIELD_ALV.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(STRUC)
*" REFERENCE(FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV
*" REFERENCE(HIDE) OPTIONAL
*" EXPORTING
*" REFERENCE(FIELDCAT_E) TYPE SLIS_T_FIELDCAT_ALV
*" TABLES
*" IT_TAB
*" IT_TAB1
*"----
DATA S_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
FIELD-SYMBOLS <F1>.
FIELD-SYMBOLS <F2>.
DATA FIELDNAME(30).
DATA VALUE(100).
DATA : BEGIN OF DISPLAY OCCURS 0,
FIELDNAME LIKE DD03L-FIELDNAME,
END OF DISPLAY.
LOOP AT IT_TAB.
DO .
READ TABLE FIELDCAT INDEX SY-INDEX
INTO S_FIELDCAT.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
ASSIGN SY-INDEX OF STRUCTURE IT_TAB1 TO <F1>.
CONCATENATE 'IT_TAB-' S_FIELDCAT-FIELDNAME INTO
FIELDNAME.
ASSIGN (FIELDNAME) TO <F1>.
IF NOT <F1> IS INITIAL.
DISPLAY-FIELDNAME = S_FIELDCAT-FIELDNAME.
COLLECT DISPLAY.
ENDIF.
ENDDO.
ENDLOOP.
FIELDCAT_E = FIELDCAT.
LOOP AT FIELDCAT_E INTO S_FIELDCAT .
READ TABLE DISPLAY WITH KEY FIELDNAME = S_FIELDCAT-FIELDNAME.
IF SY-SUBRC NE 0.
IF HIDE IS INITIAL.
DELETE FIELDCAT_E.
ELSE.
S_FIELDCAT-NO_OUT = 'X'.
CLEAR S_FIELDCAT-KEY .
MODIFY FIELDCAT_E FROM S_FIELDCAT TRANSPORTING NO_OUT
KEY.
ENDIF.
ENDIF.
ENDLOOP.
endfunction.
09-22-2008 6:05 AM
Hi..,
What are runtime errors you are getting?
And which part of above function module modifed? Interface or source code?
Get back with error datails, b'coz hard to analyze issue with given information...!!!
Thanks,
Naveen Inuganti.
09-22-2008 7:58 AM
This is all about the runtime error :-
Incorrect parameter with CALL FUNCTION
Error analysis :-
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was
not caught in
procedure "HIDE_FIELDS" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
When calling the function module "ZCFM_HIDE_INITIALFIELD_ALV", one of the
parameters
needed according to the interface description was not specified.
This parameter was "IT_TAB1".
I am not changing the function module, my couligue has change this he leave it & he doesn't tel to me. So pls. give some sol. to me.
Thanks,
Sumit.
09-22-2008 10:12 AM
Hi,
Through out the code I could see that internal table IT_ITAB1 is not used anywhere in the program. I feel instead of removing internal table IT_ITAB1 from declaration, open function module ZCFM_HIDE_INITIALFIELD_ALV in SE37 -> go to Tables tab and select optional check box against internal table IT_ITAB1 and activate it.
Reply back if it doesn't work.
Regards,
Venkat
09-23-2008 6:44 AM
09-23-2008 10:16 AM
Also, for your future reference, use transaction ST22 where you can understand the reason of why run time error occured.
You can yourself zero it down.
Regards
Ashish.
09-30-2008 8:00 AM