<?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: Authorization object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object/m-p/4651285#M1094486</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;Plz take the help of this code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI write this piece of code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE user_command_9000 INPUT.

  PERFORM f0801_validate_plan_area_cntry.

*Authority Check for Country

*AUTHORITY-CHECK OBJECT 'ZO9_CNTRY'
*      ID 'COUNTRY' FIELD g_soldto_country.
*    if sy-subrc ne 0.
*      clear g_ok_code.
*      message E001(ZOLSC_MESSAGE_AS) with G_soldto_country.
*    endif.
...............................................................
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In main program write this piece of code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM f0801_validate_plan_area_cntry .

*Validate planning area
  SELECT  SINGLE pareaid
  FROM    /sapapo/tsareako
  INTO    g_pareaid
  WHERE   pareaid = g_parea.

  IF sy-subrc NE 0.
    CLEAR g_ok_code.
    MESSAGE i240 WITH g_parea.
  ENDIF.

*Validate Sold TO country
  SELECT SINGLE /bic/dcuscntry
  FROM   /bic/pdcuscntry
  INTO   g_con
  WHERE  /bic/dcuscntry = g_soldto_country
  AND    objvers = 'A' .

  IF sy-subrc NE 0.
    CLEAR g_ok_code.
    MESSAGE i241 WITH g_soldto_country.
  ENDIF.

ENDFORM.                    " f0801_validate_plan_area_cntry&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2008 05:41:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-10T05:41:40Z</dc:date>
    <item>
      <title>Authorization object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object/m-p/4651284#M1094485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may i know how to check authorization object,any body can help me to know how to incorporate the logic in your program for this authorization object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Cost Centre Planning (Reference Txn KP06)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Auth Object: K_CSKS_PLA (CO-CCA Cost Center Planning)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·         KOKRS      Controlling Area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·         KOSTL      Cost Center&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·         ACTVT      Activity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 05:36:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object/m-p/4651284#M1094485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T05:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object/m-p/4651285#M1094486</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;Plz take the help of this code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI write this piece of code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE user_command_9000 INPUT.

  PERFORM f0801_validate_plan_area_cntry.

*Authority Check for Country

*AUTHORITY-CHECK OBJECT 'ZO9_CNTRY'
*      ID 'COUNTRY' FIELD g_soldto_country.
*    if sy-subrc ne 0.
*      clear g_ok_code.
*      message E001(ZOLSC_MESSAGE_AS) with G_soldto_country.
*    endif.
...............................................................
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In main program write this piece of code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM f0801_validate_plan_area_cntry .

*Validate planning area
  SELECT  SINGLE pareaid
  FROM    /sapapo/tsareako
  INTO    g_pareaid
  WHERE   pareaid = g_parea.

  IF sy-subrc NE 0.
    CLEAR g_ok_code.
    MESSAGE i240 WITH g_parea.
  ENDIF.

*Validate Sold TO country
  SELECT SINGLE /bic/dcuscntry
  FROM   /bic/pdcuscntry
  INTO   g_con
  WHERE  /bic/dcuscntry = g_soldto_country
  AND    objvers = 'A' .

  IF sy-subrc NE 0.
    CLEAR g_ok_code.
    MESSAGE i241 WITH g_soldto_country.
  ENDIF.

ENDFORM.                    " f0801_validate_plan_area_cntry&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 05:41:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object/m-p/4651285#M1094486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T05:41:40Z</dc:date>
    </item>
  </channel>
</rss>

