ABAP之SELECT-OPTIONS的用法

SELECT-OPTIONS - screen_options

Syntax

... [OBLIGATORY|NO-DISPLAY]      必输|不显示用于SUBMIT
    [VISIBLE LENGTH vlen]          指定显示长度
    [NO-EXTENSION]                         不显示多值选择按钮
    [NO INTERVALS]                            不显示字段的HIGH条件
    [MODIF ID modid] ... .              用于修改屏幕(系统表SCREEN

用了很久了,还不知道SELECT-OPTIONS的完整用法,惭愧……

今天仔细研读了一下SAP帮助,受益非浅呀!

以下为SAP帮助中对SELECT-OPTIONS的描述:

 

Extras: 附加条件 

1. ... OBLIGATORY

2. ... NO-DISPLAY

3. ... VISIBLE LENGTH vlen

4. ... NO-EXTENSION

5. ... NO INTERVALS

6. ... MODIF ID modid

Effect 作用

You can use these additions to declare the first input field as a required field, to suppress display on the selection screen, and to define the visible length. You can suppress display of the second input field and the pushbutton for multiple selection. All screen elements for the selection criterion can be assigned to a modification group.

你可以用这些附加项来声明首先输入的字段为必输字段,禁止显示在选择屏幕上,和定义显示长度。你可以禁止第二个输入字段和多先按钮显示在屏幕上。所有标准屏幕上的屏幕元素可以被分配给一个修改分组。

Note 注

In addition to the additions available, you can use the function module SELECT_OPTIONS_RESTRICT to restrict the number of selection options available and prohibit the value "E" for column sign in the selection table before the selection screen is sent.

Addition 1

... OBLIGATORY
 

Effect 作用

This addition defines the first input field for the selection criterion on the selection screen as a required field. If this field is blank, the user cannot exit display of the selection screen using the Execute function (F8), but only using the functions BackExit, or Cancel.

这个选项定义了在选择屏幕上的标准选择的第一个输入字段作为必输字段。如果这个字段为空,用户就不能用运行函数(F8)来退出选择屏幕,只能使用BackExit, 或者 Cancel。

Addition 2

... NO-DISPLAY
 

Effect 作用

If you specify this addition, no screen elements are created on the selection screen for the selection criterion. In an executable program, a selection criterion of this type is used exclusively as part of the interface defined by the selection screen. It can be supplied with a value by the calling program when it is called with SUBMIT.

If the addition NO-DISPLAY is specified, the low and high columns in the selection table can have any flat data types. These selection tables can only be supplied with data with a WITH addition to the SUBMIT statement.

如果你指定了这个条件,就没有标准选择的屏幕元素在选择屏幕上生成。在一个可执行程序中,这种类型的标准选择唯一地被用来作为被选择屏幕定义的接口的一部分。它可以被一个通过SUBMIT调用的程序提供一个数值。如果NO-DISPLAY被指定了,选择表中的LOW和HIGH列可以使用任何扁平的数据类型。这些选择表只能在SUBMIT语句的WITH条件中被提供数据。

Note 注

The length of the values transferred to columns low and high in the selection table, for which there is no input field, is not restricted to 45 characters, as is the case for selection criteria with input fields.

Addition 3

... VISIBLE LENGTH vlen
 

Effect 作用

This addition defines a visible length of vlen for the input fields, where vlen must be specified directly as a positive number. If vlen is shorter than the length of columns low and high in the selection table and shorter than the maximum visible length, the input field is displayed at a length of vlen and the entry can be scrolled. Otherwise, the addition is ignored.

这个条件定义输入字段的可见长度为vlen,vlen必须被直接指定成一个正数。如果veln比选择表中的列LOW和HIGH的长度短,并且小于最大的可见长度,那么这个输入字段就以vlen的长度被显示出来并且输入值可以滚动。否则,这个条件将被忽略。

Addition 4

... NO-EXTENSION
 

Effect 作用

If you specify this addition, the pushbutton for multiple selection is not created on the selection screen.

Note 注

The user cannot access the dialog box for multiple selection on the selection screen, which means they cannot edit selection tables containing several lines.

用户不能使用屏幕上的多选对话框,这意味着选择表不能包含多个单值行。

Addition 5

... NO INTERVALS
 

Effect 作用

If you specify this addition, the second input screen is not created on the selection screen.

如果你指定了这个条件,选择屏幕上的第二个输入框将不会生成。

Note 注

The user can only specify a single comparison in the first line in the selection table on the selection screen. The dialog box for multiple selections still allows interval selections.

Example 例子

Declaration of a selection criterion for which a single comparison is possible on the selection screen, but multiple selection isnot possible.

在选择屏幕上定义一个单一值可用的选择条件,并且多先框也被禁用。

DATA spfli_wa TYPE spfli.

SELECT-OPTIONS s_carrid FOR spfli_wa-carrid NO-EXTENSION
                                            NO INTERVALS.

Addition 6

... MODIF ID modid
 

Effect 作用

The addition MODIF ID assigns all the screen elements for the selection criterion to the modification group modid that is assigned to column group1 in the system table screen. This means they can be modified with a MODIFY SCREEN statement before the selection screen is displayed. You must specify the name of the modification group modid directly and it can only contain a maximum of three characters.

MODIF ID选项为选择条件的所有屏幕元素指定到MODID可修改组,这个修改组被分配给屏幕表SCREEN的group1列。这就意味着它们可以在选择屏幕显示之前被MODIFY SCREEN语句修改。你必须直接指定可修改组modid的名字并且它最多只能包含三个字符。

Note 注

The modification groups that are assigned to columns group2 and group3 in the system table screen are set by the system when a selection screen is generated and are described with the screen elements for a selection screen.

当一个选择屏幕生成时被指定给系统表SCREEN的列group2和group3的可修改组由系统设置并且被选择屏幕的屏幕元素所以识别。






 

<think>好的,我现在需要帮助用户了解或实现得物签名的相关技术,特别是签名算法的实现方式。首先,我需要收集已有的信息。根据用户提供的引用,特别是引用[4]和[5],得物的签名算法可能涉及逆向工程分析,使用了JavaScript中的XMLHttpRequest重写来拦截请求,并在请求中包含特定的sign参数。这可能意味着签名生成是在客户端进行的,通常在前端JavaScript代码中完成。 接下来,我应该考虑常见的签名生成方法。常见的Web应用签名算法通常使用HMAC、AES、RSA或自定义的哈希组合。引用[1]提到了RSA算法,但得物的签名可能更倾向于使用HMAC-SHA256之类的哈希算法,结合时间戳、随机数和请求参数进行签名,以防止篡改和重放攻击。 用户可能需要具体的步骤,比如逆向分析得物的JavaScript代码,找到生成sign的函数,提取关键参数和加密逻辑。引用[5]中的代码片段展示了如何重写XMLHttpRequest的open方法来拦截请求,这可能用于调试和定位签名生成的代码位置。 此外,引用[4]提到使用Python进行算法还原,所以可能需要在Python中复现JavaScript的签名生成逻辑。这通常涉及分析请求参数如何排序、拼接,以及如何与密钥结合进行哈希或加密。需要注意反爬机制,如obfuscation(代码混淆)或动态密钥,这可能需要使用AST(抽象语法树)解析或动态执行来还原算法。 用户可能还需要了解如何应对反调试措施,比如在Chrome开发者工具中使用断点调试,或者使用工具如Frida进行Hook。同时,引用[3]和[4]强调了法律和合规问题,确保研究仅用于学习目的,不用于非法用途。 最后,应该提醒用户注意法律风险,遵循网站的使用条款,避免侵犯知识产权或违反计算机安全法律。总结起来,实现得物签名需要逆向工程分析前端代码,提取关键算法,处理可能的混淆和反调试,最后用目标语言Python复现算法。</think>### 得物签名算法实现方式分析 得物签名算法主要用于接口请求的身份验证和防篡改保护,常见实现方式涉及以下技术点: #### 1. **签名参数组成** 签名通常由以下参数动态生成: - 请求参数(经排序、过滤空值后拼接) - 时间戳(如:$timestamp=1620000000$) - 随机数(如:$nonce=5a8s3d$) - 设备指纹(如:$device\_id=abcdef$) - 应用密钥(加密盐值,可能动态获取)[^4] 示例参数拼接逻辑: $$ \text{sign\_str} = \text{path} + \text{sorted\_params} + \text{timestamp} + \text{nonce} $$ #### 2. **加密算法类型** 根据逆向分析,得物可能采用以下组合: - **HMAC-SHA256**:对拼接字符串进行哈希运算 - **AES/Base64编码**:对结果二次处理 - **自定义位移/异或操作**:增加逆向难度[^5] #### 3. **JavaScript代码混淆** 关键函数可能被混淆,例如: ```javascript function _0x12ab5(a, b) { return a ^ b << 3; } // 需要AST解析还原控制流 ``` #### 4. **Python算法还原示例** ```python import hmac import hashlib def generate_sign(params, secret_key): # 1. 参数排序并拼接 sorted_str = '&'.join([f"{k}={v}" for k,v in sorted(params.items())]) # 2. HMAC-SHA256加密 sign = hmac.new(secret_key.encode(), sorted_str.encode(), hashlib.sha256).hexdigest() # 3. 自定义处理(示例) return sign.upper() + str(int(time.time())) ``` #### 5. **反爬对抗措施** - 动态密钥:通过接口定期更新加密盐值 - 环境检测:验证是否在真机环境运行 - 请求频率限制:异常高频触发验证码[^5]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值