Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Document Linkage for Opportunity.

$
0
0

Hello Experts,

 

 

In opportunity we have one of the assignment block which tells about the Documents (Quotations) linked to the Opportunities (I.E the Follow up quotations created from this opportunity).

 

Currently this Document Flow assignment block is showing up all the Quotation which were created from this Opportunity.  There is one status for which the document should not be showed on the UI (But technically it will remain as linked to the Opportunity in the back end).

 

So I looped into documents something like this below and tried to delete from the UI Screen . But the moment I saved the Opportunity , it deleted that Linked Quotation from the Backend also (I mean it deleted the linkage) as  i m deleting from the collection wrapper.

 

********************************************************************************************

    lr_btdocflow ?= me->typed_context->btdocflow->collection_wrapper->get_first( ).

WHILE lr_btdocflow IS BOUND.
*** Get the Quotation numnber
lr_btdocflow
->if_bol_bo_property_access~get_property_as_value(
EXPORTING
iv_attr_name
=     'OBJKEY_B'" Component Name
IMPORTING
ev_result   
=    lv_vbeln Quotation number
).
IF lv_vbeln IS NOT INITIAL.

 

*** Get the status of the Quote – if the status is XXXXXXXX then LV_FLAG will be abap_true.
ztools
=>get_document_status(
EXPORTING
iv_vbeln
=     lv_vbeln" Sales and Distribution Document Number
IMPORTING
ex_flag 
=     lv_flag" Single-Character Flag
).
ENDIF.

*** Delete the Document from the Collection
*      IF lv_flag IS NOT INITIAL.
*        lr_btdocflow->delete( ). This Completely Deleted the Document from the Backend also
*      ENDIF.
lr_btdocflow ?= me
->typed_context->btdocflow->collection_wrapper->get_next( ).
ENDWHILE.
ENDIF.

 


So How should i filter this in UI. Please suggest.

 


Thanks and Regards,

Nikhil Kulkarni


Viewing all articles
Browse latest Browse all 7775

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>