cancel
Showing results for 
Search instead for 
Did you mean: 

F4 help in BSP

Former Member
0 Kudos

hi all

i successfully able to provide F4 help in BSP with selecting all data from DB table .

But my requirement is like there are 2 fields on initial screen

(PLANT, STOREAGE LOCATION) and user will enter PLANT first then based on PLANT , In F4 help list only STORAGE LOCATION corresponding to PLANT entered by user should come .

please help me , and guide me .

Regards

Sachin Sharma

Accepted Solutions (1)

Accepted Solutions (1)

former_member416498
Active Participant
0 Kudos

Dear Sachin

You can use javascript to get the data which the user has entered for the plant input feild

var Plant = Document.<form id given in htmlb tab>.<Id of inputfiled of Plant>;

This will give you the plant id which the user has given.

Ater capturing the plant data you can then trigger the server event based on it when F4 help is clicked on the Storage Location.

Hope this help you.

Former Member
0 Kudos

hi

i tried a lot but not able to get PLANT value from one page to F4 page .

can u help me .

former_member416498
Active Participant
0 Kudos

Please go through the link hope this will help you in passing the data from one page to other using javascript.

http://saptechnical.com/Tutorials/BSP/F4Help/Tutorial.htm

Vijay

Former Member
0 Kudos

hi vijaya

i have gone through tutorial on saptechnical.com ,

due to that i am able to put F4 helps on main page .

in this under scripting

1. function getGmcode() // calling page defined for F4 help

2. function transf(fval) // defined to put value in input field

3. function getData() // defined to send data from help

// page to main page.

after this value i selected is on main page .

now i press F4 for second input field then similar as above Function

1. Function getGmcode2() // calling page defined for F4 help

will triger , at this movement value for PLANT from MAIN PAGE shall also go to F4 help page that is not going.

if any body can please guide me on this , i have searched a lot on SDN ,blogs , help.sap.com, and google but not get successes.

Regards

Sachin

but still my query not solved , coz

former_member416498
Active Participant
0 Kudos

Hi Sachin

For passing the data from the parent to child window we need to do some work around where the user has to click a button.

2 ways we can do it.

1. Once the user has entered the plant using F4 help then a server event has to be triggerd by the user like clicking a button after inserting the value so that we can capture the value from the plant field to a Global field and then pass the parameter to the child page via the URL like this

document.open('storage.htm?gv_plant=<%= gv_plant%>');

Where the gv_plant is a global and "auto" attribute in the storage.htm bsp page.

2. Using a java script. Even here after the user enter the plant data, we need a some action from him. Please see this link for more information(for passing data from parent page to child window).

http://bytes.com/forum/thread800675.html

I know only these ways where user has to do some thing after using the first f4 help and filling the data. Hope these things help you in some way.

I have done some sample example and was working.

Please award point if use ful.

I just now got one more idea which is very simple then the above one sachin

1 Create a global class with static attribute gv_plant.

2 In the first help page(plant.htm) of plant set the static attribute of the class in the oninput processing event.

3. Then in the second help page of the storage help page get the static attribute of the page from the class. Then based on it, set the where condition in your second page(in oninitialization event) I guess this is very easy method which does not require and user interaction as said above.

Edited by: vijaya musti on Sep 17, 2008 3:03 PM

Former Member
0 Kudos

Hi vijaya

thanx for guiding me .

methods given by u help me a lot , and it is sure that we can use Javascripting for this purpose .

i tried as u told by defining global class with static variable but not able to implement it correctly.

so i tried it with EXPORT IMPORT method and done successfully.

Regards

Sachin Sharma

Answers (0)