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

Dynamic Fields Manipulation

Former Member
0 Likes
598

Hi,

I am working on module pool. I have requirement that i have 10 fields in the screen. Based on the Purchasing Organisation Field I need to manipulate some other fields in the same screen dynamically. If i click enter on the purchasing organsiation field some other fields to me manipulated . How to achieve this this. Please help me

4 REPLIES 4
Read only

Former Member
0 Likes
563

Hi ,

To achieve you can make use of LOOP AT SCREEN logic.

Please follow the blow loigc as an example for reference.

REPORT z_sel_par.

DATA : w_flag1 TYPE i,

w_flag2 TYPE i.

TABLES: mara,sscrfields.

PARAMETERS: r1 RADIOBUTTON GROUP grp1 DEFAULT 'X',

r2 RADIOBUTTON GROUP grp1.

PARAMETERS: p_matnr LIKE mara-matnr MODIF ID sc1.

SELECT-OPTIONS:s_matnr FOR mara-matnr MODIF ID sc2.

INITIALIZATION.

LOOP AT SCREEN.

IF screen-group1 = 'SC1' OR screen-group1 = 'SC2'.

screen-active = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

AT SELECTION-SCREEN OUTPUT.

IF R1 = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'SC1'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

CLEAR w_flag1.

ELSEIF R2 = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'SC2'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Read only

Former Member
0 Likes
563

Hi,

If you want to manipulate some fields based on purchasing organization then you need to do this using loop at screen. endloop.

Suppose if you Porg is 'A123' and if you want to view some fields and change their data then it can be acheived through loop at screen. Based on porg you can display the fields u need and change the values to others based on your requirement.

Thanks,

Raju

Read only

Former Member
0 Likes
563

Hi,

If you need any more assistance on this, write the clear requirement. If you use the above code snippet which I have posted & debug, you can easily complete your requirement....

Please set the question to resolved if you are satisfied with the answer.

Regards

Abhii.....

Read only

Former Member
0 Likes
563

Hi,

you have to write code in the PAI (Procees after input) for that particular screen (or) you can put some push button in the

menubar when you click on that particular push button write logic for manipution accordingly.

Thanks & Regards,

Sateesh.