cancel
Showing results for 
Search instead for 
Did you mean: 

OBJECTS_OBJREF_NOT_ASSIGNED_NO working on SOCO_GAF Webdynpro

matteo_montalto
Contributor
0 Kudos

Hello gurus,

I'm dealing on a task on the socoGAF web dynpro in SRM 7.0.

Basically; once I pass from step1 to step2 (each step is represented by a web dynpro, say GAF1 and GAF2), I have to get a mapper reference for each wd.

A sketch of code will help understanding the task: on a PROCESS_EVENT override on the componentcontroller of the GAF1, I wrote:

DATA: soco           TYPE REF TO /sapsrm/cl_ch_wd_ao_soco.
    DATA: gaf1           TYPE REF TO /sapsrm/if_cll_dom_soco_gaf1.
    DATA: gaf2           TYPE REF TO /sapsrm/if_cll_dom_soco_gaf2.

    soco ?= wd_this->ig_componentcontroller~mo_aom_soco.

    CALL METHOD soco->/sapsrm/if_cll_ao_soco~get_dom_soco_gaf1
      RECEIVING
        ro_dom_soco_gaf1 = gaf1.

This returns correctly the gaf1 reference, as by construction, gaf1 always exists and the method correctly works on it.

The problem arises with the next instruction, as similarly, I have to get a reference for gaf2 but this one could also be initial:

TRY.
      CALL METHOD soco->/sapsrm/if_cll_ao_soco~get_dom_soco_gaf2
        RECEIVING
          ro_dom_soco_gaf2 = gaf2.
      catch CX_SY_REF_IS_INITIAL into OREF.
    ENDTRY.

The above sketch does not work if gaf2 is initial, as the system dumps with the exception CX_SY_REF_IS_INITIAL. I tried, as you can see, a TRY/CATCH statement but it seems it doesn't work.

The task is however as follows:

- if gaf2 exists, take its reference and launch a pair of methods on it;

- if gaf2 does not exist (because it hasn't been instanciated yet), skip the above described lauch and proceed.

Obviously, gaf1, gaf2, gaf3 and gaf4 are private in soco, so that they could be accessed only via methods offered by SOCO object.

Any help will be appreciated.

Thanks

EDIT: I could also consider a workaroud as the aim of this task is to get all the item position which passes from STEP1 to STEP2. This seems not to be easy, though. As far as I understood, I can easily get:

- the items resulting from the search process in step 1;

- the items in step1 which have not been selected to pass to step 2;

The delta should represent my desiderata... But in a real scenario, an user could even pass some items one by one, so the missing information for me is: which item positions are eventually already in step2's workarea?

Sound a bit tricky, but it's the only solution that seems easily feasible as I don't know how to get, in the PROCESS_EVENT method in componentcontroller, all the item positions which are passing from step1 to step2.

Could anyone please provide me an hint/suggestion on how to proceed? Thanks in advance.

Edited by: Matteo Montalto on Nov 8, 2011 10:30 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

matteo_montalto
Contributor
0 Kudos

Solved with a workaround