<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_Hahappyppy</title><subtitle type="text"/><id>http://feed.cnblogs.com/blog/u/41405/rss</id><updated>2011-10-24T02:50:40Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/41405/rss"/><entry><id>http://www.cnblogs.com/mysap/archive/2011/10/24/2222399.html</id><title type="text">期初库存 acc. determination</title><summary type="text">OBYC-GBB-BSA http://blog.csdn.net/stone0823/article/details/5116054</summary><published>2011-10-24T02:51:00Z</published><updated>2011-10-24T02:51:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2011/10/24/2222399.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2011/10/24/2222399.html"/><content type="html">&lt;div&gt;&amp;nbsp;&lt;div&gt;&lt;div&gt;OBYC-GBB-BSA &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;http://blog.csdn.net/stone0823/article/details/5116054&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/2222399.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2011/10/24/2222399.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2011/04/06/2006880.html</id><title type="text">idoc menu area WEDI</title><summary type="text">idoc menu area WEDI</summary><published>2011-04-06T07:43:00Z</published><updated>2011-04-06T07:43:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2011/04/06/2006880.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2011/04/06/2006880.html"/><content type="html">&lt;p&gt;idoc menu area WEDI&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/2006880.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2011/04/06/2006880.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2011/03/01/1968000.html</id><title type="text">DO ENDDO.   Check  逻辑控制</title><summary type="text">DO 1 TIMES. SELECT SINGLE ap_fieldcat FROM /fom/tc_rep_ap INTO lv_structure WHERE acc_pr = p_acc_pr AND report = sy-repid. CHECK sy-subrc &amp;lt;&amp;gt; 0. SELECT SINGLE cust_set_id FROM /fom/tc_ap_cust INTO lv_c...</summary><published>2011-03-01T06:40:00Z</published><updated>2011-03-01T06:40:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2011/03/01/1968000.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2011/03/01/1968000.html"/><content type="html">&lt;p&gt;&lt;strong&gt;&lt;font color="#0000ff"&gt;DO 1 TIMES.       &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;SELECT SINGLE ap_fieldcat FROM /fom/tc_rep_ap INTO&amp;#160; lv_structure    &lt;br /&gt;WHERE acc_pr = p_acc_pr    &lt;br /&gt;AND&amp;#160;&amp;#160; report = sy-repid.    &lt;br /&gt;    &lt;br /&gt;&lt;font color="#0000ff"&gt;&lt;strong&gt;CHECK sy-subrc &amp;lt;&amp;gt; 0.       &lt;br /&gt;        &lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;SELECT SINGLE cust_set_id FROM /fom/tc_ap_cust INTO lv_cust_set    &lt;br /&gt;WHERE obl_type = /fom/cl_aro_object=&amp;gt;gc_obl_type_for_aro    &lt;br /&gt;AND&amp;#160;&amp;#160; acc_pr&amp;#160;&amp;#160; = p_acc_pr.    &lt;br /&gt;    &lt;br /&gt;&lt;font color="#0000ff"&gt;&lt;strong&gt;CHECK sy-subrc = 0.       &lt;br /&gt;        &lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;SELECT SINGLE impl_class FROM /fom/tc_custset INTO lv_impl_class    &lt;br /&gt;WHERE cust_id = lv_cust_set.    &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; TRY.    &lt;br /&gt;    &lt;br /&gt;CALL METHOD (lv_impl_class)=&amp;gt;get_report_struc    &lt;br /&gt;EXPORTING    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; iv_repid&amp;#160;&amp;#160;&amp;#160;&amp;#160; = /fom/if_aro_object_acc_pr=&amp;gt;gc_rep_evaluate    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; RECEIVING    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ev_structure = lv_structure.    &lt;br /&gt;CATCH cx_sy_dyn_call_error.    &lt;br /&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ENDTRY.    &lt;br /&gt;    &lt;br /&gt;&lt;font color="#0000ff"&gt;&lt;strong&gt;ENDDO.&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/1968000.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2011/03/01/1968000.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2010/12/22/1914021.html</id><title type="text">多条 Message 处理</title><summary type="text">FUNCTION send_message_direct. *"-------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" REFERENCE(IT_RETURN) TYPE BAPIRETTAB OPTIONAL *" REFERENCE(IV_SEND_IF_ONE) TYPE BOOLEAN DEFAULT ABAP_TRUE *"------------------------------------------------------</summary><published>2010-12-22T08:41:00Z</published><updated>2010-12-22T08:41:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2010/12/22/1914021.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2010/12/22/1914021.html"/><content type="html">&lt;p&gt;FUNCTION send_message_direct.   &lt;br /&gt;*"--------------------------------------------------------------------    &lt;br /&gt;*"*"Local Interface:    &lt;br /&gt;*"&amp;nbsp; IMPORTING    &lt;br /&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REFERENCE(IT_RETURN) TYPE&amp;nbsp; BAPIRETTAB OPTIONAL    &lt;br /&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REFERENCE(IV_SEND_IF_ONE) TYPE&amp;nbsp; BOOLEAN DEFAULT ABAP_TRUE    &lt;br /&gt;*"--------------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;DATA: lt_return&amp;nbsp; TYPE&amp;nbsp; bapirettab.&lt;/p&gt;  &lt;p&gt;FIELD-SYMBOLS: &amp;lt;lfs_return&amp;gt; TYPE bapiret2.&lt;/p&gt;  &lt;p&gt;lt_return[] = it_return[].   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;CALL FUNCTION 'MESSAGES_INITIALIZE'   &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reset = abap_true.&lt;/p&gt;  &lt;p&gt;LOOP AT lt_return ASSIGNING &amp;lt;lfs_return&amp;gt;.   &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL FUNCTION 'MESSAGE_STORE'    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arbgb&amp;nbsp; = &amp;lt;lfs_return&amp;gt;-id    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgty&amp;nbsp; = &amp;lt;lfs_return&amp;gt;-type    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgv1&amp;nbsp; = &amp;lt;lfs_return&amp;gt;-message_v1    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgv2&amp;nbsp; = &amp;lt;lfs_return&amp;gt;-message_v2    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgv3&amp;nbsp; = &amp;lt;lfs_return&amp;gt;-message_v3    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgv4&amp;nbsp; = &amp;lt;lfs_return&amp;gt;-message_v4    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; txtnr&amp;nbsp; = &amp;lt;lfs_return&amp;gt;-number    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTIONS    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS = 0.    &lt;br /&gt;&amp;nbsp; ENDLOOP.&lt;/p&gt;  &lt;p&gt;CALL FUNCTION 'MESSAGES_SHOW'   &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; send_if_one = iv_send_if_one    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_use_grid&amp;nbsp; = abap_true    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; show_linno&amp;nbsp; = abap_false    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTIONS    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0.&lt;/p&gt;  &lt;p&gt;ENDFUNCTION.&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/1914021.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2010/12/22/1914021.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2010/12/16/1908285.html</id><title type="text">How to upload a file via ABAP RFC with Webdynpro ?</title><summary type="text">Xiaopeng Tan  Posts: 32 Registered: 7/18/05 Forum Points: 6  How to upload a file via ABAP RFC with Webdynpro ? Posted: Nov 23, 2005 10:45 PM Reply  Hi everyone, I have the follwing problem. I`m curre...</summary><published>2010-12-16T07:35:00Z</published><updated>2010-12-16T07:35:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2010/12/16/1908285.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2010/12/16/1908285.html"/><content type="html">&lt;p&gt;&lt;a href="http://forums.sdn.sap.com/profile.jspa?userID=1178352"&gt;Xiaopeng Tan&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Posts: 32    &lt;br /&gt;Registered: 7/18/05     &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/mypoints?userid=0%2FFWHsbSv3w%3D"&gt;Forum Points: 6&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="914651"&gt;&lt;/a&gt;How to upload a file via ABAP RFC with Webdynpro ?     &lt;br /&gt;Posted: Nov 23, 2005 10:45 PM &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;&lt;img border="0" alt="Click to report abuse..." src="http://forums.sdn.sap.com/images/warn-16x16.gif" width="16" height="16" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;&lt;img border="0" alt="Click to reply to this thread" src="http://forums.sdn.sap.com/images/reply-16x16.gif" width="16" height="16" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;Reply&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hi everyone,    &lt;br /&gt;I have the follwing problem.     &lt;br /&gt;I`m currently creating a webdynpro DC to upload files to a mySAP CRM system via RFC.     &lt;br /&gt;The RF-module is already available at the backend side and I have imported it as a model. The ABAP module interface looks like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;*&amp;quot;  IMPORTING&#xD;
*&amp;quot;     VALUE(IV_CASE_GUID) TYPE  SCMG_CASE_GUID&#xD;
*&amp;quot;     VALUE(IV_FILENAME) TYPE  SDOK_PROPV DEFAULT 'Case Document'&#xD;
*&amp;quot;     VALUE(IV_MODELNODE) TYPE  STRINGVAL DEFAULT '19'&#xD;
*&amp;quot;     VALUE(IV_FILE_CONTENT_BINARY) TYPE  SDOKCNTBINS OPTIONAL&#xD;
*&amp;quot;  EXPORTING&#xD;
*&amp;quot;     VALUE(EV_MESSAGE) TYPE  BAPI_MSG&#xD;
*&amp;quot;  EXCEPTIONS&#xD;
*&amp;quot;      UPLOAD_FAILED&#xD;
&lt;/code&gt;&lt;/pre&gt;&#xD;
&#xD;
&lt;br /&gt;The parameter IV_FILE_CONTENT_BINARY of TYPE SDOKCNTBINS is imported into the webdynpro model as input structure ( 0..n cardinality and of collectiontype list) with one child attribute (line) which can be fed with a byte array (data type RAW with length 1022 on ABAP side). &#xD;
&#xD;
&lt;br /&gt;I`m not really familiar with ABAP. To my understanding the structure IV_FILE_CONTENT_BINARY takes lines of byte arrays and that list of arrays will be uploaded with the RFC, right? &#xD;
&#xD;
&lt;br /&gt;Now in my Webdynpro view I implemented the standard FileUpload UI element from which I got a IWDResource object. &#xD;
&#xD;
&lt;br /&gt;Reading the IWD Resource object I got a inputStream from the file I`d like to upload. &#xD;
&#xD;
&lt;br /&gt;Now my question is: how to get the IV_FILE_CONTENT_BINARY list filled with the inputStream? &#xD;
&#xD;
&lt;br /&gt;I at least figured out that reading a byte array and put it into the structure would pretty much look like the follwing: &#xD;
&#xD;
&lt;pre&gt;&lt;code&gt;&#xD;
//create new list object&#xD;
Sdokcntbin bin = &lt;b&gt;new&lt;/b&gt; Sdokcntbin();&amp;#160;&amp;#160; //create a temporary byte array with length of the line to be inserted into the list.&#xD;
&lt;b&gt;byte&lt;/b&gt;[] b = &lt;b&gt;new&lt;/b&gt; &lt;b&gt;byte&lt;/b&gt;[bin.getLine().length];&amp;#160;&amp;#160; **read the inputStream into the &lt;b&gt;byte&lt;/b&gt; array**&#xD;
inputStream.read(b); ???&amp;#160;&amp;#160; //write the byte array into the list&#xD;
bin.setLine(b);&amp;#160;&amp;#160; //add list to input node for RFC&#xD;
ModelNode.addIv_File_Content_Binary(bin);&amp;#160;&amp;#160; &lt;/code&gt;&lt;/pre&gt;&#xD;
&#xD;
&lt;br /&gt;Do I need to create a loop to read the file binary as byte array segments of length 1022 each or am I wrong here totally? &#xD;
&#xD;
&lt;p&gt;&lt;a href="http://forums.sdn.sap.com/profile.jspa?userID=9151"&gt;Valery Silaev&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Posts: 2,972 &#xD;
  &lt;br /&gt;Registered: 3/3/04 &#xD;
&#xD;
  &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/mypoints?userid=teUTsuXgkvo%3D"&gt;Forum Points: 7,127&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&lt;a name="916105"&gt;&lt;/a&gt;Re: How to upload a file via ABAP RFC with Webdynpro ? &lt;img border="0" alt="Correct" src="http://forums.sdn.sap.com/images/star_ba.gif" width="9" height="9" /&gt; &#xD;
&#xD;
  &lt;br /&gt;Posted: Nov 24, 2005 10:15 AM&amp;#160;&amp;#160; &lt;a href="http://forums.sdn.sap.com/message.jspa?messageID=914651#914651"&gt;&lt;img title="in response to: Xiaopeng Tan" border="0" alt="in response to: Xiaopeng Tan" src="http://forums.sdn.sap.com/images/up-10x10.gif" width="10" height="10" /&gt;&lt;/a&gt; in response to: &lt;a href="http://forums.sdn.sap.com/message.jspa?messageID=914651#914651"&gt;Xiaopeng Tan&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;&lt;img border="0" alt="Click to report abuse..." src="http://forums.sdn.sap.com/images/warn-16x16.gif" width="16" height="16" /&gt;&lt;/a&gt; &#xD;
&#xD;
  &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;&lt;img border="0" alt="Click to reply to this thread" src="http://forums.sdn.sap.com/images/reply-16x16.gif" width="16" height="16" /&gt;&lt;/a&gt; &#xD;
&#xD;
  &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;Reply&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Xiaopeng, &#xD;
  &lt;br /&gt;Yes, you have to read input stream by 1022 bytes chunk, and create Sdokcntbin per chunk. &#xD;
&#xD;
  &lt;br /&gt;Something like this:&lt;/p&gt;&#xD;
&#xD;
&lt;pre&gt;&lt;code&gt;&lt;b&gt;final&lt;/b&gt; &lt;b&gt;int&lt;/b&gt; chunkSize = 1022;&#xD;
&lt;b&gt;final&lt;/b&gt; &lt;b&gt;byte&lt;/b&gt;[] chunk = &lt;b&gt;new&lt;/b&gt; &lt;b&gt;byte&lt;/b&gt;[chunkSize];&#xD;
&lt;b&gt;final&lt;/b&gt; BufferedInputStream in &#xD;
  = &lt;b&gt;new&lt;/b&gt; BufferedInputStream(resource.getInputStream());&#xD;
&lt;b&gt;try&lt;/b&gt;&#xD;
{&#xD;
  &lt;b&gt;int&lt;/b&gt; size = -1;&#xD;
  &lt;b&gt;while&lt;/b&gt; ( (size = in.read(chunk, 0, chunkSize)) &amp;gt; 0 ) &#xD;
  {&#xD;
    // If last chunk is partial, pad rest with zeros&#xD;
    &lt;b&gt;if&lt;/b&gt; ( size &amp;lt; chunkSize )&#xD;
      Arrays.fill( chunk, size, chunkSize, 0);&amp;#160;&amp;#160; //create new list object&#xD;
    &lt;b&gt;final&lt;/b&gt; Sdokcntbin bin = &lt;b&gt;new&lt;/b&gt; Sdokcntbin();&#xD;
    //write the byte array into the list&#xD;
    bin.setLine(chunk);&#xD;
    //add list to input node for RFC&#xD;
    &amp;lt;ModelObject&amp;gt;_Input.addIv_File_Content_Binary(bin);&#xD;
  }&#xD;
}&#xD;
&lt;b&gt;finally&lt;/b&gt;&#xD;
{&#xD;
  in.close();&#xD;
}&#xD;
&lt;/code&gt;&lt;/pre&gt;&#xD;
&#xD;
&lt;br /&gt;Valery Silaev &#xD;
&#xD;
&lt;br /&gt;EPAM Systems &#xD;
&#xD;
&lt;br /&gt;&lt;a href="http://www.NetWeaverTeam.com"&gt;http://www.NetWeaverTeam.com&lt;/a&gt; &#xD;
&#xD;
&lt;p&gt;Message was edited by: Valery Silaev&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&lt;a href="http://forums.sdn.sap.com/profile.jspa?userID=1178352"&gt;Xiaopeng Tan&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Posts: 32 &#xD;
  &lt;br /&gt;Registered: 7/18/05 &#xD;
&#xD;
  &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/mypoints?userid=0%2FFWHsbSv3w%3D"&gt;Forum Points: 6&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&lt;a name="916644"&gt;&lt;/a&gt;Re: How to upload a file via ABAP RFC with Webdynpro ? &#xD;
&#xD;
  &lt;br /&gt;Posted: Nov 24, 2005 11:51 AM&amp;#160;&amp;#160; &lt;a href="http://forums.sdn.sap.com/message.jspa?messageID=916105#916105"&gt;&lt;img title="in response to: Valery Silaev" border="0" alt="in response to: Valery Silaev" src="http://forums.sdn.sap.com/images/up-10x10.gif" width="10" height="10" /&gt;&lt;/a&gt; in response to: &lt;a href="http://forums.sdn.sap.com/message.jspa?messageID=916105#916105"&gt;Valery Silaev&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;&lt;img border="0" alt="Click to report abuse..." src="http://forums.sdn.sap.com/images/warn-16x16.gif" width="16" height="16" /&gt;&lt;/a&gt; &#xD;
&#xD;
  &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;&lt;img border="0" alt="Click to reply to this thread" src="http://forums.sdn.sap.com/images/reply-16x16.gif" width="16" height="16" /&gt;&lt;/a&gt; &#xD;
&#xD;
  &lt;br /&gt;&lt;a href="http://www.sdn.sap.com/irj/sdn/logon?redirect=http%3A%2F%2Fforums.sdn.sap.com%3A80%2Fthread.jspa%3FthreadID%3D84501"&gt;Reply&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Hi Valery, &#xD;
  &lt;br /&gt;That's exactly what I was looking for. It's working now. Perfect! &#xD;
&#xD;
  &lt;br /&gt;Thank you very much! &#xD;
&#xD;
  &lt;br /&gt;Best regards, &#xD;
&#xD;
  &lt;br /&gt;Xiaopeng&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&amp;#160;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&lt;a title="http://forums.sdn.sap.com/thread.jspa?threadID=84501" href="http://forums.sdn.sap.com/thread.jspa?threadID=84501"&gt;http://forums.sdn.sap.com/thread.jspa?threadID=84501&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/1908285.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2010/12/16/1908285.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2010/12/16/1908180.html</id><title type="text">Temporary Post Used For Theme Detection (3f076c7b-c23c-44e1-8634-4158040f52b8 - 3bfe001a-32de-4114-a6b4-4005b770f6d7)</title><summary type="text">This is a temporary post that was not deleted. Please delete this manually. (f10b650b-bd71-4f1c-86ab-156611a1163b - 3bfe001a-32de-4114-a6b4-4005b770f6d7)</summary><published>2010-12-16T06:20:00Z</published><updated>2010-12-16T06:20:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2010/12/16/1908180.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2010/12/16/1908180.html"/><content type="html">&lt;p&gt;This is a temporary post that was not deleted. Please delete this manually. (f10b650b-bd71-4f1c-86ab-156611a1163b - 3bfe001a-32de-4114-a6b4-4005b770f6d7)&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/1908180.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2010/12/16/1908180.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2010/12/01/1893468.html</id><title type="text">If 1=2. What is this code about?   MESSAGE where used list</title><summary type="text">http://www.saptechnical.com/Tips/ABAP/if1=2.htm  We all might have seen the code &amp;quot;IF 1=2. ....do this...EndIF&amp;quot; and we also know that this code never turns true. The main purpose of such code...</summary><published>2010-12-01T07:29:00Z</published><updated>2010-12-01T07:29:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2010/12/01/1893468.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2010/12/01/1893468.html"/><content type="html">&lt;p&gt;&lt;a title="http://www.saptechnical.com/Tips/ABAP/if1=2.htm" href="http://www.saptechnical.com/Tips/ABAP/if1=2.htm"&gt;http://www.saptechnical.com/Tips/ABAP/if1=2.htm&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We all might have seen the code &amp;quot;IF 1=2. ....do this...EndIF&amp;quot; and we also know that this code never turns true. The main purpose of such code is for &amp;quot;Maintainability&amp;quot; of the program. Confused?? Read the following:&lt;/p&gt;  &lt;p&gt;Depending upon the scenario, we would either issue the messages in the program using MESSAGE statement or sometimes might have to call the standard function module MESSAGE_PREPARE to prepare the whole message and use it wherever required.&lt;/p&gt;  &lt;p&gt;CALL FUNCTION 'MESSAGE_PREPARE'   &lt;br /&gt;&amp;#160;&amp;#160; EXPORTING    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; msg_id = msg_id    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; msg_no = msg_no    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MSG_VAR1 = sy-msgv1    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MSG_VAR2 = sy-msgv2    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MSG_VAR3 = sy-msgv3    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MSG_VAR4 = sy-msgv4    &lt;br /&gt;&amp;#160; IMPORTING    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MSG_TEXT = tdoc-text    &lt;br /&gt;&amp;#160; EXCEPTIONS    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FUNCTION_NOT_COMPLETED = 1    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MESSAGE_NOT_FOUND = 2    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OTHERS = 3.&lt;/p&gt;  &lt;p&gt;&lt;ins&gt;&lt;ins&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/p&gt;  &lt;p&gt;Assume that we have defined custom message class for issuing the messages. If we have to modify certain message in this message class, we first need to check for the where-used list of the message to study the impact of the message change. If the message is issued using the MESSAGE statement in any program, then that program would appear in the where-used list. But if the message is used in the program using the FM MESSAGE_PREPARE or any similar function module, then this program would not appear in the where-used list. So in order to have this program include in the where-used list, we would code the following after the call to the function module MESSAGE_PREPARE.&lt;/p&gt;  &lt;p&gt;IF 1=2.&lt;/p&gt;  &lt;p&gt;Message E003(xx).&lt;/p&gt;  &lt;p&gt;ENDIF.&lt;/p&gt;  &lt;p&gt;Since the check &amp;quot;IF 1=2&amp;quot; never gets true, the message would never trigger in the program and this program would appear in the where-used list of that message. &lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/1893468.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2010/12/01/1893468.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2010/11/29/1890781.html</id><title type="text">Trace tcode: SAT ST12 SE30 ST05</title><summary type="text">Imagine you change an order in VA02 and after clicking a specific button (e.g. the ATP (available to promise) check) it takes a while. Now you wonder what happens when you click this button and how yo...</summary><published>2010-11-29T01:53:00Z</published><updated>2010-11-29T01:53:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2010/11/29/1890781.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2010/11/29/1890781.html"/><content type="html">&lt;p&gt;&lt;strong&gt;Imagine you change an order in VA02 and after clicking a specific button (e.g. the ATP (available to promise) check) it takes a while. Now you wonder what happens when you click this button and how you could trace exactly this click. In this blog we will explain how to trace a single dialog step with the &amp;quot;Particular Units&amp;quot; option in ST12.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Before you start:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Please read the &amp;quot;Before you start&amp;quot; section in this blog first:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/15702"&gt;https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/15702&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We'll use the &amp;quot;Current Mode&amp;quot; scenario and the same tracing options as described in the above mentioned blog. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;ST12 - Tracing a single step&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;After filling in the transaction and a comment for the trace (nr. 1 in figure 1) we select the &amp;quot;Particular units&amp;quot; option.&amp;#160; Note: this option is only available in the &amp;quot;Current Mode&amp;quot; Scenario. All other options are set like described in the above mentioned blog. &lt;/p&gt;  &lt;p&gt;&lt;img border="0" alt="main screen" src="https://weblogs.sdn.sap.com/weblogs/images/251699217/pu_main_screens.jpg" width="448" height="281" /&gt;&lt;/p&gt;  &lt;p&gt;Figure 1 - Trace with particular units&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Executing the trace for particular units&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We are ready to start our trace (nr. 3 in figure 1). &lt;/p&gt;  &lt;p&gt;All we have to do is to mark the part we want to trace while we step through VA02. The prerequisite is that you switch on the &amp;quot;Particular Units&amp;quot; option in ST12 as shown above.&lt;/p&gt;  &lt;p&gt;If you look at figure 2 which shows the steps we execute in VA02 to do an ATP check you can see that there are some steps that we don't want to trace:&lt;/p&gt;  &lt;p&gt;We don't want to trace the whole execution (dashed black arrow) between T1 and T2 but only the ATP check (solid red arrow) between T1a and T1b. Note: As you can see in figure 2 the ST05 trace (dashed green arrow) records the whole execution of the transaction but not only particular units of it.&lt;/p&gt;  &lt;p&gt;&lt;img border="0" alt="flow" src="https://weblogs.sdn.sap.com/weblogs/images/251699217/flow.jpg" width="640" height="341" /&gt;&lt;/p&gt;  &lt;p&gt;Figure 2: Executing VA02 with current mode particular units&lt;/p&gt;  &lt;p&gt;While&amp;#160; executing VA02 we have to mark which parts of the execution should be traced with the ABAP trace:&lt;/p&gt;  &lt;p&gt;&lt;img border="0" alt="VA02" src="https://weblogs.sdn.sap.com/weblogs/images/251699217/VA02_1.jpg" width="400" height="500" /&gt;&lt;/p&gt;  &lt;p&gt;Figure 3: VA02&lt;/p&gt;  &lt;p&gt;After you start the trace (nr. 3 in figure 1) VA02 (or the transaction /program you entered in the corresponding transaction / program field in ST12 in the main screen) will show up. Since we switched on the &amp;quot;Particular Units&amp;quot; nothing is traced so far. Now we enter the order and select it.&amp;#160; During selection and when we do our changes, nothing will be recorded in the ABAP trace yet. Right before we click on the ATP check button (nr. 2 in figure 3) we type &amp;quot;/ron&amp;quot; in the ok-code field (this is the field where you type in the transactions e.g. ST12 as well) and press ENTER (nr. 1 in figure 3). This marks that the ABAP trace should be recorded from now on. This is confirmed with the message &amp;quot;Runtime analysis enabled&amp;quot; at the bottom of the screen (nr. 1 in figure 3). &lt;/p&gt;  &lt;p&gt;After that we execute the ATP check by clicking on the button (nr. 2 in figure 3). The next screen shows the result of the ATP check. We have to set the second marker now that indicates we want to stop trace recording so that nothing else is traced from this point on. We enter &amp;quot;/roff&amp;quot; in the transaction code field (nr. 3 in figure 3). We get the message &amp;quot;Runtime analysis disabled&amp;quot; at the bottom of the screen (nr. 3 in figure 3). After this, nothing else (e.g. clicking on save) will be recorded in the ABAP trace any more. If you return to ST12 and open the ABAP trace, it will only contain these parts of the execution that were running between the markers &amp;quot;/ron&amp;quot; and &amp;quot;/roff&amp;quot;. Note that the performance trace (ST05) captures the whole execution of the transaction as shown with the dashed green line in figure 2.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Alternatives for the &amp;quot;/ron&amp;quot; and &amp;quot;/roff&amp;quot;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In dialog transactions you can either work with the ok codes &amp;quot;/ron&amp;quot; and &amp;quot;/roff&amp;quot; like we have seen above. Alternatively you can use the menu path:&lt;/p&gt;  &lt;p&gt;S&lt;u&gt;y&lt;/u&gt;stem - Utilities(&lt;u&gt;H&lt;/u&gt;) - Runtime Ana&lt;u&gt;l&lt;/u&gt;ysis - &lt;u&gt;S&lt;/u&gt;witch on&lt;/p&gt;  &lt;p&gt;S&lt;u&gt;y&lt;/u&gt;stem - Utilities(&lt;u&gt;H&lt;/u&gt;) - Runtime Ana&lt;u&gt;l&lt;/u&gt;ysis - S&lt;u&gt;w&lt;/u&gt;itch off&lt;/p&gt;  &lt;p&gt;In your own developments (e.g. for programs running in background) you can even do it in the ABAP code with these 2 commands:&lt;/p&gt;  &lt;p&gt;SET RUN TIME ANALYZER ON.&lt;/p&gt;  &lt;p&gt;SET RUN TIME ANALYZER OFF.&lt;/p&gt;  &lt;p&gt;This blog demonstrated the &amp;quot;Particular Units&amp;quot; option which is very useful if you want to trace a specific part of a program e.g. a single transaction step in dialog transactions.&lt;/p&gt;  &lt;p&gt;And with special thanks to Sandra Rossi:&lt;/p&gt;  &lt;p&gt;See how the above mentioned ok codes can be used in modal popup windows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://wiki.sdn.sap.com/wiki/display/ABAP/SAPGUI+shortcuts"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/SAPGUI+shortcuts&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;More information on ST12 can be found here:&lt;/p&gt;  &lt;p&gt;ST12 WIKI and Blogs:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://wiki.sdn.sap.com/wiki/display/ABAP/Single+Transaction+Analysis"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/Single+Transaction+Analysis&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Books: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sap-press.com/product.cfm?account=&amp;amp;product=H3060"&gt;http://www.sap-press.com/product.cfm?account=&amp;amp;product=H3060&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sap-press.de/1821"&gt;http://www.sap-press.de/1821&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/1890781.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2010/11/29/1890781.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2010/11/29/1890779.html</id><title type="text">Save FM parameters as SE37 test data within a debugging session</title><summary type="text">- Set a breakpoint in the function module - when the debugger stops in the function module copy all importing, changing parameters and tables from the function module into your variables section - in ...</summary><published>2010-11-29T01:52:00Z</published><updated>2010-11-29T01:52:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2010/11/29/1890779.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2010/11/29/1890779.html"/><content type="html">&lt;p&gt;- Set a breakpoint in the function module   &lt;br /&gt;- when the debugger stops in the function module copy all importing, changing parameters and tables from the function module into your variables section    &lt;br /&gt;- in the variables section click on the tools icon    &lt;br /&gt;- choose option 'Save parameters as Test data (SE37)    &lt;br /&gt;- you get a popup where you can enter the name for your test variant    &lt;br /&gt;- confirm    &lt;br /&gt;-when you now run SE37 you will find your variant, which will populate the interface with all the data&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/1890779.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2010/11/29/1890779.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/mysap/archive/2010/11/22/1883894.html</id><title type="text">利润中心 资产负债表 / profit center B/S statement</title><summary type="text"/><published>2010-11-22T02:51:00Z</published><updated>2010-11-22T02:51:00Z</updated><author><name>Hahappyppy</name><uri>http://www.cnblogs.com/mysap/</uri></author><link rel="alternate" href="http://www.cnblogs.com/mysap/archive/2010/11/22/1883894.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/mysap/archive/2010/11/22/1883894.html"/><content type="html">&lt;p&gt;&lt;img style="border-style: none;"  alt="Winking smile" src="http://images.cnblogs.com/cnblogs_com/mysap/Windows-Live-Writer/f8661070825c_9880/wlEmoticon-winkingsmile_2.png" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://images.cnblogs.com/cnblogs_com/mysap/Windows-Live-Writer/f8661070825c_9880/image_2.png"&gt;&lt;img style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" src="http://images.cnblogs.com/cnblogs_com/mysap/Windows-Live-Writer/f8661070825c_9880/image_thumb.png" border="0" height="439" width="734" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/mysap/aggbug/1883894.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mysap/archive/2010/11/22/1883894.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry></feed>
