ABAP Tips and Tricks

简介:

Retrieving the deleted program

I recently deleted a custom program (which is already transported to production) accidentally and was wondering if there is any method of retrieving the program back. After some research, I found a way of getting back the program. Following are the steps in getting back the program:

1) Create a program with the same name as earlier (which is deleted)  
2) Click on "Utilities" --> "Versions" --> "Version Management"  
3) Select the version of your earlier program and click on display.  
4) Your earlier program is displayed here.     *-- Soumya Ray

Find out in what all Tables a specified field is available.

You can find out through transaction code SE15.

1) Give SE15 on command prompt. 
2) Select ABAP Dictionary 
3) Select "fields" folder 
4) Click on table fields 
5) Then you can enter the desired field name (In your case EKGRP) 
6) Run OR press F8.

The system will list out all the tables which contain your desired field name.

or

1) using  transactin Code  SE11( ABAP Dictionary) 
2) enter the Data table name where-in the respective field (EKGRP) is used eg; EKKO 
3) Click the where -used list button 
4) Check out the box(DB tables) Only .

There you can see entire list of tables containing the desired field.

Here  the difficulty is that one should know at least  the name of the one of the data tables which contain the desired field.

With Compliment by: Manohar TS & Kotha

**********

Find the Table Name For a Field.

I know couple of ways to find the table name for a field. 
like. 
1. Part the cursor at the field and press F1 & F9. 
2. se84 or se15 
3. st05 (sql trace). 
4. Setting Break point in ABAP.

If you will tell other methods it will be apreciate.

**********

* 
* How to print Apostrophe using the write statement 
* For e.g. You'll be there. 
* 
report zapostrophe message-id z1.

DATA: LINE(20).

CONCATENATE 'You''' 'll be there.' INTO LINE.

WRITE:/ LINE.

**********

Given a transaction code, how can I find the menu path?

In 4.6c, you can used tcode search_sap_menu to find the SAP MENU tcode.

Please note that there are no tcode available to find the path of the IMG transaction.

**********

How to un-encrypt SAP user password?

It is not possible to un-encrypt the SAP password, because a one-way encoding (with strong 1024 bit key) is used for this. The result is stored and each time one has entered the password the encoding result is checked.

**********

When you delete an entry from an internal table in ABAP, the system has to re-generate the index for all entries after your delete, slowing the report if you have many records to eliminate.

It is much quicker to do an insert of the correct records into a second table than to delete entries from the first. The reason for this is because the index is only generated for the newest element.

**********

If you want to protect a program against debugging, you just have to set the STATUS = S in the attributes view of the main program.

**********

BDC. 
When You use a call transaction ,and populate the BDCDATA table. 
Make sure you pass the "DATE FIELDS" of any transaction by formatting it as  "XX/XX/YYYY"  cos if you pick this data from database it will be of the format 20030505 or something like that. Make sure You pass this value as character field. 
Same is true for the "Rate Fields". Make sure you pass them as "Character Fields" by formatting them.

**********

If you need to find out the Okcodes for BDC sessions, look for program RSBDCCUA and run it for any platform say 'WN' for windows or MC for Mac and it will generate list of function codes

**********

To save the contents of an internal table as a Microsoft Excel Worksheet when debugging code in SAP R/3 Enterprise: 
1. Click on the "Table" button 
2. Type in the name of your internal table in the "Internal table" field and hit Enter. 
3. Hit CTRL + F11 or click on the "Save as Excel Worksheet" button. 
4. Type in the record numbers that you want to save. (Ex. From Line: 1 To Line: 10) Hit Enter. 
5. Save your file.

**********

Starts with a Z is homegrown program 
You cannot be sure that anything which starts with a Z is a homegrown program. 
SAP provide a number of correction programs, especially within the archiving area, which start with a Z. 
For e.g. ZZSTOCKL from note 202345.

**********

Can line-size of abap report large than 255?

You can have line-size upto 1023. 
Along with Report statement pass the line-size as 1023.   Ex. Report xyz line-size 1023.

**********

How to find out the number of days between a given date, excluding Saturdays and Sundays and public holidays?

Try functions, 
=> DATE_CONVERT_TO_FACTORYDATE 
=> HR_HK_DIFF_BT_2_DATES

专注于企业信息化,最近对股票数据分析较为感兴趣,可免费分享股票个股主力资金实时变化趋势分析工具,股票交流QQ群:457394862

本文转自沧海-重庆博客园博客,原文链接:http://www.cnblogs.com/omygod/archive/2007/12/16/997002.html ,如需转载请自行联系原作者
目录
相关文章
|
Java Linux 虚拟化
SAP NetWeaver 7.0 - Java and ABAP Trial Version on Linux - VMware Edition - Tips & Tricks
 http://www.saptechies.com/sap-netweaver-70-java-and-abap-trial-version-on-linux-vmware-edition...
1389 0
|
SQL 设计模式 前端开发
【置顶】SAP ABAP开发实战——从入门到精通系列目录
本文章为SAP ABAP开发实战——从入门到精通系列的目录以及关于该教程的后续写作计划表
3826 0
【置顶】SAP ABAP开发实战——从入门到精通系列目录
开发语言漫谈-ABAP
ABAP是SAP公司专门用于SAP软件环境的专门语言
|
前端开发 JavaScript 数据库
如何使用 Restful ABAP Programming 编程模型开发一个支持增删改查的 Fiori 应用(二)
Restful ABAP Programming 编程模式是 ABAP 这门编程语言在不断向前进化的过程中,诞生的一门新的编程模型,简称为RAP模型。
503 0
如何使用 Restful ABAP Programming 编程模型开发一个支持增删改查的 Fiori 应用(二)
|
BI
SAP ABAP在线预览文档对象的开发实现
应用场景:有些定制化开发(报表/功能增强等)完成之后,客户需要将其操作手册或者相关文档放在某个报表的初始画面,供实际操作者在线查阅,当然这个功能也同样类似于模板的下载,这里就以在线预览(直接打开)为例进行说明。
715 0
|
程序员 BI
也谈SAP业务顾问如何避免被ABAP开发顾问怒打
也谈SAP业务顾问如何避免被ABAP开发顾问怒打
也谈SAP业务顾问如何避免被ABAP开发顾问怒打
abap开发function module时使用tables传递参数报错过时的解决方法
如下图,我写了一个Function Module我要在tables中添加一个参数TABLES参数已过时不管怎么点击保存按钮,一直报错,怎么办呢?不管是不是过时,狂点回车,就保存了
2180 0
ABAP开发基础知识:1) ABAP基础程序类型(ABAP Elementary Data Types)
ABAP程序共包含8种基本数据类型定义,下表 数据类型名称 描述 属性 C Character Text(字符类型) 默认长度=1,默认值=blank,最大长度无限制 N Numeric Text(数字类型) 默认长度=1,默认值=“0.
1176 0
ABAP开发基础知识:2) 变量的声明(Declaring Variables)
本篇文件主要讲解的是在ABAP编程过程中如何声明变量。     1.按类型定义变量     ABAP的变量需要通过关键字DATA进行声明,当同时声明多个变量时,需要在DATA后面加冒号,如“DATA:”,每个变量可以分配默认值,使用"VALUE ‘默认值’"进行定义,基本语法如下:     DATA  (长度)  TYPE   VALUE  . 例如:定义一个C类型变量“TEST1”,长度为10,默认值为“Hello Sap” 。
2062 0
ABAP开发基础知识:3) 自定义数据类型(User-Defined Data Types)
在前面曾经介绍过,ABAP共有8种基本数据类型,但是这些数据类型属性太为单一,为了方便开发人员操作和理解,SAP还提供自定义数据类型,让用户能自行定义数据类型的名称及属性,通过关键字TYPES能够实现自定义功能,其语法格式与变量定义类似,通过TYPES声明的参数可以被其它常量、变量引用,不能直接赋值。
1435 0