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

How to obtain list of values of second field based on the selected entry of first field.

0 Kudos
668

Hi,

I have a search help with two fields , each having a search help enabled.

First, I press F4 on first field and select a record from it. Then, I press F4 on the second field, I need to get only those data  based on the first field value.

I am using a Search help exit instead of the program, as I need to attach this search help on ME23N transaction, Internal order number data element AUFNR.

Once I select a value from the hitlist provided by the first field, is it possible to capture the selected record ?

I saw in the forum , that we can use RETURN step (similar to PRESEL, SELECT or DISP) of the Search help exit.

How can we trigger the RETURN event and capture the value of the first record, after we have selected from the hitlist ?

Anyone has done it before ?

I believe once I have the value of the selected record, I can pass it to the second field through Shared Memory .

Please provide me with your inputs.

Regards,

Shail.

8 REPLIES 8
Read only

nikolayevstigneev
Contributor
0 Kudos
589

Hi, Sylendra!

As a kind of supposition - maybe you can make use of FM 'DYNP_VALUES_READ' ? After choosing the value for the first field you can read the chosen value from the screen.

Read only

0 Kudos
589

Hi Nikolay,

I am using a search help exit and not a selection screen program.

So, I don't think we can find the Dynpro name and number for the popup in order to call the FM 'DYNP_VALUES_READ'.

Or is it possible to find the Dynpro name and number ?

Regards,

Shail.

Read only

0 Kudos
589

Maybe sy-dynnr and sy-repid hasn't changed by the moment you use them?

Read only

0 Kudos
589

I tried with SY-DYNNR and SY-CPROG, SY-REPID etc, but it is giving an error 'DYNPRO name not found'.

REgards,

Shail.

Read only

Former Member
0 Kudos
589

You can create your own screen, where in PBO and PAI logie write event handling for choosing the values of the 1st field and fills this for the 2nd field.

Read only

0 Kudos
589

Hi Sergey,

I am using a Search help exit FM , as I need to attach the Search help to existing search help ORDE in ME23N transaction.

So, I cannot create a custom screen .

Is there any possibility of capturing the first field value, after I select the record from the Hitlist ?

Regards,

Shail.

Read only

0 Kudos
589

1st field AUFNR is at 1101 at which the screen is the 2nd field and his name?

Read only

0 Kudos
589

Hi all,

I addressed this requirement by calling a selection screen (from the Search help exit FM). In that program, I designed the radiobuttons and listboxes for Hierarchical search and return the values to the RECORD_TAB of the search help exit.

The solution provided in the below link helped me.

http://scn.sap.com/thread/3380868

Regards,

Shail.