09-29-2008 3:09 PM
Hi,
I have a problem at the background execution of my program. I have this error : "OBJECTS_OBJREF_NOT_ASSIGNED"
Information on where terminated
Termination occurred in the ABAP program "SAPLCNDP" - in
"DP_CONTROL_ASSIGN_TABLE".
The main program was "ZFI__SAPHIR_ES_SPLIT_TRIP_HEAD ".
In the source code you have the termination point in line 1
of the (Include) program "LCNDPU10".
The program "SAPLCNDP" was started as a background job.
Job Name....... "ZFI__SAPHIR_ES_SPLIT_TRIP_HEAD"
Job Initiator.. "COULOUMIESXA"
Job Number..... 15580300
Source Code Extract
Line SourceCde
>>>>> FUNCTION DP_CONTROL_ASSIGN_TABLE.
2 *"----
3 ""Lokale Schnittstelle:
4 *" IMPORTING
5 *" REFERENCE(H_DP) TYPE CNTL_HANDLE OPTIONAL
6 *" REFERENCE(H_CNTL) TYPE CNTL_HANDLE
7 *" VALUE(TABNAME) LIKE X030L-TABNAME OPTIONAL
8 *" VALUE(MEDIUM) TYPE C OPTIONAL
9 *" VALUE(PROPERTYNAME) TYPE C
10 *" VALUE(DATE) LIKE SY-DATUM OPTIONAL
11 *" VALUE(TIME) LIKE SY-UZEIT OPTIONAL
12 *" VALUE(DESCRIPTION) TYPE C OPTIONAL
13 *" TABLES
14 *" DATA
15 *" TABFIELDS STRUCTURE RFC_FIELDS OPTIONAL
16 *" COLUMNS_TO_STRETCH TYPE TABLE_OF_STRINGS OPTIONAL
17 *" EXCEPTIONS
18 *" DP_ERROR_CREATE
19 *" DP_ERROR_SEND_DATA
20 *" DP_ERROR_ASSIGN
Active Calls/Events
No. Ty. Program Include Line
Name
6 FUNCTION SAPLCNDP LCNDPU10 1
DP_CONTROL_ASSIGN_TABLE
5 METHOD CL_GUI_FRONTEND_SERVICES======CP CL_GUI_FRONTEND_SERVICES======CM007 63
CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
4 FORM ZFI__SAPHIR_ES_SPLIT_TRIP_HEAD ZFI__SAPHIR_ES_SPLIT_INTERFACE 141
DIRECTORY_LIST_FILES
3 FORM ZFI__SAPHIR_ES_SPLIT_TRIP_HEAD ZFI__SAPHIR_ES_SPLIT_TRIP_HEAD 165
%_SEL_SCREEN
2 MODULE (PAI) ZFI__SAPHIR_ES_SPLIT_TRIP_HEAD ZFI__SAPHIR_ES_SPLIT_TRIP_HEAD 805
%_END_OF_SCREEN
1 EVENT ZFI__SAPHIR_ES_SPLIT_TRIP_HEAD <SYSINI> 20
SYSTEM-EXIT
Thanks for help.
09-29-2008 3:14 PM
Frontend services will fail in Background, because of that you are getting the error in background.
09-29-2008 3:34 PM
You say that I can't use cl_gui_frontend_services method?? I use this metho (upload_file, download_file, delete_file...) for my program. It's mandatory!
09-29-2008 3:40 PM
then you may have to work with application server files(open dataset , Close dataset, Transfer, Read ) not the Presentation server files. Those methods will fail in background.
There is a document using using the approach you can try , but that is lengthy approach. check it here..
09-29-2008 4:02 PM
I don't understand your approach... Can I use frontend services methods? I don't use Open dataset, Transfer or Read! I used upload_file, download_file, directory_list_files, file_copy, file_delete methods...
09-29-2008 4:03 PM
>Can I use frontend services methods?
No in Background processing
if you still want to use then try the approach mentioned here..
Edited by: Vijay Babu Dudla on Sep 29, 2008 11:03 AM
09-30-2008 8:02 AM
In fact, I need, in my program, to create a filter to retrieve several files in a directory. So, with CL_GUI_FRONTEND_SERVICES, I used directory_list_files method. But, as you say, this method failed in background. So, my question is, how retrieve files name selected by the filter (ex : *.txt)?
09-30-2008 9:51 AM
How do I retrieve a file list in background without use directory_file_list method?? I try this code of the RSWATCH0 program:
CALL 'C_DIR_READ_START' ID 'DIR' FIELD a_dir_name
ID 'FILE' FIELD a_generic_name
ID 'ERRNO' FIELD file-errno
ID 'ERRMSG' FIELD file-errmsg.
DO.
CLEAR file.
CALL 'C_DIR_READ_NEXT'
ID 'TYPE' FIELD file-type
ID 'NAME' FIELD file-name
ID 'LEN' FIELD file-len
ID 'OWNER' FIELD file-owner
ID 'MTIME' FIELD file-mtime
ID 'MODE' FIELD file-mode
ID 'ERRNO' FIELD file-errno
ID 'ERRMSG' FIELD file-errmsg.
ENDDO.
But, I retrieve files of SAP server random... I don't retrieve my files!
09-30-2008 9:53 AM
I don't think you can do that. There is no straight forward solution to it. did you read the article mentioned above.
09-30-2008 10:41 AM
I try your solution but, it don't work! The function RFC_REMOTE_FILE doesn't exist, there isn't destination server and in input, there is a file but I need a directory in input...