‎2009 May 25 6:46 AM
In my module pool screen I have Shipment Number(vttk-tknum) field along with Shipment Item(vttp-tpnum).
Now I have created custom search help for Shipment item (TPNUM). Now the search help for Item should function like: what Shipment no I have selected, it should give the corresponding Item number once I click the search button for item field.
To get that thing I am using FM 'F4IF_INT_TABLE_VALUE_REQUEST' and I am getting desire list.
Now the issue is:
1) If I select Shipment No and then hit enter and click on F4 of Item then I get the desire list.
2) But if I select Shipment No and click on F4 of Item immediately after that then no list appears.
Why this is so?
I have to get that list without hitting enter key.
Please help me on that and let me know if any more details is required on that.
Thanks
Nabanita
‎2009 May 25 7:25 AM
Hi, Nandi
For this you will have to create your Search help using SE11 and than assign this to your Structure for steps please have a look at my [Blog|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13637] [original link is broken] [original link is broken] [original link is broken]; and use it like i did in bellow code of Blog under Selection Screen
Hope will help you in this way.
Please Reply if any Issue.
Best Regards,
Faisal
‎2009 May 25 6:51 AM
hi,
You would have written the module pool program such that, after pressing enter only, it retrieves the data from the next item table.
plz provide with the code. so that it will be better to give you a solution.
thanks.
‎2009 May 25 6:52 AM
Hello,
You can get the F4 help of a field if you call the module under the event PROCESS ON VALUE-REQUEST.
If you have created a standard search help for your field, then declare that search help name in the screen field.
You can add it here.
Screen-> Element list-> References. Give the search help name again the I/0 button.
Hope this helps.
Thanks,
Sowmya
‎2009 May 25 6:54 AM
hi,
Please post the sample code..u r logic seems to be right.. there may be some problem with the coding part..
‎2009 May 25 7:16 AM
This is the sample code. Z_F4_SHIPMENT_IT is my custom search help for shipment item. PLease help
&----
*& Module Z_F4_SHIPMENT_IT INPUT
&----
text
----
MODULE z_f4_shipment_it INPUT.
DATA: return_tab TYPE TABLE OF ddshretval,
dynpro_values TYPE TABLE OF dynpread.
DATA: ship_item(4) TYPE c.
DATA: BEGIN OF wa_f4_prn OCCURS 0,
tknum TYPE vttk-tknum,
tpnum TYPE vttp-tpnum,
END OF wa_f4_prn.
CLEAR wa_f4_prn.
SELECT tknum tpnum FROM vttp INTO TABLE wa_f4_prn WHERE tknum EQ rqm01-tknum.
DELETE ADJACENT DUPLICATES FROM wa_f4_prn.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = dynpro_values.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'TPNUM' "'CNPNO_RSR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'SHIP_ITEM' "'ZCNPNORS'
value_org = 'S'
TABLES
value_tab = wa_f4_prn
return_tab = return_tab.
txtuser = return_tab-FIELDVAL .
IF sy-subrc <> 0.
ENDIF.
ENDMODULE. " Z_F4_SHIPMENT_IT INPUT
‎2009 May 25 7:24 AM
Hello,
in your select query this field "rqm01-tknum" is there which is your screen value. therefore when you enter a screen value and press enter and then when you press f4 it works.
Just change your select query remove the where condition and everything would be fine
hope this solves your problem.
Cheers,
Suvendu
‎2009 May 25 7:24 AM
Get rid of the entire coding, create a Search help in SE11.
Choose Elemenatry type.
Selection method : VTTP
Search help parameters
TKNUM -> Set Imp -> Set Exp -> Lpos = 1 -> Default value = 'TNR'
TPNUM -> Set Exp -> Lpos = 2
Activate it.
Now go to module pool. Attach this search help in attributes for fields Shipment number and Shipment item. Also check the fields for "Set/get parameter id"
Comment out the entire code in Process on value request.
Your search help will work.
‎2009 May 25 7:25 AM
Hi, Nandi
For this you will have to create your Search help using SE11 and than assign this to your Structure for steps please have a look at my [Blog|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13637] [original link is broken] [original link is broken] [original link is broken]; and use it like i did in bellow code of Blog under Selection Screen
Hope will help you in this way.
Please Reply if any Issue.
Best Regards,
Faisal