2016 Sep 06 12:02 PM
Hi,
There is a custom table and it's Table Maintenance Generator is done.while maintaining entries from SM30 need F4 help on Field2 and Field3 based on value selected of Field1.
Say it has 4 fields, the requirement is on select of some value on Field1 need to populate the F4 helpl values for field2 and Field3.
2016 Sep 06 12:22 PM
Hi,
Please refer to search helps attached to fields VKORG, VTWEG and SPART in table VBAK. Try implementing the same way.
When you display contents of table VBAK, first select VKORG value and then do a F4 on VTWEG, you will see the behavior as per your requirement.
Thanks,
Hi,
There is a custom table and it's Table Maintenance Generator is done.while maintaining entries from SM30 need F4 help on Field2 and Field3 based on value selected of Field1.
Say it has 4 fields, the requirement is on select of some value on Field1 need to populate the F4 helpl values for field2 and Field3.
2016 Sep 06 12:22 PM
Hi,
Please refer to search helps attached to fields VKORG, VTWEG and SPART in table VBAK. Try implementing the same way.
When you display contents of table VBAK, first select VKORG value and then do a F4 on VTWEG, you will see the behavior as per your requirement.
Thanks,
2016 Sep 06 2:58 PM
ok But my logic to get f4 help values is not straight forward as mentioned below.
|
So I tried creating event 'Process on Value Request on POSNR' in PAI of table maintenance generator program and called FM 'F4IF_INT_TABLE_VALUE_REQUEST' to fill F4 values and 'DYNP_VALUES_READ' to read contract no from screen. I am able to display hard coded value in F4 of POSNR but facing only one issue.
'DYNP_VALUES_READ' not giving contract no entered on screen and also we need to pass dynpro name to this FM dyname. syst-cprog holds some other name but not screen name of table maintenace generator. even if we hard code screen name it doesn't give contract no in result.
If I am able to get contract no using 'DYNP_VALUES_READ' or some other FM then I could solve problem.
Mean while I will check if I can implement logic as there in VKORG,VTWEG .
2016 Sep 06 7:44 PM
You must pass the current table control line to DYNP_VALUES_READ (field STEPL). SY-STEPL. For program and dynpro number, use SY-REPID (SY-CPROG has often the same value, but is technically incorrect in the context of getting the current dynpro program) and SY-DYNNR for the dynpro number.
Personally, I'd prefer to place the coding in a new custom search help, that would avoid the risk of losing the modifications at the next dialog maintenance generation (if not done carefully/Murphy's law), and from my point of view it simplifies the transfer of field values in and out.
2016 Sep 07 6:55 AM
SY-STEPL is always zero. I just changed in debugging to 1 and it worked. why sy-stepl is not getting updated, not sure?
Also, As you are suggesting to place the code in new custom search help. I already mention the logic, so based on it could you please provide some sample to achieve the requirement.I want to try this option also.
2016 Sep 07 7:22 AM
Sorry, it's not SY-STEPL (it works only inside the LOOP of the PBO/PAI). For POV, you have to call function module DYNP_GET_STEPL to retrieve the current line.
2016 Sep 07 7:29 AM
The search help must have input fields VBELN, POSNR, MATNR, and output field POSNR. You'll also have to select the fields you want to display in the F4 result list.
Define a search help exit function module. In this function module, add your code. You'll have to call F4UT_RESULTS_MAP to return the values for the F4 result list.
You have to assign the search help to the field POSNR of ZCUST, and link the input/output fields.
Search SAP library and forum for more info.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |