2009 May 28 8:34 AM
Hi friends,
I want to pass the date to MCHB table to my internal table in module pool program.
PROCESS BEFORE OUTPUT.
select * from MCHB into table etab .
( error is : u201Cwhereu201D missing )
If I am using :
select * from MCHB into table etab where matnr = mchb-matnr.
(Error is : unprocessed component with POSIT)
plz guide me the correct select statement.
Thanking you.
Regards,
Subash
2009 May 28 8:51 AM
Hi,
I guess you will have to write the query in a module. You can write abap code in the PBO. Try to create a module in PBO and write your query there.
KR Jaideep,
2009 May 28 8:51 AM
Hi,
I guess you will have to write the query in a module. You can write abap code in the PBO. Try to create a module in PBO and write your query there.
KR Jaideep,
2009 May 28 8:52 AM
Hi,
I think the select statement itself is wrong. How you are getting the material field. Is it from the selection screen. THen it should be
select * from mchb into table ..... where matnr = s_matnr (or) p_matnr.
Regards
Ramesh Sundaram
2009 May 28 8:52 AM
want to pass the date to MCHB table to my internal table in module pool program ==> Which date ?
In where clause you have used , mchb-matnr , from where this is coming?
2009 May 28 8:56 AM
hi
your 2nd query will not work
select * from MCHB into table etab where matnr = mchb-matnr.
because here matnr and mchb-matnr are the same fields
you should use a variable or some thing else in place of mchb-matnr
and ya try to write this code in a module under PBO
2009 May 28 9:08 AM
select * from MCHB into table etab where matnr = mchb-matnr.
this statement is wrong because you where matnr = with same table mchb matnr that is incorect compare matnr of different table then MCHB
2009 May 28 9:08 AM
Hi,
Itu2019s very simple
1) Create any module or just uncomment that module like in the PBO
MODULE STATUS_0101.
2) Then Write ur code in that module
SELECT * FROM MCHB INTO TABLE ETAB.
Salil....
Edited by: salil chavan on May 28, 2009 10:09 AM
2009 May 28 9:08 AM
You are using module pool program. it seems to me that you would be having the material number on the module pool screen and for that material you need to fetch the date.
If user can keep on changing the material and you need corresponding date then move the logic under PAI. If your material cannot be changed by user then you can do it in PBO.
Process before output.
module get_date.
Module get_date.
select * from mchb into table etab where matnr = mchb-matnr. "Assuming MCHB-MATNR is the
"screen field OR
select * from mchb into table etab.
endmodule.
ETAB has same structure as that of MCHB.
Hope this will help.
2009 May 28 9:57 AM
hi,
try this
select matnr werks field3 field4 .....
into table itab
from MCHB
where matnr in l_matnr .
2009 May 28 10:19 AM
you cannot write a Query directly in Process Before Output(PBO).
You have to create a module and write the query in that.