cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Input validation in module pool

Mahesh1
Explorer
0 Kudos
439

Hi all,

For a module pool program I have 'WERKS' and 'LGORT' as two inputs field.

I maintained WERKS, LGORT along with other fields in a custom table.

I used POV event on WERKS field.

Now when user select any of the WERKS from table the respective LGORT field from table should be selected and displayed on second input field 'LGORT'.

The field validation can be done using CHAIN ENDCHAIN. but my program contain different validation inside chain and end chain.

PROCESS AFTER INPUT.
  LOOP AT IT_ITEMS.
    CHAIN.
      FIELD IS_ITEMS-ITEM_NO.
      FIELD IS_ITEMS-MATNR.
      FIELD IS_ITEMS-MENGE.
      FIELD IS_ITEMS-MEINS.
      MODULE check_material.
      MODULE TC_ISSREQ_MODIFY ON CHAIN-REQUEST.
    ENDCHAIN.
    FIELD IS_ITEMS-XFELD
    MODULE TC_ISSREQ_MARK ON REQUEST.
  ENDLOOP.

How to validate WERKS(IS_REQ-WERKS) field and pass LGORT(IS_REQ-LGORT) to second field. please suggest..

CHAIN ENDCHAIN processing items fields from item table, but I need to validate header fields from header table, how to write code for this?

Accepted Solutions (0)

Answers (1)

Answers (1)

RaymondGiuseppi
Active Contributor
0 Kudos

I suppose items are in a table control?

  • (Check) Insure that the value of WERKS is already copied to abap program, with a FIELD statement executed before the loop , then you can use this value in the item logic
  • (F4) In the POV for LGORT, read the value of WERKS, with FM DYNP_VALUES_READ and pass this value to search help (e.g. setting SPA/GPA parameter) or one of the frequently used FMs (e.g. F4IF_FIELD_VALUE_REQUEST, F4IF_INT_TABLE_VALUE_REQUEST, etc.)