Application Development and Automation 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: 
Read only

runtimr error OBJECTS_OBJREF_NOT_ASSIGNED when i schedule pgm in back grd

Former Member
0 Likes
2,394

Hi All

when I schedule any BDC pgm in Background by giving job name in SM36 .

It is giving an runtimr error OBJECTS_OBJREF_NOT_ASSIGNED and Exception CX_SY_REF_IS_INITIAL .

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not

caught in

procedure "C14T_LISTTOOL_CALL_ALV_GRID" "(FUNCTION)", 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:

You attempted to use a 'NULL' object reference (points to 'nothing')

access a component (variable: "GRID1").

An object reference must point to an object (an instance of a class)

before it can be used to access components.

Either the reference was never set or it was set to 'NULL' using the

CLEAR statement.

But it is working fine when i running with options 'N' & 'A' in call transaction. when i execute I'm searching for sap note but not able to find it,

If any one can solve this issue please ...

Hi All

when I schedule any BDC pgm in Background by giving job name in SM36 .

It is giving an runtimr error OBJECTS_OBJREF_NOT_ASSIGNED and Exception CX_SY_REF_IS_INITIAL .

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not

caught in

procedure "C14T_LISTTOOL_CALL_ALV_GRID" "(FUNCTION)", 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:

You attempted to use a 'NULL' object reference (points to 'nothing')

access a component (variable: "GRID1").

An object reference must point to an object (an instance of a class)

before it can be used to access components.

Either the reference was never set or it was set to 'NULL' using the

CLEAR statement.

But it is working fine when i running with options 'N' & 'A' in call transaction. when i execute I'm searching for sap note but not able to find it,

If any one can solve this issue please ...

10 REPLIES 10
Read only

Former Member
0 Likes
1,734

Hi,

Looks like the program is not optimised to run on background. You should not use aby GUI related classes/functions/controls in the program if you indent it to run on background.

This usually happens when you use a custom container to display ALV in the program. If it is the case change it to docking container.

Regards,

Karthik D

Read only

0 Likes
1,734

Hi Karthik,

We are not using any alv in the program, Through Call transaction we are calling CVD1 transaction to deleted rejected report shippings it was working fine in sap 4.7 version after upgradation to sap ECC6.0 we are getting this error in standard program, im not able to find any sapnote related to these issue

Read only

surajarafath
Contributor
0 Likes
1,734

I know this Problem, if you can elaborate more your code. It can be solved.

Anyway.

Try with this System Variable

SY-BATCH

if sy-batch eq 'X' then it is running in background

..

While running in background your report execution is missing some declaration

or Create object statement.

hope it will help your problem.

reply if not.

Thanks

Playsuji.

Read only

0 Likes
1,734

Play suji,

In EHS there is one transaction called CVD1, this program closes rejected report shippings thru call transaction previously this program was working fine with 4.7 version recently sap version upgrade has taken place recent version is ECC6.0, the error is occuring in standard program while calling the call transaction for tcode CVD1.

for your reference see the below code

PERFORM bdc_dynpro USING 'SAPLCVDA' '1010'.

PERFORM bdc_field USING 'BDC_CURSOR'

'CVDDISTSEL-DDOID'.

PERFORM bdc_field USING 'BDC_OKCODE' '=ECLR'.

PERFORM bdc_dynpro USING 'SAPLCVDA' '1010'.

PERFORM bdc_field USING 'BDC_CURSOR'

'CVDDISTSEL-CRDAT_FROM'.

PERFORM bdc_field USING 'CVDDISTSEL-CRDAT_FROM' '01011900'.

PERFORM bdc_field USING 'CVDDISTSEL-CRTIM_FROM' '00:00:00'.

IF i_cvddh-ddpid IS INITIAL AND

NOT i_cvddh-ddoid IS INITIAL.

v_char_20 = i_cvddh-ddoid.

PERFORM bdc_field USING 'CVDDISTSEL-DDOID' v_char_20.

PERFORM bdc_field USING 'BDC_OKCODE' '=STAT'.

PERFORM bdc_dynpro USING 'SAPLC14L' '8010'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RCGRSTIOT-MARKFLG(11)'.

PERFORM bdc_field USING 'BDC_OKCODE' '=GBCK'.

PERFORM bdc_field USING 'RCGRSTIOT-MARKFLG(11)' 'X'.

PERFORM bdc_dynpro USING 'SAPLCVDA' '1010'.

PERFORM bdc_field USING 'BDC_CURSOR' 'CVDDISTSEL-CRDAT_FROM'.

PERFORM bdc_field USING 'BDC_OKCODE' '=GRSL'.

ELSE.

PERFORM bdc_field USING 'BDC_OKCODE' '=GRSL'.

v_char_20 = i_cvddh-ddpid.

PERFORM bdc_field USING 'CVDDISTSEL-DDPID' v_char_20.

PERFORM bdc_field USING 'CVDDISTSEL-DDOID' '0'."JGB SIR-72045

ENDIF.

PERFORM bdc_field USING 'CVDDISTSEL-CRDAT_TO' '01013000'.

PERFORM bdc_field USING 'CVDDISTSEL-CRTIM_TO' '23:59:59'.

PERFORM bdc_dynpro USING 'SAPLCVDB' '1020'.

PERFORM bdc_field USING 'BDC_OKCODE' '==ESAL'.

PERFORM bdc_dynpro USING 'SAPLCVDB' '1020'.

PERFORM bdc_field USING 'BDC_OKCODE' '=EDEL'.

PERFORM bdc_dynpro USING 'SAPLSPO1' '0100'.

PERFORM bdc_field USING 'BDC_OKCODE' '=YES'.

PERFORM bdc_dynpro USING 'SAPLCVDB' '1020'.

PERFORM bdc_field USING 'BDC_OKCODE' '=OSAV'.

REFRESH MESSTAB.

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB.

Read only

0 Likes
1,734

If i am right, you are scheduling the Job in SM36 by giving the Job name and other things with this BDC Report ID along with Parameters/Variants to pass it. Then it fail to run in background but working fine when you directly execute tthe Report.

With your Dump it is clear that Refernce object is not instantiated, A reference is declared and it is accessed without Creating a Object or else It is empty.

Analyse the dump in ST22 (or in table SNAP - Runtime error table ) by in which line exactly it happens, then proceed. Then Post what happens.

Read only

Former Member
0 Likes
1,734

Find out SNOTE correction for the same as it is BASIS issue.

Thanks

Srimanta

Read only

0 Likes
1,734

Hi Srimanta,

Im not able to find snote related to this issue

Read only

deepak_dhamat
Active Contributor
0 Likes
1,734

HI ,

Check these notes :Note 1318988 - WD ABAP ALV CL_SALV_WD_DATA_TABL OBJECTS_OBJREF_NOT_ASSIGNED

Note 1319829 - WDA: Dump in method CL_WDR_CONTEXT_NODE_MAP->is_alive

regards

Deepak.

Edited by: Deepak Dhamat on Oct 21, 2011 8:02 AM

Read only

0 Likes
1,734

Hi,

It seems Basis related issue. I have tried to find note on this issue and find below. Please check if it helps to you.

1646841


Thanks
Kiran

Read only

0 Likes
1,734

Hi experts,

Can any body hlep me to find the latest note to implement. for the issue

Thanks in advance

Bhaskar N