<?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: Capturing Username in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897125#M1143766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have written the code that way to pass sy-uname only if one is changed .  You need to check the value before updating the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


IF ( SY-UNAME = 'SANGL' ) OR ( SY-UNAME = 'CHANJ' ) OR ( SY-UNAME = 'HAYESL' ) OR ( SY-UNAME = 'TONIR' ). 
if zsdcoop-flag = 'X'.
wa-delflag = zsdcoop-delflag. 
wa-DELCHG = sy-uname. 
endif.
if zsdcoop-ocflag = 'X'.
wa-ocflag = zsdcoop-ocflag. 
wa-OCFCHG = sy-uname. 
endif.

ENDIF. 


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Dec 2008 23:40:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-16T23:40:39Z</dc:date>
    <item>
      <title>Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897120#M1143761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the user interface screen I have two flags OCflag(1) and Delflag(1), I have Ocfchg(12) and delchg(12) fields for user name who changed the flags. I have to capture the uname who changed the particular flag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are only few users who can change. For other users it should not change. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me. I wrote the  following code but DELCHG and OCFCHG both are getting uname if only one of it is changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE SY-UCOMM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'SAVE'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        wa-kunnr   = zsdcoop-kunnr. &lt;/P&gt;&lt;P&gt;        wa-pfnum   = zsdcoop-pfnum. &lt;/P&gt;&lt;P&gt;        wa-trnum   = zsdcoop-trnum. &lt;/P&gt;&lt;P&gt;        wa-coopind = zsdcoop-coopind. &lt;/P&gt;&lt;P&gt;        wa-subdate = zsdcoop-subdate. &lt;/P&gt;&lt;P&gt;        wa-deldate = zsdcoop-deldate. &lt;/P&gt;&lt;P&gt;        wa-reason  = zsdcoop-reason. &lt;/P&gt;&lt;P&gt;        wa-actdate_from = zsdcoop-actdate_from. &lt;/P&gt;&lt;P&gt;        wa-actdate_to = zsdcoop-actdate_to. &lt;/P&gt;&lt;P&gt;        wa-cyear   = zsdcoop-cyear. &lt;/P&gt;&lt;P&gt;        wa-actcode = zsdcoop-actcode. &lt;/P&gt;&lt;P&gt;        wa-matnr   = zsdcoop-matnr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF ( SY-UNAME = 'SANGL' ) OR ( SY-UNAME = 'CHANJ' ) OR ( SY-UNAME = 'HAYESL' ) OR ( SY-UNAME = 'TONIR' ). &lt;/P&gt;&lt;P&gt;          wa-delflag = zsdcoop-delflag. &lt;/P&gt;&lt;P&gt;          wa-DELCHG = sy-uname. &lt;/P&gt;&lt;P&gt;        ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF ( SY-UNAME = 'SANGL' ) OR ( SY-UNAME = 'CHANJ' ) OR ( SY-UNAME = 'HAYESL' ) OR ( SY-UNAME = 'TONIR' ). &lt;/P&gt;&lt;P&gt;          wa-ocflag  = zsdcoop-ocflag. &lt;/P&gt;&lt;P&gt;          wa-OCFCHG = sy-uname. &lt;/P&gt;&lt;P&gt;        ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        MODIFY zsdcoop FROM wa. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 22:39:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897120#M1143761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T22:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897121#M1143762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you see any difference in both If statements? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF ( SY-UNAME = 'SANGL' ) OR ( SY-UNAME = 'CHANJ' ) 
OR ( SY-UNAME = 'HAYESL' ) OR ( SY-UNAME = 'TONIR' ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously both would satisfied same time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 22:50:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897121#M1143762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T22:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897122#M1143763</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;No, but only these users are allowed to change the flag and if one of the user chages a flag then I have to capture that uname and in the chg by name field of that flag. How do I know if a flag is changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 23:00:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897122#M1143763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T23:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897123#M1143764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does these Flags [ (OCflag(1) and Delflag(1) ] changes the value from X or ' ' ?&lt;/P&gt;&lt;P&gt;Check with Debugging.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 23:18:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897123#M1143764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T23:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897124#M1143765</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;Yes. Initially the flgs will be ' ' and when user wants to cancel that transaction they can put 'X' on the user interface screen and save it. Same for OCflag also. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 23:34:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897124#M1143765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T23:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897125#M1143766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have written the code that way to pass sy-uname only if one is changed .  You need to check the value before updating the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


IF ( SY-UNAME = 'SANGL' ) OR ( SY-UNAME = 'CHANJ' ) OR ( SY-UNAME = 'HAYESL' ) OR ( SY-UNAME = 'TONIR' ). 
if zsdcoop-flag = 'X'.
wa-delflag = zsdcoop-delflag. 
wa-DELCHG = sy-uname. 
endif.
if zsdcoop-ocflag = 'X'.
wa-ocflag = zsdcoop-ocflag. 
wa-OCFCHG = sy-uname. 
endif.

ENDIF. 


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 23:40:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897125#M1143766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T23:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897126#M1143767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;How do I know if a flag is changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Initially store the values of both flags in some temp variable.&lt;/P&gt;&lt;P&gt;Than the check these flags IF 'X' means user changed the flag.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if flag = 'X'
"Store Sy-uname here in wa.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Update Ztable now.&lt;/P&gt;&lt;P&gt;In short you must play around these flag values,and do some work around this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 23:41:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897126#M1143767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T23:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897127#M1143768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you think this is a sustainable way to program?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 00:01:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897127#M1143768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T00:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897128#M1143769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He would Resign Before Auditing, so he need not to worry much.&lt;/P&gt;&lt;P&gt;But atleast he save(As of now) himself by doing the hard-coding the Sy-uname &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 00:46:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897128#M1143769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T00:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing Username</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897129#M1143770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 00:50:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-username/m-p/4897129#M1143770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T00:50:19Z</dc:date>
    </item>
  </channel>
</rss>

