Skip to Content
-3
Former Member
Nov 15, 2016 at 02:19 PM

I don't know where is my problem?

131 Views Last edit Nov 15, 2016 at 09:15 PM 2 rev

Hello,

i got some problem with my function with several SELECT i try to find why this one doesn't work but unfortunately no

TYPES: BEGIN OF ty_lqua,

lgnum TYPE ltap-lgnum,

tanum TYPE ltap-tanum,

tapos TYPE ltap-tapos,

matnr TYPE ltap-matnr,

werks TYPE ltap-werks,

vltyp TYPE ltap-vltyp,

lgort TYPE ltap-lgort,

END OF ty_lqua.

DATA: wt_confirm_data TYPE TABLE OF ZDMOTS_TO_CONFIRM_DATA.

DATA: wt_ltap_conf TYPE TABLE OF ltap_conf. DATA: wt_ltap TYPE TABLE OF ty_lqua.

*The request in the table LTAP to complete the table wt_ltap

SELECT lgnum tanum tapos matnr werks vltyp lgort

FROM ltap

INTO TABLE wt_ltap

FOR ALL ENTRIES IN wt_ltap_conf

WHERE tanum = wt_ltap_conf-tanum AND tapos = wt_ltap_conf-tapos.

(The table wt_ltap is complet with the function in input table)

* The request to complete the output extra "confirm_data"

* with wt_confirm_data

SELECT a~matnr a~werks a~lgort a~labst

b~meins

c~lgnum c~lgpla c~gesme c~verme c~meins

FROM mard AS a

INNER JOIN lqua AS c

ON c~matnr = a~matnr

AND c~werks = a~werks

AND c~lgort = a~lgort

INNER JOIN mara AS b

ON b~matnr = c~matnr

INTO TABLE wt_confirm_data

FOR ALL ENTRIES IN wt_ltap

WHERE c~lgnum = wt_ltap-lgnum

AND a~matnr = wt_ltap-matnr

AND a~werks = wt_ltap-werks

AND c~lgort = wt_ltap-lgort

AND a~lvorm IS null

AND b~lvorm IS null.

confirm_data[] = wt_confirm_data[].

Confirme_data is my extra output table

I hope u'll or i'll find what is wrong