abap

Refresh table control after action

匆匆过客 提交于 2019-12-22 10:53:56
问题 I have a screen with a table control in it (generated with the Screen Painter) that shows records from a database table. The screen also has a button, which shows a popup when it's clicked. The popup has a form to add a record to the database table. When the form is submitted the record is added to the database, but when the popup is closed, the screen that shows the database records isn't refreshed i.e. the new record isn't shown. Simply calling the screen again doesn't seem to work. How to

Parallel Processing with Starting New Task - front end screen timeout

久未见 提交于 2019-12-22 10:43:15
问题 I am running an ABAP program to work with a huge amount of data. The SAP documentation gives the information that I should use Remote Function Modules with the addition STARTING NEW TASK to process the data. So my program first selects all the data, breaks the data into packages and calls a function module with a package of data for further processing. So that's my pseudo code: Select KEYFIELD from MYSAP_TABLE into table KEY_TABLE package size 500. append KEY_TABLE to ALL_KEYS_TABLE.

How to make an abap program pause?

丶灬走出姿态 提交于 2019-12-21 14:01:47
问题 For testing purposes I need my ABAP program to wait for few seconds. How can this be done? 回答1: 2 solutions: 1) Either use WAIT UP TO ... SECONDS. WAIT UP TO 42 SECONDS. WAIT UP TO '0.5' SECONDS. Does a roll-out and releases the work process to the listener Does an implicit Database commit Use it when CPU processes are at a premium and when the implicit commit will not corrupt your data or cause a short dump because of an open database cursor. 2) Or use the function module ENQUE_SLEEP : CALL

Hybris Enterprise Commerce Platform 服务层的设计与实现

做~自己de王妃 提交于 2019-12-20 04:38:24
Hybris Enterprise Commerce Platform这个系列之前已经由我的同事,SAP成都研究院Hybris开发团队的同事 张健(Zhang Jonathan) 发布过两篇文章了。这里Jerry要特别感谢张健,尽管最近他的第二个孩子诞生了,工作之余的生活变得更加忙碌,然而张健仍然抽出少的可怜的业余时间完成了这个系列的第三篇文章。 前两篇文章分别介绍了SAP Hybris的前端和DTO层: 从产品展示页面谈谈Hybris的特有概念和设计结构 从产品展示页面谈谈Hybris系列之二: DTO, Converter和Populator 本文由张健继续向我们介绍SAP Hybris的持久层即Service层。下面是他的正文。 前两篇文章分别介绍了SAP Hybris的前端和DTO层: 从产品展示页面谈谈Hybris的特有概念和设计结构 从产品展示页面谈谈Hybris系列之二: DTO, Converter和Populator 当我们打开Hybris某个Product的明细页面时,Hybris后台执行了下面三步逻辑: 1. Service层从数据库里把数据取出,以Model(又称为DAO对象)的形式返回给Facade层。 2. Facade层调用Converter, 在Populator的帮助下,基于Model生成了DTO。 3.

In ABAP Workbench, how do I make the program return multiple table fields in a table when a button is clicked?

左心房为你撑大大i 提交于 2019-12-20 01:59:16
问题 I am new to SAP/ABAP Workbench and I am trying to create a program that allows a user to input a foodCode in order to receive the Item and Description after the press of a button. Is there a way the results can be put in a table on the same screen? How? report demo. tables food. SELECTION-SCREEN: SELECTION-SCREEN BEGIN OF BLOCK SEGMENTVALUE WITH FRAME TITLE A1TITLE. SELECTION SCREEN BEGIN OF LINE. PARAMETERS P_INPUT(10) TYPE C OBLIGATORY. SELECTION-SCREEN END OF LINE. SELECTION-SCREEN BEGIN

ABAP 日期函数

故事扮演 提交于 2019-12-19 12:51:36
一 财务期间处理 T_CODE: OB29 **取 公司年度变式, 和 货币 SELECT SINGLE waers periv FROM t001 INTO (v_waers,v_periv) WHERE bukrs = 'HL01'. **取当前日期所在的财务期间年月 CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' EXPORTING i_date = sy-datum i_periv = v_periv IMPORTING e_buper = p_emonth e_gjahr = p_gjahr. ** 根据会计期间得到月初日期 CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET' EXPORTING i_gjahr = p_gjahr i_periv = v_periv i_poper = p_emonth IMPORTING e_date = v_fr_date EXCEPTIONS input_false = 1 t009_notfound = 2 t009b_notfound = 3 OTHERS = 4 . ***根据会计期间得到月末日期 CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET' "取本月最后一天 EXPORTING i_gjahr = p_gjahr "会计年度 i

abap 添加前导0和去除前导0

扶醉桌前 提交于 2019-12-18 19:01:09
【添加前导0】 LOOP AT lt_vkorg INTO DATA(ls_vkorg). ls_vkorg-vkorg = |{ ls_vkorg-vkorg ALPHA = IN }|. MODIFY lt_vkorg FROM ls_vkorg. ENDLOOP. 【去除前导0】 LOOP AT gt_data INTO gs_data. SHIFT gs_data-lifnr LEFT DELETING LEADING '0'. MODIFY gt_data FROM gs_data. CLEAR gs_data. ENDLOOP. 来源: CSDN 作者: 子雅阿酱 链接: https://blog.csdn.net/weixin_42619279/article/details/103598709

Delete the current row from an internal table in a loop

左心房为你撑大大i 提交于 2019-12-18 14:46:52
问题 Can I safely delete the active row while looping over an internal table? As an example, consider this code: LOOP AT lt_itab INTO ls_wa. IF [...] . " A check that can't be done inside a 'DELETE lt_itab WHERE' DELETE lt_itab INDEX sy-tabix " OR DELETE lt_itab FROM ls_wa. ENDIF. ENDLOOP. Is it safe to delete records like this or will this logic not behave as intended? Should I instead store the unique identifier for the rows in a temporary itab and run a DELETE lt_itab WHERE after the loop? I

ABAP函数篇1 日期函数

自作多情 提交于 2019-12-18 05:37:21
1. 日期格式字段检查 data:l_date type ekko-bedat. l_date = '20080901'. CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY' EXPORTING DATE = l_date EXCEPTIONS PLAUSIBILITY_CHECK_FAILED = 1 OTHERS = 2 . IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. 2.查询两个日期间的日间间隔 CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS' EXPORTING I_DATE_FROM = '20080101' * I_KEY_DAY_FROM = I_DATE_TO = '20090508' * I_KEY_DAY_TO = * I_FLG_SEPARATE = ' ' IMPORTING * E_DAYS = E_MONTHS = T_MOTH * E_YEARS = . 3.查询某月的最后一天 CALL FUNCTION 'LAST_DAY_OF_MONTHS' EXPORTING DAY_IN =

sap 几个名词

馋奶兔 提交于 2019-12-18 04:18:00
1 开发类 (Development Class). 开发类可简单理解为逻辑上相关的一组 ABAP 对象 , 在将来传输时将使用同一传输层 . 实际上开发类本身也可看做是一个 ABAP 对象 , 可使用 SE80 建立 . $TMP 是本地开发类 , 属于此开发类的任何 ABAP 对象 ( 包括自定义的表 , 编写的程序等都只能在 Client 做测试用而不能被传输到其他 Client. 包现在被用来代退开发类 . 2. 包 (Package) 相关的 ABAP 对象被组合在一个包内 ,SE16:TADIR 可看到被分配到某包的所有的 ABAP 对象 , 包决定了这些对象的传输层 . 所有的包被存在表 TDEVC 中 , 建立包可使用 SE80 或直接使用 SM30:V_TDEVC. 包作为开发类的退代和前身有这么几个加强特征 . 1. 包可嵌套使用 ( 这点类似 Java package) 2. 包类可包含最多本包中可见的对象 , 这些对象在包外不可见 这点类似私有对象 (Private object), 在 OOP 中也很常见 . 3. 包可为包接口定义使用访问授权 . 4. 通常自定义包必须是 Y 或 Z 前坠 , 这点和其他 ABAP 对象相同 ( 包其实也可看做 ABAP 对象 ). 其他一些包前坠 A-S, U-X 表示 SAP 标准包 ,T 私有测试包 ,$