abap

利用ABAP代码动态生成ABAP类

大兔子大兔子 提交于 2020-01-21 09:43:29
REPORT ZDYANMIC. DATA ls_vseoclass TYPE vseoclass. DATA ls_imp_if TYPE seor_implementing_r. DATA lt_imp_if TYPE seor_implementings_r. DATA ls_imp_det TYPE seoredef. DATA lt_methods_source TYPE seo_method_source_table. DATA ls_method_source TYPE seo_method_source. DATA lv_method type LINE OF SEOO_METHODS_R. data: lv_classname LIKE ls_vseoclass-clsname value 'ZCLJERRY8'. ls_vseoclass-clsname = lv_classname. ls_vseoclass-state = seoc_state_implemented. ls_vseoclass-exposure = seoc_exposure_public. ls_vseoclass-descript = `Dynamic proxy generated by Jerry's code`. ls_vseoclass-langu = sy-langu. ls

SAP:常用的T-code

让人想犯罪 __ 提交于 2020-01-19 09:18:44
SAP:常用的T-code 收藏 如下是搜集的一些T-Code,还没有做进一步分析测试。 ====================================================== 11个模块较常用的一些T-Code,希望对大家有所帮助! http://www.sapforum.net/archiver/?tid-4437.html 大家可以在SAP中查询T-Code,当然前提是你有足够的权限。 具体方法是:使用T-Code:TSTC 进入T-Code表查询。 以下是11个模块较常用的一些T-Code,希望对大家有所帮助! Plant Maintenance (PM) Production Planning BASIS/ABAP Human Resources Sales and Distribution (SD) SAP Office FI Financial Management Material Management (MM) MM configuration transactions Config Related Plant Maintenance (PM) IW32 Change Plant Maintenance Order IW33 Display Plant Maintenance Order IW34 Create Notification

用ABAP代码实现从1累加到100

我是研究僧i 提交于 2020-01-19 04:49:43
itab = VALUE #( FOR j = 1 WHILE j <= 100 ( j ) ). * Reduce 后面跟类型 * A constructor expression with the reduction operator * REDUCE creates a result of a data type specified using type * from one or more iteration expressions. * At least one variable or one field symbol must be specified. The variables or field symbols declared after * INIT can only be used after NEXT. * At least one iteration expression must then be specified using FOR and it is also possible to specify multiple * consecutive iteration expressions. DATA(sum) = REDUCE i( INIT x = 0 FOR wa IN itab NEXT x = x + wa ). WRITE: / sum.

Jerry自己写的ABAP处理中文字符的工具类

强颜欢笑 提交于 2020-01-18 05:38:33
class ZCL_CHINESE_TOOL definition public final create public . public section. type-pools ABAP . types: tt_post_attributes TYPE STANDARD TABLE OF crmt_soc_post_attr . types: tt_post_uuid TYPE STANDARD TABLE OF crmt_soc_data_uuid . types: tt_socialuserinfo type standard table of socialuserinfo . class-methods CLASS_CONSTRUCTOR . class-methods GET_FORMATTED_STRING importing !IV_FLAG type CRMT_SOC_UNICODE_FLAG optional !IV_STRING type STRING returning value(RV_STRING) type STRING . protected section. private section. types: tt_sentit TYPE STANDARD TABLE OF crmc_soc_senti_t . class-data SV_UNICODE

Problems with multiple selection screens

孤街醉人 提交于 2020-01-17 03:21:09
问题 START-OF-SELECTION is not getting triggered in my program. I am trying to fetch book details based on book name and book author using multiple selection screens in ABAP. There are two pushbuttons and based on those selection screens are opened. When I click any of the push buttons, then selection screens are opened. But after I select entries from the dropdown list and click execute button, then the transaction goes to the initial screen with the pushbuttons. The book details are not

Problems with multiple selection screens

半腔热情 提交于 2020-01-17 03:21:05
问题 START-OF-SELECTION is not getting triggered in my program. I am trying to fetch book details based on book name and book author using multiple selection screens in ABAP. There are two pushbuttons and based on those selection screens are opened. When I click any of the push buttons, then selection screens are opened. But after I select entries from the dropdown list and click execute button, then the transaction goes to the initial screen with the pushbuttons. The book details are not

ABAP \"FOR ALL ENTRIES IN\"的用法及注意事项

左心房为你撑大大i 提交于 2020-01-16 22:25:25
FOR ALL ENTRIES IN 一般使用在LOOP 中有 SELECT 语句 和 JOIN 簇表的时候。 SORT LT_A BY ID. DELETE ADJACENT DUPLICATES FROM LT_A COMPARING ID. IF LT_A IS NOT INITAL. SELECT ID NAME AGE INTO TABLE LT_C FROM LT_B FOR ALL ENTRIES IN LT_A WHERE ID EQ LT_A-ID AND NAME EQ LT_A-NAME. ENDIF. 该语句是从数据库表(LT_B)中取出与内表(LT_A)中 ID NAME 相同的数据,然后存放到LT_C 表中。 在使用该语句时需要注意: 1.where 条件后 不能使用 GROUP BY HAVING等语句不能够使用。 2.使用该表时,会删除重复数据,最好提前将内表备份。 3.使用该语句一般的步骤先对内表排序,删重,判空。 4.在取大量的数据时,不建议使用该语句。 来源: https://www.cnblogs.com/hejie-code/p/12203350.html

How to count duplicate rows in a query in efficient way?

走远了吗. 提交于 2020-01-16 18:05:29
问题 I am creating a report in SAP SQ01/SQ02 whose purpose is to show the number of times a product was picked in the specified time frame. The data is mainly sourced from table LTAP. I just need to be able to count the number of rows Material XYZ is duplicated in and output the number into an extra field and show the value. Also I want this count to happen in a specified time frame, let's say in the last 30 days, this is to make sure it's up to date and relevant. The below code works, but it's so

Save global attribute value when new session starts

坚强是说给别人听的谎言 提交于 2020-01-16 16:05:28
问题 I have two fields in SAP Fiori App: Template_ID and Offer_ID . I want to choose value in Offer_ID depending on Template_ID field value. For solving this problem I've tried to do this steps: When the user click on Template_ID field in Back-End runs the method: CL_CUAN_CAMPAIGN_DPC->contentset_get_entityset() . This method has returning paramater et_result . In et_result I have the necessary field temp_id . For saving temp_id value I created a global attribute in class ZCL_CUAN_CLASS . ZCL_CUAN

SAP ABAP 程序之间的调用

北城以北 提交于 2020-01-16 03:15:21
更多内容关注公众号:SAP Technical 各位可以关注我的公众号:SAP Technical 一,同步调用从一个程序同步调用其他的ABAP程序,有2种方式: 1,调用程序被打断,当被调用程序执行完毕之后,调用程序继续执行。如:CALL FUNCTION <function>SUBMIT <program> AND RETURNCALL TRANSACTION <tcode> 使用CALL FUNCTION 'AAA'调用FM的时候,相应的FUNCTION GROUP被加载到调用程序所在的internal session。当FM执行完毕,接着执行调用程序。FUNCTION GROUP和其GLOBAL DATA会一直保存在这个internal session直到调用程序结束。当调用程序再次调用这个FM的时候,不会再次加载相应的FUNCTION GROUP。这个FUNCTON GROUP的GLOBAL DATA和第一次调用它时的内容是一样的。 使用SUBMIT <program> AND RETURN或者CALL TRANSACTION <tcode>的时候,实际是插入了一个新的internal session,当被调用的程序执行完毕之后,新插入的internal session会被删除,继续执行调用程序。可以使用leave program语句来结束程序。 2,调用程序被结束