<?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 issue reg running a program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-reg-running-a-program/m-p/1900195#M375989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have created an object class using su21,&lt;/P&gt;&lt;P&gt;then by double clickingit i have created an auth object,with auth field actvt and werks and permitted values as all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then i went to pfcg, i created a role and then a profile,then i clicked change auth data -then i selected do not select templates and then i added manually my auth object , i have given a plant and actvt as full auth&lt;/P&gt;&lt;P&gt;and generated a profile and then in the user tab i gave my userid, and i comapree it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;everything looks in green&lt;/P&gt;&lt;P&gt;now i called the authcheck in my as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'ZFT'&lt;/P&gt;&lt;P&gt;ID 'ACTVT' FIELD '02'&lt;/P&gt;&lt;P&gt;ID 'WERKS' FIELD 'ABC'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;write : SY-UNAME , 'Suceess ZFT'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write:/ SY-UNAME , 'Fail ZFT'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Q1) DOES IT CHECK WITH SY-UNAME&lt;/P&gt;&lt;P&gt;I HAVE AUTH TO ME WHEN I RUN THE PRGM UNDER MY LOGIN I GET SUCESS (SY-SUBRC EQ 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q2)WHEN I RUN THE SAME UNDER A DIFFERENT LOGIN THE O/P IS FAIL ZFT&lt;/P&gt;&lt;P&gt;SO FAR ITS WORKING FINE BUT FOR THIS CONDITION I AM GETTING A SY-SUBRC OF 12 WHICH SHOULD BE 4 AS PER THE HELP DOCUMENT&lt;/P&gt;&lt;P&gt;· 0: The user has an authorization for all specified values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· 4: The user does not have the authorization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· 8: The number of specified fields is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· 12: The specified authorization object does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO LET ME KNOW IF IAM MISSING ANYTHING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q3) INSTEAD OF THIS CAN I USE S_PROGRAM. LET ME KNOW WHAT EXACTLY IT DOES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jan 2007 19:26:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-10T19:26:36Z</dc:date>
    <item>
      <title>issue reg running a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-reg-running-a-program/m-p/1900195#M375989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have created an object class using su21,&lt;/P&gt;&lt;P&gt;then by double clickingit i have created an auth object,with auth field actvt and werks and permitted values as all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then i went to pfcg, i created a role and then a profile,then i clicked change auth data -then i selected do not select templates and then i added manually my auth object , i have given a plant and actvt as full auth&lt;/P&gt;&lt;P&gt;and generated a profile and then in the user tab i gave my userid, and i comapree it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;everything looks in green&lt;/P&gt;&lt;P&gt;now i called the authcheck in my as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'ZFT'&lt;/P&gt;&lt;P&gt;ID 'ACTVT' FIELD '02'&lt;/P&gt;&lt;P&gt;ID 'WERKS' FIELD 'ABC'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;write : SY-UNAME , 'Suceess ZFT'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write:/ SY-UNAME , 'Fail ZFT'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Q1) DOES IT CHECK WITH SY-UNAME&lt;/P&gt;&lt;P&gt;I HAVE AUTH TO ME WHEN I RUN THE PRGM UNDER MY LOGIN I GET SUCESS (SY-SUBRC EQ 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q2)WHEN I RUN THE SAME UNDER A DIFFERENT LOGIN THE O/P IS FAIL ZFT&lt;/P&gt;&lt;P&gt;SO FAR ITS WORKING FINE BUT FOR THIS CONDITION I AM GETTING A SY-SUBRC OF 12 WHICH SHOULD BE 4 AS PER THE HELP DOCUMENT&lt;/P&gt;&lt;P&gt;· 0: The user has an authorization for all specified values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· 4: The user does not have the authorization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· 8: The number of specified fields is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· 12: The specified authorization object does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO LET ME KNOW IF IAM MISSING ANYTHING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q3) INSTEAD OF THIS CAN I USE S_PROGRAM. LET ME KNOW WHAT EXACTLY IT DOES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2007 19:26:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-reg-running-a-program/m-p/1900195#M375989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-10T19:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: issue reg running a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-reg-running-a-program/m-p/1900196#M375990</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;If sy-subrc has value 12 it means the user hasn't that authorization object, if it's 4, it means the user has the aut object but he hasn't the authorization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if in my profile there's the object 'ZFT', if I've the authorizazion for plant ABC, sy-subrc'll be 0 else 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in my profile there isn't the object 'ZFT', sy-subrc'll be 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2007 19:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-reg-running-a-program/m-p/1900196#M375990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-10T19:47:53Z</dc:date>
    </item>
  </channel>
</rss>

