Application Development 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: 

How to disabled a input field that is filled with values.

Former Member

Hi experts,

I am aware of this disabled input field thread in this forum but i tried those codes. i can disable my input field but all my existing values are gone.

Do you guys know why? and is there any way to solve this?

Thanks,

Lawrence

1 ACCEPTED SOLUTION

former_member1245113
Active Contributor

Hi Lawrance,

1) First check in PBO that you are getting the PARAMETER VALUES. else use GET PARAMETER ID key word.

2) Store them in Temp Variables

3) use LOOP AT SCREEN to disable the Screen fields.

4) again pass the temp Variables back to the Parameter Fields.

In normal Case this doesnt give problem, since you are passing the data from One External/Internal Session to another External/Internal session this problem arised.

So follow the above 4 Steps. if they dont work change their Order. First Ensure they are available in your Second program.

Once they are available in your second program You can play around.

Hope this resolves your your 2 Posts.

REPORT  ztest_export. " First PRogram
PARAMETERS werks TYPE werks_d MEMORY ID  wrk.
SET PARAMETER ID 'WRK' FIELD werks. " Export the Parameter here
*SUBMIT ztext_import." AND RETURN.
call TRANSACTION 'ZTEST_IMPORT'. " Create this Test Tcode 

REPORT ZTEXT_IMPORT " Second Program
PARAMETERS werks TYPE werks_d MEMORY ID wrk.
GET PARAMETER ID 'WRK' FIELD WERKS.
AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    GET PARAMETER ID 'WRK' FIELD WERKS. " Imort the Value here
    IF screen-name = 'WERKS'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

  START-OF-SELECTION. " This is a tested Program Just copy and execute this create Test Tcode

  IF NOT WERKS IS INITIAL.
    MESSAGE 'Plant is available now' TYPE 'I'.
    ENDIF.

Cheerz

Ram

2 REPLIES 2

former_member1245113
Active Contributor

Hi Lawrance,

1) First check in PBO that you are getting the PARAMETER VALUES. else use GET PARAMETER ID key word.

2) Store them in Temp Variables

3) use LOOP AT SCREEN to disable the Screen fields.

4) again pass the temp Variables back to the Parameter Fields.

In normal Case this doesnt give problem, since you are passing the data from One External/Internal Session to another External/Internal session this problem arised.

So follow the above 4 Steps. if they dont work change their Order. First Ensure they are available in your Second program.

Once they are available in your second program You can play around.

Hope this resolves your your 2 Posts.

REPORT  ztest_export. " First PRogram
PARAMETERS werks TYPE werks_d MEMORY ID  wrk.
SET PARAMETER ID 'WRK' FIELD werks. " Export the Parameter here
*SUBMIT ztext_import." AND RETURN.
call TRANSACTION 'ZTEST_IMPORT'. " Create this Test Tcode 

REPORT ZTEXT_IMPORT " Second Program
PARAMETERS werks TYPE werks_d MEMORY ID wrk.
GET PARAMETER ID 'WRK' FIELD WERKS.
AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    GET PARAMETER ID 'WRK' FIELD WERKS. " Imort the Value here
    IF screen-name = 'WERKS'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

  START-OF-SELECTION. " This is a tested Program Just copy and execute this create Test Tcode

  IF NOT WERKS IS INITIAL.
    MESSAGE 'Plant is available now' TYPE 'I'.
    ENDIF.

Cheerz

Ram

0 Kudos

Thanks Ram!! You made my day! Problem solved!