<?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: VALIDATIONS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836204#M664097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : payr,T012K,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select chect from payr upto 1 rows where chect = itab-chect.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;select amount from payr into table it_amount where amount = itab-amount.&lt;/P&gt;&lt;P&gt;move : itab-chect to itab1-chect,&lt;/P&gt;&lt;P&gt;       itab-AMOUNT to itab1-mount. &lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;move itab-chect to itab2-chect.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bankn from t012k upto 1 rows where bankn = itab-bankn.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;move itab-bankn to itab1-bankn.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;move itab-bankn to itab2-bankn.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now itab1 will have success records and itab2 will have error records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Oct 2007 09:43:11 GMT</pubDate>
    <dc:creator>former_member404244</dc:creator>
    <dc:date>2007-10-01T09:43:11Z</dc:date>
    <item>
      <title>VALIDATIONS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836203#M664096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;12001176583   109518   21719   20070628&lt;/P&gt;&lt;P&gt;12001176585   109518   21719   20070628&lt;/P&gt;&lt;P&gt;12001176588   109518   21719   20070628&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD 1 : CHECK NUMBER - FROM 'PAYR-CHECT'&lt;/P&gt;&lt;P&gt;FIELD 2 : AMOUNT - 'PAYR-RWBTR'&lt;/P&gt;&lt;P&gt;FIELD 3 : BANK A/C NUM - 'T012K-BANKN'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABOVE MENTION ARE RECORDS IN MY FILE WHICH R STORED IN MY INT TABLE.&lt;/P&gt;&lt;P&gt;I HAVE TO VALIDATE ONE BY FEILD BY FEILD AND RECORD BY RECORD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First : Validate Check number from table PAYR-CHECT&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second :  Validate Bank A/C no from table T012K-BANKN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Third : If both pass the validation then validate Amount from table PAYR-RWBTR,&lt;/P&gt;&lt;P&gt;Even if the amount does&amp;#146;nt match allow the record to be processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fourth : Records with errors have to captured in a ERROR file,records which have passed the validation to be captured in PROCESS file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one provide the code for the above ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 09:33:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836203#M664096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T09:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: VALIDATIONS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836204#M664097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : payr,T012K,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select chect from payr upto 1 rows where chect = itab-chect.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;select amount from payr into table it_amount where amount = itab-amount.&lt;/P&gt;&lt;P&gt;move : itab-chect to itab1-chect,&lt;/P&gt;&lt;P&gt;       itab-AMOUNT to itab1-mount. &lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;move itab-chect to itab2-chect.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bankn from t012k upto 1 rows where bankn = itab-bankn.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;move itab-bankn to itab1-bankn.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;move itab-bankn to itab2-bankn.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now itab1 will have success records and itab2 will have error records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 09:43:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836204#M664097</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-10-01T09:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: VALIDATIONS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836205#M664098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have all the records in itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now select chect from payr into table itab1 for all entries in &lt;/P&gt;&lt;P&gt;itab where payr = itab-payr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bankn from t012k into table itab2 for all entries in itab&lt;/P&gt;&lt;P&gt;where bankn = itab-bankn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort: itab1 by payr,&lt;/P&gt;&lt;P&gt;     itab2 by bankn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;read table itab1 with key payr = itab-payr binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;read table itab2 with key bankn = itab-bankn binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;success -- so move it to another itab2&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;fail --- so move it to failure internal table.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;fail --- so move it to failure internal table.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Venkatesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 09:46:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836205#M664098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T09:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: VALIDATIONS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836206#M664099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am attached a pseudo code for your requirement. This will help you out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: If this answers your query please mark the question answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_data type table of XXXX (your type)&lt;/P&gt;&lt;P&gt;data  wa_data type XXXX (your type)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_data into wa_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select chect from payr into g_check where wa_data-check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select BANKN from T012K into g_BANKN where wa_data-BANKN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do your processing.&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;move wa_data to ERROR_file.&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;move wa_data to ERROR_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 09:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836206#M664099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T09:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: VALIDATIONS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836207#M664100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;since you have to check your internal table records against other tables, its better that you fetch the records from other tables also in separate internal tables (using the "for all entries " statement). This is due to performance reasons as you will have to do these validations in a loop on the internal table which holds your records &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_main into wa. "This is your main table of records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*first validation&lt;/P&gt;&lt;P&gt;read table itab2 with key chect = wa-chect. "assuming that you got the records from PAYR in the internal table itab2 using the for all entries in itab_main. &lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&amp;lt;do your validations here&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**similarly do other validations that you need to do.&lt;/P&gt;&lt;P&gt;&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;hope this gives some insight....The stress on "For all entries" is to make sure that you don't use a select within a loop which is going to affect the performance of your program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 09:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations/m-p/2836207#M664100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T09:50:03Z</dc:date>
    </item>
  </channel>
</rss>

