Text mail budget check

Hi all,
we're concfiguring FM to do a budget check on the creation of a PO / PR. If the budget is exceeded, the system triggers a mail. But where can we specify the content of this mail ?
Tia !

well friend there is nothin like checking syntax in text editor because whatever wrong syntax u gonna write will be treated as text apart from code.
so there is no separate checking for them but yesthere are some simple things that can b checked for example u must have seen in old editor of script that left side has got only some fixed values like /: , =, * , and paragraph format but here also if u choose  invalid paragraph format then also ur default paragraph will work and no syntax error occurs.
plz reward if helpful,
keep rockin
vivek

Similar Messages

  • FM with code to send a simple text mail to external ID

    Hi All,
    I need a FM with code if possible to send a simple text mail to an external e-mail id or distribution list. I tried using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 and was successfull in sending mail. But it requires attachment.
    I need help to send mail without attachment with code.
    All configurations done at my end.
    Thanks
    Anirban Bhattacharjee

    Hi Anirban,
    Please check this sample code.
    * Email ITAB structure
    DATA: BEGIN OF EMAIL_ITAB OCCURS 10.
            INCLUDE STRUCTURE SOLI.
    DATA: END OF EMAIL_ITAB.
    DATA: T_EMAIL LIKE SOOS1-RECEXTNAM.  "EMail distribution list
    CONSTANTS: C_EMAIL_DISTRIBUTION LIKE SOOS1-RECEXTNAM VALUE
               ‘[email protected],[email protected]’.
    * Initialization
    REFRESH EMAIL_ITAB.
    * Populate data
    EMAIL_ITAB-LINE = ‘Email body text 1’.
    APPEND EMAIL_ITAB.
    EMAIL_ITAB-LINE = ‘Email body text 2’.
    APPEND EMAIL_ITAB.
    T_EMAIL = C_EMAIL_DISTRIBUTION.
    * --- EMAIL FUNCTION ---------------------------------------------------
    * REQUIRMENTS:
    * 1) The user running the program needs a valid email address in their
    *    address portion of tx SU01 under external comms -> SMTP -> internet
    *    address.
    * 2) A job called SAP_EMAIL is running with the following parameters:
    *    Program: RSCONN01  Variant: INT   User: XXX
    *    This program moves mail from the outbox to the mail server using
    *    RFC destination: SAP_INTERNET_GATEWAY_SERVER
    * INTERFACE:
    * 1) APPLICATION: Anything
    * 2) EMAILTITLE:  EMail subject
    * 3) RECEXTNAM:   EMail distribution lists separated by commas
    * 4) TEXTTAB:     Internal table for lines of the email message
    * EXCEPTIONS:
    * Send OK = 0 otherwise there was a problem with the send.
        CALL FUNCTION 'Z_SEND_EMAIL_ITAB'
             EXPORTING
                  APPLICATION = 'EMAIL'
                  EMAILTITLE  = 'Email Subject'
                  RECEXTNAM   = T_EMAIL
             TABLES
                  TEXTTAB     = EMAIL_ITAB
             EXCEPTIONS
                  OTHERS      = 1.
    Function Z_SEND_EMAIL_ITAB
    *"*"Local interface:
    *"       IMPORTING
    *"             VALUE(APPLICATION) LIKE  SOOD1-OBJNAM
    *"             VALUE(EMAILTITLE) LIKE  SOOD1-OBJDES
    *"             VALUE(RECEXTNAM) LIKE  SOOS1-RECEXTNAM
    *"       TABLES
    *"              TEXTTAB STRUCTURE  SOLI
    *- local data declaration
      DATA: OHD    LIKE SOOD1,
            OID    LIKE SOODK,
            TO_ALL LIKE SONV-FLAG,
            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.
    *- send Email
      CONDENSE RECEXTNAM NO-GAPS.
      CHECK RECEXTNAM <> SPACE AND RECEXTNAM CS '@'.
    *- 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.
      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.
      ENDIF.
    ENDFUNCTION.
    *       FORM SO_OBJECT_SEND_REC                                       *
    FORM  SO_OBJECT_SEND_REC
    TABLES  OBJCONT      STRUCTURE SOLI
            RECEIVERS    STRUCTURE SOOS1
    USING   OBJECT_HD    STRUCTURE SOOD1.
      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                     = SY-UNAME
           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.
        RAISE OTHERS.
      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.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Read email adress from a text file then check the validity of them

    a text file has three lines, each line contains one email adress:
    [email protected]
    qwe@@ws.com
    wer//@we.net
    read the email address from a text file, then check which one is invalid, output the invalid email adress in the console.

    no 3 .umm, an email adress can have more than 2 '.'s in it,
    example:
    [email protected]
    would be a valid email address.
    To decide what a valid address is you'd need to parse it against the correct standard.
    I think however that javax.mail.internet.InternetAddress does this for you, check out the docs:
    http://java.sun.com/products/javamail/1.2/docs/javadocs/javax/mail/internet/InternetAddress.html
    even if it parses it may not be a valid address though in that it may not actually exist.

  • Sending a text mail for different user in

    Hi Abapers,
    I am trying to use function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send a Text mail like "Purchase order is pending" .But how i can send a text mail .
    Here we are not attach any document only the text message we need to different mail id.Or is there any other FM to send text mail.
    Please help me if u have any sample code to send a text mail.
    Thanks
    Nani

    Hi
    You can use the fun module
    UWSP_SEND_MAIL_TO_WEB
    see the sample program using both he fun modules for sending some mails
    REPORT zm_reservation_alert
           NO STANDARD PAGE HEADING
           MESSAGE-ID zm_msg.
           D A T A B A S E  T A B L E S   D E C L A R A T I O N
                   T Y P E S  D E C L A R A T I O N S
    Reservations Main Structure
    TYPES: BEGIN OF s_res,
             rsnum TYPE rsnum,                   " Reservation No
             rspos TYPE rspos,                   " Item No
             usnam TYPE usnam,                   " User Name
             bwart TYPE bwart,                   " Movement Type
             aufnr TYPE aufnr,                   " Order Number
             rsart TYPE rsart,                   " Record Type
             bdart TYPE bdart,                   " Reservation Type
             matnr TYPE matnr,                   " Material No
             bdter TYPE bdter,                   " Req Date
             menge TYPE menge_d,                 " Quantity
             kostl TYPE kostl,                   " Cost Center
             usrid TYPE sysid,                   " User ID
           END OF s_res.
    Output Main Structure
    TYPES: BEGIN OF s_rep,
             usnam TYPE usnam,                   " User Name
             rsnum TYPE rsnum,                   " Reservation No
             rspos TYPE rspos,                   " Item No
             matnr TYPE matnr,                   " Material No
             bdter TYPE bdter,                   " Req Date
             menge TYPE menge_d,                 " Quantity
             kostl TYPE kostl,                   " Cost Center
             aufnr TYPE aufnr,                   " Order Number
           END OF s_rep.
    User Dept Details
    TYPES: BEGIN OF s_dept,
             pernr TYPE persno,                  " Personal No
             usrid TYPE sysid,                   " User ID
             orgeh TYPE orgeh,                   " Orgn Unit
             orgtx TYPE orgtx,                   " Dept Name
           END OF s_dept.
    For Send Mail Purpose
    DATA : i_doc_data LIKE sodocchgi1.
    DATA : BEGIN OF i_pack_list OCCURS 0.
            INCLUDE STRUCTURE sopcklsti1.
    DATA : END OF i_pack_list.
    DATA : BEGIN OF i_receivers OCCURS 0.
            INCLUDE STRUCTURE somlreci1.
    DATA : END OF i_receivers.
    DATA : BEGIN OF i_contents OCCURS 0.
            INCLUDE STRUCTURE solisti1.
    DATA : END OF i_contents.
    DATA : BEGIN OF i_header OCCURS 0.
            INCLUDE STRUCTURE solisti1.
    DATA : END OF i_header.
    DATA : BEGIN OF i_att OCCURS 0.
            INCLUDE STRUCTURE solisti1.
    DATA : END OF i_att.
    Internal table for bdcdata
    DATA : it_bdcdata  LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    Internal table to handle messages
    DATA : it_messages LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
               D A T A  D E C L A R A T I O N S
    DATA: gv_lines  TYPE sy-index,           " Total Lines int Table
          gv_days   TYPE i,                  " Difference Days
          gv_date   TYPE sy-datum,           " Date
          gv_date1  TYPE sy-datum,           " Date
          gv_date2  TYPE sy-datum,           " Date
          gv_text(85),                       " Text Field
          gv_mesg(70),                       " Error Messages
          gv_bdc,                            " BDC Flag
          gv_flag TYPE i,                    " Flag
          gv_ernam TYPE ernam.               " User ID
                C O N S T A N T S     D E C L A R A T I O N S
    CONSTANTS: c_x                VALUE 'X',         " Flag
               c_endda TYPE endda VALUE '99991231'.  " Date
         I N T E R N A L  T A B L E S  D E C L A R A T I O N S
    DATA: i_res TYPE STANDARD TABLE OF s_res WITH HEADER LINE,  " Reservns
          i_dept TYPE STANDARD TABLE OF s_dept WITH HEADER LINE, " Dept
          i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE.  " Output
                   S T A R T - O F - S E L E C T I O N                   *
    START-OF-SELECTION.
    Fetch main data
      PERFORM fetch_data.
    Process data
      PERFORM process_data.
    *&      Form  fetch_data
    Fetching the Reservations related data from Database Tables
    FORM fetch_data .
      CLEAR: gv_date, gv_date1, gv_date2.
      gv_date = sy-datum.
      gv_date1 = sy-datum - 10.
      gv_date2 = sy-datum + 10.
      CLEAR i_res.
      REFRESH i_res.
      SELECT a~rsnum                    " Reservation No.
             b~rspos                    " Reservation Item
             a~usnam                    " User Name
             a~bwart                    " Movement Type
             a~aufnr                    " Order Number
             b~rsart                    " Record Type
             b~bdart                    " Reservation Type
             b~matnr                    " Material No
             b~bdter                    " Req Date
        INTO TABLE i_res
        FROM rkpf AS a JOIN resb AS b
        ON arsnum = brsnum
        WHERE ( b~bdter BETWEEN gv_date1 AND gv_date2 ) AND
              b~xloek EQ ' '.
      SORT i_res BY rsnum rspos.
      DELETE ADJACENT DUPLICATES FROM i_res COMPARING matnr.
    Add userid into the i_usr int table
      LOOP AT i_res.
        i_res-usrid = i_res-usnam.
        MODIFY i_res INDEX sy-tabix.
      ENDLOOP.
      IF NOT i_res[] IS INITIAL.
    Get the User Dept Name
        CLEAR i_dept.
        REFRESH i_dept.
        SELECT a~pernr                    " Personal No
               a~usrid                    " User ID
               b~orgeh                    " Orgn Unit
               c~orgtx                    " Dept Name
          INTO TABLE i_dept
          FROM pa0105 AS a JOIN pa0001 AS b
          ON apernr = bpernr JOIN t527x AS c
          ON borgeh = corgeh
          FOR ALL ENTRIES IN i_res
          WHERE a~usrid = i_res-usrid AND
                a~endda EQ c_endda AND
                b~endda EQ c_endda.
      ENDIF.
      SORT i_dept BY pernr.
      DELETE ADJACENT DUPLICATES FROM i_dept COMPARING pernr.
    Move the Creator of Reservation to a diff table
      LOOP AT i_res.
        MOVE-CORRESPONDING i_res TO i_rep.
        APPEND i_rep.
        CLEAR i_rep.
      ENDLOOP.
      SORT i_rep BY usnam rsnum rspos.
    ENDFORM.                               " Fetch_Data
    *&      Form  process_data
    Process the Reservations related data for Expiry Date
    FORM process_data .
      DATA: lv_date1 LIKE sy-datum,
            lv_date2 LIKE sy-datum,
            lv_date3(10),
            lv_menge(13),
            lv_tabix LIKE sy-tabix.
      LOOP AT i_rep.
        CLEAR: gv_days, gv_text, lv_date1, lv_date2,lv_date3.
        lv_tabix = sy-tabix.
        AT NEW usnam.
    Populate the Contents Table
          CLEAR i_att.
          REFRESH i_att.
          i_att = 'Reservations Reminder'(014).
          APPEND i_att.
          i_att = '----
          APPEND i_att.
          i_att-line = '     '.
          APPEND i_att.
          READ TABLE i_dept WITH KEY usrid = i_rep-usnam.
          CONCATENATE 'Name:'(003) i_rep-usnam 'Dept:'(015) i_dept-orgtx
          INTO i_att-line SEPARATED BY space.
          APPEND i_att.
          i_att-line = '     '.
          APPEND i_att.
          i_att = 'Please find the List of expiring Reservations'(004).
          APPEND i_att.
          i_att-line = ' '.
          APPEND i_att.
          CONCATENATE '--' '' '--
    ' INTO
          i_att-line SEPARATED BY space.
          APPEND i_att.
        CONCATENATE 'Reservation #'(006) 'Material #'(007) ' Quantity'(002)
        'Due Date'(008) 'Work Center/CC'(005) INTO
        i_att-line SEPARATED BY space.
          APPEND i_att.
          CONCATENATE '--' '' '--
    ' INTO
          i_att-line SEPARATED BY space.
          APPEND i_att.
          i_att-line = ' '.
          APPEND i_att.
        ENDAT.
        gv_days  = i_rep-bdter - gv_date.
        lv_date1 = i_rep-bdter + 5.
        lv_date2 = i_rep-bdter + 10.
        MOVE i_rep-menge TO lv_menge.
        WRITE i_rep-bdter TO lv_date3.
        IF gv_days = 10.
          IF i_rep-aufnr <> space.
            CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
             i_rep-aufnr 'is due for 10 days. Please collect'(009)
             INTO gv_text SEPARATED BY space.
          ELSE.
            CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
             i_rep-kostl 'is due for 10 days. Please collect'(009)
             INTO gv_text SEPARATED BY space.
          ENDIF.
          i_att-line = gv_text.
          APPEND i_att.
          CLEAR i_att.
          CLEAR gv_text.
        ENDIF.
        IF gv_days = 5.
          IF i_rep-aufnr <> space.
            CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
            i_rep-aufnr 'is due for 5 days. Please collect'(010)
            INTO gv_text SEPARATED BY space.
          ELSE.
            CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
            i_rep-kostl 'is due for 5 days. Please collect'(010)
            INTO gv_text SEPARATED BY space.
          ENDIF.
          i_att-line = gv_text.
          APPEND i_att.
          CLEAR i_att.
          CLEAR gv_text.
        ENDIF.
        IF gv_date = lv_date1.
          IF i_rep-aufnr <> space.
            CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
            i_rep-aufnr 'is getting cancelled on'(011) lv_date2
            INTO gv_text SEPARATED BY space.
          ELSE.
            CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
            i_rep-kostl 'is getting cancelled on'(011) lv_date2
            INTO gv_text SEPARATED BY space.
          ENDIF.
          i_att-line = gv_text.
          APPEND i_att.
          CLEAR i_att.
          CLEAR gv_text.
        ENDIF.
        IF gv_date = lv_date2.
          IF i_rep-aufnr <> space.
            CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
            i_rep-aufnr 'is being cancelled'(012)
            INTO gv_text SEPARATED BY space.
          ELSE.
            CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
            i_rep-kostl 'is being cancelled'(012)
            INTO gv_text SEPARATED BY space.
          ENDIF.
          i_att-line = gv_text.
          APPEND i_att.
          CLEAR i_att.
          CLEAR gv_text.
    Mark the Reservation Item 'DELETED' using BDC.
         UPDATE resb SET xloek = c_x.
          PERFORM delete_item_resb.
        ENDIF.
        AT END OF usnam.
          IF ( gv_days = 10 OR gv_days = 5 OR gv_date = lv_date1 OR
               gv_date = lv_date2 ).
    Read the User who creates the Reservn and send a mail alert to him
            CLEAR : i_receivers,gv_ernam.
            REFRESH: i_receivers.
            READ TABLE i_rep INDEX lv_tabix.
            gv_ernam = i_rep-usnam.
            IF gv_ernam <> space.
    Send mail Alert to PR Creator(SAP inbox)
              PERFORM send_alert_data.
    Send Mail to External Mail ID of the SAP USER
              PERFORM send_mail_external.
            ENDIF.
          ENDIF.
        ENDAT.
      ENDLOOP.
    ENDFORM.                              " Process_data
    *&      Form  delete_item_resb
    Set the Deletion Indicator for the Res. Item in RESB
    FORM delete_item_resb.
      gv_bdc = 'N'.
    Perform to fill it_bdcdata.
      PERFORM fill_it_bdcdata.
    Call the Transaction MB22
      CALL TRANSACTION 'MB22' USING it_bdcdata MODE 'A' UPDATE 'S'
                                    MESSAGES INTO it_messages.
      IF sy-subrc <> 0.
        gv_flag = 1.
    If error occurs in transaction mode run bdc session for that data
        PERFORM bdc_process.
      ENDIF.
    Handles error messages
      PERFORM error_messages.
      CLEAR   : it_bdcdata, it_messages.
      REFRESH : it_bdcdata, it_messages.
      IF gv_bdc = 'O'.
    close bdc if it is open
        PERFORM close_bdc.
      ENDIF.
    ENDFORM.             "delete_item_resb
    *&      Form  FILL_IT_BDCDATA
    Filling Bdcdata structure with data
    FORM fill_it_bdcdata.
      PERFORM bdc_dynpro      USING 'SAPMM07R' '0560'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RM07M-RSPOS'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'RM07M-RSNUM'
                                    i_rep-rsnum.
      PERFORM bdc_field       USING 'RM07M-RSPOS'
                                    i_rep-rspos.
      PERFORM bdc_dynpro      USING 'SAPMM07R' '0510'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RESB-XLOEK'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'RESB-XLOEK'
                                     c_x.
      PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'COBL-KOSTL'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENTE'.
      PERFORM bdc_dynpro      USING 'SAPMM07R' '0510'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RESB-ERFMG'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=BU'.
      PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'COBL-KOSTL'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENTE'.
    ENDFORM.                    " FILL_IT_BDCDATA
    *&      Form  BDC_DYNPRO
    Filling the it_bdcdata table with program name & screen number
    FORM bdc_dynpro USING    program LIKE bdcdata-program
                             dynpro LIKE bdcdata-dynpro.
      it_bdcdata-program = program.
      it_bdcdata-dynpro = dynpro.
      it_bdcdata-dynbegin = 'X'.
      APPEND it_bdcdata.
      CLEAR it_bdcdata.
    ENDFORM.                    " BDC_DYNPRO
    *&      Form  BDC_FIELD
      Filling it_bdcdata with field name and field value
    FORM bdc_field USING fnam LIKE bdcdata-fnam
                         fval.
      it_bdcdata-fnam = fnam.
      it_bdcdata-fval = fval.
      APPEND it_bdcdata.
      CLEAR it_bdcdata.
    ENDFORM.                    " BDC_FIELD
    *&      Form  ERROR_MESSAGES
    Displaying error messages
    FORM error_messages.
      CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          id        = sy-msgid
          lang      = sy-langu
        IMPORTING
          msg       = gv_mesg
        EXCEPTIONS
          not_found = 1
          OTHERS    = 2.
      LOOP AT it_messages WHERE msgtyp = 'E'.
        WRITE : / 'Message :'(001) ,gv_mesg.
        CLEAR it_messages.
      ENDLOOP.
    ENDFORM.                    " ERROR_MESSAGES
    *&      Form  BDC_PROCESS
    Open bdc session if call transaction fails
    FORM bdc_process.
      IF gv_bdc = 'N'.
    open bdc session
        PERFORM open_bdc.
        gv_bdc = 'O'.
      ENDIF.
      IF gv_bdc = 'O'.
    insert data into bdc session
        PERFORM insert_bdc.
      ENDIF.
    ENDFORM.                    " BDC_PROCESS
    *&      Form  OPEN_BDC
      Calling function module to open bdc session
    FORM open_bdc.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client              = sy-mandt
          group               = 'ZMM'
          keep                = 'X'
          user                = sy-uname
        EXCEPTIONS
          client_invalid      = 1
          destination_invalid = 2
          group_invalid       = 3
          group_is_locked     = 4
          holddate_invalid    = 5
          internal_error      = 6
          queue_error         = 7
          running             = 8
          system_lock_error   = 9
          user_invalid        = 10
          OTHERS              = 11.
    ENDFORM.                    " OPEN_BDC
    *&      Form  INSERT_BDC
      Insert it_bdcdata into bdc by calling function module bdc_insert
    FORM insert_bdc.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          tcode            = 'MB22'
        TABLES
          dynprotab        = it_bdcdata
        EXCEPTIONS
          internal_error   = 1
          not_open         = 2
          queue_error      = 3
          tcode_invalid    = 4
          printing_invalid = 5
          posting_invalid  = 6
          OTHERS           = 7.
    ENDFORM.                    " INSERT_BDC
    *&      Form  CLOSE_BDC
    Closing bdc session
    FORM close_bdc.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
        EXCEPTIONS
          not_open    = 1
          queue_error = 2
          OTHERS      = 3.
    ENDFORM.                    " CLOSE_BDC
    *&      Form  send_alert_data
        Send Alert for the Expired Contract
    FORM send_alert_data .
      CLEAR: gv_lines,i_receivers, i_header, i_contents,i_doc_data.
      REFRESH : i_receivers,i_header,i_contents.
      DESCRIBE TABLE i_att LINES gv_lines.
      i_receivers-receiver = gv_ernam.
    i_receivers-receiver = 'SSHEIK'.
      i_receivers-rec_type = 'B'.
    i_receivers-rec_date = sy-datum.
    i_receivers-express = 'X'.
    i_receivers-com_type = 'INT'.
    i_receivers-notif_del = 'X'.
      APPEND i_receivers.
      i_doc_data-obj_name = 'SAPoffice'(013).
      i_doc_data-obj_descr = 'Reservations Reminder'(014).
      i_doc_data-obj_langu = 'E'.
      i_doc_data-no_change = c_x.
      i_doc_data-obj_prio = 1.
      i_doc_data-priority = 1.
      i_doc_data-doc_size = ( gv_lines - 1 ) * 255 + 135.
      i_pack_list-transf_bin = c_x.
      i_pack_list-head_start = '1'.
      i_pack_list-head_num = '1'.
      i_pack_list-body_start = '1'.
      i_pack_list-body_num = gv_lines.
      i_pack_list-doc_type = 'DOC'.
      i_pack_list-obj_name = 'SAPoffice'(013).
      i_pack_list-obj_descr = 'Reservations Reminder'(014).
      i_pack_list-obj_langu = 'E'.
      i_pack_list-doc_size = ( gv_lines - 1 ) * 255 + 135.
      APPEND i_pack_list.
    i_header-line = 'Header'. APPEND i_header.
    Data for contents
      i_contents-line = 'Please find the Reservations Due List'(016).
      APPEND i_contents.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data                    = i_doc_data
         PUT_IN_OUTBOX                    = 'X'
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
        TABLES
          packing_list                     = i_pack_list
          object_header                    = i_header
          contents_bin                     = i_att
          contents_txt                     = i_contents
          receivers                        = i_receivers
       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 = 0.
        MESSAGE i000 WITH 'Mail Sucessfully sent'(017).
      ELSE.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " send_alert_data
    *&      Form  send_mail_external
    Send mail to External MAIL ID of the PR Creator
    FORM send_mail_external.
      DATA : lv_str(24), lv_str1(40),
             lv_pernr LIKE adr6-persnumber,
             lv_adrnr LIKE adr6-addrnumber,
             lv_usrid LIKE pa0105-usrid,
             lv_mail  LIKE adr6-smtp_addr,
             lv_sendor   TYPE syuname,
             lv_receiver TYPE string,
             lv_header   TYPE string,
             lv_body     TYPE string.
      CLEAR: lv_pernr, lv_usrid, lv_adrnr,
             lv_mail, lv_sendor, lv_receiver,
             lv_header, lv_body .
      lv_usrid = gv_ernam.
      SELECT SINGLE persnumber addrnumber FROM usr21
             INTO (lv_pernr,lv_adrnr)
             WHERE bname = lv_usrid.
      IF sy-subrc = 0.
        SELECT SINGLE smtp_addr INTO lv_mail FROM adr6
               WHERE addrnumber = lv_adrnr AND
                     persnumber = lv_pernr.
        IF sy-subrc <> 0.
          CONCATENATE lv_usrid '@anc.com' INTO lv_mail.
          lv_receiver =  lv_mail.
        ELSE.
          lv_receiver =  lv_mail.
        ENDIF.
       lv_receiver =  '[email protected]'.
        lv_sendor = 'JALKHATAM'.
        lv_header = 'Reservations Reminder'(014).
        lv_str  = 'Pls check your SAP Inbox'(019).
        lv_str1 = 'for the status of Reservations Due List'(020).
        CONCATENATE lv_str lv_str1 INTO lv_body
        SEPARATED BY space.
    Call Function Module To send mail
        CALL FUNCTION 'UWSP_SEND_MAIL_TO_WEB'
          EXPORTING
            id_header           = lv_header
            id_body             = lv_body
            id_receiver         = lv_receiver
            id_sender           = lv_sendor
      ID_HTML_MAIL         =
           id_commit_work       = 'X'
         EXCEPTIONS
           error                = 1
           OTHERS               = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " send_mail_external
    Reward points for useful Answers
    Regards
    Anji

  • Project Budget Checking in SAP MM Purchasing

    Hi,
    As far as i know, in FM we can control whether the posting or delivery date should be taken for budget check for PR/PO. In our company, setting configured as posting date so when budget error trigged, the system will display budget base on the posting date.
    For WBS budget control (Project System), how we can control the budget checking during PR creation (ME51N), so that budget will refer to Posting Date and not by Delivery Date??.
    Data simulation in screen Purchasing (ME51N)
    Account Assignment = P
    Delivery Date  = 31/10/2010
    Cost Center = MM051000
    GL Account = 70080010
    Network No = 80001776 0010
    Error message at FUND Level :
    Item 010 MM051000 /70080010 payment budget exceeded++
    _Message no. BP629
    _Diagnosis
    _In document item 010 MM051000 /70080010, payment budget on MM051000 /BS020209 for fiscal year 2009 , Fund 0958 , was exceeded by 18,000.00 MYR.
    Error message at WBS evel
    Item 010 Ntwk actvty 80001776 0010 budget exhausted
    Message no. BP608
    Diagnosis
    In document item 010 Ntwk actvty 80001776 0010, budget for WBS element P.000064.20 for fiscal year 2010 is exhausted.
    Regards,
    Azmiey

    Under OPS9, below are the settings. Base on this setting, it's configured as "Annual budget released".
    Profile               MI0001                                                           
    Text                  MyCOmpany Budget Profile                                                                               
    Past                  4                  Program type budget   = ' '                        
    Future               4                                                                
    Start                 0                                                                               
    Decimal places = ' '                     Activation Type 1  Usage             0.00     
    Scaling factor       0                    Overall = ' ', Release = 'X',  Object Currrency =' '                                                                               
    Exchange Rate Type   M                                                                
    Value Date = ' '                                                                        
    Budgeting Currency : 'X' Controlling area currency               
    Tried untick "Release" to make it as annual budget also same error budget which still refer to year budget 2010. Any steps did i'm missing?

  • After downloading Firefox, my e-mail spell check doesn't work

    for years I had used IE. I recently installed Firefox and now my e-mail spell check doesn't work. The dictionary is loaded but cannot figure out how to resolve this. It still works when using IE, so am assuming it's a Firefox glitch.

    Do you have a dictionary installed and selected?
    * You can see which dictionary is selected if you right-click in a text area and open the Languages submenu.
    * Open the "Add Dictionaries" link to install a dictionary if you do not have one.
    * Make sure that [X] "Check Spelling" in the right-click context menu is check-marked.
    You can enable or disable spell checking globally:
    * Tools > Options > Advanced : General: Browsing: "Check my spelling as I type"
    You can look here for dictionaries:
    * https://addons.mozilla.org/firefox/language-tools/
    See also:
    * http://kb.mozillazine.org/Spell_checking
    * http://kb.mozillazine.org/Dictionaries
    * https://support.mozilla.com/kb/Using+the+spell+checker

  • Bug in Mail: Plain-Text | Rich-Text-Mails

    Hi,
    just found a bug in Mail (Mac OS X 10.6.2):
    I am using a faxservice-provider, which sends my PDF-files to the transmitted fax-number.
    This stopped working a few weeks ago, the recipients of my faxe just get blank pages.
    I talked to the provider and they told me, that I was sending "Multi-Part-HTML"-mails, so their fax-software just sends the first part of the mail (some blank lines) and not the attached PDF-file.
    So I checked a few thing and found the following bug:
    Mail is set up to send mails only as "plain-text"-mails.
    But if i send an email via the print-dialog ("send PDF per Mail") Mail creates a Rich-Text-mail. This also happens when using the "send PDF via Mail button" in Adobe Reader.
    The created Mail is NOT a plain-text-mail!
    Saving a PDF-file to the desktop and dragging the file to the Mail-Icon in the dock creates a "Plain-Text-File".
    So you need to check the format of the Mail in the "Format-Menu". If you change the format at this place to "Plain-Text" everything is working fine.
    Something in this Automator-workflow-script is working wrong. This workflow just has the order to create a new Mail with the PDF as attachment, so I can't change anything their. But the error must be founded in this script/workflow.
    Sven

    And it's only a Gmail issue, not in, for example, Google Docs.

  • My iphone4 has suddenly stopped playing text, mail

    my iphone4 has suddlenly stopped playing text, mail & keypad tones but the ringtones & alarm clock work fine! Help

    Have you checked all the volume settings?  Look under sounds.  You also might want to try doing a soft reset.

  • Changes in Budget checking during creation of purchase requisition

    Hi Experts,
    My client wants changes the current  Internal Order BUget checking. Currently Budget checking happens with availability control ie. 105% Suppose current budget is 8000. It will add 5% and Purchase reqn checks the fund available with 8400 less budget utlised, but client wants 8000 less budget utilised as they want to keep 5% aside for the unforseen cases.
    Cilent does not want to change the current availability setting i.e 105%, retaining that availability check, client wants to check the availability excluding tolerance. What is the solution for this.
    Appriciate your immediate response.
    Thanks & regards
    Veda Pandit

    Hi,
    I think you shall set 100 % limit for purchase order and purchase requisition and 105% for good receipt.
    You can do so in customizing "Define Tolerance Limits for Availability Control" , using the activity group.
    Paolo

  • Can any body tell me the transaction for budget check in SRM ?

    HI,
    Experts,
    As i want to check the budget of a business partner / customer i am new to that can u please tell me basic information about budget check and pass the Standard transaction for budget check.
    Thanks in advance,
    Shabeer Ahmed

    Hi    Dinesh,
    Thanks for your reply and can u send me the Budget check standard transaction and related tables and how he going to check his budget.
    According to me:
    1    In which table Amount is maintained for BP
    2   How we have check the budget.
    Do u have any document related to this please forward it to me.

  • PO being posted without budget check

    In our organisation, Funds Management has been activated from the year 2007 onwards. Budget check has been defined at the time of creation of PR else if a PO is created without the PR then the budget checks at PO level.
    The fund center is defaulted from the cost center entered as the cost center is mapped 1:1 with the fund center. The comittment item is also defaulted from the GL entered.
    BUt for the fund center and comittment item combination no budget has been defined for the current year 2009. Yet the PO and GR is happening without the budget check.
    This is happening only from the last month. But no configuration change has taken place.  What cud be the possible reason?? Currently we are on ECC6 version.
    Kindly help.
    Thanx
    Shivaji

    Availability control has been activated for the current year 2009 also.
    Yet there is no check for budgets at either PR or PO level. But for a financial transaction thru F-02 it checks for the budget for the same Fund center and Commitment item combination.
    IS there some other check too??
    Shivaji

  • How to change the text mail of Workflow Notification?

    Hi all,
    I would like to change the text mail of workflow notification. I took a look at the Help Sap and saw how to customize the text mail notification. Unfortunately, I could not found the text for workflow Notification at “notificationTexts_<language>.properties”.
    Is possible to change the text mail of Workflow Notification?
    Thanks in advanced,
    Alcides Flach

    Hi Alcides,
    Please refer to the following link.
    https://www.sdn.sap.com/irj/sdn/thread?threadID=40700
    Rajiv

  • Error occurred during budget check

    Good Morning PS Gurus<
    We are unable to increase the quantity of the matearil
    in project & save. It’s throwing error
      Error occurred during budget check, see cost protocal
      Message Number :IW172
      Diagnosis:
      An error occurred during budget availabilty check
      Procudure:
      Display the cost determination log for the order or network plan for more detailed information.
       We do’t have budget in our project. I checked budget TL ( it said warning message:1)
    Please throw light on this issue.
    Thanks
    PY

    Hello Team,
    When i select the network-activityà extrasà logsà cost calculation.  
    It said WBS <<PRO1234> do't exist CJ021
    Please help.
    Thanks
    PY

  • Problem in Commitment line items & Budget check

    Hi Experts,
    I am facing a problem in my system for Commitment line items & budget check.
    I followed the below steps:
    1. Created Project & structured the same.
    2. Allocated the Budjet for WBS Elements.
    3. Released the project.
    4. The PRs are created for material and external services.
    5. When I check in the report S_ALR_87013558 the commitments are not showing in the report.
    6. After I performed the PO & GR (the PO value is more than the budget), still it is not producing any error message.
    7. I have even consumed the material, for which the cost is more than the budget, still there is no error message from the system.
    8 . I tried to perform transfer posting of the material from other plant or initial posting of the goods using 561 Q, at that time the system is producing the error message.
    9. When I check the above report after GR & GI the actual line items are showing.
    The problem is that why system is not creating the commitment line items.
    In customization I have maintained as below:
    1. Budget profile
    2. Assigned the Budget profile to Project profile.
    3. Maintained the tolerance limits for the controlling area and budget profile combination.
    4. I have created the B/S G/L accounts as cost elements with category 90 (statistical).
    5. AVAC for the WBS elements is active for the WBS elements
    My doubt is:
    Why system is not writing commitment line items?
    Even after writing the Actual line items why the error message is not produced?
    I am understanding that since the GR from PO is being done, probably this GR is not producing the error message as it is linked with the PO commitment. But at the time of GI the error message should be produced.
    Can any one help me for solving this issue?
    I tried searching the forum before posing, but couldnot get a relevant one.
    Regards,
    Praveen

    Dear Nitin,
    Yes I have checked it and the commitment management is active.
    I also checked the table RPSCO table as well, there is no entried with the value key 21 or 22, the entires are available with 41  only for my project.
    Also, I was maitaining the WBS element in a maintenance order. When I am trying to enter the materials in componenet tab, if the value is exceeding the budget value it is producing the error message.
    Praveen

  • Components to be activated for Budget check in the table TRWCA

    hi,
    I want to know the components to be activated for budget check in the TRWCA table. I want to check the budget at the time of  PO creation , Goods reciept/Invoice receipt creation  using Network account assignment in PO  which is having WBS element and Project in its higher level.
    Thanks
    Rao

    ok well!
    Brother system will only check the budget, when your availability control is active.
    Further, as per your configuration, system will only prompt error  message when your budget exhausted 100%. ok
    please follow the same then  let me know
    check your WBS status is there avaiablity control active, when you entered the amount for budget/release.
    also check the transacion "CJBV - Activate Availability Control "
    Note: when ever you change the setting of your budget profie, must reconstruct the availability control transaction code is :CJBN/CJEN
    Thanks

Maybe you are looking for

  • MIGO Transaction

    Hi All, While creating the "Goods Receipt" in MIGO transaction, I have to update the "City of Origin" (EIP0-HERKL) field (Import tab -> click on "Detail", again click on "Origin/Destination/Business"). I donot have to manually update this field, I wa

  • APO - Sales order creation need help

    Hi Guys , I am new to SAP APO . We are trying to create 13000 sales order everyday using abap BAPI - BAPI_SLSRVAPS_SAVEMULTI2. it is taking more than 2 hours . Can you guys help me is there any other way to create Sales order . I need to know transac

  • Firefox won't open localhost files, it downloads the file instead and then won't show images, IE9 localhost works fine.

    I have installed XAMPP to preview web pages locally. Everything works fine in IE9 but not in Firefox. When I load a localhost page Firefox downloads the file, then displays the downloaded file without showing images within the page. So, in IE9 the ad

  • Moire whe using patch tool or blur filters

    I got hold of a Pentax 645Z recently and did a few shoots with it. When I was trying to clean up the background using the patch tool something weird happened - instead if getting the smooth finish I am used to, it resulted in wavy patterns. I tried t

  • After Effects error: Ray-trace 3D ( 5070 :: 12 )

    I'm getting the following errors: After Effects Arror: Ray-traced 3D: Initial shader compile failed. (50 70 :: 12) Ray Traced 3d: Out of paged mapped memory for ray tracer. Your project may exceed GPU limits. Try closing other applications. Try updat