2020 Apr 11 6:32 PM
Hi All,
In this code, i have an error if someone can help :
lt_cat99 type standard table of zcategorie99
select distinct matkl as categorie wgbez as description
from t023t
into corresponding fields of table lt_cat99
where matkl in ('001', '00103', '002', '00207', '004')
and spras = 'F'.
select m~matnr as id_produit kt~maktx as description m~meins as unite b~stprs as prix m~matkl as categorie
up to 100 rows
from mara as m
inner join makt as kt on ( m~matnr = kt~matnr )
inner join mbew as b on ( b~matnr = m~matnr )
into corresponding fields of table lt_prd99
for all entries in lt_cat99
where llt_cat99-categorie = m~matkl
and b~bwkey = 1000.
It says : Field "LT_CAT99-CATEGORIE" unknown
and in the table "zcategorie99" I have a column name "CATEGORIE"
2020 Apr 11 7:05 PM
Hi,
In your where clause you have a typo (llt_cat99 instead of lt_cat99) and a wrong statement (m~matkl should be before lt_cat99).
This should solve your problem:
select m~matnr as id_produit kt~maktx as description m~meins as unite b~stprs as prix m~matkl as categorie
up to 100 rows
from mara as m
inner join makt as kt on ( m~matnr = kt~matnr )
inner join mbew as b on ( b~matnr = m~matnr )
into corresponding fields of table lt_prd99
for all entries in lt_cat99
where m~matkl = lt_cat99-categorie
and b~bwkey = 1000.
Best regards,
Geert-Jan Klaps
Hi All,
In this code, i have an error if someone can help :
lt_cat99 type standard table of zcategorie99
select distinct matkl as categorie wgbez as description
from t023t
into corresponding fields of table lt_cat99
where matkl in ('001', '00103', '002', '00207', '004')
and spras = 'F'.
select m~matnr as id_produit kt~maktx as description m~meins as unite b~stprs as prix m~matkl as categorie
up to 100 rows
from mara as m
inner join makt as kt on ( m~matnr = kt~matnr )
inner join mbew as b on ( b~matnr = m~matnr )
into corresponding fields of table lt_prd99
for all entries in lt_cat99
where llt_cat99-categorie = m~matkl
and b~bwkey = 1000.
It says : Field "LT_CAT99-CATEGORIE" unknown
and in the table "zcategorie99" I have a column name "CATEGORIE"
2020 Apr 11 7:01 PM
It would be good if you would share the structure definition for zcategorie99 too.
But looking at your code - which is by the way not complete, e.g. the missing data keyword at the beginning - one issue is that in the where clause of your second query you named the table LLT_CAT99 instead of LT_CAT99. Changing the name to LT_CAT99 in where clause too, should resolve the issue.
2020 Apr 11 7:05 PM
Hi,
In your where clause you have a typo (llt_cat99 instead of lt_cat99) and a wrong statement (m~matkl should be before lt_cat99).
This should solve your problem:
select m~matnr as id_produit kt~maktx as description m~meins as unite b~stprs as prix m~matkl as categorie
up to 100 rows
from mara as m
inner join makt as kt on ( m~matnr = kt~matnr )
inner join mbew as b on ( b~matnr = m~matnr )
into corresponding fields of table lt_prd99
for all entries in lt_cat99
where m~matkl = lt_cat99-categorie
and b~bwkey = 1000.
Best regards,
Geert-Jan Klaps
2020 Apr 11 7:11 PM
Typo llt_cat99 - that should be:
where m~matkl = lt_cat99-categorie
2020 Apr 11 7:14 PM
2020 Apr 11 7:14 PM
Thank you a lot.
But why "m~matkl = lt_cat99-categorie" and not "lt_cat99-categorie = m~matkl" ????
2020 Apr 11 10:57 PM
Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.
2020 Apr 11 10:59 PM
Because ... it's how it works.
Other examples:
And many more.
2020 Apr 12 12:02 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |