Purpose:
User wants to add custom fields to the carry out sourcing( sourcing cockpit ) search screen and also in result table.
Procedure:
Step 1: We need to configure that custom field through SPRO.
Step 2: Then we need to add our custom field in search structure and result structure of SOCO( sourcing cockpit ).
Component : /SAPSRM/WDC_DO_SOCO_GAF_1
Context node -> Search -> Search_fields -> /SAPSRM/S_SEARCH_FIELDS_PR
Context node -> Search -> Result_fields -> /SAPSRM/S_CLL_WD_SOCO_WORKAREA
Step3 : Need to change the layout according to the requirement.
Search screen:
Output result screen:
Step 4: Write the code needed to restrict the output based on the input given by the user for the applicaiton type.
Sample code:
**** Restricted the ouput entries y apllication type:
CALL METHOD ls_element->get_attribute
EXPORTING
name = 'YYAPP_TYPE'
IMPORTING
value = lo_app_type.
IF NOT lo_app_type IS INITIAL.
LOOP AT mt_displayed_list ASSIGNING <fs> WHERE yapp_type NE lo_app_type.
DELETE mt_displayed_list WHERE guid = <fs>-guid.
ENDLOOP.
ENDIF.
**** Code displeaed fro Error message :
DESCRIBE TABLE mt_displayed_list LINES lv_elem.
IF lv_elem = 0.
MOVE '037' TO ls_messages-msgno.
MOVE '/SAPSRM/AO_SOCO' TO ls_messages-msgid.
MOVE 'W' TO ls_messages-msgty.
CALL METHOD mo_cll_message_handler->add_message
EXPORTING
is_message = ls_messages.
ENDIF.
Appreciate your queries and comments!
Thanks,
Eswari.