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

How to refresh a field in modulepool program

Former Member
0 Likes
474

Hi,

1)Tcode-ZVCRUGR (program - ZV_CRUCIAL_GOODS_RECEIPT)-->Press External Vendor Button , the Component Manufacturer field should have been refreshed like the Country of Origin and Date code.

I have gone through the program but I could not find any refreshing for country of origin and date code fields.

My requirement is I have to refresh manufactuer field like country of origin and date code fields.

2) Tcode-ZVCRUGR (program - ZV_CRUCIAL_GOODS_RECEIPT)-->press button Stocking Order, the component Manufacturer field should also been greyed out like the Country of Origin and Date code.

Please help me.It is very urgent.

Regards,

suresh

2 REPLIES 2
Read only

Former Member
0 Likes
412

If you want the field to be refreshed, write

CLEAR <field name>.

If you want to make it grey,

In the PBO Module, add the following code.

LOOP AT SCREEN.

IF screen-name = <fieldn ame>.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Assign points if helpful.

Read only

ak_upadhyay
Contributor
0 Likes
412

Hi,

In PBO, Do like this....

eg.


LOOP AT SCREEN.
if sy-tcode = 'PB30' AND ( SY-UCOMM = 'MOD' ).
IF SCREEN-NAME = 'P9001-GROUP'.
SCREEN-INPUT = '1'.   "Input Field
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'P9001-LEVEL'.
SCREEN-INPUT = '1'.
MODIFY SCREEN.
ENDIF.

if sy-tcode = 'PB30' AND ( SY-UCOMM = 'DIS' ) .
OR SY-UCOMM = ''
IF SCREEN-NAME = 'P9001-GROUP'.
SCREEN-INPUT = '0'.    "Output Field
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'P9001-LEVEL'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

Reward points if useful....

Regards

AK