Skip to Content
avatar image
-3
Former Member

I don't know where is my problem?

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 15, 2016 at 05:45 PM

    Hello,

    I think you are missing some of the your code to paste here. But if this is all the code you have in your program then it will not fetch anything as you are not populating 'wt_ltap_conf' or 'wt_confirm_data' anywhere.

    'ltap_conf' is not defined anywhere, so ideally you should already get syntax error in your code.

    Also you did not mention if you are getting any errors? Or are you not able to select desired data?

    Please let us know.

    Thank you

    Amit

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2016 at 07:43 AM

    I find what was wrong in this code,

    AND a~lvorm IS null

    AND b~lvorm IS null.


    I try with this one but this is doesn't work on the environement where i work.

    The solution was:

    AND a~lvorm = space

    AND b~lvorm = space.


    Amit Dahiya: I didn't put all my code cause i think it was useless but the next time i'll do it.

    ModeratorJürgen L : Ok sorry.

    Add comment
    10|10000 characters needed characters exceeded