Correct syntax to set "send as" permissions through Powershell

Hello,
A colleague of mine gave me a Powershell command to set "send as" permissions on a mailbox. His syntax is the following:
Add-ADPermission -Identity UserBeingGrantedPermission -User UserWhoseMailboxIsBeingConfigured -ExtendedRights 'Send-As'
In that example the user mentioned after "-User" is the one who's mailbox is being configured. Easy enough. Earlier Technet articles also use this syntax.
However, I stumbled across the
following article. Which clearly says:
This example grants Send As permissions for Aaron Painter to Terry Adams's mailbox.
Add-ADPermission -Identity "Terry Adams" -User AaronPainter -AccessRights ExtendedRight -ExtendedRights "Send As"
In this example "-User" is not the one mailbox that is being configured but the person that gets the rights.
So who is right? Technet or Technet?

Hi Fr0ns,
Your colleague mistook it a little bit, (and I don't think he can compete with the Technet library :)
-User <is always someone who is given permissions to>. In the Technet example - AaronPainter gets the permission to
Send As Terry Adams.
You can check it yourself pretty easily - enable command logging and attempt to assign the permissions with GUI where you clearly know who gets what.
▲ Vote if Helpful / Mark if Answer
MCSE: Messaging 2013 Charter / Private Cloud / Server Infrastructure
MaximumExchange.ru

Similar Messages

  • Unable to set send-as permissions because of hundrets of duplicate permissions

    hello,
    we are unable to set send-as permissons to mailboxes where more than 10 users already habe send-as permissions.
    when i use get-adpermission -identity "mailbox_abc" i get 4309 lines with permissions. But most are duplicates. every permission is set 31 times.
    when i remove a user there are 4278 lines, when i add an user there are 4309 lines.
    it seems that every account has between 1000 and 4000 permission lines
    when i use the GUI i only see 10 different permissions
    how can i fix it?
    thankyou in advance boris

    my problem are the hundreds of duplicates
    this is the output
    Get-ADPermission -Identity "mailbox_abc" | ?{($_.ExtendedRights -like "*send-as*") -and -not ($_.User -like "nt authority\self")} | select identity,user
    Identity                                                   
    User
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           NT-AUTORITÄT\SELBST
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\gka
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\ma
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\zr
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\fh
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\MT
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           NT-AUTORITÄT\SELBST
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\gka
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\ma
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\zr
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\fh
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\MT
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           NT-AUTORITÄT\SELBST
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\gka
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\ma
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\zr
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\fh
    sample.domain/MyBusiness/Users/SBSUsers/sample Mitglied           SAMPLE\MT
    alltogether 4300 duplicate lines but only 5 different accounts
    rg. borris

  • Set Send to permissions on distribution groups through powershell

    We have an Exchange 2013 environment on which we have created distribution groups with powershell.
    However I can't figure out how we can configure the "send to" permissions for these distribution groups.
    What we want is for Exchange to look at CustomAttribute3 in a user account, and if that attribute meets the set requirements the user will have permission to send mail to this distribution group.
    Can anyone help me with this issue? Is there a powershell command I can use to configure this?
    kind regards,
    kevin

    Hi kevin,
    You can use the following cmdlet to configure the distribution group to accept messages only from the specific users.
    Set-DistributionGroup -Identity "DGName" -AcceptMessagesOnlyFrom "xxx","xxx"
    What's more, I am afraid that the -AcceptMessagesOnlyFrom parameter does not accept the custom attribute. Your understanding will be appreciated.
    For your reference:
    https://technet.microsoft.com/en-us/library/bb124955(v=exchg.150).aspx
    Hope this can be helpful to you.
    Best regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Amy Wang
    TechNet Community Support

  • Can LabVIEW send an email through Microsoft Exchange server without an account set up in Outlook?

    I've found sample code that shows how to send email through Outlook using LabVIEW.  On any computer I log into on our network, my profile loads and I have access to the exchange server through Outlook so the code works.
    However, I am developing a program that will run on a lab computer with a generic PC login that is shared among everyone in the lab.  Exchange server/outlook is not set up for the generic user.
    Is it possible to have labVIEW send an email through the exchange server with a server name, username, and password coded into the executable?

    You would need to send a standard SMTP message via Exchange. The Exchange server will likely require authentication, so you won't be able to use the built-in SMTP VIs, as they do not support authentication. If you're on Windows you can use .NET (see this example), or use the OpenG SMTP VIs.

  • Im trying to send out a word doc and it tells me I need to set up an account with enterage. I already have my email set up with regular mail? How can I send it out through my email that is active?

    Im trying to send out a word document via email. It tells me it cannot send because I have not yet set up an account with enterage. My email is active already with Apple regular mail program. How can I send it out through reg mail?

    Save the Word document. Create your email in your normal mail application (Mail?), click on the add attachment icon (the paperclip if you are using Mail). Navigate to where you saved the Word file and select it. It should now appear as an attachment in your email. If you are sending it to a PC user and you are using Mail make sure 'Send Windows-friendly attachments' is selected in the edit menu. And if you don't want the attachment to display inline within the body of the email Control+Click on it and select 'view as icon'.

  • HT2508 My amp has an USB input but when I attach my mac pro to it, and set the input to the USB setting, no sound comes out. I looked at the system settings, but none of them produce a different outcome. How can I send the music through the USB out to USB

    My amp has an USB input but when I attach my mac pro to it, and set the input to the USB setting, no sound comes out. I looked at the system settings, but none of them produce a different outcome. How can I send the music through the USB out to USB in?

    AFAIK cameras offer their own built-in format utility for inserted SD cards.  You should use that.  Otherwise, refer to the manual that came with your camera to determine precisely how your SD cards need to be formatted to work properly.  Personally, I'd suggest Partition Scheme: MBR, and Filesystem: FAT32.
    Try to limit the number of formats you perform on the SD cards, though, as you're reducing their lifespan.  I believe formatting causes re-writes to a portion of the SD card that has fewer read/write cycles than the rest of the card as a whole.

  • Microsoft Outlook 2010 The delegates settings were not saved correctly. Cannot activate Send-on-behalf-of list. You do not have sufficient permission to perform this operation on this object.

    I am trying to assign delegation to a user and I receive the following message.
    The delegates settings were not saved correctly.  Cannot activate Send-on-behalf-of list.  You do not have sufficient permission to perform this operation on this object.
    We are using 2010 for the server and client.  There are only specific mailboxes that this is happening for after being migrated from Lotus Notes.  The user can use their mailfile fine however it is just the delegation that appears corrupted somehow. 
    I'm not sure how to fix this.  I have checked the access through the security tab in ad and that looks fine.
    Any help would be appreciated.

    I did some more digging and I solved it.
    This would be the solution:
    In Active Directory Users and Computers
    -Click on VIEW
    -Click on ADVANCE FEATURES  (this is important otherwise you won't see
    the complete list in the next steps)
    -Click on the USERS container
    -Find the problem user's account
    -Right mouse the account and click on PROPERTIES
    -Click on the SECURITY tab
    -In the top box, click on the SELF account
    -In the bottom portion of the screen make sure the READ PERSONAL
    INFORMATION  & WRITE PERSONAL INFORMATION  should both be checked for
    ALLOW
    If you can compare the permissions for 'SELF' with another user you probably should set them accordingly to be safe. I noticed that for the user where setting delegates (SOB) did
    not work, more than those 2 permissions were missing.
    Good luck!
    David

  • BUG - Outlook 2010 'send as' permissions - Workaround within

    issue : when a user attempts to 'send as' another mailbox, the email fails with Undeliverable message:
    "You can't send a message on behalf of this user unless you have permission to do so. Please make sure you're sending on behalf of the correct sender, or request the necessary
    permission. If the problem continues, please contact your helpdesk ".
    This error only occurs once the email address has been cached (ie: 2nd attempt to 'send as' a user). Permissions are correct as 'send as' worked fine when using outlook 2007. upgrading
    a client to outlook 2010 results in the above error.
    scope : outlook 2010 clients with exchange 2007/2010 (appears to be client related, not exchange server). windows updates as of 22-dec-2010 have not resolved this.
    workaround : Cached Exchange Mode is ENABLED. Disabling this and restarting outlook resolves this issue. (Outlook 2010 > File > Account settings > Account settings... > double click the default account on the 'EMAIL' tab > untick
    'used cached exchange mode'.)
    i hope this helps other people; i've been googling for a resolution to this issue since beta/RC. now i've got office 2010 RTM the issue was still present. no forums/blogs could
    shed light on this issue.
    Is this the correct way to report bugs, or is there another way? i've tried connect.microsoft.com, but theres no "accepting bugs" for the outlook/office suite.

    Nothing particularly useful in that thread either:
    by: busbarPosted on 2010-06-07 at 08:12:05ID: 32933664
    1) looks like you have an issue with the DC plesae check it
    2) restart the information store and system attendant to speed it.
    3) send as is managed using send as permissions in the EMC
    http://technet.microsoft.com/en-us/library/bb676368.aspx
    by: totallytontoPosted on 2010-06-07 at 08:45:34ID: 32934043
    dont amend the settings in active directory for exchange 2010 servers. use the exchange management console> recipient config>mailbox and use 'manage send as permission' in the right pane.
    by: SatyaPathakPosted on 2010-06-07 at 11:55:55ID: 32935929
    Its looks like permission issue.
    Go through .
    http://blog.nick.mackechnie.co.nz/post/2009/11/20/Exchange-2010-Active-Sync-Issue.aspx
    http://social.technet.microsoft.com/Forums/en/exchange2010/thread/b28ea96a-8458-4ec8-87a8-66f64cbb7600
    by: coderccPosted on 2010-06-07 at 19:00:23ID: 32938614
    Or bypass it all with a 3rd party app: http;//www.servolutions.com/changesender.htm
    by: ExchisaPosted on 2010-06-08 at 01:20:07ID: 32940097
    SatyaPathak: :
    I already tick the checkbox to inherit all the permissions from the parent , now for those who
    are members of any protected group , this check box keep un-ticked  again every 15 min ,
    active directory keep synchronize these permissions with adminsdholder .
    anyway my problem are still open , hope it solved .
    wait something
    by: totallytontoPosted on 2010-06-08 at 04:28:40ID: 32940992
    Hi Exchisa,
    Many, many apologies, as I mis-read your query and missed the vital bit of info (serves me right for reading it on my mobile...)
    I'm afraid you are a bit stuck. Members of the protected groups are automatically reset to the approved permissions at regular intervals as a security measure.
    I'm afraid you are not going to be able to use the 'send as' facility on any member of such a group.
    Either move the user to another group or change the e-mail address to suit your needs.
    EG:
    Lets say you want to 'send as' administrator:-
    a) change the administrator's email from {[email protected]}to {[email protected]} and disable automatic recipient policy updates for the user.
    b) Create a distribution group for {[email protected]}and set administrator as a member so they receive messages as they would have before.
    c) set the send as permissions on the distribution group {[email protected]}to allow users to send as, including the administrator user.
    This is technically a workaround, not a solution.
    by: ExchisaPosted on 2010-06-21 at 08:07:03ID: 33037008
    Dear All .
    I still stuck to have this feature working perfectly .
    Now I don't want to use this feature to enable users to send as by each other , i only want the users on any given group to send by the name of this group , i did not configure any thing in the ADUC snap in , i only configure this feature from the EMC .
    i recieve this error from outlook 2010 :
    You can't send a message on behalf of this user unless you have permission to do so. Please make sure you're sending on behalf of the correct sender, or request the necessary permission. If the problem continues, please contact your helpdesk.
    I surprised that this feature are working sometimes and sometimes not (this is the truth).
    does this feature need a CAL like archiving ??
    Wait a reply  
    by: totallytontoPosted on 2010-06-21 at 08:39:56ID: 33037354
    No you do not need a CAL for this.
    Is the mailbox that you are sending as still a member of a protected group in AD?
    If yes, send as permissions will be reset at random intervals and cannot be changed as long as the user is a member of the protected group.
    by: ExchisaPosted on 2010-06-22 at 01:43:00ID: 33043673
    totallytonto:
    No It's NOT .
    Thanks
    by: ExchisaPosted on 2010-07-25 at 15:37:57ID: 33285888
    totallytonto : I leave configure this from the EMC , instead , i use the ACL for that group in AD , in order to enable SEND AS , just tick the send as permission  

  • When I compose and send a mail, it gets placed in Outbox and I get a prompt stating something like "relating the message is not supported". Even if I compose a newest age, it says the vey same thing. I just cannot send any response through my mail account

    When I compose and send a mail, it gets placed in Outbox and I get a prompt stating something like "relating the message is not supported". Even if I compose a newest age, it says the vey same thing. I just cannot send any response through my mail account. Can anyone help with a solution?

    You haven't set up the SMTP (outgoing) mail server correctly. You probably didn't enter your user ID and password for the outgoing server. They are needed even though it says "optional".

  • Set query of VO through CO

    How can I set query of VO on run time through CO?
    Thanks,
    Krunal

    could you resolve the issue.
    because I am also facing the same error when I use the
    vo.setWhereClause(".........");
    I have extended the existing controller by adding some conditions for the ViewObject. (see above)
    after assigning the extended controller to the controller class of the page, I am receiving an error about the SQL statement, that includes two where statements in one sql.
    what is the correct syntax for that?
    how can I add one more condition within the controller to the VO???
    thanks a lot in advance for your advices...
    regards,
    DOGAN
    ps: the error I am receiving:
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT /* leading (PLL) NO_MERGE( PLL ) USE_NL( PLL POH ) */
    POH.SEGMENT1 PO_NUMBER,
         PRL.RELEASE_NUM RELEASE_NUM,
         DECODE(PRL.PO_RELEASE_ID, NULL, POH.SEGMENT1, POH.SEGMENT1 || '-' || TO_CHAR(PRL.RELEASE_NUM)) DISPLAY_PO_NUMBER,
    POL.LINE_NUM LINE_NUM,
    POL.ITEM_ID ITEM_ID,
         POL.ITEM_REVISION ITEM_REVISION,
         POL.ITEM_DESCRIPTION ITEM_DESCRIPTION,
         POL.VENDOR_PRODUCT_NUM SUPPLIER_ITEM_NUMBER,
    NVL(PLL.PROMISED_DATE, PLL.NEED_BY_DATE) DUE_DATE,
         PLL.RECEIPT_DAYS_EXCEPTION_CODE RECEIPT_DAYS_EXCEPTION_CODE,
         PLL.DAYS_EARLY_RECEIPT_ALLOWED DAYS_EARLY_RECEIPT_ALLOWED,
         PLL.DAYS_LATE_RECEIPT_ALLOWED DAYS_LATE_RECEIPT_ALLOWED,
         POL.UNIT_MEAS_LOOKUP_CODE UNIT_MEAS_LOOKUP_CODE,
         TO_NUMBER(NULL) SHIPMENT_QUANTITY,
         PLL.QUANTITY QUANTITY_ORDERED,
         PLL.QUANTITY_RECEIVED QUANTITY_RECEIVED,
         NVL(HRL.LOCATION_CODE, SUBSTR(RTRIM(HZ.ADDRESS1)||'-'||RTRIM(HZ.CITY),1,20))
    SHIP_TO_LOCATION,
         PVS.VENDOR_SITE_CODE VENDOR_SITE_CODE,
         PVS.PAY_SITE_FLAG PAY_SITE_FLAG,
         POH.PO_HEADER_ID PO_HEADER_ID,
    POH.CURRENCY_CODE CURRENCY_CODE,
    POH.RATE_TYPE RATE_TYPE,
    POH.RATE RATE,
    POH.RATE_DATE RATE_DATE,
    POL.PO_LINE_ID PO_LINE_ID,
    PLL.LINE_LOCATION_ID LINE_LOCATION_ID,
    PLL.SHIP_TO_ORGANIZATION_ID ORG_ID,
         POL.UNIT_PRICE UNIT_PRICE,
         POH.VENDOR_ID VENDOR_ID,
         POH.VENDOR_SITE_ID VENDOR_SITE_ID,
         POV.VENDOR_NAME VENDOR_NAME,
         PLL.SHIPMENT_NUM SHIPMENT_NUM,
         POH.VENDOR_CONTACT_ID VENDOR_CONTACT_ID,
         MSI.CONCATENATED_SEGMENTS ITEM_NUM,
         PLL.TAXABLE_FLAG TAXABLE_FLAG,
         '' TAX_NAME,
         POH.REVISION_NUM REVISION_NUM,
         TO_NUMBER(NULL) TOLERABLE_QUANTITY,
         NULL ORGANIZATION_CODE,
         HRO2.NAME SHIP_TO_ORG_NAME,
         HRO.NAME ORGANIZATION_NAME,
         MUM.UOM_CLASS UOM_CLASS,
         PLL.ORG_ID OPERATING_UNIT_ID,
         PLL.PO_RELEASE_ID PO_RELEASE_ID,
         PLL.MATCH_OPTION MATCH_OPTION,
         PVS.PAY_ON_CODE PAY_ON_CODE,
         PLL.CONSIGNED_FLAG CONSIGNED_FLAG,
         PLL.SHIP_TO_LOCATION_ID SHIP_TO_LOCATION_ID,
         POL.SUPPLIER_REF_NUMBER SUPPLIER_REF_NUMBER,
         nvl(POH.SHIPPING_CONTROL,'SUPPLIER') TRANSPORTATION_ARRANGED_BY ,     
    PLC.DISPLAYED_FIELD TAB_Display,
    NVL(MSI.PRIMARY_UNIT_OF_MEASURE,POL.UNIT_MEAS_LOOKUP_CODE),
    PLL.QTY_RCV_EXCEPTION_CODE
    FROM
    PO_HEADERS_ALL     POH,
    PO_LINES_ALL     POL,
    PO_LINE_LOCATIONS_ALL      PLL,
    PO_RELEASES_ALL           PRL,
    PO_VENDOR_SITES_ALL      PVS,
    HR_LOCATIONS_ALL_TL     HRL,
    HZ_LOCATIONS          HZ,
    PO_VENDORS               POV,
    MTL_SYSTEM_ITEMS_KFV     MSI,
    MTL_UNITS_OF_MEASURE     MUM,
    HR_ALL_ORGANIZATION_UNITS_TL     HRO,
    HR_ALL_ORGANIZATION_UNITS_TL     HRO2,
    PO_LOOKUP_CODES PLC
    WHERE
    POH.PO_HEADER_ID = PLL.PO_HEADER_ID AND
    POH.PO_HEADER_ID = POL.PO_HEADER_ID AND
    POH.AUTHORIZATION_STATUS = 'APPROVED' AND
    POL.PO_LINE_ID = PLL.PO_LINE_ID AND
    POL.UNIT_MEAS_LOOKUP_CODE = MUM.UNIT_OF_MEASURE (+) AND
    PLL.PO_RELEASE_ID = PRL.PO_RELEASE_ID(+) AND
    POV.VENDOR_ID = POH.VENDOR_ID AND
    PVS.VENDOR_SITE_ID = POH.VENDOR_SITE_ID AND
    HRL.LOCATION_ID(+) = PLL.SHIP_TO_LOCATION_ID AND
    HRL.LANGUAGE(+) = USERENV('LANG') AND
    HZ.LOCATION_ID(+) = PLL.SHIP_TO_LOCATION_ID AND
    NVL(PLL.APPROVED_FLAG, 'N') = 'Y' AND
    NVL(PLL.CANCEL_FLAG, 'N') = 'N' AND
    NVL(POH.FROZEN_FLAG, 'N') = 'N' AND
    NVL(PLL.CLOSED_CODE, 'OPEN') NOT IN
    ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR RECEIVING', 'CANCELLED') AND
    (PLL.QUANTITY*(1+NVL(PLL.QTY_RCV_TOLERANCE, 0)/100)) >
    (NVL(PLL.QUANTITY_RECEIVED, 0) + NVL(PLL.QUANTITY_SHIPPED, 0) + NVL(PLL.QUANTITY_CANCELLED, 0)) AND
    PLL.SHIPMENT_TYPE IN ('STANDARD','BLANKET','SCHEDULED') AND
    NVL(PLL.payment_type, ' ') not in ('ADVANCE', 'DELIVERY','MILESTONE','RATE','LUMPSUM') AND
    POL.ITEM_ID = MSI.INVENTORY_ITEM_ID (+) AND
    NVL(MSI.ORGANIZATION_ID, PLL.SHIP_TO_ORGANIZATION_ID) = PLL.SHIP_TO_ORGANIZATION_ID AND
    HRO2.ORGANIZATION_ID (+) = PLL.SHIP_TO_ORGANIZATION_ID AND
    HRO2.LANGUAGE (+)= USERENV('LANG') AND
    HRO.ORGANIZATION_ID (+) = POH.ORG_ID AND
    HRO.LANGUAGE (+)= USERENV('LANG') AND
    DECODE(PLL.PO_RELEASE_ID, NULL, NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N'), NVL(PRL.CONSIGNED_CONSUMPTION_FLAG, 'N'))!='Y'
    AND PLC.LOOKUP_TYPE='SHIPPING CONTROL'
    AND NVL(POH.SHIPPING_CONTROL,'SUPPLIER') =PLC.LOOKUP_CODE
    AND PLL.OUTSOURCED_ASSEMBLY <> 1
    AND PLL.PAYMENT_TYPE IS NULL) QRSLT WHERE (NVL(HRL.LOCATION_CODE,SUBSTR (RTRIM (HZ.ADDRESS1) || '-' || RTRIM (HZ.CITY), 1, 20)) not in ('BU-TVP')) ORDER BY DUE_DATE ASC
    Edited by: doGan on Jan 31, 2011 7:27 AM

  • The correct syntax for a recursive chmod command in Terminal

    I need to set recursive permissions on an external HDD to '777' or 'all read&write'.
    I have tried all of the following commands in Terminal:
    sudo chmod 777 -r /Volumes/...
    sudo chmod -r 777 /Volumes/...
    sudo chmod a+rw -r /Volumes/...
    sudo chmod -r a+rw /Volumes/...
    ...all of which being back a 'no such file or directory' error, e.g.
    sudo chmod 777 -r /Volumes/232Gb
    chmod: -r: No such file or directory
    Can anyone confirm the correct syntax for this command?
    Thanks in advance...
    Message was edited by: ChippyDeluxe

    If there were a solution that didn't involve using Terminal, I would prefer that.
    The reason I ask is, since my old iMac died and I connected my iMac's external HDD to my MacBook, thousands of folders on my external HDD have 'stop signs' on them and require me to go to
    Get Info -> Sharing & Permissions
    ...and add my MacBook username and set the privilege as "read and write". A bigger problem is, no backup software I've tried will back up this external HDD onto another external HDD any more, so I no longer have an up-to-date backup, which is very worrying.
    I am looking for a way of fixing this, and the chmod command appears to be the answer.
    Ideally, I don't want any permission restrictions on my external HDD at all, so I can connect it to any machine without problems.

  • How can I get my 2010 mac book pro to send signal out through the mini display port?                      end signal out through the end video signal out through the

    How can I get my 2010 macbook pro to send signal out through the mini display port?

    First, what you said is contradictory. You say "can't get a video signal", then say"the Mac wallpaper is broadcast, the mouse pointer is visible". "No video signal" means an absolutely black,blank screen. It sounds like you have plenty of signal.
    I am supposing what you are seeing is actually a blank desktop, which is to be expected if your settings are such that you are extending the desktop, instead of mirroring it.
    Within the preference panes is a setting that allows you to change this. Open System Preferences, click Displays, and then click Arrangement. You will see that you are extending the desktop. Change that setting.

  • Error while sending PO output through mail in PDF format - Urgent

    Dear friends,
    Developed program to send sapscript output through mail in pdf format, the program running properly, even function module SO_NEW_DOCUMENT_ATT_SEND_API1 returning sy-subrc 0. But the external mail is not going to user lying in SAP outbox with message <b>"Wait for communications service"</b> . SCOT is properly configured, tested mails sending through SAP office.
    Find below the source code:
    REPORT  zmm_porder_gm
                NO STANDARD PAGE HEADING.
    TABLES: ekko, ekpa, t161t, t052, komv, j_1imocomp, t001, esll.
    Internal Tables
    DATA : txt LIKE tline-tdline,  "HEADER LINE
           your_ref LIKE ekko-ihrez, "your ref
           our_ref  LIKE ekko-unsez, "our ref
           mcompname  LIKE  t001-butxt,
           itemname   LIKE  ekpo-txz01,
           del_text LIKE tline-tdline, "delivery text
           mat_po_text LIKE tline-tdline. "material po text
    DATA: g_ind TYPE i.
    DATA: it_esll LIKE esll OCCURS 0 WITH HEADER LINE.
    DATA: sub_packno LIKE esll-sub_packno.
    DATA : po_flag(1) TYPE c.
    DATA : it_erev LIKE erev OCCURS 0 WITH HEADER LINE.
    DATA : nmebeln LIKE thead-tdname,
           obj LIKE thead-tdname.
    DATA : tline LIKE tline OCCURS 0 WITH HEADER LINE.  "HEADER TEXT
    DATA  : it_ekko LIKE ekko OCCURS 0 WITH HEADER LINE.
    DATA  : it_ekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.
    DATA  : it_zmm_porder  LIKE zmm_porder OCCURS 0 WITH HEADER LINE.
    DATA  : it_konv        LIKE konv OCCURS 0 WITH HEADER LINE.
    DATA  : it_konv_ftr    LIKE konv OCCURS 0 WITH HEADER LINE.
    DATA  : it_konv_rate   LIKE konv OCCURS 0 WITH HEADER LINE.
    DATA  : it_komv_tax    LIKE komv OCCURS 0 WITH HEADER LINE.           " For Tax Calculation
    DATA  : it_zmm_house_bank LIKE zmm_house_bank OCCURS 0 WITH HEADER LINE.
    *DATA  : mrate TYPE konv-kbetr VALUE 0, mrate1(15).  rmoved by ganes and added following logic
    DATA  : mrate TYPE p VALUE 0 DECIMALS 2, mrate1(15).
    DATA  : mrate_gm TYPE p  DECIMALS 2.
    DATA  : BEGIN OF it_konv1 OCCURS 0,
                  knumv LIKE konv-knumv,
                  kschl LIKE konv-kschl,
    END OF it_konv1.
    DATA : BEGIN OF it_t052u OCCURS 0.
            INCLUDE STRUCTURE t052u.
    DATA : END OF it_t052u.
    DATA  : mpay_terms LIKE t052u-text1.
    DATA  : mwaers     LIKE konv-waers.
    DATA : BEGIN OF xt052 OCCURS 0.
            INCLUDE STRUCTURE t052.
    DATA : END OF xt052.
    DATA : it_t16ct LIKE t16ct OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF ztext OCCURS 0.
            INCLUDE STRUCTURE ttext.
    DATA : END OF ztext.
    DATA  : it_t001      LIKE t001 OCCURS 0 WITH HEADER LINE.
    DATA  : mtext(15)    TYPE c.
    DATA  : it_adrc      LIKE adrc OCCURS 0 WITH HEADER LINE.
    DATA  : it_adrc_ven  LIKE adrc OCCURS 0 WITH HEADER LINE.
    DATA  : it_adrc_plt  LIKE adrc OCCURS 0 WITH HEADER LINE.
    DATA :  it_makt      LIKE makt OCCURS 0 WITH HEADER LINE.
    DATA :  it_eket      LIKE eket OCCURS 0 WITH HEADER LINE.               " Schedulling
    DATA :  it_eikp      LIKE eikp OCCURS 0 WITH HEADER LINE.               " Export
    DATA :  it_t001w     LIKE t001w OCCURS 0 WITH HEADER LINE.
    DATA  : it_t685t     LIKE t685t OCCURS 0 WITH HEADER LINE.
    DATA  : it_t618t     LIKE t618t OCCURS 0 WITH HEADER LINE.
    DATA  : it_t685t_ftr LIKE t685t OCCURS 0 WITH HEADER LINE.
    DATA  : it_lfa1  LIKE lfa1 OCCURS 0 WITH HEADER LINE.
    DATA : it_bapi_mltx_ga LIKE bapi_mltx_ga OCCURS 0 WITH HEADER LINE. "Material long text
    DATA : mfirst   TYPE i  VALUE 0,
           mpay_flag(1) TYPE c VALUE 'X',
           mwerks   LIKE    t001w-werks,
           msr      TYPE i  VALUE 0,
           l_rate   TYPE p  DECIMALS 2  VALUE 0,
           l_amt    TYPE p  DECIMALS 2  VALUE 0,
           mflag(1) TYPE c,
           mlctr    TYPE i  VALUE 0,
           mfamt    TYPE p DECIMALS 2 VALUE 0,
           mcfamt(15) TYPE c,
           mfword(100) TYPE c,
           mkschl   LIKE konv-kschl,
           mchgamt  TYPE p  DECIMALS 2 VALUE 0,
           mkbetr   TYPE p  DECIMALS 2 VALUE 0,
           mkwert   TYPE p  DECIMALS 2 VALUE 0.
    DATA : j_1iexcd     TYPE  j_1imocomp-j_1iexcd,
           j_1icstno    TYPE  j_1imocomp-j_1icstno,
           j_1ilstno    TYPE  j_1imocomp-j_1ilstno.
    DATA : mjmop_r    TYPE p DECIMALS 2 VALUE 0,
           mjmoq_r    TYPE p DECIMALS 2 VALUE 0,
           mjecs_r    TYPE p DECIMALS 2 VALUE 0,
           mjvcs_r    TYPE p DECIMALS 2 VALUE 0,
           mjvrd_r    TYPE p DECIMALS 2 VALUE 0,
           mjsep_r    TYPE p DECIMALS 2 VALUE 0.
    DATA : mjmop_a    TYPE p DECIMALS 2 VALUE 0,
           mjmoq_a    TYPE p DECIMALS 2 VALUE 0,
           mjecs_a    TYPE p DECIMALS 2 VALUE 0,
           mjvcs_a    TYPE p DECIMALS 2 VALUE 0,
           mjvrd_a    TYPE p DECIMALS 2 VALUE 0,
           mjsep_a    TYPE p DECIMALS 2 VALUE 0.
    DATA  : mtitle   LIKE  t161t-batxt.
    DATA :         no_ammend(10),request_by(50),ver_txt(100),ver_reason(100),stext(200).
    begin of Email data declarations**************
    DATA: BEGIN OF otf OCCURS 0.
            INCLUDE STRUCTURE itcoo .
    DATA: END OF otf.
    DATA: itcpo LIKE itcpo.
    DATA: itcpp LIKE itcpp.
    DATA: it_docs  TYPE STANDARD TABLE OF docs,
          v_bin_filesize          TYPE i,
          it_lines TYPE STANDARD TABLE OF tline,
          wa_lines TYPE tline.
    DATA : i_pdf LIKE tline OCCURS 1000 WITH HEADER LINE,
    v_pdf_bytecount TYPE i,
    v_pdf_spoolid TYPE tsp01-rqident,
    v_otf_pagecount TYPE i,
    v_btc_jobname TYPE tbtcjob-jobname,
    v_btc_jobcount TYPE tbtcjob-jobcount.
    DATA: objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
    DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
    DATA: doc_chng LIKE sodocchgi1.
    DATA: tab_lines LIKE sy-tabix.
    DATA: vafilename(100) VALUE 'po_output.pdf'.
    DATA: jobdata TYPE sxjobdata.
    DATA arc_params TYPE arc_params.
    DATA print_params TYPE pri_params.
    DATA g_send_prog TYPE syrepid VALUE 'ZVF03_TEST_PROG'.
    DATA immediate TYPE btcchar1.
    DATA: i_jobname TYPE tbtcp-jobname,
    i_jobcount TYPE tbtcp-jobcount,
    i_jobstepcount TYPE tbtcp-stepcount.
    DATA recipient_obj LIKE swotobjid.
    CONSTANTS: sx_true TYPE sx_boolean VALUE 'X'.
    TABLES: tbtcp.
    end of Email data declarations**************
    SELECTION-SCREEN : BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS   : mebeln FOR ekko-ebeln OBLIGATORY .               " 75
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 12.
    SELECTION-SCREEN COMMENT (20) text-b01.
    PARAMETERS: b1 AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN : END OF BLOCK block1.
    SELECTION-SCREEN: BEGIN OF SCREEN 200 TITLE text-001 AS WINDOW.
    PARAMETERS :  p_email TYPE ad_smtpadr.     "E-Mail Address
    SELECTION-SCREEN: END OF SCREEN 200.
    INITIALIZATION.
      SET PF-STATUS 'ZMMPORD_STAT'.
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'EMAIL'.
          PERFORM zemail.
        WHEN '&IC1'.
          PERFORM load_data.
          PERFORM process.
          IF NOT p_email IS INITIAL.
            PERFORM send_mail.
          ENDIF.
      ENDCASE.
    *START-OF-SELECTION.
    PERFORM load_data.
    PERFORM process.
    FORM load_data .
      DATA : gindex LIKE sy-tabix.
      SELECT * FROM t16ct INTO TABLE it_t16ct WHERE spras = 'EN'.
      SELECT * FROM ekko INTO TABLE it_ekko WHERE ebeln IN mebeln.
      IF sy-subrc EQ 0.
        SELECT * FROM erev INTO CORRESPONDING FIELDS OF TABLE it_erev FOR ALL ENTRIES IN it_ekko
        WHERE edokn = it_ekko-ebeln AND rscod <> '' .
        SORT it_erev BY edokn revno DESCENDING.
        LOOP AT it_ekko.
          IF NOT ( it_ekko-frgke EQ 'O'  OR it_ekko-frgke EQ '0' ) .
            MESSAGE e000(zsd) WITH 'Purchase Order is not Realeased'.
          ENDIF.
        ENDLOOP.
        SELECT * FROM ekpo INTO TABLE it_ekpo WHERE ebeln IN mebeln.
        IF sy-subrc EQ 0.
          SELECT * INTO TABLE it_makt
          FROM   makt
          FOR    ALL ENTRIES IN it_ekpo
          WHERE  matnr EQ it_ekpo-matnr.
          SELECT * INTO TABLE it_lfa1
          FROM   lfa1
          FOR    ALL ENTRIES IN it_ekko
          WHERE  lifnr EQ it_ekko-lifnr.
        ENDIF.
        SELECT *
          INTO TABLE it_t052u
          FROM t052u
           FOR ALL ENTRIES IN it_ekko
         WHERE zterm EQ it_ekko-zterm
          AND  spras EQ 'EN'.
        IF sy-subrc EQ 0.
          SORT it_t052u BY zterm.
        ENDIF.
        SELECT * FROM eket INTO TABLE it_eket WHERE ebeln IN mebeln.
        IF sy-subrc EQ 0.
          SORT it_eket BY ebeln ebelp.
        ENDIF.
        SELECT  *
          INTO TABLE it_eikp
          FROM eikp
           FOR ALL ENTRIES IN it_ekko
         WHERE exnum EQ it_ekko-exnum.
        IF sy-subrc EQ 0.
          SORT it_eikp BY exnum.
          SELECT  *
            INTO TABLE it_t618t
            FROM t618t
             FOR ALL ENTRIES IN it_eikp
           WHERE expvz EQ it_eikp-expvz
             AND spras EQ 'E'
             AND land1 EQ 'IN'.
          IF sy-subrc EQ 0.
            SORT it_t618t BY expvz.
          ENDIF.
        ENDIF.
        REFRESH : it_zmm_porder.
        CLEAR   : it_zmm_porder.
        SELECT * INTO TABLE it_zmm_porder
          FROM zmm_porder
         WHERE flag EQ 'L'.
        IF sy-subrc EQ 0.
          SORT it_zmm_porder BY kschl.
        ENDIF.
        SELECT * FROM konv INTO TABLE it_konv
        FOR ALL ENTRIES IN it_ekko
        WHERE knumv = it_ekko-knumv
          AND  kwert NE 0.
        LOOP AT it_konv.
          gindex = sy-tabix.
          READ TABLE it_zmm_porder WITH KEY kschl = it_konv-kschl BINARY SEARCH.
          IF sy-subrc NE 0.
            DELETE it_konv INDEX gindex.
          ENDIF.
        ENDLOOP.
        IF sy-subrc EQ 0.
          SORT it_konv BY knumv kherk kschl.
        ENDIF.
        REFRESH : it_zmm_porder.
        CLEAR   : it_zmm_porder.
        SELECT * INTO TABLE it_zmm_porder
          FROM zmm_porder
         WHERE flag EQ 'F'.
        IF sy-subrc EQ 0.
          SORT it_zmm_porder BY kschl.
        ENDIF.
       SELECT * INTO TABLE IT_KONV_FTR FROM KONV
          FOR ALL ENTRIES IN IT_EKKO
         WHERE KNUMV = IT_EKKO-KNUMV
           AND  ( KSCHL = 'ZIN1'
              OR  KSCHL = 'ZIN2'
              OR  KSCHL = 'ZINS'
              OR  KSCHL = 'ZPF1'
              OR  KSCHL = 'ZPF2'
              OR  KSCHL = 'ZPF3'
              OR  KSCHL = 'ZPKG'
              OR  KSCHL = 'ZPKF'
              OR  KSCHL = 'FRA1'
              OR  KSCHL = 'FRB1'
              OR  KSCHL = 'FRC1'
              OR  KSCHL = 'FRD1'
              OR  KSCHL = 'FRD2'
              OR  KSCHL = 'FRD3'
              OR  KSCHL = 'FRD4'
              OR  KSCHL = 'FRD5'
    *****Added one condition type below ZFBC as on 05.06.2007 :Rajiv as per mail of Sadiq via mathew sir(RTDK906646)
              OR  KSCHL = 'ZFBC' )
           AND  KWERT NE 0
           AND  KPOSN GT '000000'.
          AND ( KRECH = 'B'                       " RTDK906167
           OR  KRECH = 'A' ).
        SELECT * INTO TABLE it_konv_ftr FROM konv
           FOR ALL ENTRIES IN it_ekko
          WHERE knumv = it_ekko-knumv
            AND  kwert NE 0
            AND  kposn GT '000000'.
        LOOP AT it_konv_ftr.
          gindex = sy-tabix.
          READ TABLE it_zmm_porder WITH KEY kschl = it_konv_ftr-kschl BINARY SEARCH.
          IF sy-subrc NE 0.
            DELETE it_konv_ftr INDEX gindex.
          ENDIF.
        ENDLOOP.
        IF it_konv_ftr[] IS NOT INITIAL.
          SORT it_konv_ftr BY knumv kschl.
        ENDIF.
       SELECT  KNUMV KSCHL INTO CORRESPONDING FIELDS OF TABLE IT_KONV1 FROM KONV
       FOR ALL ENTRIES IN IT_EKKO
       WHERE KNUMV = IT_EKKO-KNUMV
           and kherk = 'D'
         AND  ( KSCHL = 'ZIN1'
            OR  KSCHL = 'ZIN2'
            OR  KSCHL = 'ZINS'
            OR  KSCHL = 'ZPF1'
            OR  KSCHL = 'ZPF2'
            OR  KSCHL = 'ZPF3'
            OR  KSCHL = 'ZPKG'
            OR  KSCHL = 'ZPKF'
            OR  KSCHL = 'FRA1'
            OR  KSCHL = 'FRB1'
            OR  KSCHL = 'FRC1'
            OR  KSCHL = 'FRD1'
            OR  KSCHL = 'FRD2'
            OR  KSCHL = 'FRD3'
            OR  KSCHL = 'FRD4'
            OR  KSCHL = 'FRD5'
    *****Added one condition type below ZFBC as on 05.06.2007 :Rajiv as per mail of Sadiq via mathew sir(RTDK906646)
            OR  KSCHL = 'ZFBC' )
         AND  KWERT NE 0.
           AND ( KRECH = 'B'                       RTDK906167
            OR  KRECH = 'A' ).
        SELECT  knumv kschl INTO CORRESPONDING FIELDS OF TABLE it_konv1 FROM konv
        FOR ALL ENTRIES IN it_ekko
        WHERE knumv = it_ekko-knumv
          AND  kwert NE 0.
        DELETE ADJACENT DUPLICATES FROM it_konv1 COMPARING knumv kschl.
        LOOP AT it_konv1.
          gindex = sy-tabix.
          READ TABLE it_zmm_porder WITH KEY kschl = it_konv1-kschl BINARY SEARCH.
          IF sy-subrc NE 0.
            DELETE it_konv1 INDEX gindex.
          ENDIF.
        ENDLOOP.
        IF sy-subrc EQ 0.
          SORT it_konv1 BY knumv kschl.
        ENDIF.
        SELECT * INTO TABLE it_t685t
        FROM   t685t
        FOR    ALL ENTRIES IN it_konv
        WHERE  kschl EQ it_konv-kschl
          AND  kappl EQ it_konv-kappl
          AND  spras EQ 'E'.
        SELECT * INTO TABLE it_t685t_ftr
        FROM   t685t
        FOR    ALL ENTRIES IN it_konv_ftr
        WHERE  kschl EQ it_konv_ftr-kschl
          AND  kappl EQ it_konv_ftr-kappl
          AND  spras EQ 'E'.
        it_t685t_ftr-kschl = 'JVCS'.
        it_t685t_ftr-vtext = 'IN CST in vat'.
        APPEND it_t685t_ftr.
        SELECT * INTO TABLE it_zmm_house_bank
          FROM zmm_house_bank
         WHERE ebeln IN mebeln.
      ELSE.
        MESSAGE e899(mm) WITH 'Data not found for selection criteria...'.
      ENDIF.
    ENDFORM.                    " Load_data
    FORM process .
      DATA : mctr   TYPE i VALUE 1.
      DATA : gindex LIKE sy-tabix.
      DATA : mline(75) TYPE c.
      DATA : mlifn2    LIKE ekpa-lifn2.
      DATA :  mv_name LIKE lfa1-name1,
             madrnr  LIKE lfa1-adrnr.
      CLEAR itcpo.
      itcpo-tdgetotf = 'X'.
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          form     = 'ZMM_PORDER'
          language = sy-langu
          OPTIONS  = itcpo
          dialog   = ' '
        EXCEPTIONS
          OTHERS   = 1.
      LOOP AT it_ekko.
        CALL FUNCTION 'START_FORM'
          EXPORTING
            form = 'ZMM_PORDER'.
        SELECT SINGLE *
         FROM  t001
         INTO  it_t001
        WHERE  bukrs EQ it_ekko-bukrs.
        mcompname = it_t001-butxt.
        TRANSLATE mcompname TO UPPER CASE.
        Document Type
        SELECT SINGLE batxt
          INTO mtitle
          FROM t161t
         WHERE bstyp EQ 'F'
         AND   spras EQ 'E'
         AND   bsart EQ it_ekko-bsart.
        REFRESH it_adrc.
        SELECT SINGLE werks
          INTO mwerks
          FROM ekpo
         WHERE ebeln EQ it_ekko-ebeln.
        SELECT SINGLE *
          INTO it_t001w
          FROM t001w
         WHERE werks EQ mwerks.
        REFRESH it_adrc.
        SELECT SINGLE *
          INTO it_adrc_plt
          FROM adrc
         WHERE addrnumber EQ it_t001w-adrnr.
        REFRESH : xt052.
        mfamt  = 0.
        msr    = 0.
    in 500c this statement failed.
       SELECT SINGLE * FROM T052 INTO XT052 WHERE ZTERM = IT_EKKO-ZTERM.
       CALL FUNCTION 'FI_TEXT_ZTERM'
         EXPORTING
           I_T052  = XT052
         TABLES
           T_ZTEXT = ZTEXT.
        As per Preeti... Shipment address should be shown on top as purchase order company address. 27.04.
        PERFORM writeform USING 'PLANT' 'PLANT'.
        SELECT  SINGLE name1 adrnr
          INTO  (mv_name,madrnr)
          FROM  lfa1
         WHERE  lifnr EQ it_ekko-lifnr.
        REFRESH it_adrc[].
        CLEAR   it_adrc[].
        FREE it_adrc[].
        SELECT SINGLE *
          INTO it_adrc_ven
          FROM adrc
         WHERE addrnumber EQ madrnr.
        READ TABLE it_lfa1 WITH KEY lifnr = it_ekko-lifnr.
        PERFORM writeform USING 'VENDOR' 'VENDOR'.
         Shipment
        SELECT SINGLE werks
          INTO mwerks
          FROM ekpo
         WHERE ebeln EQ it_ekko-ebeln.
           up to 1 rows.
        SELECT SINGLE *
          INTO it_t001w
          FROM t001w
         WHERE werks EQ mwerks.
        SELECT SINGLE j_1iexcd j_1icstno j_1ilstno
                 INTO (j_1iexcd,j_1icstno,j_1ilstno)
               FROM    j_1imocomp
                WHERE  werks  = mwerks.
        REFRESH it_adrc.
        SELECT SINGLE *
          INTO it_adrc
          FROM adrc
         WHERE addrnumber EQ it_t001w-adrnr.
        PERFORM writeform USING 'SHIPMNT' 'SHIPMNT'.
        READ TABLE it_eikp WITH KEY exnum = it_ekko-exnum.
        IF sy-subrc EQ 0.
          READ TABLE it_t618t WITH KEY expvz = it_eikp-expvz.
        ENDIF.
        your_ref = it_ekko-ihrez.
        our_ref  = it_ekko-unsez.
        READ TABLE it_erev WITH KEY edokn = it_ekko-ebeln.
        IF sy-subrc = 0.
          no_ammend  = it_erev-revno.
          request_by = it_erev-crnam.
          ver_txt    = it_erev-txz01.
          READ TABLE it_t16ct WITH KEY rscod = it_erev-rscod.
          IF sy-subrc = 0.
            ver_reason = it_t16ct-rstxt.
          ELSE.
            ver_reason = ''.
          ENDIF.
        ELSE.
          no_ammend  = ''.
          request_by = ''.
          ver_txt    = ''.
          ver_reason = ''.
        ENDIF.
        PERFORM writeform USING 'PO_INFO' 'PO_INFO'.
        IF it_zmm_house_bank[] IS NOT INITIAL.
          READ TABLE it_zmm_house_bank INDEX 1.
          PERFORM writeform USING 'BANKDTL' 'BANKDTL'.
        ENDIF.
        PERFORM writeform USING 'HDR_INFO' 'HDR_INFO'.
        PERFORM writeform USING 'BRK_TTL' 'MAIN'.
        msr     = 1.
        mlctr   = 1.
    *added by ganesh to prevent deleted items to appear in print out
       LOOP AT IT_EKPO WHERE EBELN EQ IT_EKKO-EBELN.
        LOOP AT it_ekpo WHERE ebeln EQ it_ekko-ebeln AND loekz NE 'L'.
    *end of change
          CLEAR: mrate, mrate1.
          SELECT * FROM konv INTO TABLE it_konv_rate
                   WHERE knumv EQ it_ekko-knumv
                   AND   kposn EQ it_ekpo-ebelp
                   AND  ( kschl EQ 'PBXX' OR kschl EQ 'PB00'  OR kschl EQ 'P001' ).
          LOOP AT it_konv_rate.
           IF it_konv_rate-kpein > 0.             " added by ganesh as per sudhir 12.10.2007
             mrate_gm = it_konv_rate-kbetr / it_konv_rate-kpein.
             mrate  = mrate + mrate_gm. " added by ganesh as per sudhir 12.10.2007
           ELSE.
            mrate  = mrate + it_konv_rate-kbetr.
           ENDIF.
            IF it_konv_rate-waers IS NOT INITIAL.
              mwaers = it_konv_rate-waers.
            ENDIF.
          ENDLOOP.
        For Japanies Yen   "RTDK906759
          IF it_ekko-waers = 'JPY'.
            mrate = mrate * 100.
          ENDIF.
        End for japanies Yen
          mrate1 = mrate.
               End rate
          mfirst  = 0.
                MFAMT  = MFAMT + ( IT_EKPO-NETPR * IT_EKPO-MENGE ).
          mfamt  = mfamt + ( mrate * it_ekpo-menge ).
          PERFORM get_mat_long_text.
          DATA: lt_ctr TYPE i VALUE 0,lt_ctr1 TYPE i, lt_count TYPE i VALUE 0. " Long text counter
          DESCRIBE TABLE it_bapi_mltx_ga LINES lt_count.
          CLEAR it_bapi_mltx_ga.
    *Added by Rajiv 10.05.2007 Read and if condition RTDK906165
          READ TABLE it_konv WITH KEY knumv = it_ekko-knumv
                                      kposn = it_ekpo-ebelp.
          mkbetr  = 0.
          mkwert  = 0.
          IF sy-subrc EQ 0.
            LOOP AT it_konv  WHERE knumv EQ it_ekko-knumv
                               AND kposn EQ it_ekpo-ebelp.
              IF it_konv-krech EQ 'A'.
                mkbetr  = it_konv-kbetr / 10.
              ELSE.
                mkbetr  = it_konv-kbetr.
              ENDIF.
            For Japanies Yen "RTDK906759
              IF it_ekko-waers = 'JPY'.
                mkbetr = mkbetr * 100.
              ENDIF.
            End for japaies Yen
              IF mkbetr LT '0'.
                mkbetr = mkbetr * ( -1 ).
              ENDIF.
              mkwert   = it_konv-kwert.
            For Japanies Yen "RTDK906759
              IF it_ekko-waers = 'JPY'.
                mkwert = mkwert * 100.
              ENDIF.
            End for japaies Yen
              mfamt  = mfamt + mkwert.
              IF mkwert LT '0'.
                mkwert = mkwert * ( -1 ).
              ENDIF.
              IF it_ekpo-matnr IS INITIAL.
                itemname = it_ekpo-txz01.
              ELSE.
                READ TABLE it_makt  WITH KEY matnr = it_ekpo-matnr.
                itemname = it_makt-maktx.
              ENDIF.
              READ TABLE it_t685t WITH KEY kschl = it_konv-kschl BINARY SEARCH.
              READ TABLE it_eket  WITH KEY ebeln = it_ekpo-ebeln
                                           ebelp = it_ekpo-ebelp BINARY SEARCH.
              IF mfirst EQ 0.
                PERFORM writeform USING 'BRK_INFO' 'MAIN'.
                mfirst = 1.
              ELSE.
                ADD 1 TO lt_ctr.
                CLEAR it_bapi_mltx_ga.
                READ  TABLE it_bapi_mltx_ga INDEX lt_ctr. "For long text
                IF sy-subrc NE 0.
                  CLEAR it_bapi_mltx_ga.
                ENDIF.
                PERFORM writeform USING 'BRK_INFO1' 'MAIN'.
              ENDIF.
              mlctr = mlctr + 1.
            ENDLOOP.               "   it_konv.
          ELSE.
            IF it_ekpo-matnr IS INITIAL.
              itemname = it_ekpo-txz01.
            ELSE.
              READ TABLE it_makt  WITH KEY matnr = it_ekpo-matnr.
              itemname = it_makt-maktx.
            ENDIF.
                        READ TABLE IT_T685T WITH KEY KSCHL = IT_KONV-KSCHL BINARY SEARCH.
            READ TABLE it_eket  WITH KEY ebeln = it_ekpo-ebeln
                                         ebelp = it_ekpo-ebelp BINARY SEARCH.
            mfirst = 0.
            IF mfirst EQ 0.
              PERFORM writeform USING 'BRK_INFO' 'MAIN'.
              mfirst = 1.
            ELSE.
              ADD 1 TO lt_ctr.
              CLEAR it_bapi_mltx_ga.
              READ  TABLE it_bapi_mltx_ga INDEX lt_ctr. "For long text
              IF sy-subrc NE 0.CLEAR it_bapi_mltx_ga.ENDIF.
              PERFORM writeform USING 'BRK_INFO1' 'MAIN'.
            ENDIF.
          ENDIF.
    *Commented by rajiv 10.05.2007 used this code in above condition.
    added by ganesh on 260407 to print record
                if it_konv is initial.
                        READ TABLE IT_MAKT  WITH KEY MATNR = IT_EKPO-MATNR.
                        READ TABLE IT_T685T WITH KEY KSCHL = IT_KONV-KSCHL BINARY SEARCH.
                        READ TABLE IT_EKET  WITH KEY EBELN = IT_EKPO-EBELN
                                                     EBELP = IT_EKPO-EBELP BINARY SEARCH.
                        mFirst = 0.
                        if mFirst eq 0.
                             PERFORM WRITEFORM USING 'BRK_INFO' 'MAIN'.
                             mFirst = 1.
                        else.
                             add 1 to lt_ctr.
                             clear it_bapi_mltx_ga.
                             read  table IT_BAPI_MLTX_GA index lt_ctr. "For long text
                             if sy-subrc ne 0.clear it_bapi_mltx_ga.endif.
                             PERFORM WRITEFORM USING 'BRK_INFO1' 'MAIN'.
                        Endif.
                endif.
    end of change
          REFRESH it_komv_tax.
          PERFORM get_tax_cal USING it_ekpo-ebeln
                                    it_ekpo-ebelp.
                                 Changing it_komv_tax.
          REFRESH : it_zmm_porder.
          CLEAR   : it_zmm_porder.
          SELECT * INTO TABLE it_zmm_porder
            FROM zmm_porder
           WHERE flag EQ 'T'.
          IF sy-subrc EQ 0.
            SORT it_zmm_porder BY kschl.
          ENDIF.
          LOOP AT it_komv_tax.
            gindex = sy-tabix.
            READ TABLE it_zmm_porder WITH KEY kschl = it_komv_tax-kschl BINARY SEARCH.
            IF sy-subrc NE 0.
              DELETE it_komv_tax INDEX gindex.
            ENDIF.
          ENDLOOP.
          LOOP AT it_komv_tax WHERE kwert IS NOT INITIAL.
           IF ( IT_KOMV_TAX-KSCHL EQ 'JMOP' OR
                IT_KOMV_TAX-KSCHL EQ 'JECS' OR
                IT_KOMV_TAX-KSCHL EQ 'JSEP' OR
                IT_KOMV_TAX-KSCHL EQ 'JMOQ' OR
                IT_KOMV_TAX-KSCHL EQ 'JVCS' OR
                IT_KOMV_TAX-KSCHL EQ 'JVRD' OR
                IT_KOMV_TAX-KSCHL EQ 'JMIP' OR
    *             IT_KOMV_TAX-KSCHL EQ 'JEIP' OR
                IT_KOMV_TAX-KSCHL EQ 'JSEI' OR
                IT_KOMV_TAX-KSCHL EQ 'JSRT' OR
                IT_KOMV_TAX-KSCHL EQ 'JEC3' OR
                IT_KOMV_TAX-KSCHL EQ 'JVRN' )
                AND IT_KOMV_TAX-KWERT IS NOT INITIAL.
            SELECT SINGLE vtext
                   INTO   mtext
                   FROM   t685t
                  WHERE   kschl EQ it_komv_tax-kschl
                    AND   spras EQ 'E'.
            l_rate    = it_komv_tax-kbetr / 10.
            l_amt     = it_komv_tax-kwert.
            For Japanies Yen "RTDK906759
            IF it_ekko-waers = 'JPY'.
              l_amt = l_amt * 100.
            ENDIF.
            End for japaies Yen
            ADD l_amt TO mfamt.
            IF lt_ctr LT lt_count. "Long text
              ADD 1 TO lt_ctr.
              READ TABLE it_bapi_mltx_ga INDEX lt_ctr.
            ELSE.
              CLEAR it_bapi_mltx_ga.
            ENDIF.
            IF l_rate EQ 0 OR l_amt EQ 0.
              l_rate = ''.
              l_amt  = ''.
            ENDIF.
            PERFORM writeform USING 'TAX_LINE_ITEM' 'MAIN'.
           ENDIF.
          ENDLOOP.
          IF lt_ctr LT lt_count.
            DATA mbal_line TYPE i.
            mbal_line = ( lt_count - lt_ctr ).
            DO mbal_line TIMES.
              ADD 1 TO lt_ctr.
              READ TABLE it_bapi_mltx_ga INDEX lt_ctr.
              IF sy-subrc = 0.
                PERFORM writeform USING 'LTEXT' 'MAIN'.
              ENDIF.
            ENDDO.
          ENDIF.
          CONCATENATE it_ekko-ebeln it_ekpo-ebelp INTO nmebeln.
          REFRESH tline.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              id                      = 'F04'
              language                = sy-langu
              name                    = nmebeln
              object                  = 'EKPO'
            TABLES
              lines                   = tline
            EXCEPTIONS
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              OTHERS                  = 8.
          IF sy-subrc <> 0.
          ENDIF.
          LOOP AT tline.
            IF tline-tdline IS NOT INITIAL.
              del_text = tline-tdline.
            ENDIF.
            CONDENSE del_text.
          ENDLOOP.
          CONCATENATE it_ekko-ebeln it_ekpo-ebelp INTO nmebeln.
          REFRESH tline.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              id                      = 'F03'
              language                = sy-langu
              name                    = nmebeln
              object                  = 'EKPO'
            TABLES
              lines                   = tline
            EXCEPTIONS
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              OTHERS                  = 8.
          IF sy-subrc <> 0.
                 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
               refresh.
          CLEAR : po_flag, mat_po_text.
          LOOP AT tline.
            IF tline-tdline IS NOT INITIAL.
              MOVE tline-tdline TO mat_po_text.
              CONDENSE mat_po_text.
              PERFORM writeform USING 'MTRL_PO_TEXT' 'MAIN'.
              po_flag = 'X'.
              CLEAR : mat_po_text.
            ENDIF.
          ENDLOOP.
    *Added lines below for Schedule delivery for line item on 09.05.2007:Rajiv
          CLEAR g_ind.
          READ TABLE it_eket  WITH KEY ebeln = it_ekpo-ebeln
                                       ebelp = it_ekpo-ebelp BINARY SEARCH.
          g_ind = sy-tabix.
          LOOP AT it_eket FROM g_ind.
            IF it_eket-ebeln EQ it_ekpo-ebeln AND it_eket-ebelp = it_ekpo-ebelp.
              PERFORM writeform USING 'SCHEDULE' 'MAIN'.
            ELSE.
              EXIT.
            ENDIF.
          ENDLOOP.
    *End Addition:Rajiv
          PERFORM writeform USING 'REQSLP' 'MAIN'.
          mlctr = mlctr + 1.
          msr = msr + 1.
          CLEAR: lt_ctr, lt_ctr1.
      following lines added by ganesh to add service po details as per Mr. sadiq 21.08.2007
          IF it_ekpo-packno IS NOT INITIAL.
            CLEAR sub_packno.
            SELECT SINGLE sub_packno INTO sub_packno FROM esll WHERE packno = it_ekpo-packno.
            IF sub_packno IS NOT INITIAL.
              CLEAR it_esll.
              REFRESH it_esll.
              SELECT * FROM esll INTO CORRESPONDING FIELDS OF TABLE it_esll
              WHERE packno = sub_packno.
              IF sy-subrc = 0.
                PERFORM writeform USING 'SERVICE_PO_TEXT' 'MAIN'.
              ENDIF.
              LOOP AT it_esll.
                CONCATENATE sub_packno it_esll-introw INTO obj.
                CALL FUNCTION 'READ_TEXT'   "4500002446  C300
                  EXPORTING
                    id       = 'LTXT'
                    language = sy-langu
                    name     = obj
                    object   = 'ESLL'
                  TABLES
                    lines    = tline
                  EXCEPTIONS
                    id                      = 1
                    language                = 2
                    name                    = 3
                    not_found               = 4
                    object                  = 5
                    reference_check         = 6
                    wrong_access_to_archive = 7
                    OTHERS                  = 8.
                IF sy-subrc <> 0.
                ENDIF.
                CLEAR stext.
                LOOP AT tline.
                  CONCATENATE stext tline-tdline  INTO stext SEPARATED BY space.
                ENDLOOP.
                FREE tline.
                CLEAR tline.
                REFRESH tline.
                PERFORM writeform USING 'SERVICE_PO' 'MAIN'.
                PERFORM writeform USING 'SERVICE_TEXT' 'MAIN'.
              ENDLOOP.
            ENDIF.
          ENDIF.
        end of change
        ENDLOOP.             " it_ekpo.
        IF mlctr < 15.
          DO 5 TIMES.
            PERFORM writeform USING 'LINEFEED' 'MAIN'.
          ENDDO.
        ENDIF.
        added by ganesh  for allding line before ECC No.
        IF it_ekko-bsart NE 'ZIM'.               " IF EXPORT NO NEED TO PRINT ECC.
          PERFORM writeform USING 'LIN' 'MAIN'.
          PERFORM writeform USING 'WERKS_TAX_DETAIL' 'MAIN'.
        ENDIF.
        end of change
         MFLAG = 'Y'.
        PERFORM writeform USING 'TERMS_VAL' 'MAIN'.
        LOOP AT it_konv1 WHERE knumv EQ it_ekko-knumv.
          mkschl = it_konv1-kschl.
          mchgamt = 0.
          LOOP AT it_konv_ftr  WHERE knumv EQ it_konv1-knumv
                               AND kschl EQ mkschl.
            mchgamt = mchgamt + it_konv_ftr-kwert.
          ENDLOOP.
            For Japanies Yen "RTDK906759
          IF it_ekko-waers = 'JPY'.
            mchgamt = mchgamt * 100.
          ENDIF.
            End for japaies Yen
          mfamt = mfamt + mchgamt.
          IF mchgamt LT '0'.
            mchgamt = mchgamt * ( -1 ).
          ENDIF.
          READ TABLE it_t685t_ftr WITH KEY kschl = mkschl.
          PERFORM writeform USING 'TERMS_FTR_VAL' 'MAIN'.
          mlctr = mlctr + 1.
        ENDLOOP.
        mflag = 'T'.
        CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
          EXPORTING
            amt_in_num         = mfamt
          IMPORTING
            amt_in_words       = mfword
          EXCEPTIONS
            data_type_mismatch = 1
            OTHERS             = 2.
        CONDENSE mebeln.
        nmebeln = it_ekko-ebeln.
        REFRESH tline.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            id                      = 'F01'
            language                = sy-langu
            name                    = nmebeln
            object                  = 'EKKO'
          TABLES
            lines                   = tline
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.
        IF sy-subrc <> 0.
        ENDIF.
    *---- CHANGED BY MATHEW BECAUSE THIS STATMENT WORKING FINE IN 300 BUT NOT IN 500C.
       LOOP AT ZTEXT.
         IF ZTEXT-TEXT1 IS NOT INITIAL.
           PERFORM WRITEFORM USING 'TERMS_COND_VAL_PAY' 'MAIN'.
         ENDIF.
         MPAY_FLAG = 'Y'.
       ENDLOOP.
        READ TABLE it_t052u WITH KEY zterm = it_ekko-zterm.
        LOOP AT it_t052u WHERE zterm EQ it_ekko-zterm.
          IF it_t052u-text1 IS NOT INITIAL.
            PERFORM writeform USING 'TERMS_COND_VAL_PAY' 'MAIN'.
          ENDIF.
          mpay_flag = 'Y'.
        ENDLOOP.
        PERFORM writeform USING 'TERMS_COND_VAL' 'MAIN'.
        LOOP AT tline.
          IF tline-tdline IS NOT INITIAL.
            PERFORM writeform USING 'TERMS_COND_VAL_HDR' 'MAIN'.
          ENDIF.
          CONDENSE txt.
        ENDLOOP.
        PERFORM writeform USING 'FTR' 'FTR_LIN3'.
        PERFORM writeform USING 'FTR_LIN1' 'FTR_LIN1'.
        CALL FUNCTION 'END_FORM'.
      ENDLOOP.                    "   It_ekko.
      CALL FUNCTION 'CLOSE_FORM'
       IMPORTING
       RESULT                         = itcpp
      RDI_RESULT                     =
       TABLES
         otfdata                        = otf
       EXCEPTIONS
         unopened                       = 1
         bad_pageformat_for_print       = 2
         send_error                     = 3
         spool_error                    = 4
         codepage                       = 5
         OTHERS                         = 6.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " Process
    *&      Form  WRITEFORM
          text
         -->P_0150   text
         -->P_0151   text
    FORM writeform  USING    value(p_0150)
                             value(p_0151).
      CALL FUNCTION 'WRITE_FORM'

    Hi
    I think some basis related configuartions to be done
    Try like this and inform me
    A cyclic job runs, which processes the messages seen in the SOST queue.
    Are you sure it's not the frequency of the cyclic job, rather than the
    number of messages in the queue, that you are observing? In messages
    that are queued and before the cyclic job runs, "wait for comm. service"
    is the normal status.
    If you mean that there are always 4 items queued in SOST regardless of
    the cyclic send job, then I have no ideas. I would have thought there
    was no way to do that.
    when the send job runs it just never
    picks them up & sends them, while it picks up many others. The send job
    is somehow blind to these; no error message occurs. In this case, I
    'delete' them from the queue (in SOST) and then 'undelete' (drop down
    menu -> /Go to /Deleted Items) them and then re-queue them. THEN they
    actually get picked up & sent when the next cyclic send job executes.
    Regards
    Pavan

  • My macbook pro with OS 10.6.7 'mail' program does not send my mail through the IPS wireless, I am connected to. The message is my 'e-mail is rejected by the server'. It has been working until 5 days ago. The connection doctor says I am connected and no lo

    My macbook pro with OS 10.6.7 'mail' program does not send my mail through the IPS wireless, I am connected to. The message is my 'e-mail is rejected by the server'. It has been working until 5 days ago. The connection doctor says I am connected and no log in required.
    After trying lots I found now in 'Airport Utility is 'unable to detect any airport wireless devises.....'
    There is no provider to be seen in airport utility and only 'rescan' is an option with no results...
    even so I am connected and can browse the net receive mail etc. and the outgoing 'mail server' is set to the internet provider I am connected to.
    Can you enlighten me what can I do I need to use my e-mail program urgently !!!
    Thanks for your help

    I'm not sure what "IPS wireless" is, but unless you have an Apple Wi-Fi base station (such as a Time Capsule, AirPort Extreme, or AirPort Express), AirPort Utility won't see anything.
    You might try defining a new SMTP server to see if that will work any better.
    By the way, the subject field for these messages isn't intended to hold a lot of text.  Put a short description of your problem in the subject field and save the rest of your message for the body field.

  • Using PowerShell to set Custom Access Rights on a Calendar Does not set Free/Busy Permissions

    We recently discovered an issue where, if you use Exchange Management Shell to configure custom access rights, the Free/Busy permissions do not get set at all (they remain as "None"):
    $temp = [Microsoft.Exchange.Management.StoreTasks.MailboxFolderAccessRight[]]("ReadItems","EditOwnedItems","DeleteOwnedItems","EditAllItems","DeleteAllItems","FolderVisible")
    Add-MailboxFolderPermission -Identity "conf-company-test:\calendar" -User "Company Calendar Management" -AccessRights $temp
    Add-MailboxFolderPermission -Identity "conf-company-test:\calendar" -User "mpinkston" -AccessRights Editor
    If you use a pre-defined "role" such as Editor given to mpinkston6 in the above example it sets the Free/Busy permission to Full Details. It would appear that using Add-MailboxFolderPermission or Set-MailboxFolderPermission is generic for folder
    objects, and doesn't explicitly set the Free/Busy permissions. In the case of the pre-defined roles either the command is doing something special/different, or the permission checks later accept pre-defined roles for determining Free/Busy permissions. No idea
    which is going on. If Free/Busy permissions can be fixed through PowerShell by some other mechanism/command, that would be great. If not, how do we go about requesting a fix/feature change in Exchange?
    http://technet.microsoft.com/en-us/library/dd298062%28v=exchg.150%29.aspx
    (Please expand Parameters and read AccessRights to get a better understanding for what I'm describing.)

    Did you try adding AvailabilityOnly or LimitedDetails in your $temp variable for Calendar folder? These would set it to "Free/Busy time, subject, location" or "Free/Busy time" respectively....
    Add-MailboxFolderPermission - http://technet.microsoft.com/en-us/library/dd298062(v=exchg.150).aspx
    The following roles apply specifically to calendar folders:
    AvailabilityOnly   View only availability data
    LimitedDetails   View availability data with subject and location
    Amit Tank | Exchange - MVP | Blog:
    exchangeshare.wordpress.com 

Maybe you are looking for

  • URGENT : Help needed for OLAP tools selection

    Hi Gurus, Environment : Oracle 10g .net web application with backend as Oracle 10g server embaded with OLAP server. Application - CRM Feature requreid - OLAP, OLAP Reporting, Drilldown graphical analysis, US MAP view location specific queries, Ad-hoc

  • Can I install Ora 8.0.5 client on a Win2000 workstation ?

    Hi, we have Oracle 8.0.5 installed on a Windows NT server. May I risk to start an Ora 8.0.5 client installation on my Windows 2000 workstation ? I mean is it compatible with win2000 ? If no, what is the solution ? Ora9i ? Thanks: Szilard

  • Picking up files in a sequence order

    Hi, My requirement is to picking up the files in a sequence order, The sequence no. (say for eg 1, 2, 3,etc)will be attached along with the files. i.e file1.xml,file2.xml,file3.xml etc suppose if my input folder contain file1.xml, file2.xml,file4.xml

  • Bank Communication Management - Incoming messages from Banks

    Hi, We are using Bank communication management. When we send our ACH and Wire files to the bank, the bank sends two confirmations: 1. First confirmation says that the file is received. 2. Second confirmation sends the total number of items and total

  • Black & White Brick

    When you use the B&W adjustment in Aperture a bunch of stuff happens in behind the scenes (which is a question for another time) and then you get the B&W brick. The brick has three sliders Red, Green and Blue which adjust the sensitivity of the image