SAP Component - ERP Function Module

Hi,
i'm looking for information, how to figure out which ERP module (FI, MM, CO, SD) is build in which SAP component package (SAP_BASIS, SAP_ABA, SAP_APPL, SAP_AP).
I'm not talking about the enhancement packages, IS solutions or other SAP systems (BI, EP, XI, ....) but just the old and classical ERP modules.
Thanks for any help.
Regards,
Wilhelm

Logistics and Accounting is built on SAP_APPL, Human Resources on SAP_HR.
From SAP menu navigate, System> Status> click on component information icon below the component version. This will give you the component and its description.

Similar Messages

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            exceptions
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT = 2
              DOCUMENT_TYPE_NOT_EXIST = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR = 5
              X_ERROR = 6
              ENQUEUE_ERROR = 7
              others = 8.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • SAP Upgrade - Standard function modules & modifications

    Hello everybody,
    we are doing a SAP Upgrade to SAP ERP 6.0 and I need your help
    Some SAP standard funcion modules were modified in the last years and some weeks ago the changes were undone. The last version of the function modules are the same than the original function modules, but the version manager shows that the last version belongs to the user FGZ583 (and not SAP).
    The Problem is, that SAP deals with that function modules as a modification (because the last change was done by FGZ583?), but they are identical to the original SAP function modules.
    When the Upgrade is done, the SPAU/SPDD/se95 show that function modules as "modifications", although they are the same that the original ones.
    What could I do to avoid that SAP deals with that function modules as modifications?
    Cheers
    Prashad

    Hello Prashad,
    Its standard that once the object is changed the corresponding entry is recorded in different tables.Even if you roll back now system will treat as the modifications because corresponding change entries are present in the tables. You can try to activate the older versions but i don't think this will help you.
    This is not a point of worry as in SPDD adn SPAU you can choose reset to original for all those objects.
    Even if you can get those objects to move back to the source version they will get back to the standard in the new release.So my advise will be to let your upgrade run and then reset these objects to original.
    Regards
    Niraj

  • SAP Script in Function module

    HI Experts,
    I will get VBELN as an import parameter in my Z-FM.
    Now i have to pass this VBELN to RVORDER01 script and to finally get the OTF data from CLose_form.
    How to sap script processing in function module
    Thanks
    Chandra

    Example
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = u2018|u2019. "First page
    ELSE.
    OUT_PAR-VALUE = u2018||u2019. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.

  • Null character removal in sap using a function module

    Little background :
    1) we are using a lot of interfaces with legacy and the data in sap has null characters for example : phone#123 .
    the prob is not on sap side but on bw side when i extract this data it converts to hex format and the load fails.
    2) so i wrote a abap function module for the extractor which uses the function modules SRET_TEXT_TO_BINARY and SRET_BINARY_TO_TEXT and passed the variable that has the null character and replaced it with space.
    3) the prob is i get null characters in a lot of fields now and i am not sure how i can pass it to SRET_BINARY_TO_TEXT OR SRET_TEXT_TO_BINARY as they are SAP standard and it takes in just a single variable. i have all my fields in a internal table .
    I apologize for the the length of the message but any help is greatly appreciated.I want to know how to pass a internal table with null in all fields to a standard function module bec . The code is below :
    =======================================================
      CALL FUNCTION 'SRET_TEXT_TO_BINARY'
        EXPORTING
          TEXT                        = input
        TEXT_LENGTH                 = -1
          LAISO                       = '00'
        IV_CATID                    = ' '
        IV_RFC_FOR_INITIALIZE       = ' '
       IMPORTING
        OUTPUT_LENGTH               =
          XBUFFER                     = v_hexa
       EXCEPTIONS
          FAILED                      = 1
          OTHERS                      = 2
      IF SY-SUBRC = 0.
    *Replacing all NULL (X'00') values with SPACE (X'20')
      REPLACE ALL OCCURRENCES OF c_null IN v_hexa WITH c_space IN BYTE MODE.
        CALL FUNCTION 'SRET_BINARY_TO_TEXT'
          EXPORTING
            XBUFFER                     = v_hexa
            LAISO                       = '00'
          IV_CATID                    = ' '
          IV_RFC_FOR_INITIALIZE       = ' '
         IMPORTING
          OUTPUT_LENGTH               =
            TEXTBUFFER                  = output
         EXCEPTIONS
            FAILED                      = 1
            OTHERS                      = 2

    The entire code :
    =======================================================
    FUNCTION YFR1_CA_U_NULL_SPACE.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(INPUT) TYPE  C
    *"  EXPORTING
    *"     REFERENCE(OUTPUT) TYPE  C
    *"  EXCEPTIONS
    *"      LENGTH_TOO_LONG
    *"      FAILED
    This function provides the functionality of replacing the NULL
    characters with SPACE .
      DATA : v_hexa(100) TYPE X ,
             c_space(2) TYPE X VALUE '0020' ,
             c_null(2) TYPE X VALUE '0000' ,
             v_length TYPE i .
      COMPUTE v_length = STRLEN( input ) .
      IF v_length > '100'.
        RAISE length_too_long .
      ENDIF .
      CALL FUNCTION 'SRET_TEXT_TO_BINARY'
        EXPORTING
          TEXT                        = input
        TEXT_LENGTH                 = -1
          LAISO                       = '00'
        IV_CATID                    = ' '
        IV_RFC_FOR_INITIALIZE       = ' '
       IMPORTING
        OUTPUT_LENGTH               =
          XBUFFER                     = v_hexa
       EXCEPTIONS
          FAILED                      = 1
          OTHERS                      = 2
      IF SY-SUBRC = 0.
    *Replacing all NULL (X'00') values with SPACE (X'20')
      REPLACE ALL OCCURRENCES OF c_null IN v_hexa WITH c_space IN BYTE MODE.
        CALL FUNCTION 'SRET_BINARY_TO_TEXT'
          EXPORTING
            XBUFFER                     = v_hexa
            LAISO                       = '00'
          IV_CATID                    = ' '
          IV_RFC_FOR_INITIALIZE       = ' '
         IMPORTING
          OUTPUT_LENGTH               =
            TEXTBUFFER                  = output
         EXCEPTIONS
            FAILED                      = 1
            OTHERS                      = 2
        IF SY-SUBRC <> 0.
          RAISE FAILED .
        ENDIF.
      ELSE.
        RAISE FAILED .
      ENDIF .
    ENDFUNCTION.

  • Monitoring availability of SAP-WebDispatcher + ERP functions

    we want to check (Nagios) the availability of Webservices  components are SAP-WebDispatcher + ERP.
    in the past, after offline-backup and restarting the systems, there was a problem, when the webdispatcher first starts and the ERP-system was not allready startet yet - the webdispatcher could not be used (no connection to ERP)
    so, what URL can we use to check the correct function of the webdispatcher (including connection to ERP) ?

    Hi,
    I really doubt if it is widely used within India yet. But you can find reference customer in rest of world. Have you tried to call SAP India sales number: +91 1800 425 5959 (toll free) or +91 80 2554 7586.
    If you are representing any SME then my suggestion is to send RFQ (request for quote) to various SAP partners in India and they will surely respond.
    Since this SaaS based product hence you can also explore out-of-india service provider.
    Regards,
    Gourav

  • Connection error to SAP InfoSets/Queries 'Function module not found'

    I have crystal reports 2011 and I would like to connect to our SAP system (ECC6.0).  I am able to connect partially but when I drill down into where I guess crystal is trying to pull a list of queries or infosets I get errors.
    For infosets i get 'Function module "/CRYSTAL/GET_FUNCAREA_CATALOG" not found.'
    For queries i get 'Function module "/CRYSTAL/GET_QUERY_CATALOG" not found.'
    What changes need to be performed to our SAP system to get these functions added?
    Thanks in advance.

    Hi Joshua,
    I did some checking so I changed my original reply. Those drivers are installed so nothing extra needed. I'm not completely sure how all of the Classic SAP data sources work but the only thing different is BW Query was removed in favor of MDX.
    Also, the Transports are in a download package and must be installed onto the BW system. I'm checking what that means and where they are located.
    The package for the BW server is located here:
    <folder where I unzipped>\DATA_UNITS\CrystalReports\Collaterals\Add-Ons\SAP\Transports
    Thanks again and sorry for the confusion...
    Don
    Edited by: Don Williams on Jul 11, 2011 10:59 AM

  • All sap-crm standard function module I need

    Hi Experts,
    I want to know about the function modules used for special purpose in crm.
    who see this post and know some of those function send me the name of function module because i want to document all the function modules.
    prem

    this can be searched from google.

  • Doubt In Function module : Write_Form_Lines in Sap Scripts

    Friends,
      I wanted to know for what purpose the funtion module Write_Form_Lines is used in SAP SCRIPTS.
    Regards
    Yamini

    From SAP documentation:
    The function module outputs the text lines in table LINES into the specified form window. The text lines must have the SAPscript ITF format. From the data in the text header, the system uses only the field TDSTYLE to apply the formatting attributes defined in the specified style for this text. If the field is empty, the system uses the identically named formatting attributes (character and paragraph formats) of the form.
    Use parameter WINDOW to specify into which of the windows defined in the form you want to output the text. You can specify any window used in the form. The parameter FUNCTION determines how to merge the text lines to be output with any existing contents in the window. There are differences between the different window types or areas.
    Prabhu Rajesh.

  • How to create Geniric data source using the SAP FUNCTION MODULE

    Hi,
    I want to create genric data source using function module
    MD_STOCK_REQUIREMENTS_LIST_API (delivered by sap)
    for this function module where I can find  Extract Structer
    or I have to create ?
    How can i use this ?
    Thanks in Advance

    Hi Shilpa,
                  Check here..........
    Using function module as the generic extractor
    Generic Delta Update using Function Module
    Document regarding R/3 extractors using function module/user exits
    Generic extractors using FM

  • Function Module SO_OBJECT_SEND

    Hi Gurus,
    Can we send the attachments using Function Module 'SO_OBJECT_SEND'. ?
    If so please do let me know the code for filling the attachment and using this FM.
    Promise to reward points.
    Thanks & Regards
    Mac

    Hai ,
    SAP supplies a function module 'SO_OBJECT_SEND' to allow you send SAPOffice mails from within your ABAP programs.
    Just try this.
    Author: Kevin Wilson
    FUNCTION z_send_email_itab_uname.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(APPLICATION) LIKE  SOOD1-OBJNAM
    *"     VALUE(EMAILTITLE) LIKE  SOOD1-OBJDES
    *"     VALUE(RECEXTNAM) LIKE  SOOS1-RECEXTNAM OPTIONAL
    *"     VALUE(SENDER) LIKE  SOUD-USRNAM DEFAULT SY-UNAME
    *"     VALUE(UNAME) LIKE  SOOS1-RECEXTNAM OPTIONAL
    *"  EXPORTING
    *"     VALUE(RETURN_CODE) LIKE  SY-SUBRC
    *"  TABLES
    *"      TEXTTAB STRUCTURE  SOLI
    tables
      TABLES: pa0105,   "Employee detail for username and email address
              usr21,    "Login addition address data
              adr6.     "Address table for email addresses
    *- local data declaration
      DATA: ohd    LIKE sood1,
            oid    LIKE soodk,
            to_all LIKE sonv-flag,
            t_uname LIKE sy-uname,
            okey   LIKE swotobjid-objkey.
      DATA: BEGIN OF receivers OCCURS 0.
              INCLUDE STRUCTURE soos1.
      DATA: END OF receivers.
    *- fill odh
      CLEAR ohd.
      ohd-objla    = sy-langu.
      ohd-objnam   = application.
      ohd-objdes   = emailtitle.
      ohd-objpri   = 3.
      ohd-objsns   = 'F'.
      ohd-ownnam   = sy-uname.
      IF NOT uname IS INITIAL.
    Find personnel number of username
        CONDENSE uname NO-GAPS.
        WHILE uname CS ','.
          t_uname = uname+0(sy-fdpos).
          ADD 1 TO sy-fdpos.
          SHIFT uname LEFT BY sy-fdpos PLACES.
          PERFORM find_email_address USING t_uname
                                     CHANGING recextnam.
        ENDWHILE.
    *Do the last record
        IF uname <> space.
          t_uname = uname.
          PERFORM find_email_address USING t_uname
                                     CHANGING recextnam.
        ENDIF.
      ENDIF.
    *- send Email
      IF NOT recextnam IS INITIAL.
        CONDENSE recextnam NO-GAPS.
        CHECK recextnam CS '@'.
      ENDIF.
    *- for every individual recipient send an Email
    (see OSS message 0120050409/0000362105/1999)
      WHILE recextnam CS ','.
        PERFORM init_rec TABLES receivers.
        READ TABLE receivers INDEX 1.
        receivers-recextnam = recextnam+0(sy-fdpos).
        ADD 1 TO sy-fdpos.
        SHIFT recextnam LEFT BY sy-fdpos PLACES.
        MODIFY receivers INDEX 1.
        PERFORM so_object_send_rec
         TABLES texttab receivers
          USING ohd
                sender.
      ENDWHILE.
    *- check last recipient in recipient list
      IF recextnam <> space.
        PERFORM init_rec TABLES receivers.
        READ TABLE receivers INDEX 1.
        receivers-recextnam = recextnam.
        MODIFY receivers INDEX 1.
        PERFORM so_object_send_rec
         TABLES texttab receivers
          USING ohd
                sender.
      ENDIF.
    ENDFUNCTION.
          FORM SO_OBJECT_SEND_REC                                       *
    FORM  so_object_send_rec
    TABLES  objcont      STRUCTURE soli
            receivers    STRUCTURE soos1
    USING   object_hd    STRUCTURE sood1
            sender LIKE soud-usrnam.
      DATA:   oid     LIKE soodk,
              to_all  LIKE sonv-flag,
              okey    LIKE swotobjid-objkey.
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                extern_address             = 'X'
                object_hd_change           = object_hd
                object_type                = 'RAW'
                outbox_flag                = 'X'
                sender                     = sender
           IMPORTING
                object_id_new              = oid
                sent_to_all                = to_all
                office_object_key          = okey
           TABLES
                objcont                    = objcont
                receivers                  = receivers
           EXCEPTIONS
                active_user_not_exist      = 1
                communication_failure      = 2
                component_not_available    = 3
                folder_not_exist           = 4
                folder_no_authorization    = 5
                forwarder_not_exist        = 6
                note_not_exist             = 7
                object_not_exist           = 8
                object_not_sent            = 9
                object_no_authorization    = 10
                object_type_not_exist      = 11
                operation_no_authorization = 12
                owner_not_exist            = 13
                parameter_error            = 14
                substitute_not_active      = 15
                substitute_not_defined     = 16
                system_failure             = 17
                too_much_receivers         = 18
                user_not_exist             = 19
                x_error                    = 20
                OTHERS                     = 21.
      IF sy-subrc <> 0.
        CASE sy-subrc.
          WHEN 1.
            MESSAGE i999(b1) WITH 'Activer user does not exist.'
                              'Send Mail failed!'.
          WHEN 2.
            MESSAGE i999(b1) WITH 'Communication Failure.'
                              'Send Mail failed!'.
          WHEN 3.
            MESSAGE i999(b1) WITH 'Component not available.'
                              'Send Mail failed!'.
          WHEN 4.
            MESSAGE i999(b1) WITH 'Folder does not exist..'
                              'Send Mail failed!'.
          WHEN 5.
            MESSAGE i999(b1) WITH 'No authorization for folder.'
                              'Send Mail failed!'.
          WHEN 6.
            MESSAGE i999(b1) WITH 'Forwarder does not exist.'
                              'Send Mail failed!'.
          WHEN 7.
            MESSAGE i999(b1) WITH 'Note does not exist.'
                              'Send Mail failed!'.
          WHEN 8.
            MESSAGE i999(b1) WITH 'Object does not exist.'
                              'Send Mail failed!'.
          WHEN 9.
            MESSAGE i999(b1) WITH 'Object not sent.'
                              'Send Mail failed!'.
          WHEN 10.
            MESSAGE i999(b1) WITH 'No authorization for object.'
                              'Send Mail failed!'.
          WHEN 11.
            MESSAGE i999(b1) WITH 'Object type does not exist.'
                              'Send Mail failed!'.
          WHEN 12.
            MESSAGE i999(b1) WITH 'No authorization for operation.'
                              'Send Mail failed!'.
          WHEN 13.
            MESSAGE i999(b1) WITH 'Owner does not exist.'
                              'Send Mail failed!'.
          WHEN 14.
            MESSAGE i999(b1) WITH 'Parameter Error.'
                              'Send Mail failed!'.
          WHEN 15.
            MESSAGE i999(b1) WITH 'Substitute not active.'
                              'Send Mail failed!'.
          WHEN 16.
            MESSAGE i999(b1) WITH 'Substitute not defined.'
                              'Send Mail failed!'.
          WHEN 17.
            MESSAGE i999(b1) WITH 'System failure.'
                              'Send Mail failed!'.
          WHEN 18.
            MESSAGE i999(b1) WITH 'Too many receivers.'
                              'Send Mail failed!'.
          WHEN 19.
            MESSAGE i999(b1) WITH 'User does not exist.'
                              'Send Mail failed!'.
          WHEN 20.
            MESSAGE i999(b1) WITH 'Unknown error ocurred.'
                              'Send Mail failed!'.
          WHEN 21.
            MESSAGE i999(b1) WITH 'Unknown error ocurred.'
                              'Send Mail failed!'.
        ENDCASE.
      ENDIF.
    ENDFORM.
          FORM INIT_REC                                                 *
    FORM init_rec TABLES receivers STRUCTURE soos1.
      CLEAR receivers.
      REFRESH receivers.
      MOVE sy-datum  TO receivers-rcdat .
      MOVE sy-uzeit  TO receivers-rctim.
      MOVE '1'       TO receivers-sndpri.
      MOVE 'X'       TO receivers-sndex.
      MOVE 'U-'      TO receivers-recnam.
      MOVE 'U'       TO receivers-recesc.
      MOVE 'INT'     TO receivers-sndart.
      MOVE '5'       TO receivers-sortclass.
      APPEND receivers.
    ENDFORM.
    *&      Form  find_email_address
          Returns the email address for a USERID whether they are an
          employee or just a user.
         <--P_RECEXTNAM  Email address
         -->P_UNAME      USERID
    FORM find_email_address USING    p_uname
                            CHANGING p_recextnam LIKE soos1-recextnam.
      DATA:   t_pernr LIKE pa0105-pernr,
              t_email LIKE pa0105-usrid_long.
    STEP 1 - Find personnel number for UNAME
      SELECT SINGLE pernr INTO t_pernr
        FROM pa0105
        WHERE subty = '0001' AND
              endda >= sy-datum AND
              begda <= sy-datum AND
              usrid = p_uname.
    Employee record found
      IF sy-subrc = 0.
    STEP 2 - Find email address for personnel number
        SELECT SINGLE usrid_long INTO t_email
          FROM pa0105
          WHERE pernr = t_pernr AND
                subty = '0022' AND
                endda >= sy-datum AND
                begda <= sy-datum.
        IF sy-subrc = 0.
          IF NOT p_recextnam IS INITIAL.
            CONCATENATE p_recextnam t_email
              INTO p_recextnam SEPARATED BY ','.
          ELSE.
            p_recextnam = t_email.
          ENDIF.
        ELSE.  "Never found an email address for employee
    WHO SHOULD WE SEND TO HERE??? ***
        ENDIF.
    Employee number not found. Search in ADR6 table
      ELSE.
    See if user name is in the username table.
    i.e. The user is not an employee
        SELECT SINGLE addrnumber persnumber
          INTO (usr21-addrnumber, usr21-persnumber)
          FROM usr21
          WHERE bname = p_uname.
        IF sy-subrc = 0.
    Found user name now let's get the email address
          SELECT SINGLE smtp_addr INTO t_email
            FROM adr6
            WHERE addrnumber = usr21-addrnumber AND
                  persnumber = usr21-persnumber.
          IF sy-subrc <> 0 OR t_email IS INITIAL.
    WHO SHOULD WE SEND TO HERE??? ***
          ELSE.  "Found email
            IF NOT p_recextnam IS INITIAL.
              CONCATENATE p_recextnam t_email
                INTO p_recextnam SEPARATED BY ','.
            ELSE.
              p_recextnam = t_email.
            ENDIF.
          ENDIF.
        ELSE.   "UNAME just does not have an email address addigned at all
    WHO SHOULD WE SEND TO HERE??? ***
        ENDIF.
      ENDIF.
    ENDFORM.                    " find_email_address
    Regards.
    Sowjanya.B.

  • Runtime Error in execution of 'SO_OBJECT_SEND' function module

    Hi friends,
    We are going for upgradation from 4.6c to ECC6.0. There is one program which is used to send external mails thru 'SO_OBJECT_SEND', but the function module is giving runtime error(line no:515) in ECC6.
    what could be the reason?
    rewarded,
    Steve

    Hi,
    Plz check if any latest release notes of SAP for the function module 'SO_OBJECT_SEND' are available. If so you may apply those.
    If you have valid SAP service username and password you can get the notes from service.sap.com. Else your BASIS people can help you.
    Which is the highest patch level you have applied?
    Regards,
    Renjith Michael.

  • Function Modules for Data and Time

    Hi all,
              I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
    Thanks in advance

    Hi Ranjith,
    i think this will b usefull for you..
    SAP Bar Chart Function Modules and what they are used for
    Function module
    Used for
    BARC_GRAPHIC_PBO
    Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
    BARC_GRAPHIC_PAI
    Analyzing data returned by the graphic
    BARC_SET_TIME_AXIS
    Setting start and end of time axis
    BARC_SET_OPTIONS
    Setting options
    BARC_ADD_CHART
    Creating a chart
    BARC_SET_CHART_ATTRIB
    Setting chart attributes
    BARC_ADD_SECTION
    Creating a section on the time axis
    BARC_SET_SECTION_ATTRIB
    Setting section attributes
    BARC_ADD_RIBBON
    Adding a ribbon to the time axis
    BARC_SET_RIBBON_ATTRIB
    Setting attributes for ribbons in the chart
    BARC_ADD_GRID
    Adding a time grid
    BARC_SET_GRID_ATTRIB
    Setting grid attributes
    BARC_ADD_LAYER
    Adding a layer (graphic elements)
    BARC_SET_LAYER_ATTRIB
    Setting layer attributes
    BARC_ADD_LINE
    Adding a line
    BARC_ADD_CALENDAR
    Creating a calendar
    BARC_SET_CALENDAR_ATTRIB
    Setting attributes for a calendar
    BARC_ADD_TIME_PROFILE
    Creating time profiles
    BARC_SET_TIME_PROFILE_ATTRIB
    Setting attributes for time profile
    BARC_ADD_INTERVAL
    Adding a time interval
    BARC_SET_INTERVAL_ATTRIB
    Setting time interval attributes
    BARC_ADD_TIME_OBJECT
    Creating a time object
    BARC_CONVERT_DATE
    Creating a date string in bar chart format
    BARC_REVERT_DATE
    Converting a date string in bar chart format to date and time
    BARC_ADD_DATELINE
    Creating a date line
    BARC_SET_DATELINE_ATTRIB
    Setting dateline attributes
    BARC_GET_PROFILE_CONTENTS
    Obtaining profile contents for customizing a chart
    BARC_GET_COLUMN_WIDTH
    Selecting new column width
    BARC_SET_COLUMN_WIDTH
    Setting the column width
    BARC_GET_TEXTINDEX
    Obtaining the text index of a field
    BARC_SET_LABELS
    Positioning the chart display
    BARC_SET_COLUMN_ATTRIB
    Setting column attributes
    BARC_SET_ROW_ATTRIB
    Setting row attributes
    BARC_SET_ROW_HEIGHT
    Setting the line height
    BARC_SET_MAXCHARTS
    Setting the maximum number of charts sent
    <b>If its usefull reward points
    </b>

  • Function module / name spaces

    Hello all,
    I was asked to create a function module with the prefix "ZIST_" in its name. Unfortunately this name is part of the SAP namespace, as the system tells me during FM creation (it would be ok to use "Z_IST_" though). Technically it is possible to ignore the error/warning message and create the "ZIST_" function anyway.
    My question now is: can this issue have any bad impact, for example during a release upgrade? If not, if it's ok to use "ZIST_" as prefix, why does the SAP system then popup this warning at all?
    Thanks in adavance for your help!
    Kind regards, Matthias

    Theoretically, SAP could introduce function modules starting with ZIST_ in the future.
    I'd say the probability is only slightly larger than zero though, and even smaller for an entire duplicate function name collision by any chance. Your server might rather get struck by lightning. And even if it happens, then you are forced to change your names, should not be the end of the world.
    But it remains your risk
    Thomas

  • Help , if there exists a Function Module

    Hello everybody,
       I want a help whether SAP has some Function Module which can take an "Internal Table" as an Import Parameter and give us "CSV File" as an export parameter , more-or-less like the "GUI_DOWNLOAD" Function Module , which downloads the file as ".DAT" or ".ASC" .
        Please remember that i would need a CSV file , which i can read later through Opening a Dataset and transferring the contents into a file.
         Your immediate answers is most needed.
    Thanks,
    Suddha Laik

    hi suddha,
    try with GUI_DOWNLOAD with filetype as 'ASC' and
    give the filename as 'C:\TEST.CSV'.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'C:\TEST.CSV'
       FILETYPE                        = 'ASC'
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab
      FIELDNAMES                      =
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22.
    do reward if it helps,
    regards,
    priya.
    Message was edited by: Priya

Maybe you are looking for

  • REPORT LAYOUT Discoverer Viewer AS-10g

    I have a problem about report layout on Discoverer viewer AS10g. If I have a crosstab layout and Year is my left axis and Sales and Products are my top axis, I see the label on report (Year), not only values (2003, …). I also see the label “Data poin

  • Why cant I delete photos from event in Iphoto 08?

    Set to edit in external editor. After trying to open movie, return to event and cannot delete photos. Open and close program a couple of times, reset to edit in new window, re-open program and I can delete, but only by dragging to the trash located i

  • Default Web Application - new bug in SP1?

    Just rebuilding everything from scratch to test out SP1. Have noticed that the admin console now always seems to report only "(none)" in the Default Web Application drop-down, even if other web apps are deployed to the server. Editing the config.xml

  • How do you make square brackets with the keyboard on this thing?

    Needed for Matlab!

  • Backint failed "ERROR: unable to find file "

    Hello I try to backup Oracle database 10.2 with netbackup tools on Redhat 2.6.18-53 I got errror: BR0231E Backup utility call failed ERROR: unable to find file /oracle/BWP/sapdata4 Can u help me Regards Fethi