<HTML><BODY><DIV style='font-family: "Verdana"; font-size: 10pt;'><DIV>
<DIV><SPAN class=correction id="">Josie</SPAN>,</DIV>
<DIV> </DIV>
<DIV>First make sure that the WF_<SPAN class=correction id="">initiator</SPAN> (event creator) is not WF_BATCH user. </DIV>
<DIV>I know of at least one <SPAN class=correction id="">BAPI</SPAN> which has user id as a parameter but ignores the value supplied and uses <SPAN class=correction id="">sy-uname</SPAN> instead. So test the <SPAN class=correction id="">BAPI</SPAN> independently by passing a value other than your user id in the <SPAN class=correction id="">uname</SPAN> parameter and check if it does use the supplied value. If it does not, you can request SAP to correct the problem.</DIV>
<DIV> </DIV>
<DIV>Best Regards,</DIV>
<DIV><SPAN class=correction id="">Ramki</SPAN> <SPAN class=correction id="">Maley</SPAN>.</DIV>
<DIV> </DIV> <BR>-----Original Message-----<BR>From: <SPAN class=correction id="">Srinivasan</SPAN> <SPAN class=correction id="">Ramanan</SPAN> <r_m_n_n@hotmail.com><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 , <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... <BR>Try the following in foreground... <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. <BR> <BR>then in the <SPAN class=correction id="">workflow</SPAN> log check who is WF_initiator. <BR> <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. <BR> <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... <BR> <BR>best of luck <BR>Srinivasan <BR> <BR>>From: "<SPAN class=correction id="">Josie</SPAN> <SPAN class=correction id="">Henriques</SPAN>" <<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>> <BR>>Reply-To: "SAP <SPAN class=correction id="">Workflow</SPAN> Users' Group" <<A href="mailto:sap-wug%40mit.edu">sap-wug@mit.edu</A>> <BR>>To: "SAP <SPAN class=correction id="">Workflow</SPAN> Users' Group" <<A href="mailto:sap-wug%40mit.edu">sap-wug@mit.edu</A>> <BR>>Subject: RE: <SPAN class=correction id="">WF-BATCH</SPAN> <BR>>Date: Tue, 8 Nov 2005 13:54:37 -0200 <BR>> <BR>> This <SPAN class=correction id="">BAPI</SPAN> is called in background . <BR>> <BR>> t_<SPAN class=correction id="">BAPIHR1005-CLIENT</SPAN> = <SPAN class=correction id="">sy-mandt</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-PLAN_<SPAN class=correction id="">VER</SPAN> = <SPAN class=correction id="">plvar</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-OBJ_TYPE = <SPAN class=correction id="">otype</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-OBJ_ID = <SPAN class=correction id="">objid</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-INFOTYPE = '1005'. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-PL_STATUS = <SPAN class=correction id="">istat</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-FROM_DATE = <SPAN class=correction id="">BEGDA</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-TO_DATE = <SPAN class=correction id="">ENDDA</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-IT_REC_NO = <SPAN class=correction id="">i1005-seqnr</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-CHANGED_ON = <SPAN class=correction id="">aedtm</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-CHANGED_BY = <SPAN class=correction id="">uname</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-COUNTRY_GROUPING = <SPAN class=correction id="">i1005-molga</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-TYPE = <SPAN class=correction id="">i1005-trfar</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-AREA = v_<SPAN class=correction id="">trfgb</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005-ESGFORCAP</SPAN> = <SPAN class=correction id="">i1005-trfkz</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-LOWEST_GROUP = <SPAN class=correction id="">i1005-trfg1</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-HIGHEST_GROUP = <SPAN class=correction id="">i1005-trfg2</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-LOWEST_LEVEL = <SPAN class=correction id="">i1005-trfs1</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-HIGHEST_LEVEL = <SPAN class=correction id="">i1005-trfs2</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-COMP_FROM = <SPAN class=correction id="">i1005-budg1</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-COMP_TO = <SPAN class=correction id="">i1005-budg2</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-MEAN_VALUE = <SPAN class=correction id="">i1005-midpt</SPAN>. <BR>> t_<SPAN class=correction id="">BAPIHR1005</SPAN>-PLANNED_COMP_TYPE = <SPAN class=correction id="">i1005-CPIND</SPAN>. <BR>> append t_<SPAN class=correction id="">BAPIHR1005</SPAN>. <BR>> <BR>> <SPAN class=correction id="">Uname</SPAN> has the WF_<SPAN class=correction id="">intiator</SPAN>. <BR>> <BR>><SPAN class=correction id="">Josie</SPAN> <SPAN class=correction id="">Henriques</SPAN> <BR>> <BR>>-----Original Message----- <BR>>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 >Srinivasan Ramanan <BR>>Sent: terça-feira, 8 de <SPAN class=correction id="">novembro</SPAN> de 2005 11:50 <BR>>To: <A href="mailto:sap-wug%40mit.edu">sap-wug@mit.edu</A> <BR>>Subject: RE: <SPAN class=correction id="">WF-BATCH</SPAN> <BR>> <BR>>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 <BR>>have <SPAN class=correction id="">WF-BATCH</SPAN> as the user who created the object in SAP tables.. <BR>> <BR>>You can use <SPAN class=correction id="">WF-BATCH</SPAN> to schedule and run a background job....but those jobs <BR>>which are part of <SPAN class=correction id="">workflow</SPAN> should run under the <SPAN class=correction id="">autorization</SPAN> of the user >who <BR>>actually execute the work item, not of <SPAN class=correction id="">wF-BATCH</SPAN>... <BR>> <BR>>In <SPAN class=correction id="">otehr</SPAN> words .. <BR>>Job created by <SPAN class=correction id="">WF-BATCH</SPAN> <BR>>Job run under authorization of user ---work item executor , in your case <BR>>WF_<SPAN class=correction id="">intiator</SPAN>.. <BR>>What field in which <SPAN class=correction id="">BAPI</SPAN> structure you are filling the actual user name <BR>>instead of <SPAN class=correction id="">WF-BATCH</SPAN> ? <BR>>Are you executing this <SPAN class=correction id="">BAPI</SPAN> call in dialog or background ? <BR>> <BR>>Srinivasan <BR>> <BR>> <BR>>_______________________________________________ <BR>>SAP-WUG mailing list <BR>><A href="mailto:SAP-WUG%40mit.edu">SAP-WUG@mit.edu</A> <BR>><A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A> <BR> <BR>_________________________________________________________________ <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> <BR> <BR>_______________________________________________ <BR>SAP-WUG mailing list <BR><A href="mailto:SAP-WUG%40mit.edu">SAP-WUG@mit.edu</A> <BR><A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A> <BR></DIV><!-- end of AOLMsgPart_0_6c53f735-bb00-455a-a4b6-4bfb598ba382 --></DIV></DIV></BODY></HTML>