2012 Oct 17 11:59 PM
Hi Friends,
I have created a ZTABLE which has one field group name(ZGPNAME - char12) and the table is filled with 6 entries. The field group name (ZGPNAME) should have same domain characteristics as USR21-BNAME.
I have an ALV report which has a one editable column. I need to validate against this column with USR21-BNAME and ZTABLE-ZGPNAME.
For example:
USR21 table has 50 entries out of which one USR21-BNAME is ABC. This ABC is involved in different groups like G1, G2, G3.
On the editable ALV I should be able to enter either G1 or ABC or G2 or G3. If I try to enter XYZ or some other value like G6 it should error me out saying that the User or group name is unavailable.
For that I have created a foreign key relationship in ZTABLE for the field ZGPNAME against USR21-BNAME. Till here it is fine. When I execute the ZTABLE and check number of entries it shows me 6 entries and when I dropdpwn the ZGPNAME field it has 50 entries since USR21 has 200 entries. I am confused here. How do I need to check against the USR21 table using table ZTABLE.
Do I need to create any check table? Am I going in a wrong direction? Please suggest me the correct way of doing...
Thanks,
Nani.
2012 Oct 18 5:02 AM
I'm not sure to understand you requirement, could you consider building a view help from both joined tables and creating a search help on this view, then attach it to the field via field catalog. If you actually want that any value of both tables is displayed, you could consider build a collective search help containing helps based on one or the other tables, or build programmatically a search help using both tables via a search help exit.
Regards,
Raymond
I'm not sure to understand you requirement, could you consider building a view help from both joined tables and creating a search help on this view, then attach it to the field via field catalog. If you actually want that any value of both tables is displayed, you could consider build a collective search help containing helps based on one or the other tables, or build programmatically a search help using both tables via a search help exit.
Regards,
Raymond
2012 Oct 18 5:02 AM
I'm not sure to understand you requirement, could you consider building a view help from both joined tables and creating a search help on this view, then attach it to the field via field catalog. If you actually want that any value of both tables is displayed, you could consider build a collective search help containing helps based on one or the other tables, or build programmatically a search help using both tables via a search help exit.
Regards,
Raymond
2012 Oct 22 1:16 PM
Hi nani,
do you have requirement of an input help for that field? if not then just wait till the user enter the value in that field and as soon as he enters a value there use select single statement for checking that value exists in the table use21. if sy-subrc is not zero then user doesnot exist.
thanks,
Aswath.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |