abap

2019.12.04 ADT on eclipse 配置篇

前提是你 提交于 2019-12-06 12:12:03
今天看JerryWang的简书博客 https://www.jianshu.com/p/74ad8e4bbc49 ,SAP GUI 和ADT是互为补充的关系,有很多SAP新出的技术都没有办法在GUI上开发。 所以准备涉及一下名声很大的eclipse 1.安装JDK, JRE 下载JDK的地址,根据自己的系统选择安装 https://www.oracle.com/technetwork/java/javase/downloads/index.html 2.可以根据JDK获取JRE 在JDK安装目录下,的bin cmd执行 jlink.exe --module-path jmods --add-modules java.desktop --output jre 将生成的jre放到JDK-13.0.1的目录下 3.配置变量环境 右击我的电脑->属性 选择高级系统设置 选择环境变量 在系统变量中新建: 在path加入2个变量如下 4.安装Eclipse https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2019-09/R/eclipse-inst-win64.exe 5.打开Eclipse安装ADT 输入网址 https://tools.hana.ondemand.com/2019-06 (注: https:/

ABAP DEMO so批量导入

亡梦爱人 提交于 2019-12-06 11:05:38
*&---------------------------------------------------------------------* *& Report YDEMO_015 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT YDEMO_015. *&---------------------------------------------------------------------* *& TOP *&---------------------------------------------------------------------* "相关表引用声明 TABLES:VBAK, VBAP, EKKO, EKPO, EKET, MEAN, MARA, MAKT, MARD, MARC, EORD, LFA1, EINA, T023T, T001W,T001L, KNA1, TVKO, TVKOV,TVAK, TVBUR. TABLES:SSCRFIELDS. *----------------

ABAP DEMO ALVtree显示BOM层级

落爺英雄遲暮 提交于 2019-12-06 11:04:52
展示效果: *&---------------------------------------------------------------------* *& Report YCX_015 *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT ycx_015 MESSAGE-ID zpp01. TABLES: stpox. INCLUDE <icon>. CLASS: cl_gui_column_tree DEFINITION LOAD, cl_gui_cfw DEFINITION LOAD . DATA: tree1 TYPE REF TO cl_gui_alv_tree, mr_toolbar TYPE REF TO cl_gui_toolbar. DATA: gs_stpox TYPE stpox, gt_stpox TYPE stpox OCCURS 0, gt_fieldcatalog TYPE lvc_t_fcat, gt_item_layout TYPE lvc_t_laci, gs_item_layout

ABAP DEMO ALV-监听数据修改

…衆ロ難τιáo~ 提交于 2019-12-06 11:04:45
*&---------------------------------------------------------------------* *& Report YDEMO_006 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT YDEMO_006. DATA: BEGIN OF itab OCCURS 0 , mblnr LIKE mseg-mblnr , kostl LIKE mseg-kostl , END OF itab . DATA: ok_code LIKE sy-ucomm . DATA: l_valid(1) TYPE c. DATA: go_grid TYPE REF TO cl_gui_alv_grid, go_custom_container TYPE REF TO cl_gui_custom_container. DATA: gt_fieldcat TYPE lvc_t_fcat, gs_fieldcat TYPE lvc_s_fcat, gs_variant TYPE

ABAP DEMO 下拉框

久未见 提交于 2019-12-06 11:02:06
效果展示: *&---------------------------------------------------------------------* *& Report YCX_020 *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT ycx_020. TABLES: mcha. DATA: ls_id TYPE vrm_id, lt_list TYPE vrm_value OCCURS 0, ls_list LIKE LINE OF lt_list. DATA: ps_t(10) TYPE c. DATA: BEGIN OF str_charg, matnr LIKE mcha-matnr, werks LIKE mcha-werks, charg LIKE mcha-charg, END OF str_charg. DATA: lt_charg LIKE str_charg OCCURS 0, ls_charg LIKE str_charg. PARAMETERS:p_matnr LIKE mcha-matnr

ABAP学习(14):ABAP面向对象

一曲冷凌霜 提交于 2019-12-06 10:52:33
ABAP面向对象 1、类的定义与实现 类定义: 语法:Class <类名> definition. Public section. Methods:<方法名> Importing <参数名> type <参数类型> Exporting <参数名> type <参数类型>. Endclass. 类实现: 语法:Class <类名> implementation. Public section. Method <方法名>. 实现具体代码块. Endmethod. Endclass. 2、抽象类 抽象类定义,抽象方法定义,使用Abstract关键字。 示例: "抽象类定义 "抽象类可以包含静态成员 class-data ,class-methods,class-events "抽象类可以包含非抽象方法 "抽象类可以不定义任何方法 "抽象类 不可以create object 创建实例,但是可以用create object type ref to 创建抽象类引用,并接受子类实例 CLASS base_class DEFINITION ABSTRACT. "抽象类 关键子abstract,基类 PUBLIC SECTION. METHODS:message ABSTRACT "抽象方法 IMPORTING msg TYPE String OPTIONAL. METHODS:sayHello

ABAP Websocket Server XSRF Token

血红的双手。 提交于 2019-12-06 09:40:33
I'm currently trying to setup a web-socket server on an SAP application server as a proof of concept. The application which is connecting to the web-socket server is not going to be a UI5 or WebDynpro application but just a middle-ware program running on a headless computer. Following a quick guide, I've setup the push channel and I have an object with the interface methods ON_START , ON_MESSAGE and etc. I'm currently testing the interface using wscat which you can get from npm . When I tried connecting to my service for the first time using wscat I was receiving a HTTP 500 error. I wasn't

如何用ABAP代码读取CDS view association的数据

有些话、适合烂在心里 提交于 2019-12-06 08:33:16
我有如下一个CDS view, 这个view的数据来自CRMD_ORDERADM_H, 定义了一个名称为_statushelp的association, 指向了另一个CDS view Z_C_Status_Valuehelp.该view暴露了两个字段STATUS_KEY和STATUS_TEXT. 现在我的需求是:在ABAP代码里只需要一次读操作,既能读出主view里的guid字段,又能读出association view Z_C_Status_Valuehelp暴露出的两个字段STATUS_KEY和STATUS_TEXT。 解决方案 (1) 创建一个新的数据类型,里面包含了两个view的总共3个待读取字段。 (2) 使用如下代码读取数据: DATA: lt_data TYPE tt_Data. SELECT guid, \_STATUSHELP-STATUS_KEY AS STATUS_KEY , \_STATUSHELP-STATUS_TEXT AS STATUS_TEXT FROM ZORDER_SYS_STATUS WHERE ZORDER_SYS_STATUS~GUID = 'FA163E8EAB031EE6A99F824537D112A4' AND ZORDER_SYS_STATUS~STAT = 'I1002' AND \_STATUSHELP-STATUS_KEY

Sending email to a SAP inbox and an ordinary email inbox

丶灬走出姿态 提交于 2019-12-06 06:32:16
I needed a function to send an email to an ordinary email address and to send on too to an SAP Inbox. I found this function: CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = gd_doc_data put_in_outbox = 'X' commit_work = 'X' TABLES packing_list = it_packing_list contents_txt = it_message receivers = it_receivers EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 document_type_not_exist = 3 operation_no_authorization = 4 parameter_error = 5 x_error = 6 enqueue_error = 7 OTHERS = 8. The it_receivers it's filled like this: FREE wa_it_receivers. wa_it_receivers-receiver

How to use REUSE_ALV_FIELDCATALOG_MERGE function module?

冷暖自知 提交于 2019-12-06 06:31:37
I'm trying to use the function module REUSE_ALV_FIELDCATALOG_MERGE to pass the field label in ddic to display in the column header of the alv report. But, that didn't work. If I comment the I_STRUCTURE_NAME = 'TY_YNAH_CUS_OBJ_REQ' line, it give me runtime error state The ABAP program lines are wider than the internal table. But if I uncomment it ,the program still did not work REPORT YALV_TEST. tables sscrfields. type-pools : slis. "CREATE STRUCTURE -1 TYPES: BEGIN OF TY_YNAH_CUS_OBJ_REQ, REQID TYPE YNAH_REQ_ID, REQUESTOR TYPE YNAH_REQUESTOR, BUSINESS_OWNER TYPE YNAH_BUS_OWN, FUNCTIONAL_OWNER