cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Get Account Assignment GUID in WDC /SAPSRM/WDC_UI_BACKEND_SH

laurent_burtaire
Active Contributor
0 Kudos
184

Hello,

We have implemented enhancement spot /SAPSRM/BD_F4_EXIT in order to implement BAdI definition /SAPSRM/BD_F4_EXIT_PRESEL.

We want to populate one of the search-field by a default value coming from one of account assignment fields.

This works fine if we have only one account assignment line. But, if we split distribution, we have at least two lines.

My problem is to be able to know on wich account assignment line from SC item line I am working onu2026

I did not find yet how to transfer account assignment GUID from view V_DO_ACCOUNT_DETAIL (WDC /SAPSRM/WDC_UI_DO_ACC ) to method CREATE_SO_SCREEN (component controller from WDC /SAPSRM/WDC_UI_BACKEND_SH ).

Anybody has an advise ?

Regards.

Laurent.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

how to transfer account assignment GUID from view V_DO_ACCOUNT_DETAIL (WDC /SAPSRM/WDC_UI_DO_ACC ) to method CREATE_SO_SCREEN (component controller from WDC /SAPSRM/WDC_UI_BACKEND_SH )

I don't know how these two views are interacting with each other, but whenever I encounter the need to retrieve a piece of information from one component to be used in another which has no apparent relations with the former, I usually end up creating a "helper" ABAP class with Static "set" and "get" methods and a Static attribute for the value (similar to the concept of creating a function group with a static variable). It definitely is not the only possible approach (for example, using memory variable with "import/export" statement is another) and might not even be an elegant one. But it should work.

laurent_burtaire
Active Contributor
0 Kudos

Hello Jay,

Thank you for your contribution.

We found a solution :

1- enhance method CREATE_SO_SCREEN with an Overwrite Exit,

2- using Wizard, read node SELECTION.CONTEXT_ELEMENT to generate correponding code,

3- then, for this context element, get GUID attribut :

lv_context_element->get_attribute( EXPORTING name = 'GUID'
IMPORTING value = lv_acc_guid )

4- store this data into internal table dedicated to the search-help which is called in exit BAdI for search-help,

5- inside the BAdI, replace low value (which was account assignment line guid) by its real value got from SC item detail.

Did not try to get attribute COST_CRT instead of GUID...

If it is possible, there is no need to implement BAdI !

I do not understand why SAP did not populate account assignment line guid as done in standard for SC header and item guid...

Regards.

Laurent.