ABAP高手请进来帮下忙,一个很简单的程序
我想把number的输入框内容,输入到SQL语句中WHERE条件进行查找,应该怎么写,下面是我的代码:REPORTzz_itab_ida.TABLES:mara.SELE...
我想把number的输入框内容,输入到SQL语句中WHERE条件进行查找,应该怎么写,下面是我的代码:
REPORT zz_itab_ida.
TABLES:mara.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME.
PARAMETERS: number LIKE mara-matnr.
SELECT-OPTIONS: time FOR mara-ernam.
SELECTION-SCREEN END OF BLOCK a1.
DATA:it_a LIKE TABLE OF mara WITH HEADER LINE.
DATA:it_b(20),it_c(20).
it_b = '物料号码'.
it_c = '时间'.
SELECT matnr ersda INTO CORRESPONDING FIELDS OF TABLE it_a
FROM mara.
WRITE: it_b,it_c.
LOOP AT it_a.
WRITE: / it_a-matnr,it_a-ersda.
ENDLOOP. 展开
REPORT zz_itab_ida.
TABLES:mara.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME.
PARAMETERS: number LIKE mara-matnr.
SELECT-OPTIONS: time FOR mara-ernam.
SELECTION-SCREEN END OF BLOCK a1.
DATA:it_a LIKE TABLE OF mara WITH HEADER LINE.
DATA:it_b(20),it_c(20).
it_b = '物料号码'.
it_c = '时间'.
SELECT matnr ersda INTO CORRESPONDING FIELDS OF TABLE it_a
FROM mara.
WRITE: it_b,it_c.
LOOP AT it_a.
WRITE: / it_a-matnr,it_a-ersda.
ENDLOOP. 展开
1个回答
展开全部
REPORT zz_itab_ida.
TABLES:mara.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME.
PARAMETERS: number LIKE mara-matnr.
SELECT-OPTIONS: time FOR mara-ernam.
SELECTION-SCREEN END OF BLOCK a1.
DATA:it_a LIKE TABLE OF mara WITH HEADER LINE.
DATA:it_b(20),it_c(20).
it_b = '物料号码'.
it_c = '时间'.
SELECT matnr ersda INTO CORRESPONDING FIELDS OF TABLE it_a
FROM mara where matnr = number and ernam in time.
WRITE: it_b,it_c.
LOOP AT it_a.
WRITE: / it_a-matnr,it_a-ersda.
ENDLOOP.
TABLES:mara.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME.
PARAMETERS: number LIKE mara-matnr.
SELECT-OPTIONS: time FOR mara-ernam.
SELECTION-SCREEN END OF BLOCK a1.
DATA:it_a LIKE TABLE OF mara WITH HEADER LINE.
DATA:it_b(20),it_c(20).
it_b = '物料号码'.
it_c = '时间'.
SELECT matnr ersda INTO CORRESPONDING FIELDS OF TABLE it_a
FROM mara where matnr = number and ernam in time.
WRITE: it_b,it_c.
LOOP AT it_a.
WRITE: / it_a-matnr,it_a-ersda.
ENDLOOP.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询