<?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 Step loops in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-loops/m-p/2766751#M644465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement like the screen is made of Step loops and initially user want the step loops  in the disable mode except one field and once he enter the value in that field corresponding row shold become enable, i have tried making with the loop at screen and mdify screen and if i set enable for one row its making the all rows as editable, so, please give  me some remedy to avoid this problem ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mahesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2007 10:31:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-05T10:31:16Z</dc:date>
    <item>
      <title>Step loops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-loops/m-p/2766751#M644465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement like the screen is made of Step loops and initially user want the step loops  in the disable mode except one field and once he enter the value in that field corresponding row shold become enable, i have tried making with the loop at screen and mdify screen and if i set enable for one row its making the all rows as editable, so, please give  me some remedy to avoid this problem ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mahesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 10:31:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/step-loops/m-p/2766751#M644465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T10:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Step loops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-loops/m-p/2766752#M644466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand the requirement correctly, once the user enters a value in column 1, the remaining columns on the line should open, yes?  If so, here's an example piece of code - main thing is to use the "modify screen" inside the pbo loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zlocal_jc_step_loop_lock.                                                                                
data:                                                                
  g_col1(4)           type c,                                        
  g_col2(10)          type c,                                        
  begin of gt_data occurs 10,                                        
    col1              like g_col1,                                   
    col2              like g_col2,                                   
  end of gt_data.                                                                                
start-of-selection.                                                  
  call screen '9999'.                                                
*screen has a step loop with 2 columns, fields "g_col1" and "g_col2" 
* PROCESS BEFORE OUTPUT.                                             
*   LOOP.                                                            
*     MODULE D9999_PBO_LOOP.                                         
*   ENDLOOP.                                                         
*   MODULE D9999_PBO.                                                
*                                                                    
*PROCESS AFTER INPUT.                                                
*   LOOP.                                                            
*     MODULE D9999_PAI_LOOP.                                         
*   ENDLOOP.                                                         
*   MODULE D9999_PAI.                                                

*" PBO modules                                  
module d9999_pbo_loop output.                   
  perform d9999_pbo_loop.                       
endmodule.                                      
module d9999_pbo output.                        
  perform d9999_pbo.                            
endmodule.                                      
*" PAI modules                                  
module d9999_pai_loop input.                    
  perform d9999_pai_loop.                       
endmodule.                                      
module d9999_pai input.                         
  perform d9999_pai.                            
endmodule.                                                                                
*" Forms                                        
form d9999_pbo_loop.                            
* if the first column is empty, lock the second:
  clear: gt_data.                               
  read table gt_data index sy-stepl.            
                                                
  g_col1 = gt_data-col1.                        
  g_col2 = gt_data-col2.                        
  if g_col1 is initial.                         
    loop at screen.                                           
      if screen-name = 'G_COL2'.  "lock the second column      
        screen-input = '0'.                                   
        modify screen.                                        
      endif.                                                  
    endloop.                                                  
  endif.                                                      
endform.                                                                                
form d9999_pbo.                                               
  break-point. "just for demo                                 
endform.                                                                                
form d9999_pai_loop.                                          
*" Executed once for each row in the screen                   
  read table gt_data index sy-stepl.                                                                                
if sy-subrc is initial.                                     
    gt_data-col1 = g_col1.                                    
    gt_data-col2 = g_col2.                                    
    modify gt_data index sy-stepl.                            
  else.                                                       
    gt_data-col1 = g_col1.                                    
    gt_data-col2 = g_col2.              
    insert gt_data index sy-stepl.     
  endif.                               
                                       
endform.                               
                                       
form d9999_pai.                        
  break-point. "just for demo          
endform.                               
                 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 04:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/step-loops/m-p/2766752#M644466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-06T04:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Step loops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/step-loops/m-p/2766753#M644467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me how you fixed this issue. I am facing same problem.&lt;/P&gt;&lt;P&gt;I want to input enable/disable a field in step loop based on conditions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 12:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/step-loops/m-p/2766753#M644467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-14T12:54:47Z</dc:date>
    </item>
  </channel>
</rss>

