‎2009 Jun 26 10:45 PM
Hi,
In a Custom Transaction (Module Pool Programming), I have MATNR, WERKS & BUKRS as screen input fields (Required Fields).
After the user populated the Material Field (This is using the collective search help attached to the screen filed), a F4 help to be implemented to bring plants that uses the just above populated Material. The F4 value request need to read plants that uses the Material and display in a table form (pop-up screen) for the user to choose the required plant. After choosing one plant from the pop-up screen by the user, that value needs to automatically to the WERKS screen field.
Once Plant is populated with right value, F4 help to be implemented to bring the company Codes that uses the above Plant. The F4 value request need to read Company Codes that uses the Plant and display in a table form (pop-up screen) for the user to choose the required Company Code. After choosing one Company Code from the pop-up screen by the user, that value needs to automatically to the BUKRS screen field.
I am trying to Build F4_Help_Modules in POV event. Can you please suggest me a suitable solution to accomplish this task?
Appreciate Your Help in Advance.
Thanks,
Kannan.
‎2009 Jul 02 12:32 PM
In flow logic.
PROCESS ON VALUE-REQUEST.
FIELD matnr MODULE f4_matnr.
FIELD field2 MODULE f4_field2.
module f4_matnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'matnr' Value from popup window
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'matnr' value to screen field name
VALUE = ' '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = f4 table value table.
endmodule.
If you want the value base on other field
declare this table and wa.
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values,
module f4_field2.
field_value-fieldname = 'matnr'.
APPEND field_value TO dynpro_values.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = dynpro_values
READ TABLE dynpro_values INDEX 1 INTO field_value.
temp = field_value-fieldvalue.
SELECT * FROM table INTO TABLE itab WHERE matnr = temp.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'field2' Value from popup window
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'field2' value to screen field name
VALUE = ' '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab value table.
endmodule.
Hope This will help you.
‎2009 Jun 27 4:22 AM
Hi Kannan, You have 3 fields MATNR, WERKS & BUKRS. <li>Use POV event in flow logic. <li>Use <b>F4IF_INT_TABLE_VALUE_REQUEST</b> function module to get F4 help for MATNR.Select all Materials into one internal table and pass that to above function module. <li>For WERKS field use <b>DYNP_VALUES_READ</b> function module to read MATNR from selected value using F4. again use <b>F4IF_INT_TABLE_VALUE_REQUEST</b> fm to display f4 for WERKS field. <li>For BUKRS field , use <b>DYNP_VALUES_READ</b> function module to read WERKS from selected value using F4. again use <b>F4IF_INT_TABLE_VALUE_REQUEST</b> fm to display f4 for BUKRS field. <li> Go to SE37, use WHERE USED LIST search to know how those function modules are used in SAP system. I hope that it helps you. Thanks Venkat.O
‎2009 Jul 02 12:32 PM
In flow logic.
PROCESS ON VALUE-REQUEST.
FIELD matnr MODULE f4_matnr.
FIELD field2 MODULE f4_field2.
module f4_matnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'matnr' Value from popup window
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'matnr' value to screen field name
VALUE = ' '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = f4 table value table.
endmodule.
If you want the value base on other field
declare this table and wa.
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values,
module f4_field2.
field_value-fieldname = 'matnr'.
APPEND field_value TO dynpro_values.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = dynpro_values
READ TABLE dynpro_values INDEX 1 INTO field_value.
temp = field_value-fieldvalue.
SELECT * FROM table INTO TABLE itab WHERE matnr = temp.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'field2' Value from popup window
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'field2' value to screen field name
VALUE = ' '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab value table.
endmodule.
Hope This will help you.
‎2009 Jul 07 8:54 AM
Hi Kannan SA ,
Have you got the answer?
If Not , what problem you got let me know to Help.
Pramoth CG
‎2009 Jul 08 9:28 PM