Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

module pool screen validation

Former Member
0 Likes
529

Hi all..

this is fiels

    MATNR,  

    MAKTX.      

    ZVFROM ,DATE.  

    ZVTO_DATE  .

   ZVCREATED_ON.           

   ZVCREATED_BY.       

   ZVCHANGED_ON.

   ZVCHANGED_BY .

using table control  in module pool

When user clicks the INSERT button, Fields MATNR,  ZVFROM_DATE and ZVTO_DATE will be input fields, it will accept the values. Other columns should be in display mode.


Regards.

     RAM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
500

You should use CHAIN ENDCHAIN.

Include those fields which you you want to insert between this Chain and endchain.

And keep the fields which are not to be inserted in non editable mode.

Make an internal table. Transfer those fields which are to be inserted to this table and use insert for the same.

2 REPLIES 2
Read only

Former Member
0 Likes
500

Hi Ramakanth Reddy,

Consider you have two fields field1 and field2 in the screen.

On F4 of field1 you have a pop up having two fields which u got using "F4IF_INT_TABLE_VALUE_REQUEST" function module.

you must have passed data using some internal table  into the  VALUE_TAB of the below code.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

  EXPORTING

    RETFIELD               =

  TABLES

    VALUE_TAB              = it_f4_values.

          .

IF SY-SUBRC <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Lets name the internal table as it_F4_values which has two fields.

it_F4_values internal table:

Field1          field2

AU               Australia

IN                India

**************************************************

so now write in ur code.

AT SELECTION SCREEN OUTPUT.

LOOP AT SCREEN.

   IF SCREEN-NAME EQ 'FIELD1'.

     lv_field1_value = FIELD1.

" if the internal table contains unique values go for read statement...   

     READ TABLE it_f4_values into wa_f4_values with table key field1 = lv_field1_value.

     FIELD2 = wa_f4_values-field2.

     MODIFY SCREEN.

     ENDIF.

  ENDLOOP.

So in the output if you select AU in field1 then australia will come in field2 automatically.

Try this and let us know if this solution is useful.

Read only

Former Member
0 Likes
501

You should use CHAIN ENDCHAIN.

Include those fields which you you want to insert between this Chain and endchain.

And keep the fields which are not to be inserted in non editable mode.

Make an internal table. Transfer those fields which are to be inserted to this table and use insert for the same.