2013 Apr 07 7:26 AM
Dear Abaper,
It this compulsory to have a Table fields define in Parameter/Select-option of Selection screen should be Primary key of respective tables??
and
If we used two different tables having common fields and if common field of Table1 is primary key and Table2 is not a primary key can we used that common field in Parameter/Select-option of selection screen?
Thanks & regards
Mahendra
2013 Apr 07 8:51 AM
Hi,
Its not necessary to have fields in parameters/select options to be primary key. It just takes the datatype irrespective of the primary key.
.
I have written a small example for you:
PARAMETERS: a(18) type c,
b type matnr, "data element
c type mara-matnr. "table-fieldname
These all are one and the same thing. a/b/c will have char 18 data type and length.
Regards
Purnand
2013 Apr 07 8:01 AM
Hi Mahendra,
You can try this out for yourself and find the answer to your queries.
No, it's not compulsory for the fields you use in select-options to be primary key fields in a table. And, as long as the data type of the common field in your two tables is same, you should be able to use the same field for querying on both the tables.
2013 Apr 07 8:48 AM
Parameter n select-option fields can be anything according to your requirement..
its not compulsory. n you can use common field of two tables in query to fetch the related data
2013 Apr 07 8:51 AM
Hi,
Its not necessary to have fields in parameters/select options to be primary key. It just takes the datatype irrespective of the primary key.
.
I have written a small example for you:
PARAMETERS: a(18) type c,
b type matnr, "data element
c type mara-matnr. "table-fieldname
These all are one and the same thing. a/b/c will have char 18 data type and length.
Regards
Purnand
2013 Apr 07 8:56 AM
Hi Gaurav,
u will come to better conclusions when u urself try the things and face issues and then try to resolve them ............
I suggest you to go thru online R/3 help and Debugger. I'm sure u'll be able to proceed .....
Thanks
Vivek
2013 Apr 07 10:12 AM
Hi Gaurav,
Please close the thread if you have got your answer.
Regards
Purnand
2013 Apr 07 10:33 AM
Thanks all for your Valuable answers.
]
Thanks & Regards
Gaurav Mahendra