SAP Function SO_NAME_CONVERT_API1 - SAPoffice: SO_NAME_CONVERT_API1

Parameter Reference Type Length Default Optional Text
NAME SOUDNAMEI1 u 77 Structure with name to be converted

Parameter Reference Length Optional Text
NAMES SOUDNAMEI1 77 Filled structure with all relevant names

Exception Text
PARAMETER_ERROR Invalid combination of parameter values
USER_NOT_EXIST Specified name does not exist
X_ERROR Internal error or database inconsistency

Functionality
This function modules allows the other name forms to be determined forany name form of a user. If an entry is generic or not unique, allrelevant name entries are included.

Import parameters
NAME
This structure must contain at least one name form of the user beingsearched for.

  • USERID

  • SAPoffice ID of the user.
    • SAPNAME

    • SAP name of the user. The SAP name is used to log onto the system.
      • OFFICENAME

      • SAPoffice name of the user. The SAPoffice name is unique client-wide.
        • FULLNAME

        • Full name of the user from the address management. A genericspecification can also be made.
          • DELETED

          • This field is not used.

            Table parameters
            NAMES
            This table contains all name forms of the users found.

            • USERID

            • SAPoffice ID of the user.
              • SAPNAME

              • SAP name of the user. The SAP name is used to log onto the system.
                • OFFICENAME

                • SAPoffice name of the user. The SAPoffice name is unique client-wide.
                  • FULLNAME

                  • Full name of the user from the address management.
                    • DELETED

                    • This field is not used.

                      Exceptions
                      USER_NOT_EXIST
                      A user could not be determined for the name forms specified. Anincorrect value was probably passed.
                      PARAMETER_ERROR
                      An invalid combination of parameter values was passed to the functionmodule. At least one name form must be specified.
                      X_ERROR
                      An internal error or a database inconsistency occurred.

                      Example
                      Determining and outputting name forms for an address name specified viauser input.
                      PARAMETERS: ADRNAME LIKE SOUDNAMEI1-FULLNAME.
                      DATA: NAMELIST LIKE SOUDNAMEI1 OCCURS 5 WITH HEADER LINE.
                      DATA: NAME LIKE SOUDNAMEI1.
                      NAME-FULLNAME = ADRNAME.
                      CALL FUNCTION 'SO_NAME_CONVERT_API1'
                      EXPORTING
                      NAME = NAME
                      TABLES
                      NAMES = NAMELIST.
                      EXCEPTIONS
                      USER_NOT_EXIST = 1
                      OTHERS = 99.
                      CASE SY-SUBRC.
                      WHEN 0.
                      WRITE: / 'Users found:'.
                      LOOP AT NAMELIST.
                      WRITE: / NAMELIST-USERID, NAMELIST-SAPNAME,
                      NAMELIST-OFFICENAME, NAMELIST-FULLNAME.
                      ENDLOOP.
                      WHEN 1.
                      WRITE: / 'No user found !'.
                      WHEN 99.
                      WRITE: / 'Unexpected error occurred !'.
                      ENDCASE.