<?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 User Name for Material Document when using BAPI_GOODSMVT_CREATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-name-for-material-document-when-using-bapi-goodsmvt-create/m-p/7128438#M1512101</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;I am using BAPI_GOODSMVT_CREATE to post goods movement.&lt;/P&gt;&lt;P&gt;My requirement is to create the material document with the given user name.&lt;/P&gt;&lt;P&gt;Ex: Using the BAPI_GOODSMVT_CREATE , if I post goods movement, the material document is created with my user name.     &lt;/P&gt;&lt;P&gt;      I want it to be created with the given user name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this, I used the field PR_UNAME of the import parameter GOODSMVT_HEADER.&lt;/P&gt;&lt;P&gt;It does not help me in creating the material doc. with the given user name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to know, how we can post the material doc. using the given user name and which field of the import parameter i need to fill to get the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Uday Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jul 2010 11:33:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-07T11:33:15Z</dc:date>
    <item>
      <title>User Name for Material Document when using BAPI_GOODSMVT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-name-for-material-document-when-using-bapi-goodsmvt-create/m-p/7128438#M1512101</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;I am using BAPI_GOODSMVT_CREATE to post goods movement.&lt;/P&gt;&lt;P&gt;My requirement is to create the material document with the given user name.&lt;/P&gt;&lt;P&gt;Ex: Using the BAPI_GOODSMVT_CREATE , if I post goods movement, the material document is created with my user name.     &lt;/P&gt;&lt;P&gt;      I want it to be created with the given user name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this, I used the field PR_UNAME of the import parameter GOODSMVT_HEADER.&lt;/P&gt;&lt;P&gt;It does not help me in creating the material doc. with the given user name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to know, how we can post the material doc. using the given user name and which field of the import parameter i need to fill to get the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Uday Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 11:33:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-name-for-material-document-when-using-bapi-goodsmvt-create/m-p/7128438#M1512101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-07T11:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: User Name for Material Document when using BAPI_GOODSMVT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-name-for-material-document-when-using-bapi-goodsmvt-create/m-p/7128439#M1512102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; If there is no fields in the BAPI means, follow my idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to create one report program which will use BAPI_GOODSMVT_CREATE say Z_BAPICALL.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you have to create background job using that report as shown below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
 1.)  CALL FUNCTION 'JOB_OPEN'                       
   EXPORTING                                    
      jobname                = w_jobname            
  IMPORTING                                     
    jobcount               = w_co_job_count             
  EXCEPTIONS                                    
    cant_create_job        = 1                  
    invalid_job_data       = 2                  
    jobname_missing        = 3                  
    OTHERS                 = 4       .           


 2.) SUBMIT Z_BAPICALL TO SAP-SPOOL                  
                     SPOOL PARAMETERS w_print_parameters
                     WITHOUT SPOOL DYNPRO               
   WITH p_wi_id EQ wf_w_wid                             
   USER wf_w_user        " here you can specify the user ID whom you want
   VIA JOB w_jobname NUMBER w_co_job_count AND RETURN.                   

3.)                                                        
CALL FUNCTION 'JOB_CLOSE'                              
  EXPORTING                                            
    jobcount                          = w_co_job_count 
    jobname                           = w_jobname      
   strtimmed                         = 'X'                        " This flag is important.Because this will start the job immediately like BAPI call.
         
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Senthil Kumar Anantham.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 11:59:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-name-for-material-document-when-using-bapi-goodsmvt-create/m-p/7128439#M1512102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-07T11:59:26Z</dc:date>
    </item>
  </channel>
</rss>

