Hi ,
At upgrade I changed a Z program ,instaead of ws_query putting CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_GET_CURRENTbut suddenly i am getting a dump.
please help ???
Below is the my code.
FORM GET_DIRECTORY.
get current directory
*Start of changes
CALL FUNCTION 'WS_QUERY'
EXPORTING
ENVIRONMENT = ' '
FILENAME =
QUERY = 'CD'
WINID = ' '
IMPORTING
RETURN = P_PATH
EXCEPTIONS
INV_QUERY = 1
NO_BATCH = 2
FRONTEND_ERROR = 3
OTHERS = 4.
DATA L_DIR TYPE STRING.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_GET_CURRENT
CHANGING
CURRENT_DIRECTORY = L_DIR
EXCEPTIONS
DIRECTORY_GET_CURRENT_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
others = 5.
P_PATH = L_DIR.
*End of changes
*check result
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E011(PC) WITH 'invalid name / directory not found'(006).
ENDIF.
ENDFORM. " GET_DIRECTORY
Dump details:
Dump:Runtime Errors SYSTEM_POINTER_PENDING
Short text:
Use of local result variables in a Control/Automation call.
Error analysis:
The use of a local variable to receive a return value in a call to a
control or automation server is not permitted.
For performance reasons calls to front-end components, such as controls,
are collected in a queue and are only transferred to the front-end for
processing at the so called flush. The processing of these calls to the
front-end takes place asynchronously to the calls in the ABAP code.
When local variables are used in calls to controls to receive return
values (for example, the ID of the selected node of a tree) it is
possible that the local variable will no longer exist at the time of the
flush. This makes the transfer of the return value to the variable
impossible.
It must be assumed that without the return value the processing cannot
be correctly carried out. As a precaution, further processing was
interrupted.
Check your application for local variables that should be used for the
return values of control/automation calls.
The variable used here points to the area "stack area" to the data object
"\PROGRAM=ZIDXML4X\FORM=GET_DIRECTORY\DATA=L_DIR".
Information on where terminated:::::::::::
Termination occurred in the ABAP program "ZIDXML4X" - in "GET_DIRECTORY".
The main program was "ZIDXML4X ".