01-28-2010 11:32 AM
Hello Folks,
I want to handle multiple material numbers as import parameters.. I have tried using table types but having problem while reading the data....
My requirement is user will input say 10 materials , now i need to get all the information for that particular material ..
I am unable to use for all entries as it is saying that it is not internal table... I have found table types which is having sigon , option, low and high fields but user doesn't want it... He wants to enter only materials... Currently am using this MD_T_MATNR(table type)
I am stuck up here..
Appreciate any kind of help.
Regards,
Raj
01-28-2010 12:02 PM
Hi,
it looks like you are on a good way, just something little is missing. Type MD_T_MATNR is suitable for your issue. I have tried it and probably your problem is that You have to use
SELECT ... FOR ALL ENTRIES IN it_matnr WHERE mara~matnr EQ it_matnr~table_line.
instead of
SELECT ... FOR ALL ENTRIES IN it_matnr WHERE mara~matnr EQ it_matnr~matnr.
In this example I suppose that a name of your variable of type MD_T_MATNR is it_matnr. Problem is that table line is not structure, but data element, therefore You have to use ~table_line instead of ~matnr.
Hope it helps.
Adrian
01-28-2010 11:44 AM
Define Range Table type using SE11 for material and use that range table type as importing parameter in FM.
Edited by: Pawan Kesari on Jan 28, 2010 5:14 PM
Just an update, there are already table types defined in dictionary which you can use
BVNE_MATERIAL_T
ISM_MATNR_TAB
MD_T_MATNR
MMPURUI_MATNR_TTY
RJPMEDIAISSUE
TABLE_MATNR
WSAO_TAB_MATERIAL
Edited by: Pawan Kesari on Jan 28, 2010 5:17 PM
01-28-2010 11:51 AM
hi
you can define in table parameter.
lt_table like zmat_str_material in table parameter.
just suggestion.
01-28-2010 12:02 PM
Hi,
it looks like you are on a good way, just something little is missing. Type MD_T_MATNR is suitable for your issue. I have tried it and probably your problem is that You have to use
SELECT ... FOR ALL ENTRIES IN it_matnr WHERE mara~matnr EQ it_matnr~table_line.
instead of
SELECT ... FOR ALL ENTRIES IN it_matnr WHERE mara~matnr EQ it_matnr~matnr.
In this example I suppose that a name of your variable of type MD_T_MATNR is it_matnr. Problem is that table line is not structure, but data element, therefore You have to use ~table_line instead of ~matnr.
Hope it helps.
Adrian
01-29-2010 8:25 AM
Thanks adrian. thanks others as well for looking into this
Regards,
Raj
01-28-2010 12:34 PM
Hi Kumar,
Can you post your code so that it is easy to suggest on what went wrong.
Regards,
Swarna Munukoti.
01-28-2010 1:09 PM
Get the materials in a table type.
Move it into a range and use 'in' statement in your query.