<?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: BAPI_USER_GETLIST Selection Range Profile Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588804#M1567009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same result, with SELECTION_EXP set as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOGOP  ARITY  PARAMETER  FIELD        OPTION LOW&lt;/P&gt;&lt;P&gt;AND          2&lt;/P&gt;&lt;P&gt;                          PROFILES       BAPIPROF EQ          A&lt;/P&gt;&lt;P&gt;                          PROFILES       BAPIPROF NE          B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the SELECTION_RANGE based on the example given in the help documentation that demonstrated how to select postal codes that include codes in a certain range, then exclude codes in that range that match a comparison string.  For this particular problem, I've found no combination of SELECTION_EXP or SELECTION_RANGE that deliver the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bill Bormann&lt;/P&gt;&lt;P&gt;Purdue University&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jan 2011 13:23:32 GMT</pubDate>
    <dc:creator>former_member73068</dc:creator>
    <dc:date>2011-01-07T13:23:32Z</dc:date>
    <item>
      <title>BAPI_USER_GETLIST Selection Range Profile Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588802#M1567007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using BAPI_USER_GETLIST, I'd like to find all users that have profile 'A' assigned but do not have profile 'B'.  A Selection Range expression of the type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER     FIELD          Sign   OP   LOW&lt;/P&gt;&lt;P&gt;PROFILES         BAPIPROF     I       EQ   'A'&lt;/P&gt;&lt;P&gt;PROFILES         BAPIPROF     E      EQ   'B'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Returns everyone holding 'A' but does not exclude people holding 'B'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm confused about this result.  Can anyone explain why BAPI_USER_GETLIST works this way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bill Bormann&lt;/P&gt;&lt;P&gt;Purdue University&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 12:56:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588802#M1567007</guid>
      <dc:creator>former_member73068</dc:creator>
      <dc:date>2011-01-07T12:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_GETLIST Selection Range Profile Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588803#M1567008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quote from BAPI documentation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"SELECTION_RANGE - You can list multiple attributes in the table, and an attribute can appear more than once. In this case, the selection using the same attribute is linked with 'OR', and selection using different attributes with 'AND'."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you should try with SELECTION_EXP - there you can influence the operator (LOGOP specifies whether the selection is to be linked with 'OR' or 'AND')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 13:11:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588803#M1567008</guid>
      <dc:creator>former_member182670</dc:creator>
      <dc:date>2011-01-07T13:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_GETLIST Selection Range Profile Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588804#M1567009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same result, with SELECTION_EXP set as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOGOP  ARITY  PARAMETER  FIELD        OPTION LOW&lt;/P&gt;&lt;P&gt;AND          2&lt;/P&gt;&lt;P&gt;                          PROFILES       BAPIPROF EQ          A&lt;/P&gt;&lt;P&gt;                          PROFILES       BAPIPROF NE          B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the SELECTION_RANGE based on the example given in the help documentation that demonstrated how to select postal codes that include codes in a certain range, then exclude codes in that range that match a comparison string.  For this particular problem, I've found no combination of SELECTION_EXP or SELECTION_RANGE that deliver the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bill Bormann&lt;/P&gt;&lt;P&gt;Purdue University&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 13:23:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588804#M1567009</guid>
      <dc:creator>former_member73068</dc:creator>
      <dc:date>2011-01-07T13:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_GETLIST Selection Range Profile Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588805#M1567010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem here is that these conditions are executed on the joined table.&lt;/P&gt;&lt;P&gt;Here is what BAPI executes:&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt; from ( USR02 INNER JOIN UST04 ON USR02&lt;SUB&gt;MANDT = UST04&lt;/SUB&gt;MANDT AND USR02&lt;SUB&gt;BNAME = UST04&lt;/SUB&gt;BNAME )&lt;/P&gt;&lt;P&gt; where&lt;/P&gt;&lt;P&gt; ( UST04~PROFILE                  EQ 'A' AND&lt;/P&gt;&lt;P&gt; UST04~PROFILE                  NE 'B' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it select users which have A, and users which have A+B. Users which have just B are excluded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I your case it should be something like &lt;/P&gt;&lt;P&gt; UST04~PROFILE                  EQ 'A' AND NOT EXISTS SELECT ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think you can make it with one call. You need custom query or two BAPI calls and make the intersection in the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 14:02:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588805#M1567010</guid>
      <dc:creator>former_member182670</dc:creator>
      <dc:date>2011-01-07T14:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_GETLIST Selection Range Profile Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588806#M1567011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ... that makes a lot of sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 14:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588806#M1567011</guid>
      <dc:creator>former_member73068</dc:creator>
      <dc:date>2011-01-07T14:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_GETLIST Selection Range Profile Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588807#M1567012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;  FROM ust04 AS u&lt;/P&gt;&lt;P&gt;  INTO TABLE gt_ust04j&lt;/P&gt;&lt;P&gt;  WHERE profile = 'A''&lt;/P&gt;&lt;P&gt;  AND NOT EXISTS ( SELECT *&lt;/P&gt;&lt;P&gt;  FROM ust04&lt;/P&gt;&lt;P&gt;  WHERE bname = u~bname AND&lt;/P&gt;&lt;P&gt;  profile = 'B' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should do the trick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 14:18:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-getlist-selection-range-profile-query/m-p/7588807#M1567012</guid>
      <dc:creator>former_member182670</dc:creator>
      <dc:date>2011-01-07T14:18:48Z</dc:date>
    </item>
  </channel>
</rss>

