<?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: ABAP code help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318513#M794952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the elaborate reply, I understood it. I shall run the program and will award the points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jan 2008 19:44:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-21T19:44:47Z</dc:date>
    <item>
      <title>ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318506#M794945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some help in the programming code. Here is the scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF INT_P4002 OCCURS 0,&lt;/P&gt;&lt;P&gt;        PERNR LIKE P4002-PERNR,&lt;/P&gt;&lt;P&gt;        VACANCY LIKE PB4002-OBJID,&lt;/P&gt;&lt;P&gt;     END OF INT_P4002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  BEGIN OF int_applicant OCCURS 0,&lt;/P&gt;&lt;P&gt;        PERNR LIKE P4002-PERNR,&lt;/P&gt;&lt;P&gt;        contest_number_id1(10),&lt;/P&gt;&lt;P&gt;        contest_number_id2(10),&lt;/P&gt;&lt;P&gt;        contest_number_id3(10),&lt;/P&gt;&lt;P&gt;        contest_number_id4(10),&lt;/P&gt;&lt;P&gt;        contest_number_id5(10),&lt;/P&gt;&lt;P&gt;     END OF int_applicant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have declared two internal tables as shown. The first table (INT_P4002 ) contains the data of applicants that have applied for multipe vacancies like (sample data). I get the data into this table by reading it from Recruitment tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;20000010, 50001234 &lt;/P&gt;&lt;P&gt;20000010, 50001235&lt;/P&gt;&lt;P&gt;20000010, 50001236 &lt;/P&gt;&lt;P&gt;20000010, 50001237 &lt;/P&gt;&lt;P&gt;20000011, 50001235 &lt;/P&gt;&lt;P&gt;20000012, 50001238 &lt;/P&gt;&lt;P&gt;20000012, 50001239 &lt;/P&gt;&lt;P&gt;20000012, 50001240&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since each applicant has applied to different vacancies, and I am collecting the data in the form of rows. However I need to present the data along different coulmns instead of rows like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now have to write this data to the table (int_applicant)  in this format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;20000010, 50001234, 50001235, 50001236, 50001237, &lt;/P&gt;&lt;P&gt;20000011, 50001235,&lt;/P&gt;&lt;P&gt;20000012, 50001238, 50001239, 50001240,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 17:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318506#M794945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T17:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318507#M794946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vinu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at int_p4002.&lt;/P&gt;&lt;P&gt;if &amp;lt;id1_condition&amp;gt;.&lt;/P&gt;&lt;P&gt;int_applicant-id1 = id1.&lt;/P&gt;&lt;P&gt;elseif &amp;lt;id2_condition&amp;gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at end of pernr.&lt;/P&gt;&lt;P&gt;append int_applicant.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;~goldie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 18:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318507#M794946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T18:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318508#M794947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply goldie. I did not understand your answer. Can you elaborate your logic?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 18:28:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318508#M794947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T18:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318509#M794948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to do something like the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare a &lt;STRONG&gt;data : xtabix like sy-tabix&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear xtabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at INT_P4002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  xtabix = xtabix + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    int_applicant-pernr = INT_P4002-pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if xtabix eq 1.&lt;/P&gt;&lt;P&gt;        int_applicant-contest_number_id1 = INT_P4002-VACANCY.&lt;/P&gt;&lt;P&gt;      elseif xtabix eq 2.&lt;/P&gt;&lt;P&gt;        int_applicant-contest_number_id2 = INT_P4002-VACANCY.&lt;/P&gt;&lt;P&gt;      elseif xtabix eq 3.&lt;/P&gt;&lt;P&gt;        int_applicant-contest_number_id3 = INT_P4002-VACANCY.&lt;/P&gt;&lt;P&gt;      elseif xtabix eq 4.&lt;/P&gt;&lt;P&gt;        int_applicant-contest_number_id4 = INT_P4002-VACANCY.&lt;/P&gt;&lt;P&gt;      elseif xtabix eq 5.&lt;/P&gt;&lt;P&gt;        int_applicant-contest_number_id5 = INT_P4002-VACANCY.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   at end of pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Append int_applicant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   clear xtabix.&lt;/P&gt;&lt;P&gt;   end at.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now your int_application will have the data in your format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinodh Balakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 18:30:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318509#M794948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T18:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318510#M794949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have your first internal table sorted. right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you loop at it.&lt;/P&gt;&lt;P&gt;and if you get your ids into one record of second internal table.&lt;/P&gt;&lt;P&gt;at the end of your pernr (the last record for a particular pernr in 1at itab), you append the current record to 2nd itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this you do for all the pernrs.&lt;/P&gt;&lt;P&gt;think this explains.&lt;/P&gt;&lt;P&gt;goldie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 18:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318510#M794949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T18:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318511#M794950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys for the reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinodh, it answers only a part of the logic, yes, if the first applicant has applied for  '4' vacancies,  the record lines from 1 to 4 will be filled in 'int_applicant-contest_number_id1' subsequently, however if the  'fifth' record is of a new applicant  who has just '1' vacancy  and the next two records is of another applicant applying for  2 vacanies, how can this is identified?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand correctly, the logic you have given.. 'at end of pernr'  ... does this piece of code takes care of the issue that I mentioned above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you elaborate on this so that I can uderstand better?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 19:14:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318511#M794950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T19:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318512#M794951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution will address your entire problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before coming into the Loop, you would have sorted your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say for example, your records are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;20000010, 50001234 &lt;/P&gt;&lt;P&gt;20000010, 50001235&lt;/P&gt;&lt;P&gt;20000010, 50001236 &lt;/P&gt;&lt;P&gt;20000010, 50001237 &lt;/P&gt;&lt;P&gt;20000010, 50001238 &lt;/P&gt;&lt;P&gt;20000011, 50001235 &lt;/P&gt;&lt;P&gt;20000012, 50001238 &lt;/P&gt;&lt;P&gt;20000012, 50001239 &lt;/P&gt;&lt;P&gt;20000012, 50001240&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pernr &lt;STRONG&gt;20000012&lt;/STRONG&gt; has applied for five positions and &lt;STRONG&gt;20000011&lt;/STRONG&gt; for one position and &lt;STRONG&gt;20000012&lt;/STRONG&gt; for three.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the loop hits the fifthe record of &lt;STRONG&gt;20000010&lt;/STRONG&gt;, control will go to &lt;STRONG&gt;AT END OF PERNR&lt;/STRONG&gt; Block, there all the five records would be transfereed to your second internal table and the record will be appended as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;20000010, 50001234, 50001235, 50001236, 50001237, 50001238&lt;/STRONG&gt;  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now the control goes back to &lt;STRONG&gt;LOOP at INT_P4002&lt;/STRONG&gt; for the sixth record, ie pernr &lt;STRONG&gt;20000011&lt;/STRONG&gt;  .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will continue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try running the same in your program and see....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinodh Balakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 19:29:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318512#M794951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T19:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318513#M794952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the elaborate reply, I understood it. I shall run the program and will award the points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 19:44:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318513#M794952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T19:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318514#M794953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vinodh, The logic worked and got to learn something new. Shall award the points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 20:58:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-help/m-p/3318514#M794953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T20:58:31Z</dc:date>
    </item>
  </channel>
</rss>

