<?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: regarding select  check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-check/m-p/5428868#M1245795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Mar 2009 14:27:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-26T14:27:05Z</dc:date>
    <item>
      <title>regarding select  check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-check/m-p/5428866#M1245793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me write this  code properly  i  have to check for rest all select options with  s_pernr  and  without s_pernr. but this code is not checking properly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its like  user can or can't enter value in either of the field  but at last with all the combination of data the information shd correct .&lt;/P&gt;&lt;P&gt;my prob is i dont want to make any field mandatory so we cant use AND  and if i use OR  it give me so many unwanted entrires too&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This  is  with s_pernr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( ( PNPSTAT2[] is not initial ) or ( PNPWERKS[] is not initial ) or ( PNPBTRTL[] is not initial )&lt;/P&gt;&lt;P&gt;    or ( PNPPERSG[] is not initial ) or ( PNPPERSK[] is not initial ) or ( PCHOBJID[] is not initial )&lt;/P&gt;&lt;P&gt;    and ( s_pernr[] is not initial ) ).&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 pernr werks persg persk btrtl orgeh&lt;/P&gt;&lt;P&gt;  from pa0001 into corresponding fields of table ito1&lt;/P&gt;&lt;P&gt;  where pernr in s_pernr&lt;/P&gt;&lt;P&gt;  and  endda ge sy-datum&lt;/P&gt;&lt;P&gt;  and  begda le sy-datum&lt;/P&gt;&lt;P&gt;  and  ( werks in pnpwerks ) or ( werks EQ space )&lt;/P&gt;&lt;P&gt;  and  ( persg in pnppersg ) or ( persg EQ space )&lt;/P&gt;&lt;P&gt;  and  ( persk in pnppersk ) or ( persk EQ space )&lt;/P&gt;&lt;P&gt;  and  ( btrtl in pnpbtrtl ) or ( btrtl EQ space )&lt;/P&gt;&lt;P&gt;  and  ( orgeh in pchobjid ) or ( orgeh EQ space ).&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do some thing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;  Message i000(zmess) .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;       this is without s_pernr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif  ( ( PNPSTAT2[] is not initial ) or ( PNPWERKS[] is not initial )&lt;/P&gt;&lt;P&gt;       or ( PNPBTRTL[] is not initial ) or ( PNPPERSG[] is not initial )&lt;/P&gt;&lt;P&gt;       or ( PNPPERSK[] is not initial ) or ( PCHOBJID[] is not initial )&lt;/P&gt;&lt;P&gt;       and ( s_pernr[] is initial ) ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select pernr werks persg persk btrtl orgeh&lt;/P&gt;&lt;P&gt;  from pa0001 into corresponding fields of table ito2&lt;/P&gt;&lt;P&gt;  where ( werks in pnpwerks ) or ( werks EQ space )&lt;/P&gt;&lt;P&gt;  and   ( persg in pnppersg ) or ( persg EQ space )&lt;/P&gt;&lt;P&gt;  and   ( persk in pnppersk ) or ( persk EQ space )&lt;/P&gt;&lt;P&gt;  and   ( btrtl in pnpbtrtl ) or ( btrtl EQ space )&lt;/P&gt;&lt;P&gt;  and   ( orgeh in pchobjid ) or ( orgeh EQ space ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do some thing.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Meeta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 14:25:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-check/m-p/5428866#M1245793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T14:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select  check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-check/m-p/5428867#M1245794</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;Check this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if ( (  PNPSTAT2[] is not initial  or  PNPWERKS[] is not initial  or  PNPBTRTL[] is not initial 
or  PNPPERSG[] is not initial  or  PNPPERSK[] is not initial  or  PCHOBJID[] is not initial )
and  s_pernr[] is not initial ).

select pernr werks persg persk btrtl orgeh
from pa0001 into corresponding fields of table ito1
where pernr in s_pernr
and endda ge sy-datum
and begda le sy-datum
and ( werks in pnpwerks or  werks EQ space )
and ( persg in pnppersg  or  persg EQ space )
and ( persk in pnppersk  or  persk EQ space )
and ( btrtl in pnpbtrtl  or  btrtl EQ space )
and ( orgeh in pchobjid  or  orgeh EQ space ).
if sy-subrc = 0.

Do some thing

elseif sy-subrc NE 0.
Message i000(zmess) .
endif.

this is without s_pernr

elseif ( ( PNPSTAT2[] is not initial  or  PNPWERKS[] is not initial 
or  PNPBTRTL[] is not initial  or  PNPPERSG[] is not initial 
or  PNPPERSK[] is not initial  or  PCHOBJID[] is not initial )
and ( s_pernr[] is initial ) ).

select pernr werks persg persk btrtl orgeh
from pa0001 into corresponding fields of table ito2
where ( werks in pnpwerks  or  werks EQ space )
and ( persg in pnppersg  or  persg EQ space )
and ( persk in pnppersk  or  persk EQ space )
and ( btrtl in pnpbtrtl  or  btrtl EQ space )
and ( orgeh in pchobjid  or  orgeh EQ space ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do some thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 14:36:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-check/m-p/5428867#M1245794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T14:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select  check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-check/m-p/5428868#M1245795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2009 14:27:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-check/m-p/5428868#M1245795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-26T14:27:05Z</dc:date>
    </item>
  </channel>
</rss>

