on ‎2011 Feb 02 10:18 PM
Hi Gurus,
I have to add some logic in a post-exit for Modify View event in the History WDA-Component (the one used in Tracking and Related Document Tabs).
How can I get the current document number (guid or object id) in a proper way from this event? New logic will be used only for SCs and RFxs so I could use the first element for the main context node (i.e. SC) but this is not a good approach at all for Bid Invitations...
I also managed to get it from the FPM-IDR Application Title. This could be a workaround, but unfortunately the object id is not displayed in the title when the SC/RFx is being created :S.
Debugging I can see that this kind of data usually comes from Mapper Classes which actually make use of PDO classes. I have been also trying the Task Containner Class but, same as using the FPM-IDR Title, guid and object-id is not informed when creating objects :(.
I suppose that it should be retrieved in a very easy and simple way.
On the other hand, is there any valuable documentation regarding SRM Mappers PDO etc? Even a high level overview of the whole architecture would be helpful.
Any help would be really apretiated!
Thanks in advance and regards
Vicente
Request clarification before answering.
I think you can get the current document's GUID from context node "MAIN_HISTORY" and attribute "P_GUID".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This was the first attemp.
The problem here is that this node has n multiplicity and there are more than one element for such node. Hence, I tried to get element by index 1. This element corresponds to the first row displayed in the output table (in the related docs/tracking tab) and it is indeed the SC line (even when displaying the RFx).
Customer assumptions state that only one RFx can be linked to a SC. If this assumption were true, everithing would be working as intended (I could get the only RFx linked to the SC by using the header guid just retrieved). The problem is that sometimes Bids are cancelled and new ones are created and linked to the same SC ==> It is not posible to determine the concrete RFx using the 'parent' SC guid :S.
Code below almost work! but it retrieves an empty value when the SC/RFX are just being created :(.
DATA : lo_task_container TYPE REF TO /sapsrm/if_cll_task_container.
lo_task_container = /sapsrm/cl_ch_wd_taskcont_fact=>get_task_container_instance( ).
IF lo_task_container IS BOUND.
DATA lv_bo_guid TYPE BBP_GUID.
CLEAR lv_bo_guid.
CALL METHOD lo_task_container->get_bo_guid
receiving
rv_bo_guid = lv_bo_guid
.
ENDIF.
I cannot believe that something so easy could become so so dificult! Probably I am missing some stupid thing :S.
Thanks for your inputs and regards
Vicenet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.