11-02-2009 11:52 AM
Hi all,
I need to change the status (N1CORDER-WLSTA) of the clinical order header. I have found the way to change the status of the items and it works, but i dont know how to change the header status.
Now, for the items i do:
1- Create an object type cl_ishmed_prereg
2- Load the item (n1vkg-vkgid)
3- Use set_status method
4- Save the object
5- Commit work
So, do you know how i can change the status of the header? Im looking for other methods but...
Thanks,
Manel
11-03-2009 10:39 AM
In order to change the clinic order header status u have to:
1- Obtain the instance from item instance:
CALL METHOD lv_prereg->get_corder
IMPORTING
er_corder = lv_corder
e_rc = rc.
2- Create a var type rn1_corder_x
3- Modify:
is_n1corder_x-wlsta = 'RE'. " new status
is_n1corder_x-wlsta_x = 'X'.
4- Use change mehod:
CALL METHOD lv_corder->change
EXPORTING
is_corder_x = is_n1corder_x
IMPORTING
e_rc = rc
CHANGING
cr_errorhandler = cl_error.
5- Save:
CALL METHOD lv_corder->if_ish_objectbase~save
6- Commit work
Regards,
Manel
11-14-2014 6:34 PM
hello, Manel,
can you please give me some example code to change a line-item status after creating a visit for an item?.
kind regards,