关与ABAP语法的READ和MODIFY之间的问题
将某个TABLE(A)的栏位(A1)加入到另外一个TBLE(B)如果无法用INNERJOIN需要用到会用到READ和MODIFY可是我不知道如何列出这两个语法程式...尤...
将某个TABLE(A)的栏位(A1)加入到另外一个TBLE(B)如果无法用INNER JOIN
需要用到会用到READ和MODIFY
可是我不知道如何列出这两个语法程式...尤其是 READ TABLE...WITH KEY
请问有大大可以帮忙吗> <
不好意思 我吧 TABLE 抓出来
DATA : BEGIN OF T_EKKO OCCURS 0 ,
LIFNR LIKE EKKO-LIFNR,
EKORG LIKE EKKO-EKORG,
AEDAT LIKE EKKO-AEDAT,""
EBELN LIKE EKKO-EBELN,
SHKZG LIKE EKBE-SHKZG, " h ''
EBELP LIKE EKPO-EBELP,
MAKTX LIKE MAKT-MAKTX,
END OF T_EKKO.
DATA : T_EKKO1 LIKE T_EKKO OCCURS 0 WITH HEADER LINE.
我是要为了抓取MAKT-MAKTK 的栏位用READ + MODIFY 去写...
不好意思 麻烦各位大大 展开
需要用到会用到READ和MODIFY
可是我不知道如何列出这两个语法程式...尤其是 READ TABLE...WITH KEY
请问有大大可以帮忙吗> <
不好意思 我吧 TABLE 抓出来
DATA : BEGIN OF T_EKKO OCCURS 0 ,
LIFNR LIKE EKKO-LIFNR,
EKORG LIKE EKKO-EKORG,
AEDAT LIKE EKKO-AEDAT,""
EBELN LIKE EKKO-EBELN,
SHKZG LIKE EKBE-SHKZG, " h ''
EBELP LIKE EKPO-EBELP,
MAKTX LIKE MAKT-MAKTX,
END OF T_EKKO.
DATA : T_EKKO1 LIKE T_EKKO OCCURS 0 WITH HEADER LINE.
我是要为了抓取MAKT-MAKTK 的栏位用READ + MODIFY 去写...
不好意思 麻烦各位大大 展开
2个回答
展开全部
DATA: BEGIN OF IT_ITAB OCCURS 0,
MATNR TYPE MATNR,
MAKTX TYPE MAKTX,
END OF IT_ITAB.
DATA: ITAB LIKE STANDARD TABLE OF IT_ITAB WITH HEADER LINE.
SELECT MATNR INTO corresponding fields of table IT_ITAB
FROM MARA WHERE MTART = 'FERT'.
SELECT MATNR MAKTX INTO TABLE ITAB FROM MAKTX WHERE SPRAS = '1'.
LOOP AT IT_ITAB.
READ TABLE ITAB WITH KEY MATNR = IT_ITAB-MATNR.
IF SY-SUBRC = 0.
IT_ITAB-MAKTX = ITAB-MAKTX.
MODIFY IT_ITAB TRANSPORTING MAKTX.
ENDIF
ENDLOOP.
READ 就是根据 with key后面的条件取出值 modify就是修改呗
写得还不够清楚吗?
你先从maktx里把物料描述取出来放在一个内表
然后跟上面我写的一样去read
然后modify T_EKKO
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询