Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

OBJECTS_OBJREF_NOT_ASSIGNED error in a background execution

Former Member
0 Kudos

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.

9 REPLIES 9

former_member188685
Active Contributor
0 Kudos

Frontend services will fail in Background, because of that you are getting the error in background.

Former Member
0 Kudos

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!

0 Kudos

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

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb...

Former Member
0 Kudos

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

0 Kudos

>Can I use frontend services methods?

No in Background processing

if you still want to use then try the approach mentioned here..

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb...

Edited by: Vijay Babu Dudla on Sep 29, 2008 11:03 AM

Former Member
0 Kudos

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)?

Former Member
0 Kudos

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!

0 Kudos

I don't think you can do that. There is no straight forward solution to it. did you read the article mentioned above.

Former Member
0 Kudos

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