Wednesday, March 28, 2012

Change SAP Web Service Default Login Language

 We can configure web services using SOAMANAGER transaction for a long time. This application controls icf nodes regarding selected web services which makes the WS publishing process easier for us. Unfortunately last version of SOAMANAGER don't have an option to change WS login language , either SICF does not allow us to change directly related node and gives SHTTP824 error.

 I have tried a little bit to find a solution however nothing came out. So I decided to code for myself and put it into my toolbox. The program below lets you change WS default login language. After execution it opens sicf transaction by selecting the node you entered. Deactivate and activate node. It's done.

 


*&---------------------------------------------------------------------*
*& Report  ZBCP_CHANGE_WS_LANGU
*&---------------------------------------------------------------------*

REPORT  zbcp_change_ws_langu.

TABLES icfservice.

DATA gt_nodes TYPE TABLE OF icfservice.


PARAMETERS p_lng_fr TYPE sy-langu OBLIGATORY DEFAULT 'EN'.
PARAMETERS p_lng_to TYPE sy-langu OBLIGATORY DEFAULT sy-langu.
PARAMETERS p_node TYPE icfservice-icf_name OBLIGATORY.


START-OF-SELECTION.

  SELECT FROM icfservice INTO TABLE gt_nodes
    WHERE icf_name p_node
      AND icf_langu p_lng_fr.
  IF sy-subrc NE 0.
    MESSAGE 'Node does not exists!' TYPE 'I'.
    EXIT.
  ENDIF.

  LOOP AT gt_nodes INTO icfservice.

    icfservice-icf_langu p_lng_to.
    MODIFY icfservice.
  ENDLOOP.

  MESSAGE 'It''s done please reactivate node !'
     TYPE 'S'.

  SUBMIT rsicftree WITH icf_serv p_node AND RETURN.