2009 Jul 16 2:15 PM
Presently using EXIT_SAPLN1LO_001 for setting the clinical order position during release of services using NWP1. The Service details are fetched through n1vkg table and object lr_cordpos for clinical order position is created.
The method set_status is not working when used for setting the staus. Object lr_cordpos is defined as
lr_cordpos TYPE REF TO cl_ishmed_prereg
any idea do we have to call any other method before setting this status.
thanks
anya
2009 Jul 16 4:44 PM
Hi,
I think there is a (static) utility class with a method designed to perform this status change (from outside the CORDER dialog), CL_ISH_UTL_CORD=>CHANGE_STATE.
Example call:
CALL METHOD cl_ish_utl_cord=>change_state
EXPORTING
ir_cordpos = lr_cordpos
* I_VKGID =
i_target_state = l_target_state
ir_environment = lr_environment
IMPORTING
e_rc = l_rc
CHANGING
cr_errorhandler = p_errorhandler.
hope it helps, anton
2009 Jul 31 9:20 AM
Hi,
in my opinion, since you are using a preregistration object method that change the status from outside of the clinical order, may be you has to use the save method af the same class.
I think you are changing the status only in the ABAP memory, not saving it to DB.
This method works fine when calling it inside of the clinical order process screen (N1_CORDER_CHECK, N1_CORDER_PREALLOC, N1_CORDER_USER_COMM, ...), because at the end of the process, the save global method is calling all save methods of involved classes.
Best Regards
2009 Aug 03 10:22 AM
Hi all,
thanks for ur suggestions. But the method set-status or change_state doesn't work. Finally used FM
CALL FUNCTION 'STATUS_CHANGE_EXTERN' which worked and status was updated.
thanks
anya
2009 Aug 03 10:52 AM
>
> Hi all,
>
> thanks for ur suggestions. But the method set-status or change_state doesn't work. Finally used FM
>
> CALL FUNCTION 'STATUS_CHANGE_EXTERN' which worked and status was updated.
>
> thanks
> anya
Hi,
IMHO this is a bad solution because it manipulates the status object itself but bypasses all clinical order specific checks and procedures, e.g. order components' business methods bound to a status change, status dependent checks on a field level, etc. actually, it potentially leaves the clinical order item (position) in an inconsistent state.
the static utility classes mentioned above work outside the clinical order process (if they don't, you should file an OSS message). they don't work within the dialog based clinical order process (e.g. in a clinical order BAdI)
kind regards, anton
2009 Aug 03 12:08 PM
Hi all,
thanks for ur suggestions. But the method set-status or change_state doesn't work. Finally used FM
CALL FUNCTION 'STATUS_CHANGE_EXTERN' which worked and status was updated.
thanks
anya
2009 Aug 04 5:42 AM
Hi Anton,
thanks a lot for ur informative suggestion. Will take of this point.
By mistake my reply was posted twice.
Thanks a lot once again.
anya