‎2010 Nov 25 10:25 AM
Hi experts,
I am trying to pick the data from mard table..but values are not fetched to my internal table
as of now my code is
tables: mard.
SELECT-OPTIONS: s_werks FOR mard-werks.
TYPES : BEGIN OF TT_MARD,
MATNR TYPE MATNR ,
WERKS TYPE WERKS_D,
LGORT TYPE LGORT_D,
VMLAB TYPE VMLAB,
VMINS TYPE VMINS,
VMSPE TYPE VMSPE,
VMRET TYPE VMRET,
END OF TT_MARD .
DATA: GT_MARD type TABLE OF TT_MARD,
GS_MARD TYPE TT_MARD.
SELECT MATNR WERKS LGORT VMLAB VMINS VMSPE VMRET FROM MARd INTO TABLE GT_MARD
WHERE werks in s_werks.
Actullly for this selection criteria i have 11,000 records in MARD table...but internal table is blank.
can any body plz help me...
regards,
Praveena.
‎2010 Nov 25 10:34 AM
hai friend,
the select query works only when were u can mainatin werks data on the selection-screen only
because you can maintain werks as selection screen.
in select query werks as the condition so based on that condition only it fetches the data ok.
thanks,
anji.
‎2010 Nov 25 10:35 AM
Hi,
Check the values in your select option "s_werks". If you have passed any 'E' for sign .
Regards,
Srini.
‎2010 Nov 25 10:38 AM
hai ,
its workin fine .
tables: mard.
SELECT-OPTIONS: s_werks FOR mard-werks.
TYPES : BEGIN OF TT_MARD,
MATNR TYPE MATNR ,
WERKS TYPE WERKS_D,
LGORT TYPE LGORT_D,
VMLAB TYPE VMLAB,
VMINS TYPE VMINS,
VMSPE TYPE VMSPE,
VMRET TYPE VMRET,
END OF TT_MARD .
DATA: GT_MARD type TABLE OF TT_MARD,
GS_MARD TYPE TT_MARD.
SELECT MATNR WERKS LGORT VMLAB VMINS VMSPE VMRET FROM MARd INTO TABLE GT_MARD
WHERE werks in s_werks.
loop at gt_mard into gs_mard.
write : / gs_mard-matnr,
gs_mard-werks,
gs_mard-lgort.
endloop.
thanks,
anji.
‎2010 Nov 25 10:51 AM
Hi anji..
Thanks for giving reply
for me why it is not working?
plz help me out
‎2010 Nov 25 10:56 AM
hello ,
are you getting any error
i think you have no data in the database check it once .
thanks,
anji.
‎2010 Nov 25 11:00 AM
Hi..
in databased i have 11000 records..i am not getting any error..
‎2010 Nov 25 11:02 AM
Hi Praveena,
what is the subrc value you getting after select query.
Regards,
karthikeyan k s.
‎2010 Nov 25 11:09 AM
R U checking in the same client?
If Yes Check without giving values in selection screen.
R there any alphabets in company code? If yes check Lower case and Upper case of the selection screen.
Thanks and Regards,
Chandra
‎2010 Nov 25 11:36 AM
Hi karthick...
thanks for giving reply
i am getting sy-subrc value is 4.
‎2010 Nov 25 11:42 AM
Hi
Just 2 questions:
A) Which values have you inserted in S_WERKS?
B) Are you sure your program works in the same client where you're checking the hits of MARD?
Max
‎2010 Nov 26 3:42 AM
Hi max...
Thnaks for giving reply...
i am passing plant as INDW it is there in database..
for this selection criteria i have 11000 records in database...but i did'nt get values in internal table...
can you plz help e?
‎2010 Nov 26 4:04 AM
Hi Praveena ,
I pasted your code in my system and i get records in my table .
So as Max had mentioned in his reply , please check again if the client in which you are executing the report has records for that plant in the MARD table.
Regards
Arun
‎2010 Nov 26 4:28 AM
Hi all..
Now i ma getting values...actually In test client i have no data.now they have updated...Thanks to every body for your replies...
Thanks alot..