2007 Sep 29 7:55 PM
Hello,
I have a problem with reading a parameters content.
Following coding:
...
...
Log table
DATA: BEGIN OF it_log OCCURS 0,
matnr_short(10),
matnr TYPE matnr,
END OF it_log.
...
...
PARAMETERS s_matnr TYPE rmmg1-matnr.
...
...
Now I enter numbers like 1234000000, 1235000000, 1236000000.
Content of s_matnr will be 000000001234000000, etc.
Q: How can I read all entries of s_matnr into it_log-matnr ?
2.Q: How can I read 1234000000 to it_log-matnr_short ?
Thanks a lot!
2007 Sep 30 6:22 AM
Hi,
we can use only one value at a time if we are using Parameters
see the following example
tables:BKPF.
Parameters : P_Bukrs type BKPF-bukrs.
Select-options : S_Bukrs for BKPF-bukrs.
using select-options we are creating an internal table with the values needed from user..but using parameter only a single variable is fetched from user
in short
PARAMETERS s_matnr TYPE rmmg1-matnr.
Now I enter numbers like 1234000000, 1235000000, 1236000000.
Content of s_matnr will be 000000001234000000, etc. <u><i><b> NO</b></i></u>
For this declare as following
tables:matnr.
Select-options : s_matnr for rmmg1-matnr.
we can check the values entered in select options during a select statement like
select * from MARA into XXXX where
...................... and matnr in s-Matnr.
so the internal table will contain values from select which has matnr in the s_matnr.
Q: How can I read all entries of s_matnr into it_log-matnr ?
2.Q: How can I read 1234000000 to it_log-matnr_short ?
since the value is available in s_matnr itself pls can you clarify the purpose of again reading it to another internal table
Pls check,revert and reward if helpful
Regards
Byju
Hi Wolf,
Sorry, your question is not clear but still check my small example it may be useful.
Tables: MARA.
*Declaring the internal table
DATA: Begin of it_mara occurs 0,
matnr like mara-matnr,
mbrsh like mara-mbrsh,
end of it_mara.
*parameter is used for selecting single value only
parameter: s_matnr like mara-matnr.
*If you are using parameter the select stament should be
select matnr mbrsh from mara into table it_mara where matnr eq s_matnr.
*now print the values retrived in the internal table
write: / it_mara-matnr, it_mara-mbrsh.
*using select-options u can retirve range of values
select-options: s_matnr for mara-matnr.
*select statement if you use select-options
select matnr mbrsh from mara into table it_mara where matnr in s_matnr.
*printing the values from internal table
write: / it_mara-matnr, it_mara-mbrsh.
SEE THE DIFFERNCE IN THE SELECT STATEMENT IN THIS WAY WE READ THE CONTENTS OF INPUT FIELD
<b>reward with points if useful</b>
cheers,
sunil kumar.
2007 Sep 30 6:22 AM
Hi,
we can use only one value at a time if we are using Parameters
see the following example
tables:BKPF.
Parameters : P_Bukrs type BKPF-bukrs.
Select-options : S_Bukrs for BKPF-bukrs.
using select-options we are creating an internal table with the values needed from user..but using parameter only a single variable is fetched from user
in short
PARAMETERS s_matnr TYPE rmmg1-matnr.
Now I enter numbers like 1234000000, 1235000000, 1236000000.
Content of s_matnr will be 000000001234000000, etc. <u><i><b> NO</b></i></u>
For this declare as following
tables:matnr.
Select-options : s_matnr for rmmg1-matnr.
we can check the values entered in select options during a select statement like
select * from MARA into XXXX where
...................... and matnr in s-Matnr.
so the internal table will contain values from select which has matnr in the s_matnr.
Q: How can I read all entries of s_matnr into it_log-matnr ?
2.Q: How can I read 1234000000 to it_log-matnr_short ?
since the value is available in s_matnr itself pls can you clarify the purpose of again reading it to another internal table
Pls check,revert and reward if helpful
Regards
Byju
2007 Oct 05 7:48 AM
Hi Wolf,
Sorry, your question is not clear but still check my small example it may be useful.
Tables: MARA.
*Declaring the internal table
DATA: Begin of it_mara occurs 0,
matnr like mara-matnr,
mbrsh like mara-mbrsh,
end of it_mara.
*parameter is used for selecting single value only
parameter: s_matnr like mara-matnr.
*If you are using parameter the select stament should be
select matnr mbrsh from mara into table it_mara where matnr eq s_matnr.
*now print the values retrived in the internal table
write: / it_mara-matnr, it_mara-mbrsh.
*using select-options u can retirve range of values
select-options: s_matnr for mara-matnr.
*select statement if you use select-options
select matnr mbrsh from mara into table it_mara where matnr in s_matnr.
*printing the values from internal table
write: / it_mara-matnr, it_mara-mbrsh.
SEE THE DIFFERNCE IN THE SELECT STATEMENT IN THIS WAY WE READ THE CONTENTS OF INPUT FIELD
<b>reward with points if useful</b>
cheers,
sunil kumar.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |