cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if the SC triggered from SOCO

channu_s
Participant
0 Kudos

Hi All,

Need a help on below requirement.

Scenario :  Buyer editing the Shopping Cart custom field  'X' from SOCO.

Requirement : The custom field 'X' should be editable on the Shopping Cart ,only if its Shopping Cart is triggered from SOCO by Buyer .

Issue : To achieve above requirement , we are using Dynamic Class and Method concept of SRM MDF , but we are not able to differentiate between when buyer open the Shopping Cart from SOCO and when the Buyer open the Shopping Cart from other places.

    So basically we are not able to get how to identify if the Shopping Cart is triggered from SOCO ? . Can anyone help us on this.

Thanks

Channa

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Channappa,

Usually if shopping cart is in SOCO, the field SOURCE_REL_IND will be 'X'. . So in the dynamic class, before setting to editable, you can try to check if the line-item of shopping cart has SOURCE_REL_IND as  "X", this means that the cart is in SOCO and we can try to set the field to editable.

However if its not relevant for sourcing, then the above field will be blank and we can disable the custom field for editing. Sorry if I am wrong.

Thanks and Regards,

  Harinadh

vinita_kasliwal
Active Contributor
0 Kudos

Hi Channappa

Please note that if you need to update the field which I think you will do in DOC_CHNAGE place the code as below :

From the SOCO screen where the buyer is editing : Go to the webdynpro component  /SAPSRM/WDC_DO_SOCO_GAF_3  or maybe its some other screen for you .. check the component name in the method WDDOMODIFY . Export to memory ID any lv_value as  X ..

Then , import it back to DOC_CHANGE badi .. so only if the value is changed from the SOCO the value of the Local variable lv_value  it will get the value as X .. else it will get the value Blank ..

Hence using this you would eb able to identify from where it gets modified

Hope this work ..Let me know the result

Regards

Vinita

oliver_wurm
Active Participant
0 Kudos

Hi,

if you use SRM Release up to 5.50 you can check the Transactioncode which is BBPSOCO01. From SRM 7 on you can use:

  DATA: lo_tr_context TYPE REF TO /sapsrm/if_transaction_context,

              lv_tr_group   TYPE /sapsrm/transaction_group.

...

  lo_tr_context = /sapsrm/cl_transaction_context=>/sapsrm/if_transaction_context~get_instance( ) .

  lv_tr_group = lo_tr_context->get_transaction_group( ).

  IF lv_tr_group EQ lo_transaction_context->gc_ta_group_soco.

    ...

Regards

Oliver

channu_s
Participant
0 Kudos

Hi Oliver ,

Thanks for the reply and sorry for later response .

We are using SRM 713 Server , so cant use the approach which you suggested.

thanks

CB