09-12-2014 5:24 PM
Hello.
I have a following problem: I have an OSS note (opened in transaction SNOTE) and in the left tree I have a couple of correction instructions. I have multiple of them because the correction is relevant to multiple releases. The note is "implementable".
Then I have a class CL_CWB_NOTE which is the main object behind SNOTE.
I would like to be able to say which of the correction instructions that I can get from CL_CWB_NOTE class or function module SCWB_NOTE_READ (read OSS note) or SCWB_CINST_READ (read correction instruction) are relevant for my release.
Of course I could invent something on my own but it's obviously the wrong thing to do. Can someone help me find the method or function that would tell me if a correction instruction is relevant for my release?
Thank you, regards Otto
09-12-2014 8:33 PM
Hi,
On 702 it looks like SCWB_NOTE_IMPL_STATUS may be the best bet, but it is not as simple as relevant or not:
REPORT zjbtst33.
DATA: go_note TYPE REF TO cl_cwb_note .
DATA: gs_note_key TYPE cwbntkeyvs .
DATA: g_status TYPE cwbprstat .
DATA: gt_to_be_implemented TYPE bcwbn_corr_instructions .
DATA: gt_to_be_deimplemented TYPE bcwbn_corr_instructions.
DATA: gt_to_be_reset_to_original TYPE bcwbn_corr_instructions.
gs_note_key-numm = '1757949' .
go_note = cl_cwb_note=>create( is_note_key = gs_note_key ) .
CALL FUNCTION 'SCWB_NOTE_IMPL_STATUS'
EXPORTING
* iv_update_note = 'X'
is_note = go_note->as_note
IMPORTING
ev_status = g_status
et_to_be_implemented = gt_to_be_implemented
et_to_be_deimplemented = gt_to_be_deimplemented
et_to_be_reset_to_original = gt_to_be_reset_to_original
EXCEPTIONS
note_not_found = 1
inconsistent_delivery_data = 2
undefined_component_state = 3
incomplete_note_data = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
cheers
Jānis
09-12-2014 8:33 PM
Hi,
On 702 it looks like SCWB_NOTE_IMPL_STATUS may be the best bet, but it is not as simple as relevant or not:
REPORT zjbtst33.
DATA: go_note TYPE REF TO cl_cwb_note .
DATA: gs_note_key TYPE cwbntkeyvs .
DATA: g_status TYPE cwbprstat .
DATA: gt_to_be_implemented TYPE bcwbn_corr_instructions .
DATA: gt_to_be_deimplemented TYPE bcwbn_corr_instructions.
DATA: gt_to_be_reset_to_original TYPE bcwbn_corr_instructions.
gs_note_key-numm = '1757949' .
go_note = cl_cwb_note=>create( is_note_key = gs_note_key ) .
CALL FUNCTION 'SCWB_NOTE_IMPL_STATUS'
EXPORTING
* iv_update_note = 'X'
is_note = go_note->as_note
IMPORTING
ev_status = g_status
et_to_be_implemented = gt_to_be_implemented
et_to_be_deimplemented = gt_to_be_deimplemented
et_to_be_reset_to_original = gt_to_be_reset_to_original
EXCEPTIONS
note_not_found = 1
inconsistent_delivery_data = 2
undefined_component_state = 3
incomplete_note_data = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
cheers
Jānis
09-12-2014 10:34 PM
Thank you, you've nailed it!
I saw the function module but the name sounded a bit misleading that I thought it would be the status for the whole note. I didn't go checking the parameters so didn't see the correction level there.
Thanks again
cheers Otto