<HTML><BODY><DIV style='font-family: "Verdana"; font-size: 10pt;'><DIV>
<DIV><SPAN class=correction id="">Josie</SPAN>,</DIV>
<DIV>&nbsp;</DIV>
<DIV>First make sure that the WF_<SPAN class=correction id="">initiator</SPAN> (event creator)&nbsp;is not WF_BATCH user.&nbsp; </DIV>
<DIV>I&nbsp;know of&nbsp;at least&nbsp;one <SPAN class=correction id="">BAPI</SPAN> which has&nbsp;user id as a parameter but ignores the value supplied and uses <SPAN class=correction id="">sy-uname</SPAN> instead.&nbsp;So&nbsp;test the <SPAN class=correction id="">BAPI</SPAN> independently&nbsp;by passing a value other than your user id&nbsp;&nbsp;in the <SPAN class=correction id="">uname</SPAN> parameter and&nbsp;check if it does use the supplied value. If it does not, you can request SAP to correct the problem.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Best Regards,</DIV>
<DIV><SPAN class=correction id="">Ramki</SPAN> <SPAN class=correction id="">Maley</SPAN>.</DIV>
<DIV>&nbsp;</DIV>&nbsp;<BR>-----Original Message-----<BR>From: <SPAN class=correction id="">Srinivasan</SPAN> <SPAN class=correction id="">Ramanan</SPAN> &lt;r_m_n_n@hotmail.com&gt;<BR>To: sap-wug@mit.edu<BR>Sent: Tue, 08 Nov 2005 12:15:16 -0500<BR>Subject: RE: <SPAN class=correction id="">WF</SPAN>-BATCH<BR><BR>
<STYLE>
.AOLPlainTextBody {
    margin: 0px;
    font-family: Tahoma, Verdana, Arial, Sans-Serif;
    font-size: 12px; 
    color: #000; 
    background-color: #fff; 
}

.AOLPlainTextBody pre {
    font-size: 9pt;
}

.AOLInlineAttachment {
    margin: 10px;
}

.AOLAttachmentHeader {
    border-bottom: 2px solid #E9EAEB;
    background: #F9F9F9;
}

.AOLAttachmentHeader .Title {
    font: 11px Tahoma;
    font-weight: bold;
    color: #666666;
    background: #E9EAEB; 
    padding: 3px 0px 1px 10px;
}

.AOLAttachmentHeader .FieldLabel {
    font: 11px Tahoma; 
    font-weight: bold;
    color: #666666;
    padding: 1px 10px 1px 9px;
}

.AOLAttachmentHeader .FieldValue {
    font: 11px Tahoma; 
    color: #333333;
}

</STYLE>

<DIV class=AOLPlainTextBody id=AOLMsgPart_0_6c53f735-bb00-455a-a4b6-4bfb598ba382>Hi ,&nbsp;<BR>In this case WF_initiator is <SPAN class=correction id="">WF-BATCH</SPAN> itself since this <SPAN class=correction id="">BAPI</SPAN> is called in the background...&nbsp;<BR>Try the following in foreground...&nbsp;<BR>Please check by debugging the <SPAN class=correction id="">BAPI</SPAN> by putting break point before calling the <SPAN class=correction id="">BAPI</SPAN>...and check the values <SPAN class=correction id="">sy-uname</SPAN> , <SPAN class=correction id="">uname</SPAN> and t_<SPAN class=correction id="">BAPIHR1005</SPAN>-CHANGED_BY.&nbsp;<BR>&nbsp;<BR>then in the <SPAN class=correction id="">workflow</SPAN> log check who is WF_initiator.&nbsp;<BR>&nbsp;<BR>I guess both <SPAN class=correction id="">uname</SPAN> and wf_<SPAN class=correction id="">initiaor</SPAN> will be fore-ground SAP user name.&nbsp;<BR>&nbsp;<BR>if that is the case then try submitting a job in the back ground where you could choose user name in <SPAN class=correction id="">setp</SPAN> of the job...any way you are running this in background...&nbsp;<BR>&nbsp;<BR>best of luck&nbsp;<BR>Srinivasan&nbsp;<BR>&nbsp;<BR>&gt;From: "<SPAN class=correction id="">Josie</SPAN> <SPAN class=correction id="">Henriques</SPAN>" &lt;<A href="mailto:jhenriques_procwork%40timbrasil.com.br">jhenriques_<SPAN class=correction id="">procwork</SPAN>@timbrasi<SPAN class=correction id="">l.</SPAN>com.br</A>&gt;&nbsp;<BR>&gt;Reply-To: "SAP <SPAN class=correction id="">Workflow</SPAN> Users' Group" &lt;<A href="mailto:sap-wug%40mit.edu">sap-wug@mit.edu</A>&gt;&nbsp;<BR>&gt;To: "SAP <SPAN class=correction id="">Workflow</SPAN> Users' Group" &lt;<A href="mailto:sap-wug%40mit.edu">sap-wug@mit.edu</A>&gt;&nbsp;<BR>&gt;Subject: RE: <SPAN class=correction id="">WF-BATCH</SPAN>&nbsp;<BR>&gt;Date: Tue, 8 Nov 2005 13:54:37 -0200&nbsp;<BR>&gt;&nbsp;<BR>&gt; This <SPAN class=correction id="">BAPI</SPAN> is called in background .&nbsp;<BR>&gt;&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005-CLIENT</SPAN> = <SPAN class=correction id="">sy-mandt</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-PLAN_<SPAN class=correction id="">VER</SPAN> = <SPAN class=correction id="">plvar</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-OBJ_TYPE = <SPAN class=correction id="">otype</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-OBJ_ID = <SPAN class=correction id="">objid</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-INFOTYPE = '1005'.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-PL_STATUS = <SPAN class=correction id="">istat</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-FROM_DATE = <SPAN class=correction id="">BEGDA</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-TO_DATE = <SPAN class=correction id="">ENDDA</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-IT_REC_NO = <SPAN class=correction id="">i1005-seqnr</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-CHANGED_ON = <SPAN class=correction id="">aedtm</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-CHANGED_BY = <SPAN class=correction id="">uname</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-COUNTRY_GROUPING = <SPAN class=correction id="">i1005-molga</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-TYPE = <SPAN class=correction id="">i1005-trfar</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-AREA = v_<SPAN class=correction id="">trfgb</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005-ESGFORCAP</SPAN> = <SPAN class=correction id="">i1005-trfkz</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-LOWEST_GROUP = <SPAN class=correction id="">i1005-trfg1</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-HIGHEST_GROUP = <SPAN class=correction id="">i1005-trfg2</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-LOWEST_LEVEL = <SPAN class=correction id="">i1005-trfs1</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-HIGHEST_LEVEL = <SPAN class=correction id="">i1005-trfs2</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-COMP_FROM = <SPAN class=correction id="">i1005-budg1</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-COMP_TO = <SPAN class=correction id="">i1005-budg2</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-MEAN_VALUE = <SPAN class=correction id="">i1005-midpt</SPAN>.&nbsp;<BR>&gt; t_<SPAN class=correction id="">BAPIHR1005</SPAN>-PLANNED_COMP_TYPE = <SPAN class=correction id="">i1005-CPIND</SPAN>.&nbsp;<BR>&gt; append t_<SPAN class=correction id="">BAPIHR1005</SPAN>.&nbsp;<BR>&gt;&nbsp;<BR>&gt; <SPAN class=correction id="">Uname</SPAN> has the WF_<SPAN class=correction id="">intiator</SPAN>.&nbsp;<BR>&gt;&nbsp;<BR>&gt;<SPAN class=correction id="">Josie</SPAN> <SPAN class=correction id="">Henriques</SPAN>&nbsp;<BR>&gt;&nbsp;<BR>&gt;-----Original Message-----&nbsp;<BR>&gt;From: <A href="mailto:sap-wug-bounces%40mit.edu">sap-wug-bounces@mit.edu</A> [<A href="mailto:sap-wug-bounces%40mit.edu"><SPAN class=correction id="">mailto</SPAN>:sap-wug-bounces@mit.edu</A>] On Behalf Of &gt;Srinivasan Ramanan&nbsp;<BR>&gt;Sent: terça-feira, 8 de <SPAN class=correction id="">novembro</SPAN> de 2005 11:50&nbsp;<BR>&gt;To: <A href="mailto:sap-wug%40mit.edu">sap-wug@mit.edu</A>&nbsp;<BR>&gt;Subject: RE: <SPAN class=correction id="">WF-BATCH</SPAN>&nbsp;<BR>&gt;&nbsp;<BR>&gt;If a <SPAN class=correction id="">BAPI</SPAN> function is called and executed by user <SPAN class=correction id="">WF-BATCH</SPAN> then you will&nbsp;<BR>&gt;have <SPAN class=correction id="">WF-BATCH</SPAN> as the user who created the object in SAP tables..&nbsp;<BR>&gt;&nbsp;<BR>&gt;You can use <SPAN class=correction id="">WF-BATCH</SPAN> to schedule and run a background job....but those jobs&nbsp;<BR>&gt;which are part of <SPAN class=correction id="">workflow</SPAN> should run under the <SPAN class=correction id="">autorization</SPAN> of the user &gt;who&nbsp;<BR>&gt;actually execute the work item, not of <SPAN class=correction id="">wF-BATCH</SPAN>...&nbsp;<BR>&gt;&nbsp;<BR>&gt;In <SPAN class=correction id="">otehr</SPAN> words ..&nbsp;<BR>&gt;Job created by <SPAN class=correction id="">WF-BATCH</SPAN>&nbsp;<BR>&gt;Job run under authorization of user ---work item executor , in your case&nbsp;<BR>&gt;WF_<SPAN class=correction id="">intiator</SPAN>..&nbsp;<BR>&gt;What field in which <SPAN class=correction id="">BAPI</SPAN> structure you are filling the actual user name&nbsp;<BR>&gt;instead of <SPAN class=correction id="">WF-BATCH</SPAN> ?&nbsp;<BR>&gt;Are you executing this <SPAN class=correction id="">BAPI</SPAN> call in dialog or background ?&nbsp;<BR>&gt;&nbsp;<BR>&gt;Srinivasan&nbsp;<BR>&gt;&nbsp;<BR>&gt;&nbsp;<BR>&gt;_______________________________________________&nbsp;<BR>&gt;SAP-WUG mailing list&nbsp;<BR>&gt;<A href="mailto:SAP-WUG%40mit.edu">SAP-WUG@mit.edu</A>&nbsp;<BR>&gt;<A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A>&nbsp;<BR>&nbsp;<BR>_________________________________________________________________&nbsp;<BR>Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. <A href="http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963" target=_blank>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?<SPAN class=correction id="">cid</SPAN>=3963</A>&nbsp;<BR>&nbsp;<BR>_______________________________________________&nbsp;<BR>SAP-WUG mailing list&nbsp;<BR><A href="mailto:SAP-WUG%40mit.edu">SAP-WUG@mit.edu</A>&nbsp;<BR><A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A>&nbsp;<BR></DIV><!-- end of AOLMsgPart_0_6c53f735-bb00-455a-a4b6-4bfb598ba382 --></DIV></DIV></BODY></HTML>