<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Address type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236699#M481785</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the following portion of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_txt_upload.&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You are reading record belonging to pernr only. I feel the approach should be&lt;/P&gt;&lt;P&gt;try and read record using both pernr and anssa. There should be three reads. In the&lt;/P&gt;&lt;P&gt;first read use anssa eq '1'. If you donot get any record in that read try using anssa eq '9001'. If that also fails try using anssa equals '4'. The code i have given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_txt_upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr anssa = '1' binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr anssa = '9001' binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr anssa = '4' binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2007 16:06:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-03T16:06:53Z</dc:date>
    <item>
      <title>Address type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236694#M481780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AS per the requirement i need to fetch the Address details of employees from PA0006.&lt;/P&gt;&lt;P&gt;we have a field ADDRESS TYPE (ANSSA).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) First need to check whether employee has "PERMANENT ADDRESS or not, if it is there display it. (ANSSA = 1)&lt;/P&gt;&lt;P&gt;2) If any employee doesn't contain "Permanent Address" then check for his TEMPORARY ADDRESS. if it is there display it. (ANSSA = 9001)&lt;/P&gt;&lt;P&gt;3) if "Temporary address" is not there then Display EMERGENCY ADDRESS. &lt;/P&gt;&lt;P&gt;(ANSSA = 4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written the code for this. but Eventhough the Employee has Permanent Address(ANSSA =1) it is taking Emergency Address(ANSSA = 4) for some of the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm attaching the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please verify and suggest me the right way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading Personal No. from Flat file and storing into Internal table t_txt_upload.&lt;/P&gt;&lt;P&gt;using FOR ALL ENTRIES fetching corresponding the records associated with that personal numbers from PA0006 and storing into IT_p0006.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    it_final-pernr = it_p0006-pernr.  "Employee No&lt;/P&gt;&lt;P&gt;    it_final-begda = it_p0006-begda.  "Date From&lt;/P&gt;&lt;P&gt;    it_final-endda = it_p0006-endda.  "Date To&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if it_p0006-anssa = 4.&lt;/P&gt;&lt;P&gt;         it_final-anssa = 'E'.&lt;/P&gt;&lt;P&gt;         it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;         it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;         it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;         it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;         it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;         it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;         it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt;       elseif it_p0006-anssa = '9001'.&lt;/P&gt;&lt;P&gt;         it_final-anssa = 'T'.&lt;/P&gt;&lt;P&gt;         it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;         it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;         it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;         it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;         it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;         it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;         it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt;       elseIF.&lt;/P&gt;&lt;P&gt;         it_p0006-anssa = '1'.&lt;/P&gt;&lt;P&gt;         it_final-anssa = 'P'.&lt;/P&gt;&lt;P&gt;         it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;         it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;         it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;         it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;         it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;         it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;         it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 13:48:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236694#M481780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T13:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Address type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236695#M481781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be just a typo... At least if you copied and pasted the code.&lt;/P&gt;&lt;P&gt;Check if the 4 is also like '4'. With single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like (I prefer CASE...):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE it_p0006-anssa.
  WHEN '4'.
    it_final-anssa = 'E'.
    it_final-stras = it_p0006-stras.
    it_final-locat = it_p0006-locat.
    it_final-ort01 = it_p0006-ort01.
    it_final-ort02 = it_p0006-ort02.
    it_final-pstlz = it_p0006-pstlz.
    it_final-telnr = it_p0006-telnr.
    it_final-land1 = it_p0006-land1.
  WHEN '9001'.
    it_final-anssa = 'T'.
    it_final-stras = it_p0006-stras.
    it_final-locat = it_p0006-locat.
    it_final-ort01 = it_p0006-ort01.
    it_final-ort02 = it_p0006-ort02.
    it_final-pstlz = it_p0006-pstlz.
    it_final-telnr = it_p0006-telnr.
    it_final-land1 = it_p0006-land1.
  WHEN '1'.
    it_final-anssa = 'P'.
    it_final-stras = it_p0006-stras.
    it_final-locat = it_p0006-locat.
    it_final-ort01 = it_p0006-ort01.
    it_final-ort02 = it_p0006-ort02.
    it_final-pstlz = it_p0006-pstlz.
    it_final-telnr = it_p0006-telnr.
    it_final-land1 = it_p0006-land1.
ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 13:55:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236695#M481781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T13:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Address type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236696#M481782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi,&lt;/P&gt;&lt;P&gt; I guess what is happening here is all records belonging to all types are selected.&lt;/P&gt;&lt;P&gt;But if you check the order in which you are comparing first you are checking if any&lt;/P&gt;&lt;P&gt;emergency record is present, then temporary address and then  permanent address. But to get your result you should check in the reverse order i.e. first&lt;/P&gt;&lt;P&gt;permanent address, then temporary, then emergency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_p0006-anssa = 1.&lt;/P&gt;&lt;P&gt;it_final-anssa = 'E'.&lt;/P&gt;&lt;P&gt;it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt;elseif it_p0006-anssa = '9001'.&lt;/P&gt;&lt;P&gt;it_final-anssa = 'T'.&lt;/P&gt;&lt;P&gt;it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt;elseIF.&lt;/P&gt;&lt;P&gt;it_p0006-anssa = '9001'.&lt;/P&gt;&lt;P&gt;it_final-anssa = 'P'.&lt;/P&gt;&lt;P&gt;it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 13:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236696#M481782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T13:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Address type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236697#M481783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI earlier i have tried like that itself. it always going to 4. so have given first condition as 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i will give you the record pattern in DB. it will give clarity on my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personal No.     BeginDate            EndDate       AddressType&lt;/P&gt;&lt;P&gt;01                    01.03.1998            25.07.2006         1&lt;/P&gt;&lt;P&gt;01                   26.07.2006             31.12.9999         1&lt;/P&gt;&lt;P&gt;01                   12.09.2004             31.12.9999         4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each personal No. there are two to three records in the DB.&lt;/P&gt;&lt;P&gt;I'm sorting based on Personal Number.&lt;/P&gt;&lt;P&gt;and Deleting Adjacent Duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will make you very clear and please give the Reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;if not t_txt_upload[] is initial.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the data from table PA0006.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;select  pernr&lt;/P&gt;&lt;P&gt;        begda&lt;/P&gt;&lt;P&gt;        endda&lt;/P&gt;&lt;P&gt;        anssa&lt;/P&gt;&lt;P&gt;        stras&lt;/P&gt;&lt;P&gt;        locat&lt;/P&gt;&lt;P&gt;        ort01&lt;/P&gt;&lt;P&gt;        ort02&lt;/P&gt;&lt;P&gt;        pstlz&lt;/P&gt;&lt;P&gt;        land1&lt;/P&gt;&lt;P&gt;        telnr&lt;/P&gt;&lt;P&gt;        com01&lt;/P&gt;&lt;P&gt;        num01&lt;/P&gt;&lt;P&gt;        com02&lt;/P&gt;&lt;P&gt;        num02&lt;/P&gt;&lt;P&gt;              from pa0006&lt;/P&gt;&lt;P&gt;        into table it_p0006&lt;/P&gt;&lt;P&gt;     for all entries in t_txt_upload&lt;/P&gt;&lt;P&gt;       where pernr eq t_txt_upload-pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc eQ 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append it_p0006.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      MESSAGE I030 WITH IT_P0006-PERNR.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  sort it_p0006 by pernr.&lt;/P&gt;&lt;P&gt;  delete adjacent duplicates from it_p0006 comparing pernr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_txt_upload.&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    it_final-pernr = it_p0006-pernr.  "Employee No&lt;/P&gt;&lt;P&gt;    it_final-begda = it_p0006-begda.  "Date From&lt;/P&gt;&lt;P&gt;    it_final-endda = it_p0006-endda.  "Date To&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if it_p0006-anssa = 1.&lt;/P&gt;&lt;P&gt;         it_final-anssa = 'P'.&lt;/P&gt;&lt;P&gt;         it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;         it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;         it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;         it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;         it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;         it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;         it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt;       elseif it_p0006-anssa = 9001.&lt;/P&gt;&lt;P&gt;         it_final-anssa = 'T'.&lt;/P&gt;&lt;P&gt;         it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;         it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;         it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;         it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;         it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;         it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;         it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt;       else .&lt;/P&gt;&lt;P&gt;         it_p0006-anssa = 4.&lt;/P&gt;&lt;P&gt;         it_final-anssa = 'E'.&lt;/P&gt;&lt;P&gt;         it_final-stras = it_p0006-stras.&lt;/P&gt;&lt;P&gt;         it_final-locat = it_p0006-locat.&lt;/P&gt;&lt;P&gt;         it_final-ort01 = it_p0006-ort01.&lt;/P&gt;&lt;P&gt;         it_final-ort02 = it_p0006-ort02.&lt;/P&gt;&lt;P&gt;         it_final-pstlz = it_p0006-pstlz.&lt;/P&gt;&lt;P&gt;         it_final-telnr = it_p0006-telnr.&lt;/P&gt;&lt;P&gt;         it_final-land1 = it_p0006-land1.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 14:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236697#M481783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T14:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Address type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236698#M481784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is with below two statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_p0006 by pernr.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it_p0006 comparing pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are deleting comparing pernr, then what might be happening is that records with address type 1 and 9001 might be getting deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why are you sorting and deleting adjacent duplicates based on pernr? If you want only the current records you can add that in the selection criteria like below, no need to sort and delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select pernr&lt;/P&gt;&lt;P&gt;begda&lt;/P&gt;&lt;P&gt;endda&lt;/P&gt;&lt;P&gt;anssa&lt;/P&gt;&lt;P&gt;stras&lt;/P&gt;&lt;P&gt;locat&lt;/P&gt;&lt;P&gt;ort01&lt;/P&gt;&lt;P&gt;ort02&lt;/P&gt;&lt;P&gt;pstlz&lt;/P&gt;&lt;P&gt;land1&lt;/P&gt;&lt;P&gt;telnr&lt;/P&gt;&lt;P&gt;com01&lt;/P&gt;&lt;P&gt;num01&lt;/P&gt;&lt;P&gt;com02&lt;/P&gt;&lt;P&gt;num02&lt;/P&gt;&lt;P&gt;from pa0006&lt;/P&gt;&lt;P&gt;into table it_p0006&lt;/P&gt;&lt;P&gt;for all entries in t_txt_upload&lt;/P&gt;&lt;P&gt;where pernr eq t_txt_upload-pernr and&lt;/P&gt;&lt;P&gt;        &amp;lt;u&amp;gt; begda le sy-datum             and&lt;/P&gt;&lt;P&gt;         endda ge sy-datum.&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 14:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236698#M481784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T14:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Address type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236699#M481785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the following portion of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_txt_upload.&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You are reading record belonging to pernr only. I feel the approach should be&lt;/P&gt;&lt;P&gt;try and read record using both pernr and anssa. There should be three reads. In the&lt;/P&gt;&lt;P&gt;first read use anssa eq '1'. If you donot get any record in that read try using anssa eq '9001'. If that also fails try using anssa equals '4'. The code i have given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_txt_upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr anssa = '1' binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr anssa = '9001' binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_p0006 with key pernr = t_txt_upload-pernr anssa = '4' binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 16:06:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236699#M481785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T16:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Address type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236700#M481786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks alot for your suggestion. i get rid of tht problem.&lt;/P&gt;&lt;P&gt;I'm Printing the output in flat file(notepad) using GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;Data is populating fine.&lt;/P&gt;&lt;P&gt;I need add pipe dilimiter (|) for all the fields.&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personal No.| BEGDA | ENDDA | ANSSA | TELNR|&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you guide me the way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2007 07:40:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236700#M481786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-04T07:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Address type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236701#M481787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the only possible way is concatenate all fields i.e. personnel number, begda, endda separated by '|' using concatenate statement as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate pernr '|' begda '|' endda '|' into result or&lt;/P&gt;&lt;P&gt;concatenate pernr '|' begda '|' endda '|' into result separated by '|' and then download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also suggest you to create a separate thread for the new question so that it&lt;/P&gt;&lt;P&gt;has higher visibility among viewers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aravind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2007 14:12:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/address-type/m-p/2236701#M481787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-04T14:12:53Z</dc:date>
    </item>
  </channel>
</rss>

