First address of my BP

hi there
i have some BPs that have more than one address assigned to their page
it means that they have two factorys for example
how can i get only the first address(only the country) from my BP;s contact card?
SELECT T0.[DocNum]'A/R inv',
T1.[visorder] InvLine,
p.Docnum'A/P inv',
pp.CardName,c.name,C2.name,
T1.[ItemCode],p.NumAtCard,
T2.U_IntCode
FROM OINV T0
  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
  INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
  left outer join PCH1 pr on pr.ItemCode=T2.ItemCode and not exists
     (select 1 from pch1 w where w.docentry>pr.docentry and
       w.itemcode=pr.itemcode)
  left outer join opch p on pr.docentry=p.docentry
  left outer join ocrd pp on pp.CardCode=coalesce(p.CardCode,T2.Cardcode)
  left outer join crd1 s1 on s1.CardCode=pp.CardCode and s1.Adrestype='B'
         and s1.Linenum=(select min(w.linenum) from crd1 w
     where w.CardCode=pp.CardCode and w.Adrestype='B'
      and w.country is not null)
  left outer join ocry c on c.code=s1.country
  left outer join crd1 s2 on s2.CardCode=T2.CardCode and s2.Adrestype='B'
         and s2.Linenum=(select min(w.linenum) from crd1 w
     where w.CardCode=T2.CardCode and w.Adrestype='B'
      and w.country is not null)
  left outer join ocry c2 on c2.code=s2.country
WHERE T0.DocNum = '1501244'
how should i edit the above code?
thanks in advance

In the BP master data Addresses tab the system shows the addresses ordered by the Address id. So the one you first see can retrieved by this:
SELECT T0.[DocNum]'A/R inv',
T1.[visorder] InvLine,
p.Docnum'A/P inv',
pp.CardName,c.name,C2.name,
T1.[ItemCode],p.NumAtCard--,
-- T2.U_IntCode
FROM OINV T0
  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
  INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
  left outer join PCH1 pr on pr.ItemCode=T2.ItemCode and not exists
     (select 1 from pch1 w where w.docentry>pr.docentry and
       w.itemcode=pr.itemcode)
  left outer join opch p on pr.docentry=p.docentry
  left outer join ocrd pp on pp.CardCode=coalesce(p.CardCode,T2.Cardcode)
  left outer join crd1 s1 on s1.CardCode=pp.CardCode and s1.Adrestype='B'
         and s1.Linenum=(select top 1 w.linenum from crd1 w
     where w.CardCode=pp.CardCode and w.Adrestype='B'
      and w.country is not null order by w.address)
  left outer join ocry c on c.code=s1.country
  left outer join crd1 s2 on s2.CardCode=T2.CardCode and s2.Adrestype='B'
         and s2.Linenum=(select top 1 w.linenum from crd1 w
     where w.CardCode=pp.CardCode and w.Adrestype='B'
      and w.country is not null order by w.address)
  left outer join ocry c2 on c2.code=s2.country

Similar Messages

  • How to I list the e-mail addresses in my contacts group? Mine seem to go to only the first address.

    How do I list the e-mail addresses in my contacts group? It seems to go only to the first address.

    Hi ozziejack123,
    Welcome to the Support Communities!
    The individual contacts are sorted first within the Contact application.  When you create a group in Contacts, the individual names in the group should keep the same sorting order.  Try resetting the name order for all contacts.
    Contacts (Mavericks): List contacts by first or last name
    http://support.apple.com/kb/PH15091
    Choose whether contacts’ first or last names are listed first, and whether they’re sorted by first or last name.
    Change the name order for all contacts
    Choose Contacts > Preferences, then click General.
    Select an option next to “Show first name.”
    Sort contacts
    Choose Contacts > Preferences, then click General.
    Use the Sort By menu to choose how to sort.
    I hope this information helps ....
    - Judy

  • Why is the first address on a subnet reserved?

    Based on subnetting, the "all 1s" or last address in a subnet is the broadcast address.  Why is the "all 0s" or first address reserved?  About all I can find on the web is that "way back in time" it was also a broadcast address of some type.  Is there current programmatic reasons, or just convention to reserve the first address of a subnet?  Is there something I can see with a wireshark trace?  I happen to run into a situation recently where a host was in fact using the resevered first address both on net and across the router, apparently without issues.  Links to documentation appreciated.  Thanks.

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    I'll try again - maybe this time I'll be helpful.
    Beginning with very early RFCs, all zeros was recommended to represent "this".  So an IP address with an all-zeros host bits, such as this Class C, 192.168.1.0 would mean "this network", 192.168.1.
    Hosts were not to be assigned all zeros as a host number so they wouldn't be confused with a (sub)network number.  I.e., if you use 192.168.1.0 as either a source or destination IP it could have special meaning (just as the all ones host is used for broadcasts).  As far as I can tell, little if anything used this special designation (except for some old Unix implementations that could use all zeros as the broadcast address).
    However, with RFC 3021, allowing for /31s for P2P links, the all zeros and all one host bits denote hosts.  This RFC does has some interesting things to say about how all zero host IPs should be treated:
    (h)  { , , 0 }
             Subnetwork number.  SHOULD NOT be used as a source address,
             except when the originator is one of the endpoints of a point-
             to-point link with a 31-bit mask.  For other types of links, a
             packet with such a destination SHOULD be silently discarded.
             If these packets are not silently discarded, they MUST be treated
             as IP broadcasts [RFC1812].
    (f)  { , , 0 }
             Subnetwork number.  SHOULD NOT be used as a source address,
             except when the originator is one of the endpoints of a point-
             to-point link with a 31-bit mask.  For other types of links, a
             packet with such a destination SHOULD be silently discarded.
             If these packets are not silently discarded, they MUST be
             treated as IP broadcasts.
          (2) SHOULD silently discard on receipt (i.e., do not even deliver
          to applications in the router) any packet addressed to 0.0.0.0 or
          { , 0 }.  If these packets are not silently
          discarded, they MUST be treated as IP broadcasts (see Section
          [5.3.5]).  There MAY be a configuration option to allow receipt of
          these packets.  This option SHOULD default to discarding them.
          In a point-to-point link with a 31-bit mask, a packet addressed to
          { , 0 } corresponds to one of the endpoints of
          such link, it MUST be treated as directed to the router on which
          the address is applied.
          (4) SHOULD NOT originate datagrams addressed to 0.0.0.0 or {
          , 0 }.  There MAY be a configuration option to
          allow generation of these packets (instead of using the relevant
          1s format broadcast).  This option SHOULD default to not
          generating them.
          In a point-to-point link with a 31-bit mask, the configuration of
          such a mask SHOULD allow for the generation of datagrams addressed
          to { , 0 }.
    With RFC 3021 (if I'm reading the above correctly), except for /31 P2P IPs, this shouldn't work, but the fact you've found it does, is likely due to most IP implementations not treating the all zeros host bits IP address as directed, above, but just as like another host IP.  Again, if nothing really has used this special case, it simplifies the IP implementation.
    In the above, technically, changing destination {, 0} as a MUST broadcast, should allow destination host to receive packet anyway.
    Rule 4 is also interesting, as it assumes only /31 hosts can send to all zero hosts.  This would be impossible to control if you don't know what the destination network-prefix is, and often only the destination truly knows.
    Disclaimer
    The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.
    Liability Disclaimer
    In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.
    Posting
    I'll try again

  • How do you get Groups to work on the IPAD? They imported and show in Address Book but when used, only the first address picks up.

    How do you get Groups to work on the IPAD. They show in address book but only the first name is used when entering.

    When you select the bookmark on the upper left, you should be able to see multiple groups.
    For the groups page, select the bookmark on the upper right to see the individual entries.

  • Mail replies using first "to" address instead of current account

    Hi;
    I have three email accounts configure in Mail, [email protected], [email protected] and [email protected] (shared system account, I know it's not the best solution
    Anyway, occasionally all three accounts get the same message, so the To: field contains the addresses in some order, say: [email protected], [email protected] and [email protected]
    When I try to reply to a message like this from the user3 account (from their inbox), the From: field always populates with the first address in the To: field of the original message.
    Is there any way to change this behavior so that the From: field is always that of the account initiating the reply?
    Hope that was a clear explanation of the problem... I'll be happy to elaborate if it's not!
    Thanks All,
    vg.

    I can confirm this behavior. When you have more than one account setup, and a message comes to all those accounts, Mail will only choose one from which to allow the Reply. I think, but have not checked lately, that it will be the first one listed.
    Ernie

  • Invoice data repeating Address after page break

    Hello forum mebers,
    i have a problem to create a rtf template which prints invoice data with more than one address.
    The original data has more than one invoice to print all papers within one output.
    It is for repeat printing. I want to mark several invoices to print.
    The source data is splitting into header information (Address,Invoice number,summaries), invoice positions and company information (client).
    How to create the xml source ?
    How to create the word rtf template to repeat the invoice address on each page also if the first invoice has more than one page.
    I have tried the <?template feature, but this only repeats the first address of the data.
    I have tried the <?start:body feature, but this creates all addresses on the first page.
    I have tried the <?split-by-page-break feature, but this creates no repeating address header.
    I am clueless.
    Do you have any help or example for this problem ?
    Regards
    Frank

    Hallo Jorge,
    danke für die Antwort und das RTF, aber soweit war ich auch schon.
    Wenn mann jetzt noch sortiert nach ID und einen Header (template) und Footer hinzufügt, funktioniert es nicht mehr.
    Gruß
    Frank

  • How can I send an email to multiple addresses for one recipient?

    I would like to send to recipient who has an "additional" email acccount, that is to both of his accounts.

    Did you manage to read the article I linked to in the last post?
    Enter the address manually.
    Just press enter after the first address and you get a field for another address Your choice of fields so you can use it as if they are '''To:''' two separate individual recipients, or use a primary address and a '''CC''' field, the arrowhead allows you to choose.

  • How to change the address to new address for all pages in a script

    i created a script for my website against an IP address
    now i have to run the same script of web site against new IP address
    can i change programmitically the old ip address of all script pages to new ip address?
    or should i go manually by opening each and every page address properties and changing it to new ip address.
    any suggestions
    my visual script is having around 75 pages.
    having a visual script with that many pages is best practice?
    thanks in advance

    Hello Pasumarthi,
    If I understand your question correctly, the address contains an IP address that you need to change for the 75 pages..
    If you change the first address in the page, save the script and re-run the test this should fix the remaining 74 pages.
    ex: http://192.168.2.1/index.html (Old)
    http://202.116.25.1/index.html(New)
    If the url example above is this task you are going to resolve, this will take care of your issue.
    If you have 75 scripts that need the URL changed, and you have upgraded to 8.20, you can use the script updater utility to do this.
    Please let me know if this resolves your issue.
    Best Regards,
    Jim

  • Missing information with Address Book

    I've got a Centro, run Mac OS X 10.4.11, and managed to get iSync to play nice with my new Centro (palm os 5.4.9) and transfer over the years of information I have stocked up in iCal and Address Book.app. Everything seemed fine on the surface, but when I went to look at the contacts on the Centro, it only transfered some of the data. Particularly, I'm missing address from every contact that has only 1 address (which happens to be the vast majority). iSync managed to pull over the first address if there is a second one, but it has it mislabeled. For example:
    On the computer
    Contact : Me
    some phone numbers
    Home Address
    Work Address
    On the Centro
    Contact : Me
    some phone numbers
    Home Address (which is labeled as Work)
    Really quite frustrating. What am I doing wrong? I've done several searches using various keywords and 90% of the time I end up getting directed to buy more software (Missing Sync), on top of the several hundred dollars I've already shelled out on an operating system and palm hardware. Please, tell me there's a better way.
    Less important, but equally annoying, are such small things as
    -How do I file contact categories en masse from my computer?
    -How do sync contact photos from Address Book.app to the Centro?
    -How do I get locations to transfer from iCal to the Palm Calendar on the Centro?
    -How do I get the Palm Calendar's categories to match with iCal's?
    -How do I get the Palm Calendar to accept iCal's categorizations of appointments?
    I tried posting this over in the Palm help forums, but got no responses, any help would be greatly appreciated. Thanks!
    Daniel

    Welcome to Apple Discussions.
    You have bumped up against the substantial, long term limitations of the iSync Palm Conduit, and iSync itself, with respect to the issues you point out.
    There is no explicit support for contact and calendaring extensions introduced with later versions of the Palm personal information management applications. Categories, for example, are not supported. The conduit still does not, and—I dare say, never will—support the synchronization of any address labeled other than <home>.
    Each of the issues you raise is addressed by Mark/Space with the Missing Sync for Palm OS, and that is the only workaround available to you.

  • In Address Book, how can i modify several contacts (several cards) at the s

    Hello,
    In Address Book, how can i modify several contacts (several cards) at the same time ?
    for exemple : I have 100 contact which live in Paris, I select all of them together, but when I put "Paris" in the field "city", it puts "Paris" only in the fisrt contact !
    how to edit several contact at a time ?
    And I would like to put some kind of "tags", or words, in "remark", also by selecting several contact and edit them together...
    Thanks by advance !
    Alexandre.

    Welcome to the discussions, Alexandre1975 et bonjour.
    Just using Address Book this can't be done, but if you are prepared to try a little Applescript it is easy. This script will set the city for example - but only if there is already an address.
    AK
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "Address Book"
    set ContactList to the selection
    repeat with ThisOne in ContactList
    set city of first address of ThisOne to "Paris"
    end repeat
    end tell</pre>
    (The recent upgrade to the discussions has disabled the link that allows direct opening of a script, so run Script Editor and copy in the script.)
    Message was edited by: Austin Kinsella1

  • Address Book Exporting ... the Case of the Missing Spouse ... ?

    … and missing children and missing birthdays, too.
    I have had problems customizing address labels, which I discussed in detail in a separate message, entitled Wonky Address Labels. In fact, I gave up on using Apple Address Book and decided to export the database, put it in Excel, and do some column merging to get a one-time solution to my label-printing problem for my Christmas cards.
    Yeah, sure I would … when Address Book will not export in anything other than an arcane address book file format.
    So it was back to this forum, to review exporting suggestions. Two seemed to be offered and I tried ‘em both; first, Address Book Exporter at:
    gwenhiver.net/applications/addressbookexporter/index.php
    and second, some special mail scripts at:
    http://homepage.mac.com/aamann/Mail_Scripts.html
    These were both fun to use and worked pretty well, producing tab-delimited text files. But neither will do a complete export of the database; they won’t export spouse names, anniversary dates, children’s names or spouse/children’s birthdays ( which I had put in an ‘Other Date’ field ) … nor, BTW, will they export custom fields.
    Well, if I can’t print custom labels with Apple Address Book and can’t export the full database, I guess hand-written Christmas card envelopes have a certain panache.
    Or, I suppose I might use my 10-year old Windows software that I run on Virtual PC.
    It would be nice if Apple would fix this Address Book exporting problem. Frankly, I don’t like the idea of having data in a database that I cannot export as a simple text file. In fact, if I had known I could not get my data OUT, I would not have put it IN to start with.
    Any suggestions for exporting ALL the fields of the Apple Address Book database would be welcome.
    DICK

    value = value;Oh, so you have one of those new compilers that reads your mind and knows which value is which in that statement, huh?
    Lucky.
    The rest of us are stuck doing this.value = value;so that the compiler can distinguish the member variable from the method parameter.

  • Exporting a mailing label report to PDF shifts the address off ...

    Hi.
    The report is created using the wizard "File->New->Mailing Label Report". Everything looks good at the preview. Following are the dimensions:
    - 4 X 1 inches
    - 2 labels across, 10 down
    - Paper would be 8-1/2 X 11 inches (Letter sized) (labeled) paper
    - 0.5 inches page margin on top and bottom
    - 0.156 inches left & right margins
    - Horizontally .188 inches between labels
    - Vertically NO space between labels
    For this, in the Crystal Reports Designer, I used Mailing Label Type = "Address (Avery 5261)".
    Issue
    However, when trying to export the report to PDF and when we print the report, addresses go off the labels (shifts up slightly starting from the begining). It looks like the font sizes, etc are not maintained. Therefore, visually, addresses shifts up gradually and does not fall into labels.
    Other specific details
    The first address was too low, I mean after .5 inches top margin, this first address started to appear .4 inches down the margin. If we measure from top of one address to the top of next one, it is about .9 inch and not 1 inch.
    Later I tried this [template|http://www.worldlabel.com/Pages/crystal-reports.htm] as well. I faced the same issue.
    Had anyone worked with mailing labels report faced similar issue?
    I appreciate your help

    Go through the following SAP Note
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bip/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303336333933353336%7D.do]
    Regards,
    Raghavendra.G

  • Send E-mail with payment advice to several address

    Hi Experts
    In our company in USA we set a payment through ACH, for it we need to send a payment advice to the vendor after we run process in F110, that process is run properly but the problem is we need to send some mails to more than one receiver, and the option to input it is in vendor master data, but at the moment to send e-mail the system only send mail to first address, some one have idea can I do for send to several address???
    Thanks

    HI,
    I am assuming that you are using BTE 2040 or 2050 to achieve this. Instead of using the sample FM provided by SAP for this BTE, copy it to a Y/Z FM and then you can modify it accordingly.
    My suggestion would be to create a custom table for the email addresses and pick the additional email addresses from there in conjugation with the Vendor master.
    Regards

  • Send AP payment advice e-mail to multiple e-mail addresses?

    Hello all,
    I implemented Business Transaction Event 2040 to determine whether a vendor payment advice should be paper or e-mail.  The SAP code that populates the e-mail address from the vendor's master record only uses the first e-mail address, regardless of how many e-mail addresses are entered.
    Have any of you found a way to send the e-mail to all of the addresses in the vendor master address table, ADR6, without making a modification to SAP's code?  I tried putting multiple e-mail addresses in the first address field.  The data validation that is being performed did not allow multiple addresses.
    When I asked this question of SAP, their answer was that there's nothing wrong and that they would be happy to charge for remote consulting to provide that functionality.
    I know that we could create a group e-mail address within our e-mail application for every vendor that wants the e-mail to be sent to multiple recipients.  Then enter that group e-mail address in the first line of the vendor master e-mail data.  I don't really want to do this because this would entail AP staff requesting to have that group set up and maintained by the staff that maintains the e-mail application. 
    Since we have the ability to enter multiple e-mail addresses for vendors, it seems like the payment advice e-mail that is generated should send an e-mail for every entry in the vendor master.
    Thanks
    Bruce

    Anil,
    We are using program RFFOUS_T to create the payment advice.  Your solution of copying that program and modifying it would work.  But I don't want to go to the time and trouble of doing that. 
    Because the volume of vendors that have multiple e-mail addresses is small, we'll just create group e-mail addresses in our e-mail application (Lotus Notes) and use that group e-mail address in the vendor master e-mail screen.
    SAP doesn't consider this an error.  At best it is a serious shortcoming.  I have a hard time believing that I'm the first or only customer that has asked about and for this.
    Thanks
    Bruce

  • Acrobat X Std: Mailmerge Word Add-in only emails the first recipient in the Mail merge list

    I have a user who is trying to do a mail merge from MS Word 2010 by using the PDF Add-in, whether she selects just to create the PDF's or email them automatically the add-in will say the emails have been sent successfully but only the first address on the WORD mail merge list will have been created/emailed. Effectively only doing one at a time!

    Hi,
    As the event log indicated, this is due to acrobat pdfmaker office com addin doesn't work well with Microsoft Word.
    I would suggest you go ahead and try to upgrade your Adobe product to the latest version and see if issue persists.
    Or contact the support of Adobe and see if there is a known compatibility issue or not.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    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]

Maybe you are looking for

  • Error Creating New Location in Business Rules

    I have installed System 11.1.1.x EAS Web on Windows / WebLogic. When I log into EAS as 'Admin' I can log into Business Rules and Create a New Location. When I log in as any other user, I get a message that "Business Rules Login Successful" but when I

  • Q10 contacts and calendar syncroniza​tion

    Using outlook account, syncronization of contacs and calendar by usb connection fails, with message at the end of the process "writing of the coomit on the device failed". It was not like this at the beginning. Computer and device software are update

  • HT1146 I want to Save certain received emails to allow more space on my hard drive. How do I do it?

    I would like to be able to save certain emails. There is a Saved file in my aol email account. How can I move emails to this Saved file? Also, how can I make specific folders to put emails into?

  • Using = and =

    I have created a function that accepts two parameters fromstyleid and tostyleid. These parameters can either have a % or a value. When I pass in a value for the TOSTYLEID I get all rows up to the specified row but not the value that was passed. If I

  • Case-insensitive Search-Highlighting doesn't work..

    Hi, I've got a poblem using the character-highlighting in report regions... There are some html-tags in the searched data, perhaps this can cause some problems? They work, but they don't highlight case-insensitive... Where could be the error? Message