cancel
Showing results for 
Search instead for 
Did you mean: 

Getting dump after upgrade for my Z program

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

answered

Former Member
0 Kudos

>

> answered

thats all?

not even a "thank you" ?

wonder where you are from...

former_member198900
Participant
0 Kudos

Same problem here & Same Solution. I am thanking you....

LOT OF THANKS MAN & SALUTE you.

Rupom

ayyappan_venugopal2
Participant
0 Kudos

Hi Atiul,

I am also facing same error while i tried make the file read only.

how can i declare a global variable outside the form incase of implicit enhancement .

Thanks & Regards

Ayyappan.V

Former Member
0 Kudos

Hi subhasis,

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

You have to declare field L_DIR as global variable (outside the form)

Regards

REA

Madhurivs23
Participant
0 Kudos

Hello Ramy,

In my case, I have declared the variable as global. Still I am getting the same error. Will you please help me? Here is my code:

call method CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY

             changing    TEMP_DIR             = W_TMP_FOLDER

             exceptions  CNTL_ERROR           = 1

                         ERROR_NO_GUI         = 2

                         NOT_SUPPORTED_BY_GUI = 3

                         OTHERS               = 4

                   .

           if SY-SUBRC <> 0.

*           message ID SY-MSGID type SY-MSGTY number SY-MSGNO

*                  with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

           else.

           endif.



And the error is :

its giving question mark after data



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=/INTALEC/CLIENT_AND_MAT_V2\CLASS=LCL_APPLICATION\METHOD=HANDLE_CHECKB              
    OX_CHANGE\DATA=???".