abap

ABAP ALV详细教程(一)

一曲冷凌霜 提交于 2019-12-17 17:14:27
ABAP ALV详细教程(一) 第一步:第一步申明变量 TYPE-POOLS:slis. DATA : lt_fieldcat TYPE slis_t_fieldcat_alv, wt_fieldcat TYPE slis_fieldcat_alv, ls_layout TYPE slis_layout_alv. 第二步:定义内表 TYPES:BEGIN OF lt_xs, vbeln TYPE vbak-vbeln, matnr TYPE vbap-matnr, END OF lt_xs. DATA :gw_xs TYPE lt_xs, gt_xs TYPE TABLE OF lt_xs. 第三步:读取数据 SELECT vbak~vbeln matnr FROM vbak LEFT JOIN vbap on vbak~vbeln = vbap~vbeln INTO TABLE gt_xs. 第四步:ALV格式控制 ls_layout-zebra = 'X' . ls_layout-detail_popup = 'X' . ls_layout-detail_titlebar = '详细信息' . ls_layout-f2code = '&ETA' . ls_layout-colwidth_optimize = 'X' . wt_fieldcat-fieldname =

Parsing XML within SAP ABAP

╄→гoц情女王★ 提交于 2019-12-14 03:57:37
问题 My company is working on a project that needs to read XML files within SAP ABAP. When the XML file has no data for a particular tag it omits that data. Some tags are self closing. e.g. <tag /> The SAP developer says that to read the XML document he first parses the document into an ABAP XML structure. This process fails on point 2. He must then create an XSLT to turn that data into an internal data structure, and that fails on point 1 therefore making the task very difficult to achieve within

SAP ABAP alv Grid OO Tooltip in a single cell

感情迁移 提交于 2019-12-13 23:00:21
问题 It is possible to put a tooltip on a single cell of my alv, i know that it is possible in a column by a field catalog, but in one cell it is possible? Thanks. Im my example i have an alv with icon like that: I use a cl_gui_alv_grid not an salv. And i want that when i mouse over the icon i have information about this item in tha tooltip. 回答1: The information on how to display a symbol with a tooltip is easily available if you google for "site:help.sap.com tooltip icon". Since you seem to be

Character variable with dynamic length

岁酱吖の 提交于 2019-12-13 10:17:07
问题 Is there any way to declare char variable (or maybe string) with the length which is calculated dynamically? This coding clarifies what I want: DATA: len TYPE i, a TYPE i, b TYPE i. len = a + b. DATA: var(len) TYPE с. Do not propose solutions with CREATE DATA and/or field symbols: I've tried them but they are not applicable in my case. The intention of such declaration is adding leading zeroes and/or apply other logic to this string. Therefore string is to be declared strictly ! Any proposals

PyRFC: Connect via mshost (not ashost)

淺唱寂寞╮ 提交于 2019-12-13 08:34:42
问题 I would like to use PyRFC to do remote procedure call on SAP using the Python programming language. conn = pyrfc.Connection(user='foouser', passwd='xxxx', mshost='sap.example.com', sysid='TE1', client='220', group='EXAMPLE', ) But it fails like this: RFC_COMMUNICATION_FAILURE (rc=1): key=RFC_COMMUNICATION_FAILURE, message= ERROR service 'sapmsTE1' unknown TIME Tue Dec 18 15:49:40 2018 RELEASE 753 COMPONENT NI (network interface) VERSION 40 RC -3 MODULE /bas/753_REL/src/base/ni/niuxi.c LINE

Generation of ABAP report in runtime

本小妞迷上赌 提交于 2019-12-13 07:42:43
问题 Is there any Function module that can generate ABAP code. For eg: FM takes tables name and join conditions as input and generate ABAP code corresponding to that. Thanks 回答1: 1. Generic reports are possible. Your problem is, that You will have to draw a strict frame of what is generic and what not, this means, some stuff MUST be that generic, that it will deal with WHATEVER You want to do before ( mostly the selection ) , during ( mostly manipulation ---> I would offer a badi for that ), and

Load Excel file with long cells via SAPGUI

て烟熏妆下的殇ゞ 提交于 2019-12-13 05:06:58
问题 I need to read excel files via SAPGUI (not in batch, not from server). Only one sheet/file, not a csv file. I am aware of a few function modules that do that, but they are restricted to cell sizes of 32 or 40 or 50 characters per cell. Are there function modules or classes/methods that allow me to read excel files with longer cells? Longer means: either String or defined by the caller or at least 80. Edit I used ALSM_EXCEL_TO_INTERNAL_TABLE successfully in other projects where cell size is

How to generate a table with dynamic amount of colums (and a fixed set of rows)?

对着背影说爱祢 提交于 2019-12-13 04:00:01
问题 I have some calculations in the area of payroll which result in a lot of data each per month/year and two dates: an begin date (mm/yyyy) and an end date (mm/yyyy). What I want: generating an internal table which has as many columns as begda-year till endda-year has (in years). For example my begda is 05/2010 and endda is 03/2013, then I need a table like this which has columns 2010, 2011, 2012, 2013 and rows for each month: The difficult part for me is, that the table colums (or the endda and

How can I link RSEG table into BSEG or RBKP to BSEG?

家住魔仙堡 提交于 2019-12-13 03:01:34
问题 I already browse the web but i find no answer that can solve my problem. I tried the concatenation of RBKP-BELNR and RBKP-GJAHR into BKPF-AWKEY to get the BKPF-BELNR then BKPF-BELNR to BSEG-BELNR , but always show no records. I need to link to the RSEG to BSEG or RBKP to BSEG . Need some help! thanks! Edit: I made the parked document in Tcode MIR7 I found this, but can't enter to VBSEGS table. UPDATE : these are the details I want to get. but can't find the other details 回答1: Concatenate

SAP Fiori应用的三种部署方式

别说谁变了你拦得住时间么 提交于 2019-12-12 23:59:31
封面图片来自Google搜索,关键字: Fiori Deployment 方式1 On premise环境下以BSP应用作为Fiori应用部署和运行的载体 典型的例子是SAP CRM这几个 Fiori应用 : 在Google上搜索关键字Fiori Architecture, 能找到这样一张图片,其中CRM和S/4 HANA的Fiori应用都以BSP应用的方式运行在下图我标注了红色方框的ABAP前台服务器上。 以CRM的My lead应用为例,在Chrome的development tool里能找到其对应的BSP应用名称为crm_leads, 用SAPGUI登录这台前台服务器,使用事务码SE80即可打开该BSP应用,里面的层级结构和Chrome的development tool里观察到的一致(前提是您使用ctrl+alt+shift+p加载了调试版本的应用源码) 我们可以用各种IDE(比如Eclipse, Sublime, Atom, Webstorm)等进行Fiori应用开发,然后使用report /UI5/UI5_REPOSITORY_LOAD将本地工程上传到前台服务器,具体步骤参考这篇博客 Deploy a Fiori app in SAP Fiori 另外,Eclipse有个SAP开发的插件叫做ABAP Repository Team Provider