<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LOOP AT SCREEN PROBLEM - make field as output only in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863846#M1137268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is your problem, the fact that the field is an input field which is disabled is causing the value NOT to be passed from your BDC.  The reason is that BDC is a screen sequence automation tool, and it will try to process the screens as if you are doing them yourself using the SAPgui.  Can you put a value in a field which has been disabled?  Nop.  This is your issue, so you must do what you want another way.  There are several ways to get around it.  Not sure that what others have suggested will work either, making it output only(for the reason stated above).  You might want to try to pass the value through memory id instead.  This way you can keep your field as disabled, and simply fill the value from the memory id before throwing the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in program 1, before calling the transactions.  Export the text to memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;export text2 = text2 to memory id 'ZTEXT2'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In program 2, before in the PBO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if text2 is intial.
import text2 = text2 from memory id 'ZTEXT2'.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rich Heilman on Dec 4, 2008 10:44 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Dec 2008 15:44:30 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2008-12-04T15:44:30Z</dc:date>
    <item>
      <title>LOOP AT SCREEN PROBLEM - make field as output only</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863842#M1137264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="12" __jive_macro_name="size"&gt;&lt;STRONG&gt;PROGRAM 1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
report ZPROGRAM01
       no standard page heading line-size 255.

DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.

start-of-selection.
perform bdc_dynpro      using 'ZDF052_TEST_09' '9000'.
perform bdc_field       using 'BDC_CURSOR'
                              'TEXT2'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'TEXT1'
                              'TEXT1'.
perform bdc_field       using 'TEXT2'
                              'TEXT2'.
perform bdc_dynpro      using 'ZDF052_TEST_09' '9000'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EBACK'.
CALL TRANSACTION 'ZMPPTEST' USING BDCDATA
                     MODE   'A'.

*----------------------------------------------------------------------*
*        Start new screen                                              *
*----------------------------------------------------------------------*
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
  CLEAR BDCDATA.
  BDCDATA-PROGRAM  = PROGRAM.
  BDCDATA-DYNPRO   = DYNPRO.
  BDCDATA-DYNBEGIN = 'X'.
  APPEND BDCDATA.
ENDFORM.

*----------------------------------------------------------------------*
*        Insert field                                                  *
*----------------------------------------------------------------------*
FORM BDC_FIELD USING FNAM FVAL.
    CLEAR BDCDATA.
    BDCDATA-FNAM = FNAM.
    BDCDATA-FVAL = FVAL.
    APPEND BDCDATA.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="12" __jive_macro_name="size"&gt;&lt;STRONG&gt;PROGRAM 2&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZPROGRAM_02
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
REPORT  ZPROGRAM_02.
DATA : TEXT1 TYPE CHAR10,
       TEXT2 TYPE CHAR10.
DATA  : GT_ITAB TYPE STANDARD TABLE OF DYNPREAD,
        GW_ITAB TYPE                   DYNPREAD.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_9000  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE STATUS_9000 OUTPUT.
  SET PF-STATUS 'ZMENU'.
  PERFORM F_SET_SCREEN.
ENDMODULE.                 " STATUS_9000  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_9000  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_9000 INPUT.
CASE SY-UCOMM.
  WHEN 'BACK'.
    LEAVE PROGRAM.
ENDCASE.
ENDMODULE.                 " USER_COMMAND_9000  INPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F_SET_SCREEN
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM F_SET_SCREEN .
LOOP AT SCREEN.
  IF SCREEN-NAME CS 'TEXT2'.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
  ENDIF.
ENDLOOP.
ENDFORM.                    " F_SET_SCREEN
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="12" __jive_macro_name="size"&gt;&lt;STRONG&gt;&lt;U&gt;Scenario&lt;/U&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Here i have one module pool program having two text boxes. Another program i am using CALL TRANSACTION to load values to that screen at the same time i have to disable the &lt;STRONG&gt;TEXT2&lt;/STRONG&gt; field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="12" __jive_macro_name="size"&gt;&lt;STRONG&gt;&lt;U&gt;Problem&lt;/U&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Now the problem is, i cant get the value on the screen but the field is disabled. &lt;/P&gt;&lt;P&gt;i need the value as well as the field should be non-editable. Help to fix it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Florian&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 12:05:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863842#M1137264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T12:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: LOOP AT SCREEN PROBLEM - make field as output only</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863843#M1137265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When your desiginig the screen with that field then in the field attributes screen make that field as output only...so it will make that field in non-editable mode and also get the value for it...then i think there is no necessary to write that loop at screen logic for that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rohan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 12:09:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863843#M1137265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T12:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: LOOP AT SCREEN PROBLEM - make field as output only</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863844#M1137266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Goto the module pool screen painter of your program . Select the 'ELEMENT LIST' tab and make a tick mark against the field which you want to make it as output field only. there wil be a tab OUTPUT ONLY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Uma.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 12:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863844#M1137266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T12:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: LOOP AT SCREEN PROBLEM - make field as output only</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863845#M1137267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Actually my problem is not making output only field... the problem is i cant get the value which i am sending thru CALL Transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Program 1&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'TEXT2'&lt;/P&gt;&lt;P&gt;                                        'TEXT2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using this line of code..but this value is not reflected there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Program 2&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;  IF SCREEN-NAME CS 'TEXT2'.&lt;/P&gt;&lt;P&gt;    SCREEN-INPUT = 0.&lt;/P&gt;&lt;P&gt;    MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i commented these lines i can able to get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;I need value as well as the field sholud be non editable one&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please run my code then only you can understand my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 15:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863845#M1137267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T15:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: LOOP AT SCREEN PROBLEM - make field as output only</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863846#M1137268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is your problem, the fact that the field is an input field which is disabled is causing the value NOT to be passed from your BDC.  The reason is that BDC is a screen sequence automation tool, and it will try to process the screens as if you are doing them yourself using the SAPgui.  Can you put a value in a field which has been disabled?  Nop.  This is your issue, so you must do what you want another way.  There are several ways to get around it.  Not sure that what others have suggested will work either, making it output only(for the reason stated above).  You might want to try to pass the value through memory id instead.  This way you can keep your field as disabled, and simply fill the value from the memory id before throwing the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in program 1, before calling the transactions.  Export the text to memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;export text2 = text2 to memory id 'ZTEXT2'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In program 2, before in the PBO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if text2 is intial.
import text2 = text2 from memory id 'ZTEXT2'.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rich Heilman on Dec 4, 2008 10:44 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 15:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863846#M1137268</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-12-04T15:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: LOOP AT SCREEN PROBLEM - make field as output only</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863847#M1137269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use the attribute &lt;STRONG&gt;active&lt;/STRONG&gt; to make it a display field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry... it doesnt work!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich, yours in an excellent  solution !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rajasekhar Dinavahi on Dec 4, 2008 9:15 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rajasekhar Dinavahi on Dec 4, 2008 9:18 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rajasekhar Dinavahi on Dec 4, 2008 9:20 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 15:45:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-screen-problem-make-field-as-output-only/m-p/4863847#M1137269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T15:45:48Z</dc:date>
    </item>
  </channel>
</rss>

