Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Editable ALV Grid Search Help Problem

Former Member
0 Likes
473

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.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
417

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

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.

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
418

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

Read only

Former Member
0 Likes
417

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.