MPLS - How are external/internal routes distinguished?

Hi all
I was setting up an MPLS environment and wanted to get some more information about how MPLS VPN's work. Basically I have three sites connected to the MPLS cloud. Site A runs EIGRP on the customer side and Site B runs OSPF on the customer side. Site C is the one in question. The way I have it designed, Sites A and C have full visability into one another and sites B and C have full visibility into one another. When I configure site C with eigrp, all proper routes are seen, but the OSPF routes from site B are seen as EIGRP external routes. When I switch site C to OSPF, EIGRP routes from site A are seen as OSPF External type 2 routes. I guess my ultimate question is, How does the PE router at site C know the originating protocol? All the routes it receives are from BGP. Does a certain attribute carry this? If so, is this feature specific to Cisco gear or an RFC standard? Thanks in advance for all your help. I can include configs if that would help, below I'll show you my RD and RT's for each VRF and the routing tables of the CE router at Site C before and after the change.
Site A
ip vrf a
rd 1:111
route-target export 1:100
route-target import 1:101
Site B
ip vrf c
rd 3:333
route-target export 3:301
route-target import 1:101
Site C
ip vrf a
rd 1:111
route-target export 1:101
route-target import 1:100
route-target import 3:301
Change from EIGRP to OSPF
Gateway of last resort is not set
     6.0.0.0/32 is subnetted, 1 subnets
D       6.6.6.6 [90/435200] via 10.2.1.1, 00:05:26, Ethernet0/0
     7.0.0.0/32 is subnetted, 1 subnets
C       7.7.7.7 is directly connected, Loopback1
     8.0.0.0/32 is subnetted, 1 subnets
D EX    8.8.8.8 [170/2560025856] via 10.2.1.1, 00:02:13, Ethernet0/0
D EX 111.0.0.0/8 [170/2560025856] via 10.2.1.1, 00:02:13, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       10.2.1.0/24 is directly connected, Ethernet0/0
D       10.1.1.0/24 [90/307200] via 10.2.1.1, 00:05:56, Ethernet0/0
D       10.20.0.0/16 [90/435200] via 10.2.1.1, 00:05:56, Ethernet0/0
C       10.77.0.0/16 is directly connected, Loopback2
D EX 192.168.1.0/24 [170/2560025856] via 10.2.1.1, 00:02:43, Ethernet0/0
R7(config)#no router eigrp 22
*Mar  1 02:10:20.747: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 22: Neighbor 10.2.1.1 (Ethernet0/0) is
down: interface down
R7(config)#router ospf 3
R7(config-router)#network 10.0.0.0 0.255.255.255 area 0
R7(config-router)#network 7.7.7.7 0.255.255.255 area 0
R7(config-router)#end
R7#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     6.0.0.0/32 is subnetted, 1 subnets
O E2    6.6.6.6 [110/409600] via 10.2.1.1, 00:00:27, Ethernet0/0
     7.0.0.0/32 is subnetted, 1 subnets
C       7.7.7.7 is directly connected, Loopback1
     8.0.0.0/32 is subnetted, 1 subnets
O IA    8.8.8.8 [110/21] via 10.2.1.1, 00:00:27, Ethernet0/0
O IA 111.0.0.0/8 [110/21] via 10.2.1.1, 00:00:27, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       10.2.1.0/24 is directly connected, Ethernet0/0
O E2    10.1.1.0/24 [110/1] via 10.2.1.1, 00:00:26, Ethernet0/0
O E2    10.20.0.0/16 [110/409600] via 10.2.1.1, 00:00:26, Ethernet0/0
C       10.77.0.0/16 is directly connected, Loopback2
O IA 192.168.1.0/24 [110/11] via 10.2.1.1, 00:00:26, Ethernet0/0
R7#trace 6.6.6.6
Type escape sequence to abort.
Tracing the route to 6.6.6.6
  1 10.2.1.1 652 msec 396 msec 192 msec
  2 40.1.1.9 [MPLS: Labels 18/24 Exp 0] 2264 msec 2640 msec 2532 msec
  3 30.1.1.3 [MPLS: Labels 18/24 Exp 0] 2320 msec *  *
  4 10.1.1.1 [MPLS: Label 24 Exp 0] 1816 msec 1792 msec 2148 msec
  5 10.1.1.2 1940 msec *  2200 msec
R7#

Hello Edward,
I see nothing strange in the results you have posted. They are completely natural to the process of carrying customer routes over MPLS L3 VPN.
You know yourself that the customer routes are carried between PE routers using BGP, and from PE towards CE, these routes are redistributed from BGP into the particular routing protocol running between PE and CE. Each of these routing protocols automatically marks redistributed networks as external networks. For OSPF, this is a normal part of the open protocol specification - that routes injected into OSPF via redistribution shall be represented as external routes (and carried in LSA-5). Similarly, when you redistribute into EIGRP from a different routing protocol, these routes will be carried by EIGRP as external networks. So what you see here is natural and normal. Even if all sites ran the same routing protocol (EIGRP or OSPF), one site would see networks from other sites as external routes.
In fact, there are extensions to BGP using extended community attributes that try to preserve the original nature of the redistributed routes. The prerequisite is that all sites run the same IGP, either OSPF or EIGRP. In that case, EIGRP routes carried over MPLS can be made look like internal routes although they are redistributed, and OSPF will make the routes appear as inter-area routes, not as external routes. There is even a modification to OSPF allowing you to see other sites as intra-area routes (though this requires configuring so-called OSPF sham links between PEs). All of this is done because an internal network is always preferred to an external network. This causes trouble if there is a backup link directly interconnecting two sites, bypassing the MPLS cloud. As the routing protocol run over this link advertises all networks as internal, this link would always be preferred to the MPLS VPN which is exactly the opposite of what you want to do.
Please feel welcome to ask further!
Best regards,
Peter

Similar Messages

  • If you've upgraded to the Rev. 1 router how are you liking it?

    If you've upgraded to the Rev. 1 router how are you liking it over the old one that you had? Wired speeds aside are you getting more or less wireless speeds or not much difference? This of course applies if your wireless cards can handle the higher speeds.
    Range any better?
    Looking for feedback as I'm still deciding if I want to upgrade my Westell 7100 to the Rev. 1 because I'd have to upgrade my pc's network card as well.

    TNS_2 wrote:
    I assume you mean REV I (letter i) .  Speed is better range is about the same.
    I that case then cheaper and more likely better to just purchase your own router/wap and and it to the internal network.
    I you don't have tv as part of your package then could request to change to ethernet connection from ont and just replace the westell with your own router.

  • Leading 0's in BW have been removed in BPC but how to convert internal to external for hierarchy load.

    When loading MD/Hierarchy into BPC from BW, I'm removing 0's appended to MD using js: parseInt(%external).
    BW --> 000000123456
    BPC -->123456
    But when loading Hierarchy later I need to have a conversion which allow me tell system that BPC members are without 0's
    BW-->000011111
    BPC-->11111
    I've tried the below different conversion mappings but didn't work.
    External               Internal
          *                    js:parseInt(%external)
    0000?????              ?????
    0000*                       * 
    Some how I need to tell system that 000011111 has been changed to 11111 in BPC.
    Can you guys please help me with the correct conversion??

    Hi Asif,
    js:parseInt(%external) is correct, make sure you are applying the conversion for all the IDs and NODEs.
    Andy

  • Beep the internal speakers, while there are external plugged?

    How can I use the "beep" command and have the laptop beep even if there are speakers connected through the audio port, but switched off? Want to be able to set the beep to inform me of certain events, even when the external speakers are off (I keep them always plugged in though).
    Any ideas?
    Last edited by Prowler (2012-06-15 14:30:31)

    ewaller wrote:
    You need to provide just a bit more information.  Not all audio systems are created equal.  It may be possible, but you need to at least tell us the make and the model.
    Beyond that:
    what is the audio chip?  lspci -nn
    What audio codecs are there on your system?
    Are you using Pulseaudio?  Are you willing to?
    Are you using Jack? Are you willing to?
    lspci -nn | grep -i audio
    00:1b.0 Audio device [0403]: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio [8086:3b56] (rev 05)
    audio codes (providing loaded modules, I think that are "codecs")
    http://pastebin.com/raw.php?i=bqdwghQs
    Card: HDA Intel
    Chip: Conexant CX20585
    on that card, in alsamixer I have: Master, PCM, Beep, Capture, Analog Mic Boost
    Using pulseaudio with alsa, controlling through pavucontrol usually.
    Wouldn't think it would be that system specific, I believe it acts the same way, prefering external speakers,  on every linux?
    @alphaniner
    that is my problem, when there are external speakers plugged in, it just produces the beep sound through the speakers.
    Last edited by Prowler (2012-06-15 15:14:37)

  • How are materialized view refreshes scheduled internally ?

    DB Version: 11.2.0.3/RHEL 5.9
    How are materialized view refreshes scheduled internally in 11.2 ? Is it done using DBMS_JOB or DBMS_SCHEDULER internally?

    Hi,
    Its old style dbms_jobs - see example below:
    SYS@EETGRID>create materialized view test refresh complete start with sysdate next sysdate+1/24 as select * from session_roles;
    Materialized view created.
    SYS@EETGRID>select * from user_jobs;
           201 SYS                            SYS
    SYS                            24-JUL-2013 14:09:20 14:09:20
                                  24-JUL-2013 15:09:20 15:09:20          0 N
    sysdate+1/24
             0
    dbms_refresh.refresh('"SYS"."TEST"');
    NLS_LANGUAGE='ENGLISH' NLS_TERRITORY='UNITED KINGDOM' NLS_CURRENCY='#' NLS_ISO_C
    URRENCY='UNITED KINGDOM' NLS_NUMERIC_CHARACTERS='.,' NLS_DATE_FORMAT='DD-MON-RRR
    R HH24:MI:SS' NLS_DATE_LANGUAGE='ENGLISH' NLS_SORT='BINARY'
    0102000202000000                                                          0
    SYS@EETGRID>
    Regards,
    Harry

  • How to view internal order,Business area wise?

    Hi experts,
    as u know,we are creating internal order under a business area.
    Now my problem is,when i am trying to view internal orders in KO03 ,business area wise,its showing me all the internal orders and B.Area is not showing dide to that.
    Any other T.CODE available to view internal orders Business Area wise?
    Plz suggest.
    Regards,
    Sumeya Offrin

    Thank you kalyan,
    It really helped me upto some extent.
    In KOK5,i created a new varient and able to view internal orders B.Area wise but i am missing some internal orders which are available in KO03.
    Suggest any alternative solution.
    I ll appreciate for the quick response.
    Regards,
    Sumeya
    Edited by: sumeya offrin on Mar 4, 2009 11:07 AM

  • How are pictures in Photoshop elements 9 linked to program?

    I have 40,00 plus pictures shown in my elements program and since I bought and loaded Photoshop elements 9 (I previously had versions 3,4,5,6,7,8), I get the notice "searching for missing files" and can't use the program software for photo processing. I downloaded all my pictures from Windows 7 pictures on my computer and uninstalled Photoshop Elements 9 from my computer..
    When I reinstalled PE 9, my pictures were there even though I had eliminated them (I thought) from my hard drive and the problem of "searching for muissing file" still existed.
    How are my pictures attached to PE 9 and how do I eliminate that link and start all over with PE 9?
    Need help

    Ohboy 108Thanks for your suggestions and interest.I downloaded all my pictures to an external hard drive, cleared out my internal hard drive photos and now use my external hard drive as the storage and source.No problem with "Elements" constantly looking for lost files.
    Greg Date: Wed, 13 Jun 2012 16:46:55 -0600
    From: [email protected]
    To: [email protected]
    Subject: How are pictures in Photoshop elements 9 linked to program?
        Re: How are pictures in Photoshop elements 9 linked to program?
        created by Ohboy108 in Photoshop Elements - View the full discussion
    My guess is that you have solved the problem but if continues maybe this will help. I had a similar problem where pictures kept showing up in Organizer even though I had deleted the catalog and rebuilt it and even uninstalled and reinstalled PSE 9.  I solved it by checking under edit-preferences-files and making sure that the save location was correct.  I also changed the catalog location from the default.  I suspect that there was a registry entry pointing to the old file and/or catalog location.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4490681#4490681
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4490681#4490681. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How are contract and service order related....urgent

    Hi all
    I am ABAP consultant...
    I am working on Service contract Cost Management threshold alert report...
    I want clear idea as to how are contract and service order related....
    BAsed on contract type and contract start and ,end date,sold to party....
    i need to get contract ,item , service order no: , and i have to calculate <b>INTERNAL ,EXTERNAL LABOUR, INTERNAL,EXTERNAL material COST</b>
    plz help me out...
    Thanks in advance,
    Madhavi.

    Dear Madhavi,
    http://www.erpgenie.com/abap/tables_sd.htm
    VBFA Sales Document Flow
    KONV Conditions for Transaction Data
    KONP Conditions for Items
    LIKP Delivery Header Data
    LIPS Delivery: Item data
    VBAK Sales Document: Header Data
    VBAP Sales Document: Item Data
    VBBE Sales Requirements: Individual Records
    VBEH Schedule line history
    VBEP Sales Document: Schedule Line Data
    VBLB Sales document: Release order data
    VBLK SD Document: Delivery Note Header
    VBPA Sales Document: Partner
    VBRK Billing: Header Data
    VBRP Billing: Item Data
    VBUK Sales Document: Header Status and Administrative Data
    VBUP Sales Document: Item Status
    VEKP Handling Unit - Header Table
    VEPO Packing: Handling Unit Item (Contents)
    VEPVG Delivery Due Index
    Also, go through:
    http://www.erpgenie.com/abap/tables.htm
    Regards,
    Naveen.

  • Incoming Sharepoint Mail: External/Internal Domain Environment

    We have setup Incoming Sharepoint 2010 Mail both on Sharepoint side and on the Exchange 2007 side (Send Connector setup). And we have no problem delivering mail from Exchange to Sharepoint.
    We have an External/Internal Domain setup.
     Our Windows DNS does not own the “A” record for our External domain Name @external.Domain.com. 
    All mailboxes/mail-enabled contacts/UDG’s/USGS are stamped with our External domain Name: @external.Domain.com because within Exchange an accepted domain (Internal Relay Type) was created for @external.Domain.com.
    Sharepoint is part of our Internal Windows domain. Sharepoint mail-enabled contacts are created as
    [email protected]
    Per Incoming mail technote: we created Active Directory Org Unit for Share Point mail-enabled contacts. These contacts replicated to Exchange Recipient Management Console and then of course
    to the Outlook Global Address List; however, the contacts are not a routable address because they are stamped @windows.Internal.Domain.com.  If we add @external.Domain.com which is a routable address, mail is delivered to the Sharepoint Site.
    Q. One thing we do not want is within our Outlook Global Address List, to show two SMTP domain names, i.e., @windows.Internal.Domain.com and @external.Domain.com this would be
    too confusing for our users. Also changing each mail-enabled contact to the routable address (@external.Domain.com would be a nightmare. Any suggestions or assistance would be greatly appreciated?

    It doesn't need to be a nightmare, you simply have to create a Recipient Update Policy and apply it to the OU containing your contacts/DLs. You also need to configure SharePoint to use external.domain.com instead of the internal domain.
    See http://thesharepointfarm.com/2013/02/a-practical-guide-to-implementing-incoming-email-using-the-sharepoint-directory-management-service/
    for more info on how this is done.
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • PA30 - Copying a Personnel No & adding email details (External & internal)

    Hi,
    In PA30, Is is possible to do the following:
    1. Copy an HR Person (Personnel No.) to a new Person. For example, the new one will be created from the copied one.
    2. Add an email address (external) to a Person (Personnel No.)
    How are the above action done?
    Thanks,
    John

    You q. no 1. copying personnel no whereby creating a new personnel no as such is isnt possible.Personnel no gets genereated during hiring actions with 0000 as INS which doesnt happen otherwise.
    q.no 2: ye su can give external email address in infotype 0105 (COMMUNICATION) in subtype MAIL, however there is another subtype for email 0010, BUT reserve it for using internal email id as most function modules/bapis etc and other programs /reports consider 0010 than MAIL subtype.

  • How are deliveries automatically created from scheduling agreement?

    How are deliveries automatically created from the schedule line of the scheduling agreement? Can anybody explain this step by step? Can we use the code VL10BATCH for this purpose? If we can, how is this code used?
    Thanks in advance.

    hi
    A customer scheduling agreement is an outline agreement with the customer containing delivery quantities and dates. These are then entered as schedule lines in a delivery schedule. You can either create schedule lines when you create the scheduling agreement or you can create them later.
    You fulfill a scheduling agreement by creating the deliveries in the schedule as they become due. You process deliveries for a scheduling agreement in exactly the same way as you process a normal delivery. After you have carried out the delivery, the system updates the Delivered quantity field in the scheduling agreement item with the delivery quantity.
    The scheduling agreement is used as a basis for delivering a material. The customer sends in scheduling agreement releases, referred to as delivery schedules, at regular intervals to release a quantity of the material.
    Document Types
    To configure document types for scheduling agreements, choose Sales -> Sales Documents -> Sales Document Header -> Define sales document types in Customizing for Sales and Distribution.
    The R/3 System contains the following document types for component suppliers:
    LZ - Scheduling agreement with delivery schedules (no external agents)
    LZM - Scheduling agreement with delivery orders
    LK - Scheduling agreement with delivery schedules (external agents)
    ED - Delivery by external agent (consignment issue)
    EDKO - External agent correction
    RZ - Scheduling agreement returns (no external agents)
    KAZU - Consignment pick-up for external agents
    KRZU - Consignment returns for external agents
    Item Categories
    To configure item categories for scheduling agreements, choose Sales -> Sales Documents -> Sales Document Item -> Define item categories in Customizing for Sales and Distribution.
    The system determines the following item categories for the related document types in
    documents containing materials with item category group NORM:
    Item category LZN for scheduling agreement type LZ
    Item category LZMA for scheduling agreement type LZM
    Item category LKN for scheduling agreement type LK
    Item category KEN for document type ED
    Item category EDK for positive corrections (or the manual alternative EDK1 for
    negative corrections) for document type EDKO
    Item category REN for document type RZ
    Item category KAN for document type KAZU
    Item category KRN for document type KRZU
    Schedule Line Categories
    To configure schedule line categories for scheduling agreements, choose Sales -> Sales Documents -> Schedule lines -> Define or Assign schedule line categories in Customizing for Sales and Distribution.
    The R/3 System contains the following schedule line categories for component suppliers:
    L1, BN, L2, and CN for item category LZN
    E4, E0, E5, and BN for item category LKN
    L2 for item category LZMA (standard for delivery order processing)
    Schedule Line Types
    To configure schedule line types for scheduling agreements, choose Sales -> Sales Documents -> Scheduling Agreements with Delivery Schedules -> Define schedule line types in Customizing for Sales and Distribution.
    Creating Scheduling Agreements
    To create a scheduling agreement with delivery schedules:
    1. In the Sales menu http://Ext. choose Scheduling agreement ->Create.
    2. Enter scheduling agreement type LK (standard) or LZ (external agents) and the
    relevantorganizational data.
    3. Choose ENTER.
    4. Enter the following data:
    Sold-to or ship-to party number
    Purchase order or closing number
    Material or customer material number
    You can use the Description field to identify the scheduling agreement. For
    example,
    you could enter the model year for a particular production series.
    The system allows up to 35 digits for a customer material number.
    Rounding quantity
    Usage
    Choose Goto -> Header -> Sales to enter the usage at header level, or Goto ->
    Item-> Sales A to enter it at item level. The system proposes usage S, for series, as default in both cases.
    Planning indicator
    Choose Goto -> Header ->Sales.
    Target quantity
    Mark an item and choose Goto -> Item -> Sales A
    Partners
    For scheduling agreements with external agents , choose Goto -> Header
    ->Partners to enter the external agent as forwarding agent and special stock partner
    on the partner function screen.
    5. Create a delivery schedule
    Mark an item in the scheduling agreement and choose Goto -> Item -> <Delivery
    schedule>. Enter:
    A delivery schedule number and date
    The cumulative quantity received by the customer
    The last delivery confirmed by the customer
    A schedule line with date, time, and quantity
    To enter additional data in the delivery schedule, choose DlvSch.Hdr (delivery schedule header).
    configuration:
    img->SD->Sales->sales document->scheduling agreements with delivery schedules->
    step1: define schedule line types
    schedule line types are not schedule line categories. Schedule line types are used for information purpose only.
    stds are 1. fixed date 2. backlog 3. immediate requirement
    4. estimate
    step2: maintain planning delivery sched. instruct/splitting rules
    The planning delivery schedule is an internal delivery schedule used to plan requirement s more efficiently.  It is sub divided into 3 parts
    2.1 delivery schedule splitting rules
    2.2 dly schedule instrusctions
    2.3 assign dly schedule splitting rules
    step3: define sales documents type
    step4 : define item categories
    step5: define schedule line categories
    step6: maintain copy control
    PROCESS
    step1:  create scheduling agreement
    VA31
    enter SP,SH valid from, valid to,
    goto ITEM OVERVIEW tab
    enter material, rouding qty
    select ITEM  click on FORECAST DLSCH
    enter different dly dates and qties
    save it.
    step2: create sales order with reference to above
    step3: create delivery
    step4: create billing
    regards
    krishna

  • External proxy routing via MAC-LIST PERMIT

    I have a school class where I want to provide internet connectivity.
    Only certain computers should be able to connect to the internet, based on the allowed MAC address.
    Of those who are allowed to connect to the internet, all browsing needs to go via an external proxy-server, for example ws.proxyserver.com:8080. Normally such an option can be set in the browser setup, but I would like this be set in the router.
    Additionally, another computer should be able to access the internet without going via the external proxy.(Voip calls)
    I saw that the CISCO 877 and PIX Firewall 501 and similar products that support the IOS CLI have the MAC-LIST PERMIT option but I don't know if and how the external proxy-server via can be accomplished.

    Refer the command reference of the pix for more details about this command.
    http://www.cisco.com/en/US/docs/security/pix/pix63/command/reference/mr.html#wp1116289

  • 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.

  • Update to kichat: FAQ 2 - How to get my router to work with iChat?

    kichat: FAQ 2 - How to get my router to work with iChat? December 2008 version 3
    (Note to Hosts. to be removed on acceptance. Please use this to replace http://discussions.apple.com/thread.jspa?threadID=121775 )
    Getting your router started with iChat.
    Appropriate for using iChatAV 2 upwards. Edits have been made for iChat 4
    Glossary for this FAQ
    Routers: Any configurable device that sits between your computer and the internet link you have. This includes Modems that Route as well as "routers"
    Routers seem to fall into two categories
    Those that work straight from the box. See Apple Article HT1787
    NOTE :This Article has not been updated in content since Jan 04 Only being changed to an Article from the Previous Doc listing
    Even then some list that they need tweaks.
    and those that do not.
    This post will deal with what you may need to look at.
    First off make sure your device is acting as a DHCP server. (if you are already on the internet you may not have to bother with this.)
    Check in the Tiger System Preferences > Network Preference Pane, in the "Built in Ethernet" option from the "Show" drop down list.
    In Leopard the Networks are listed on the left with icons. The Airport Option will need you to access the Advance Button for the Next bit.
    Make sure the TCP/IP tab is the 'front' one. You should be able to see Configure IPv4 and it most likely reads Using DCHP. Make a note of your IP address. It will start 10.xxx.xxx.xxx or 192.168.xxx.xxx (the 'x' s will stand for any number between 1 and 255). The range 172.16.xxx.xxx is also a possible value at this point. Rarely used, but it is part of the RFC for Address Allocation for Private Internets.
    Your router is most likely to be configurable from your browser. You will need to find the IP address to type into the browser from any Readme or PDF files that came on the install disk or visit the makers website and download a manual.
    The Port Forward.com site lists many devices and clicking on one will take you to a list of Applications. This iChat will open an page that will start by telling you the defaults to access the device
    Opening or Allowing ports. Several Methods not all devices have all of them.
    DMZ (Demilitarised Zone)
    This is a less secure setting that basically opens all ports and points the incoming data to your computer. (not helpful if you have more than one computer on your LAN). It can be considered as an extreme form of Port Forwarding
    Port Forwarding (also Virtual Server or Pin Holes)
    These settings are usually found in an Advanced setting.
    You may need to set an incoming IP address (Usually 0.0.0.0 to any outside server), a port that data will arrive on, the Inside computer's IP address (your computer) and the port it will deal with the data on and the protocol it will use.
    See this pic for an example of the description above.
    In this example shows that on some Port AND Protocols need to be listed.
    iChat uses TCP and UDP so some devices will need the ports listed one by one and some settings done twice, once for each protocol. The example above has a "Both" setting
    See Apple Article HT1507 Previously Doc 93208 for more information. This is the Tiger iChat 3 list. The same ports are needed for Leopard except for these changes
    My Note 2:
    On the first link Note 1 under tables in that link would be better if it read:
    " 1. All iChat AV traffic is UDP -
    except for ports 5190 and 5298, which need to be open for both TCP as well;
    and 5220, 5222, which need to be open for TCP only. "
    Note 2
    GoggleTalk needs port 5223 on TCP. Also note the Server name for iChat 3 set ups
    UPnP Universal Plug n Play.
    This is a simple Plug and Play type of setting. iChat can find it's own way through a router if the device has this capability.
    By Not doing Port Forwarding, Triggering or DMZ and enabling UPnP the application is allowed to control the modem and the ports that are open.
    They close after the application has finished with them on a timed basis.
    On some devices the number of "hops" (how far away the UPnP can be "seen") can be reduced from a default of 4)
    Trigger Ports
    Some devices offer a security measure that works by a first or trigger port receiving a data packet and then opening further ports when accepted.
    The first port for incoming Video or Audio invites is port 5678.
    Pre iChat 4
    When you click on the invite window the process moves in to port 5060 (so these will need to be opened by the trigger port) for negotiating the final group of ports from the group of 20 (16384-16403 These will need to open when the trigger says so as well). Therefore port 5678 triggers ports 5678, 5060, 16384-16403. All on UDP. Port 5190 neeeds to trigger port 5190 for both TCP and UDP.
    See this variation where only the ports listed above are completed.
    The other single ports need to be set one by one in addition. (5220,5222, 5223 5297, 5298, 5353)Replace
    iChat 4
    The port used in IChat 4 is port 16402 instead of port 5060. The group of 20 ports is reduced to 10 (16393-16402). This is because all the In and Out Audio and Video data is on one port. Other that than the settings are the same.
    At this time there is no Info on the ports the Screen Sharing in iChat 4 uses.
    Wireless
    Here you will have to read around but this Apple Article TA25949 Previously Doc 58514 might be a good starting place.
    Essentially whether you are wireless or Ethernet to your routing device makes very little difference to the way you do things.
    Your computer will get two IPs from a DHCP server if you are connected by both methods. (iChat does not like this)
    Multiple devices
    Make sure only one is acting as a DHCP server. Make sure wireless devices are bridged properly.
    Further Help
    I have found that this site (ADSLGuide) to be helpful.
    It is British based but I have linked you to the Apple Related Discussions Forum.
    Eliminating Problems on my Personal web pages.
    The ports and their function within iChat. (my personal Web pages again)
    This is not a step by step approach. You will have to read around the information about your device.
    Collected FAQs and Expansions: Index Page Based on FAQs here by EZ Jim and myself
    Also http://www.portforward.com/routers.htm for instructions with Pics on Port Forwarding and access info as mentioned earlier.
    Click on your device.
    Select iChat on the next page.
    Follow the info on the next.
    This site is godd for finding out the Default IP to use in a web browser and the default User ID and Passwords needed to do so.
    Gives you a chance to look at at pics to give clues to where some of these other things are.
    With thanks to Macmuse for comment on the Original (Aug 23rd 2004)
    and to EZ Jim for his work on iSights on my web pages.
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.
    9:51 PM Saturday; December 6, 2008

    kichat: FAQ 2 - How to get my router to work with iChat? December 2008 version 3
    (Note to Hosts. to be removed on acceptance. Please use this to replace http://discussions.apple.com/thread.jspa?threadID=121775 )
    Getting your router started with iChat.
    Appropriate for using iChatAV 2 upwards. Edits have been made for iChat 4
    Glossary for this FAQ
    Routers: Any configurable device that sits between your computer and the internet link you have. This includes Modems that Route as well as "routers"
    Routers seem to fall into two categories
    Those that work straight from the box. See Apple Article HT1787
    NOTE :This Article has not been updated in content since Jan 04 Only being changed to an Article from the Previous Doc listing
    Even then some list that they need tweaks.
    and those that do not.
    This post will deal with what you may need to look at.
    First off make sure your device is acting as a DHCP server. (if you are already on the internet you may not have to bother with this.)
    Check in the Tiger System Preferences > Network Preference Pane, in the "Built in Ethernet" option from the "Show" drop down list.
    In Leopard the Networks are listed on the left with icons. The Airport Option will need you to access the Advance Button for the Next bit.
    Make sure the TCP/IP tab is the 'front' one. You should be able to see Configure IPv4 and it most likely reads Using DCHP. Make a note of your IP address. It will start 10.xxx.xxx.xxx or 192.168.xxx.xxx (the 'x' s will stand for any number between 1 and 255). The range 172.16.xxx.xxx is also a possible value at this point. Rarely used, but it is part of the RFC for Address Allocation for Private Internets.
    Your router is most likely to be configurable from your browser. You will need to find the IP address to type into the browser from any Readme or PDF files that came on the install disk or visit the makers website and download a manual.
    The Port Forward.com site lists many devices and clicking on one will take you to a list of Applications. This iChat will open an page that will start by telling you the defaults to access the device
    Opening or Allowing ports. Several Methods not all devices have all of them.
    DMZ (Demilitarised Zone)
    This is a less secure setting that basically opens all ports and points the incoming data to your computer. (not helpful if you have more than one computer on your LAN). It can be considered as an extreme form of Port Forwarding
    Port Forwarding (also Virtual Server or Pin Holes)
    These settings are usually found in an Advanced setting.
    You may need to set an incoming IP address (Usually 0.0.0.0 to any outside server), a port that data will arrive on, the Inside computer's IP address (your computer) and the port it will deal with the data on and the protocol it will use.
    See this pic for an example of the description above.
    In this example shows that on some Port AND Protocols need to be listed.
    iChat uses TCP and UDP so some devices will need the ports listed one by one and some settings done twice, once for each protocol. The example above has a "Both" setting
    See Apple Article HT1507 Previously Doc 93208 for more information. This is the Tiger iChat 3 list. The same ports are needed for Leopard except for these changes
    My Note 2:
    On the first link Note 1 under tables in that link would be better if it read:
    " 1. All iChat AV traffic is UDP -
    except for ports 5190 and 5298, which need to be open for both TCP as well;
    and 5220, 5222, which need to be open for TCP only. "
    Note 2
    GoggleTalk needs port 5223 on TCP. Also note the Server name for iChat 3 set ups
    UPnP Universal Plug n Play.
    This is a simple Plug and Play type of setting. iChat can find it's own way through a router if the device has this capability.
    By Not doing Port Forwarding, Triggering or DMZ and enabling UPnP the application is allowed to control the modem and the ports that are open.
    They close after the application has finished with them on a timed basis.
    On some devices the number of "hops" (how far away the UPnP can be "seen") can be reduced from a default of 4)
    Trigger Ports
    Some devices offer a security measure that works by a first or trigger port receiving a data packet and then opening further ports when accepted.
    The first port for incoming Video or Audio invites is port 5678.
    Pre iChat 4
    When you click on the invite window the process moves in to port 5060 (so these will need to be opened by the trigger port) for negotiating the final group of ports from the group of 20 (16384-16403 These will need to open when the trigger says so as well). Therefore port 5678 triggers ports 5678, 5060, 16384-16403. All on UDP. Port 5190 neeeds to trigger port 5190 for both TCP and UDP.
    See this variation where only the ports listed above are completed.
    The other single ports need to be set one by one in addition. (5220,5222, 5223 5297, 5298, 5353)Replace
    iChat 4
    The port used in IChat 4 is port 16402 instead of port 5060. The group of 20 ports is reduced to 10 (16393-16402). This is because all the In and Out Audio and Video data is on one port. Other that than the settings are the same.
    At this time there is no Info on the ports the Screen Sharing in iChat 4 uses.
    Wireless
    Here you will have to read around but this Apple Article TA25949 Previously Doc 58514 might be a good starting place.
    Essentially whether you are wireless or Ethernet to your routing device makes very little difference to the way you do things.
    Your computer will get two IPs from a DHCP server if you are connected by both methods. (iChat does not like this)
    Multiple devices
    Make sure only one is acting as a DHCP server. Make sure wireless devices are bridged properly.
    Further Help
    I have found that this site (ADSLGuide) to be helpful.
    It is British based but I have linked you to the Apple Related Discussions Forum.
    Eliminating Problems on my Personal web pages.
    The ports and their function within iChat. (my personal Web pages again)
    This is not a step by step approach. You will have to read around the information about your device.
    Collected FAQs and Expansions: Index Page Based on FAQs here by EZ Jim and myself
    Also http://www.portforward.com/routers.htm for instructions with Pics on Port Forwarding and access info as mentioned earlier.
    Click on your device.
    Select iChat on the next page.
    Follow the info on the next.
    This site is godd for finding out the Default IP to use in a web browser and the default User ID and Passwords needed to do so.
    Gives you a chance to look at at pics to give clues to where some of these other things are.
    With thanks to Macmuse for comment on the Original (Aug 23rd 2004)
    and to EZ Jim for his work on iSights on my web pages.
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.
    9:51 PM Saturday; December 6, 2008

  • How to Convert internal table data into text output and send mail in ABAP

    Hi All,
    Good Morning.
    Taking a glance at a code that converts internal table data to an Excel file in ABAP. also checked how to send this excel to mailing list as attachment.
    But thought of doing it without excel.
    I mean, I have an internal table which contains fields of all types (character,integer,date,time). Since it is only around 4 to 5 rows in it (output),why to convert it to excel. not required!!.  Instead I  want to send this output to User's mails as Normal mail body with No attachments.
    Could anybody please suggest me a way as to how to send internal table data as a mail ( not as an excel or PDF etc).
    as of now my findings are, it is quite complex to convert internal table data to email (Text) format. but i believe if there is some way of doing it.
    Best Regards
    Dileep VT

    here's something I have used in the past where we send out information about failed precalculation settings (which are stored in internal table gt_fail)
    notice we use gt_text as "mail body"
    TRY.
    *     -------- create persistent send request ------------------------
           gv_send_request = cl_bcs=>create_persistent( ).
    *     -------- create and set document -------------------------------
    *     create text to be sent
           wa_line = text-001.
           APPEND wa_line TO gt_text.
           CLEAR wa_line.
           APPEND wa_line TO gt_text.
           LOOP AT gt_fail ASSIGNING <fs_fail>.
             MOVE <fs_fail>-retry_count TO gv_count.
             CONCATENATE text-002
                         <fs_fail>-setting_id
                         text-003
                         gv_count
                         INTO wa_line SEPARATED BY space.
             APPEND wa_line TO gt_text.
             CLEAR wa_line.
           ENDLOOP.
           APPEND wa_line TO gt_text.
           wa_line = text-007.
           APPEND wa_line TO gt_text.
    *     create actual document
           gv_document = cl_document_bcs=>create_document(
                           i_type    = 'RAW'
                           i_text    = gt_text
                           i_length  = '12'
                           i_subject = 'Failed Precalculation Settings!' ).
    *     add document to send request
           CALL METHOD gv_send_request->set_document( gv_document ).
    *     --------- set sender -------------------------------------------
           gv_sender = cl_sapuser_bcs=>create( sy-uname ).
           CALL METHOD gv_send_request->set_sender
             EXPORTING
               i_sender = gv_sender.
    *     --------- add recipient (e-mail address) -----------------------
           LOOP AT s_email INTO wa_email.
             MOVE wa_email-low TO gv_email.
             gv_recipient = cl_cam_address_bcs=>create_internet_address(
                                               gv_email ).
             CALL METHOD gv_send_request->add_recipient
               EXPORTING
                 i_recipient = gv_recipient
                 i_express   = 'X'.
           ENDLOOP.
    *     ---------- set to send immediately -----------------------------
           CALL METHOD gv_send_request->set_send_immediately( 'X' ).
    *     ---------- send document ---------------------------------------
           CALL METHOD gv_send_request->send(
             EXPORTING
               i_with_error_screen = 'X'
             RECEIVING
               result              = gv_sent_to_all ).
           IF gv_sent_to_all = 'X'.
             WRITE text-004.
           ENDIF.
           COMMIT WORK.
    *   exception handling
         CATCH cx_bcs INTO gv_bcs_exception.
           WRITE: text-005.
           WRITE: text-006, gv_bcs_exception->error_type.
           EXIT.
       ENDTRY.
    with the following declarations
    * TABLES                                                               *
    TABLES:
       adr6,
       rsr_prec_sett.
    * INTERNAL TABLES & WORK AREAS                                         *
    DATA:
       gt_fail          TYPE SORTED TABLE OF rsr_prec_sett
                             WITH UNIQUE KEY setting_id run_date,
       gt_text          TYPE bcsy_text,
       wa_fail          LIKE LINE OF gt_fail,
       wa_line(90)      TYPE c.
    FIELD-SYMBOLS:
       <fs_fail>        LIKE LINE OF gt_fail.
    * VARIABLES                                                            *
    DATA:
       gv_count(4)      TYPE n,
       gv_send_request  TYPE REF TO cl_bcs,
       gv_document      TYPE REF TO cl_document_bcs,
       gv_sender        TYPE REF TO cl_sapuser_bcs,
       gv_recipient     TYPE REF TO if_recipient_bcs,
       gv_email         TYPE adr6-smtp_addr,
       gv_bcs_exception TYPE REF TO cx_bcs,
       gv_sent_to_all   TYPE os_boolean.
    * SELECTION-SCREEN                                                     *
    SELECT-OPTIONS:
       s_email          FOR adr6-smtp_addr NO INTERVALS MODIF ID sel.
    DATA:
       wa_email         LIKE LINE OF s_email.

Maybe you are looking for

  • How to use the ColumnDescriptor's type as CLOB?

    I want to build a metric which are used to record the content of a file. But the length of the content is too long, it may not be stored with a ColumnDescriptor's type STRING. I tried to make the TYPE='CLOB', but failed. I though it might be somethin

  • Problem with Color Print in Illustrator. Photoshop fine. Epson R2400

    OK.. I've spent all morning trying to troubleshoot bad color on Illustrator CS4 to Epson R2400 and can't find a solution. Mac  10.5.8 I'm getting off color (but a neutral grayscale) when printing to from AI 14.0 to Epson Stylus Photo R2400. This just

  • Keyword searching

    I would like to offer my users the ability to perform a "keyword" search which would allow the user to search about 90% of the fields in the xml file. What is the best way to do something like this. I currently have each field in my query seperated b

  • Languages for SDN

    I am very interested to pursue my carrier to SDN, I am good with Perl and PHP but I am not sure this languages useful for SDN. some say TCL or Phyton.  is there any one can advice me or direct me a good source to look at it.  thanks.

  • DNS Server issues on Airport Extreme since last update

    Since the last update to my Airport Extreme, my windows 7PC's show connected to internet but do not connect due to DNS server. Windows 8 computer works fine as does Mac. Mac is the only wireless computer I have mentioned. The wireless router is segre