sap

Automatic filling of NAME_1 when entered a valid KUNNR - SM30

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 02:23:40
问题 I've made a table with three fields: KUNNR, NAME_1 and Z_CLASS. KUNNR has KUNNR as data element, NAME_1 has NAME1_GP and Z_CLASS has a data element that I made with 3 values (1, 2 or 3). I've made the table maintenance generator and put some data in with SM30. Now, I need to make the name of the client show automatically (NAME_1) when I enter a client number (KUNNR) and press enter; and need to make sure that the Z_CLASS is filled and not leaved in blank. I don't really know how to search for

ABAP hard code value into SELECT and field into another field

半城伤御伤魂 提交于 2019-12-11 00:55:20
问题 It is possible in ABAP to make a select and include a hard code value and to put a value in any field. In my exemple i have to fill a range with Company code BUKRS according to VKORG so i have to do a select on TVKO like that: DATA : lt_rtvko TYPE RANGE OF bukrs. SELECT 'I' as sign 'EQ' as option bukrs as low INTO CORRESPONDING FIELDS OF TABLE lt_rtvko FROM tvko WHERE vkorg EQ p_vkorg. But i have a dump. I know a longer solution to do this, To fill manually a table of TVKO and make a LOOP to

Failed to load resource while consuming OData service

风流意气都作罢 提交于 2019-12-11 00:07:30
问题 Hello comunnity i need some help, i have my odata service already running and i have an url like this: https://myclient:port/sap/opu/odata/SAP/servicename_SRV/MaterialListSet This is my config, which I suppose is wrong. manifest.json "dataSources": { "invoiceRemote": { "uri": "https://myclient:port/sap/opu/odata/SAP/servicename_SRV/", "type": "OData", "settings": { "odataVersion": "2.0" } } } . . . "models": { ... "invoice": { "dataSource": "invoiceRemote" } } I get these two errors: Failed

SAP Error handling by SAP GUI Scripting

吃可爱长大的小学妹 提交于 2019-12-10 23:22:13
问题 I m using SAP GUI Scripting code for bulk record submission through SAP form. It picks records one by one from excel file and submits in SAP system. My Question: I want to include error handling into it. So that if any error occurs at any particular record submission, Script shouldn't stop. It should move to the next line after putting appropriate message in Comment field. Can anyone throw some light how to identify whether SAP is facing some Error or Warning? And if Error occurs how to get

Is there a setting that would let me display ALV Grid always as ALV List?

末鹿安然 提交于 2019-12-10 22:22:47
问题 I have a following issue. I would like to display an ALV Grid always as ALV list for my user. So instead of always doing that... ...I would like to set a variable or something in, for example, SU01 that would always show me the output as ALV list. Is there a trick that would allow me to do so? The ALV grid is presented from SAP standard transaction so I do not have control over the ABAP code under the hood. EDIT: I have a possibility to change layout. However the only options I have are SAP

SAP making HTTPS requests to REST service

允我心安 提交于 2019-12-10 18:54:49
问题 Is this possible? I'm about to start into a project which requires a call from an SAP instance to a remotely hosted service using XML over HTTPS. Does anyone have sample ABAP code? 回答1: There is a SDN article titled "Real Web Services with REST and ICF". This covers the server side (providing a REST service) only, but maybe this could help you getting started. There's also the (arguably rather concise) documentation on client side ICF development. However, it looks like you'll have to parse

How do I group conditions in a SELECT statement in ABAP?

血红的双手。 提交于 2019-12-10 16:36:27
问题 First off, I have no experience with ABAP, I'm operating on guesswork here. I want to add a condition to a SELECT in an existing report. The existing code looks like this: SELECT SINGLE * FROM EKPO WHERE EBELN = GT_MSEG-EBELN AND EBELP = GT_MSEG-EBELP. I want to add a condition to exclude the record if field F1 is a certain value and field F2 is 0 (both conditions must be true to exclude the record). I've tried this: SELECT SINGLE * FROM EKPO WHERE EBELN = GT_MSEG-EBELN AND EBELP = GT_MSEG

使用ABAP操作Excel的几种方法

最后都变了- 提交于 2019-12-10 16:35:51
这篇文章本来不在我计划之内,因为最近一个朋友微信上问到我这个问题,但我平时在SAP研究院工作中从没遇到过需要用ABAP操作Excel的需求,因此也没有太多技术实现细节可以分享给大家,只能泛泛写一些。 用ABAP操作Excel这个需求算是比较常见,所以Jerry希望这篇文章能起到抛砖引玉的效果,在这个话题上有多年工作经验的朋友们,欢迎留言,指出Jerry文章中不足或者错误之处。 在SAPGUI里根据关键字OLE搜索,能找到通过ABAP操作Excel的一种办法: 这段文档说的比较清楚,微软的Word和Excel这种Office应用,提供了一种所谓automation的接口,暴露的公有类的方法和属性可以被其他应用消费。 作为ABAP应用开发人员,我们通过调用OLE对象的方法CALL METHOD, GET PROPERTY,SET PROPERTY等来访问微软Word和Excel的automation接口,代码看起来像这样: 上面这个函数RH_START_EXCEL_DATA_OLE调用微软Excel的automation接口,新建一个Excel workbook,然后准备把ABAP内表里的数据写到Excel里。 你也许会问,我咋知道Excel里有哪些公有的类和方法可以被ABAP调用呢? 在Excel里点击右键,选择View Code: 打开Microsoft Visual Basic

SAP错误消息调试之七种武器:让所有的错误消息都能被定位

拈花ヽ惹草 提交于 2019-12-10 16:32:49
目录 长生剑 - SAPGUI Where Used List 碧玉刀 - ABAP调试器观察点 霸王枪 - ABAP调试器动态断点 多情环 - ABAP代码静态扫描 孔雀翎 - SAT 离别钩 - ST05 拳头 - 迷之方法??? Jerry在2018年开始用中文在微信公众号平台上写作之前,在SAP官方社区上总共写了639篇英文博客。 其中有一篇写于2013年介绍ABAP调试技巧的博客: Six kinds of debugging tips to find the source code where the message is raised 从2016年至今,在SAP社区上有超过十五万的阅读量。 实际的阅读量远远大于这个数字,因为2016年社区改版之后,文章阅读量清零了。 SAP社区在2016年改版前,有一个所谓的Gamification游戏化机制,博客每收到一个赞之后,作者会得到2点积分。这篇博客当时给Jerry赢得了不少社区积分。 该博客以一个实际例子,向大家介绍了Jerry多年ABAP编程生涯积累的6种错误消息调试方法。事实上Jerry实际工作中靠着这六种方法,对于我遇到形形色色的错误消息,几乎没有遇到调试不出抛出消息准确代码位置的情况,个人觉得这些方法还是相当管用的。 具体场景:在SE38里随便输入一个并不存在的程序名,点击Display按钮,显示一个提示消息

How to encode JSON in ABAP before 7.02

 ̄綄美尐妖づ 提交于 2019-12-10 16:12:43
问题 As Horst Keller mentioned in his ABAP and JSON post, "with Releases 7.02 and 7.03/7.31 (Kernelpatch 116) JSON is supported natively in ABAP". Appartently 7.02 in my case of too generic because the line below: writer = cl_sxml_string_writer=>create( type = if_sxml=>co_xt_json ). returns the error: "The field CO_XT_JSON is unknown, but there is a field with the similar name CO_XT_XOP". So is there any way to easily generate JSON? Edit: Screenshot from SAP - Status 回答1: About the class CL_TREX