Tag Archives: ABAP

iXML ABAP Objects的测试

参考资料:iXML ABAP Objects Jumpstart *&———————————————————————* *& Report Z_XML_LIB_TEST *& *&———————————————————————* *& *& *&———————————————————————* REPORT z_xml_lib_test. TYPE-POOLS: ixml. CLASS cl_ixml DEFINITION LOAD. DATA: g_ixml TYPE REF TO if_ixml. g_ixml = cl_ixml=>create( ). TYPES: BEGIN OF xml_line, data(256) TYPE x, END OF xml_line. DATA: xml_table TYPE TABLE OF xml_line, xml_table_size TYPE i, istream TYPE REF TO if_ixml_istream. [...]


在non-Unicode的SAP系统中连接外部AL32UTF8的Oracle数据库,对于中文字符,以前一直认为需要程序中做编码转换。 今天根据note 808505的说明,在连接字符串后增加编码说明(TNS_NAME:ZHS16GBK)后,中文字符由Oracle自动转换编码后,可以直接在ABAP中像英文字符一样正常使用。 以前的处理方法挺麻烦的,大概过程如下: 读取:在Oracle中先转换为16进制的RAW类型,然后在sap中进行编码转换,代码如下: select utl_raw.cast_to_raw(‘测试’) from dual; form hex_to_utf8 using p_hex_source type xsequence changing p_result type simple. data: cv type ref to cl_abap_conv_in_ce. cv = cl_abap_conv_in_ce=>create( encoding = ‘UTF-8′ ). call method cv->convert exporting input = p_hex_source importing data = p_result. endform. 写入:在SAP中先转换为16进制,然后在Oracle中转换为实际的数据类型,代码如下: form utf8_to_hex using p_source type simple changing p_hex_result type xsequence. [...]

SAP Kernel升级造成的Excel导出错误

问题的起因和现象 我们的basis一直认为,SAP的Knernel升级对一般用户的操作是不会影响的,因此在做硬件扩容的时候,顺便把Kernel从185升级到278。 之后用户在ALV报表中导出到Excel的时候,出现下面的错误: Runtime Errors CONVT_CODEPAGE Exception CX_SY_CONVERSION_CODEPAGE Short text A character set conversion is not possible. 发生了什么? At the conversion of a text from codepage ’8400′ to codepage ’4110′: – a character was found that cannot be displayed in one of the two codepages; – or it was detected that this conversion is not [...]


DATA: it_var LIKE TABLE OF vimsellist WITH HEADER LINE. it_var-viewfield = ‘VORNR’. it_var-operator = ‘EQ’. it_var-value = ’0101′. APPEND it_var. CALL FUNCTION ‘VIEW_MAINTENANCE_CALL’ EXPORTING action = ‘U’ * SHOW_SELECTION_POPUP = ‘X’ view_name = ‘ZAFVC’ * variant_for_selection = ‘ZTEST_VAR’ TABLES dba_sellist = it_var EXCEPTIONS client_reference = 1 foreign_lock = 2 invalid_action = 3 no_clientindependent_auth = 4 [...]


原文地址:Change table records with SE16N 1、TCODE SE16N 2、COMMAND &SAP_EDIT 3、F8, Then do what you want to do. 这个东西越看越像SAP故意留的后门,一般情况还是不用的好。


DATA: number TYPE tbtcjob-jobcount, name TYPE tbtcjob-jobname VALUE ‘JOB_TEST’, print_parameters TYPE pri_params. … CALL FUNCTION ‘JOB_OPEN’ EXPORTING jobname = name IMPORTING jobcount = number EXCEPTIONS cant_create_job = 1 invalid_job_data = 2 jobname_missing = 3 OTHERS = 4. IF sy-subrc = 0. SUBMIT submitable TO SAP-SPOOL SPOOL PARAMETERS print_parameters WITHOUT SPOOL DYNPRO VIA JOB name NUMBER [...]


online help: http://help.sap.com/saphelp_nw04/helpdata/en/34/d9c8b6c23c11d188b40000e83539c3/frameset.htm 下面是几个总体示意图: 其他一些资料可以参考这个word文件。


结论:调用VC_I_GET_CONFIGURATION时,必须设置IV_MAX_MASSPROCESSING参数,建议设置成10.解释:VC_I_GET_CONFIGURATION是为GUI界面调用设计的。为提高读取同一个订单数据的速度,它会将订单的主数据和配置数据放到内存中,以便下一次使用。这个机制对单个订单处理是合适且有效的,但是当一个报表程序需要同时读取很多订单的配置数据,就会造成Paging Area内存的溢出。为应对批量读取订单配置的情况,必须设置VC_I_GET_CONFIGURATION的IV_MAX_MASSPROCESSING参数。如果设置成10,意味着这个函数调用10次之后,就会清空缓存数据。 Notes 303138的说明:Module VC_I_GET_CONFIGURATION and the modules being called are not written for mass data processing but for high-performing online transactions. For this reason, the master data and the configuration data is buffered in memory for the entire runtime of the transaction, to ensure quick access when you request the same data several times.This [...]


原理很简单,就是把SAP GUI当成了一个OLE的SERVER,我估计是DUAL INTERFACE,因为VB也能调用。微软的OFFICE组件都是这样的。 服务器端的设置,参考 notes 480149 客户端的例子,请参考 SAP GUI Scripting 有时间自己做个例子看看。

Document about lnformation Structures

Here is the online help of information structure. Customizing menu: Logistics – General -> Logistics Information System(LIS) -> Logistics Data Warehouse -> DataBasis