<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Unleashing ABAP</title>
	<atom:link href="http://naveenvishal.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://naveenvishal.wordpress.com</link>
	<description>Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein</description>
	<lastBuildDate>Thu, 18 Nov 2010 07:18:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='naveenvishal.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/e6798223a377506a9c4162e203fdf04f?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Unleashing ABAP</title>
		<link>http://naveenvishal.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://naveenvishal.wordpress.com/osd.xml" title="Unleashing ABAP" />
	<atom:link rel='hub' href='http://naveenvishal.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Hard to say, but true&#8230;.</title>
		<link>http://naveenvishal.wordpress.com/2009/11/18/hard-to-say-but-true/</link>
		<comments>http://naveenvishal.wordpress.com/2009/11/18/hard-to-say-but-true/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 15:03:12 +0000</pubDate>
		<dc:creator>naveenvishal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=739</guid>
		<description><![CDATA[Hi all, Its been some time, I have not posted a blog out here. I was really missing the blog posting. Well, Its nice to say, that I am back. Back with three informative news for you. Two are good and one is bad . Let me tell them alternatively. Good 1: Got certified by Brainbench. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=739&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>Its been some time, I have not posted a blog out here. I was really missing the blog posting. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Well, Its nice to say, that I am back. Back with three informative news for you. Two are good <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and one is bad <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  . Let me tell them alternatively.</p>
<p>Good 1: Got certified by <a href="http://www.brainbench.com" target="_blank">Brainbench</a>. Now I am focusing on the one from SAP.</p>
<p>Bad 1:  I am going to stop the blog right here. No further posts on the blog.</p>
<p>And the last , Good 1 is :  I was busy in setup of my new blog cum website. I will continue blogging and updating on the site only.</p>
<p>You are <a href="http://abap-tutorials.com">welcome to the site</a> (<a href="http://www.abap-tutorials.com/">http://www.abap-tutorials.com/</a>), with your queries, suggestions, thoughts and opinions.</p>
<p>See you there&#8230;. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Naveen Vishal</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenvishal.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenvishal.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenvishal.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenvishal.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenvishal.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenvishal.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenvishal.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenvishal.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenvishal.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenvishal.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenvishal.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenvishal.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenvishal.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenvishal.wordpress.com/739/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=739&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenvishal.wordpress.com/2009/11/18/hard-to-say-but-true/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55302662ee2aeea96d20ccea7bf37e93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">naveenvishal</media:title>
		</media:content>
	</item>
		<item>
		<title>Tic-Tac-Toe Game in SAP</title>
		<link>http://naveenvishal.wordpress.com/2009/08/24/tic-tac-toe-game-in-sap/</link>
		<comments>http://naveenvishal.wordpress.com/2009/08/24/tic-tac-toe-game-in-sap/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 14:10:08 +0000</pubDate>
		<dc:creator>naveenvishal</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Tic-Tac-Toe]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=734</guid>
		<description><![CDATA[The main objective of this program is to develop a game in abap. The game is called as &#8220;Tic Tac Toe&#8221; which can be played against a computer. Simple procedures are used to write this program. Use of selection screen concepts are done in this game. Tic-Tac-Toe Game *&#38;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;* *&#38; Report ZTICTACTOE *&#38; *&#38;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;* REPORT ZTICTACTOE. TABLES SSCRFIELDS. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=734&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">The main objective of this program is to develop a <strong>game in abap</strong>. The <strong>game</strong> is called as &#8220;<strong>Tic Tac Toe</strong>&#8221; which can be played against a computer. Simple procedures are used to write this program. Use of selection screen concepts are done in this <strong>game</strong>.</p>
<p style="text-align:justify;">
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-735" title="Tic-Tac-Toe Game" src="http://naveenvishal.files.wordpress.com/2009/08/tictactoe1.jpg?w=414&#038;h=207" alt="Tic-Tac-Toe Game" width="414" height="207" /></dt>
<dd class="wp-caption-dd">Tic-Tac-Toe Game</dd>
</dl>
</div>
<p style="text-align:justify;">
<p style="text-align:justify;">
<div style="text-align:justify;"><span style="font-family:arial;"><span style="line-height:normal;"><span id="more-734"></span></span></span></div>
<div style="text-align:justify;"><span style="font-family:arial;"><span style="line-height:normal;">*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*</p>
<p>*&amp; Report  ZTICTACTOE</p>
<p>*&amp;</p>
<p>*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*</p>
<p>REPORT  ZTICTACTOE.</p>
<p>TABLES SSCRFIELDS.</p>
<p>DATA: FLAG, count(10) type c ,</p>
<p>f1,f2,f3,f4,f5,f6,f7,f8,f9,</p>
<p>p1(2) type c,</p>
<p>p2(2) type c,</p>
<p>player(2) type c,</p>
<p>ch type c.</p>
<p>SELECTION-SCREEN BEGIN OF BLOCK rad1</p>
<p>WITH FRAME TITLE text-002 no intervals.</p>
<p>PARAMETERS Message(10) TYPE c .</p>
<p>SELECTION-SCREEN SKIP 1.</p>
<p>SELECTION-SCREEN:</p>
<p>BEGIN OF LINE,</p>
<p>PUSHBUTTON 2(5) BUT1 USER-COMMAND CLI1 MODIF ID sc1,</p>
<p>PUSHBUTTON 7(5) BUT2 USER-COMMAND CLI2 MODIF ID sc2,</p>
<p>PUSHBUTTON 12(5) BUT3 USER-COMMAND CLI3 MODIF ID sc3,</p>
<p>END OF LINE,</p>
<p>BEGIN OF LINE,</p>
<p>PUSHBUTTON 2(5) BUT4 USER-COMMAND CLI4 MODIF ID sc4,</p>
<p>PUSHBUTTON 7(5) BUT5 USER-COMMAND CLI5 MODIF ID sc5,</p>
<p>PUSHBUTTON 12(5) BUT6 USER-COMMAND CLI6 MODIF ID sc6,</p>
<p>END OF LINE,</p>
<p>BEGIN OF LINE,</p>
<p>PUSHBUTTON 2(5) BUT7 USER-COMMAND CLI7 MODIF ID sc7,</p>
<p>PUSHBUTTON 7(5) BUT8 USER-COMMAND CLI8 MODIF ID sc8,</p>
<p>PUSHBUTTON 12(5) BUT9 USER-COMMAND CLI9 MODIF ID sc9,</p>
<p>END OF LINE.</p>
<p>SELECTION-SCREEN END OF BLOCK rad1.</p>
<p>* DISPLAYING THE SCORE FILED AS A LABEL</p>
<p>*disabling process******************************* *</p>
<p>form box_disable using ch.</p>
<p>LOOP AT SCREEN.</p>
<p>IF screen-group1 = ch.</p>
<p>screen-input = &#8217;0&#8242;.</p>
<p>MODIFY SCREEN.</p>
<p>ENDIF.</p>
<p>ENDLOOP.</p>
<p>endform. &#8220;box_disable</p>
<p>AT SELECTION-SCREEN OUTPUT.</p>
<p>if f1 = 1.</p>
<p>perform box_disable using &#8216;SC1&#8242;.</p>
<p>endif.</p>
<p>if f2 = 1.</p>
<p>perform box_disable using &#8216;SC2&#8242;.</p>
<p>endif.</p>
<p>if f3 = 1.</p>
<p>perform box_disable using &#8216;SC3&#8242;.</p>
<p>endif.</p>
<p>if f4 = 1.</p>
<p>perform box_disable using &#8216;SC4&#8242;.</p>
<p>endif.</p>
<p>if f5 = 1.</p>
<p>perform box_disable using &#8216;SC5&#8242;.</p>
<p>endif.</p>
<p>if f6 = 1.</p>
<p>perform box_disable using &#8216;SC6&#8242;.</p>
<p>endif.</p>
<p>if f7 = 1.</p>
<p>perform box_disable using &#8216;SC7&#8242;.</p>
<p>endif.</p>
<p>if f8 = 1.</p>
<p>perform box_disable using &#8216;SC8&#8242;.</p>
<p>endif.</p>
<p>if f9 = 1.</p>
<p>perform box_disable using &#8216;SC9&#8242;.</p>
<p>endif.</p>
<p>AT SELECTION-SCREEN .</p>
<p>CASE SSCRFIELDS.</p>
<p>WHEN &#8216;CLI1&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT1 = p1.</p>
<p>f1 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>WHEN &#8216;CLI2&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT2 = p1.</p>
<p>f2 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>WHEN &#8216;CLI3&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT3 = p1.</p>
<p>f3 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>WHEN &#8216;CLI4&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT4 = p1.</p>
<p>f4 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>WHEN &#8216;CLI5&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT5 = p1.</p>
<p>f5 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>WHEN &#8216;CLI6&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT6 = p1.</p>
<p>f6 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>WHEN &#8216;CLI7&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT7 = p1.</p>
<p>f7 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>WHEN &#8216;CLI8&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT8 = p1.</p>
<p>f8 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>WHEN &#8216;CLI9&#8242;.</p>
<p>count = count + 1.</p>
<p>perform player_turn.</p>
<p>BUT9 = p1.</p>
<p>f9 = &#8217;1&#8242;.</p>
<p>perform computer_move.</p>
<p>ENDCASE.</p>
<p>*this is for toggle operation p1 = X ; p2 = O ;</p>
<p>form player_turn.</p>
<p>player = count MOD 2.</p>
<p>**BUT2 = player.</p>
<p>if player = 1.</p>
<p>**BUT4 = &#8216;player1&#8242;.</p>
<p>p1 = &#8216;X&#8217;.</p>
<p>else.</p>
<p>**BUT4 = &#8216;player2&#8242;.</p>
<p>p1 = &#8216;O&#8217;.</p>
<p>endif.</p>
<p>endform. &#8220;player_turn</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form computer_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form computer_move.</p>
<p>if count = 9.</p>
<p>Message = &#8216;DRAW&#8217;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if count = 7.</p>
<p>perform fourth_move.</p>
<p>endif.</p>
<p>if count = 5.</p>
<p>perform third_move.</p>
<p>endif.</p>
<p>if count = 3.</p>
<p>perform second_move.</p>
<p>endif.</p>
<p>if count = 1.</p>
<p>perform first_move.</p>
<p>endif.</p>
<p>perform who_wins.</p>
<p>endform. &#8220;computer_move</p>
<p>**computer &#8211; O</p>
<p>form first_move.</p>
<p>if but5 &lt;&gt; &#8216;X&#8217;.</p>
<p>but5 = &#8216;O&#8217;.</p>
<p>else.</p>
<p>BUT9 = &#8216;O&#8217;.</p>
<p>endif.</p>
<p>count = count + 1.</p>
<p>endform. &#8220;first_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form second_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form second_move.</p>
<p>data str1 type c.</p>
<p>str1 = &#8216;X&#8217;.</p>
<p>perform check_possible using &#8216;X&#8217;.</p>
<p>if count = 3.</p>
<p>perform misc_move.</p>
<p>endif.</p>
<p>if count = 3.</p>
<p>perform empty_fill.</p>
<p>endif.</p>
<p>endform. &#8220;second_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form check_possible</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>** *&#8211;&gt;STR text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form check_possible using str type c.</p>
<p>**checking for rows</p>
<p>**1st row *&#8211;3rd col empty</p>
<p>if but1 = str and but2 = str and but3 = &#8216; &#8216;.</p>
<p>but3 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**2ndrow</p>
<p>if but4 = str and but5 = str and but6 = &#8216; &#8216;.</p>
<p>but6 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**3rd row</p>
<p>if but7 = str and but8 = str and but9 = &#8216; &#8216;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**1st row *&#8211;2nd col empty</p>
<p>if but1 = str and but2 = &#8216; &#8216; and but3 = str.</p>
<p>but2 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**2ndrow</p>
<p>if but4 = str and but5 = &#8216; &#8216; and but6 = str.</p>
<p>but5 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**3rd row</p>
<p>if but7 = str and but8 = &#8216; &#8216; and but9 = str.</p>
<p>but8 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**1st row *&#8211;1st col empty</p>
<p>if but1 = &#8216; &#8216; and but2 = str and but3 = str.</p>
<p>but1 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**2ndrow</p>
<p>if but4 = &#8216; &#8216; and but5 = str and but6 = str.</p>
<p>but4 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**3rd row</p>
<p>if but7 = &#8216; &#8216; and but8 = str and but9 = str.</p>
<p>but7 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**check for columns</p>
<p>**1st col *&#8211;3rd col empty</p>
<p>if but1 = str and but4 = str and but7 = &#8216; &#8216;.</p>
<p>but7 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**2nd col</p>
<p>if but2 = str and but5 = str and but8 = &#8216; &#8216;.</p>
<p>but8 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**3rd col</p>
<p>if but3 = str and but6 = str and but9 = &#8216; &#8216;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**1st col *&#8211;2nd col empty</p>
<p>if but1 = str and but4 = &#8216; &#8216; and but7 = str.</p>
<p>but4 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**2nd col</p>
<p>if but2 = str and but5 = &#8216; &#8216; and but8 = str.</p>
<p>but5 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**3rd col</p>
<p>if but3 = str and but6 = &#8216; &#8216; and but9 = str.</p>
<p>but6 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**1st col *&#8211;1st col empty</p>
<p>if but1 = &#8216; &#8216; and but4 = str and but7 = str.</p>
<p>but1 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**2nd col</p>
<p>if but2 = &#8216; &#8216; and but5 = str and but8 = str.</p>
<p>but2 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**3rd col</p>
<p>if but3 = &#8216; &#8216; and but6 = str and but9 = str.</p>
<p>but3 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**diagonal</p>
<p>**left-top</p>
<p>if but1 = &#8216; &#8216; and but5 = str and but9 = str.</p>
<p>but1 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but1 = str and but5 = str and but9 = &#8216; &#8216;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**right-top</p>
<p>if but3 = &#8216; &#8216; and but5 = str and but7 = str.</p>
<p>but3 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but3 = str and but5 = str and but7 = &#8216; &#8216;.</p>
<p>but7 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>endform. &#8220;check_possible</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form misc_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form misc_move.</p>
<p>if but6 = &#8216;X&#8217; and but8 = &#8216;X&#8217;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but1 = &#8216;X&#8217; and but9 = &#8216;X&#8217;.</p>
<p>but2 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but3 = &#8216;X&#8217; and but7 = &#8216;X&#8217;.</p>
<p>but2 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but1 = &#8216;X&#8217; and but5 = &#8216;X&#8217;.</p>
<p>but7 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but1 = &#8216;X&#8217; and but8 = &#8216;X&#8217;.</p>
<p>but7 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but3 = &#8216;X&#8217; and but8 = &#8216;X&#8217;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but6 = &#8216;X&#8217; and but7 = &#8216;X&#8217;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but4 = &#8216;X&#8217; and but6 = &#8216;X&#8217;.</p>
<p>but1 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-misc&#8211;last updated trial *-error</p>
<p>if but2 = &#8216;X&#8217; and but8 = &#8216;X&#8217;.</p>
<p>but1 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>exit .</p>
<p>endif.</p>
<p>if but2 = &#8216;X&#8217; and but7 = &#8216;X&#8217;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but2 = &#8216;X&#8217; and but9 = &#8216;X&#8217;.</p>
<p>but7 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but4 = &#8216;X&#8217; and but8 = &#8216;X&#8217;.</p>
<p>but1 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but1 = &#8216;X&#8217; and but6 = &#8216;X&#8217;.</p>
<p>but3 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but2 = &#8216;X&#8217; and but6 = &#8216;X&#8217;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but2 = &#8216;X&#8217; and but4 = &#8216;X&#8217;.</p>
<p>but3 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but4 = &#8216;X&#8217; and but9 = &#8216;X&#8217;.</p>
<p>but7 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>if but4 = &#8216;X&#8217; and but3 = &#8216;X&#8217;.</p>
<p>but1 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>endform. &#8220;misc_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form empty_fill</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form empty_fill.</p>
<p>if but1 &lt;&gt; &#8216;X&#8217; and but1 &lt;&gt; &#8216;O&#8217;.</p>
<p>but1 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>elseif but2 &lt;&gt; &#8216;X&#8217; and but2 &lt;&gt; &#8216;O&#8217;.</p>
<p>but2 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>elseif but3 &lt;&gt; &#8216;X&#8217; and but3 &lt;&gt; &#8216;O&#8217;.</p>
<p>but3 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>elseif but4 &lt;&gt; &#8216;X&#8217; and but4 &lt;&gt; &#8216;O&#8217;.</p>
<p>but4 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>elseif but5 &lt;&gt; &#8216;X&#8217; and but5 &lt;&gt; &#8216;O&#8217;.</p>
<p>but5 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>elseif but6 &lt;&gt; &#8216;X&#8217; and but6 &lt;&gt; &#8216;O&#8217;.</p>
<p>but6 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>elseif but7 &lt;&gt; &#8216;X&#8217; and but7 &lt;&gt; &#8216;O&#8217;.</p>
<p>but7 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>elseif but8 &lt;&gt; &#8216;X&#8217; and but8 &lt;&gt; &#8216;O&#8217;.</p>
<p>but8 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>elseif but9 &lt;&gt; &#8216;X&#8217; and but9 &lt;&gt; &#8216;O&#8217;.</p>
<p>but9 = &#8216;O&#8217;.</p>
<p>count = count + 1.</p>
<p>endif.</p>
<p>endform. &#8220;empty_fill</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form third_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form third_move.</p>
<p>perform check_possible using &#8216;O&#8217;.</p>
<p>if count = 5.</p>
<p>perform check_possible using &#8216;X&#8217;.</p>
<p>endif.</p>
<p>if count = 5.</p>
<p>perform empty_fill.</p>
<p>endif.</p>
<p>endform. &#8220;third_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form fourth_move</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form fourth_move.</p>
<p>perform check_possible using &#8216;O&#8217;.</p>
<p>if count = 7.</p>
<p>perform check_possible using &#8216;X&#8217;.</p>
<p>endif.</p>
<p>if count = 7.</p>
<p>perform empty_fill.</p>
<p>endif.</p>
<p>endform. &#8220;fourth_move</p>
<p>**check for win ,reset&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-*-</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form check_x_win</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form check_x_win.</p>
<p>** checking of the rows</p>
<p>data a type i.</p>
<p>if but1 = &#8216;X&#8217; AND but2 = &#8216;X&#8217; AND but3 = &#8216;X&#8217;.</p>
<p>Message = &#8216; X wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but4 = &#8216;X&#8217; AND but5 = &#8216;X&#8217; AND but6 = &#8216;X&#8217;.</p>
<p>Message = &#8216; X wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but7 = &#8216;X&#8217; AND but8 = &#8216;X&#8217; AND but9 = &#8216;X&#8217;.</p>
<p>Message = &#8216; X wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>** checking of the cols</p>
<p>if but1 = &#8216;X&#8217; AND but4 = &#8216;X&#8217; AND but7 = &#8216;X&#8217;.</p>
<p>Message = &#8216; X wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but2 = &#8216;X&#8217; AND but5 = &#8216;X&#8217; AND but8 = &#8216;X&#8217;.</p>
<p>Message = &#8216; X wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but3 = &#8216;X&#8217; AND but6 = &#8216;X&#8217; AND but9 = &#8216;X&#8217;.</p>
<p>Message = &#8216; X wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>** checking for diagonal</p>
<p>if but1 = &#8216;X&#8217; AND but5 = &#8216;X&#8217; AND but9 = &#8216;X&#8217;.</p>
<p>Message = &#8216; X wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but3 = &#8216;X&#8217; AND but5 = &#8216;X&#8217; AND but7 = &#8216;X&#8217;.</p>
<p>Message = &#8216; X wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>endform. &#8220;check_x_win</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form check_o_win</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form check_o_win.</p>
<p>** checking of the rows</p>
<p>if but1 = &#8216;O&#8217; AND but2 = &#8216;O&#8217; AND but3 = &#8216;O&#8217;.</p>
<p>Message = &#8216; O wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but4 = &#8216;O&#8217; AND but5 = &#8216;O&#8217; AND but6 = &#8216;O&#8217;.</p>
<p>Message = &#8216; O wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but7 = &#8216;O&#8217; AND but8 = &#8216;O&#8217; AND but9 = &#8216;O&#8217;.</p>
<p>Message = &#8216; O wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>** checking of the cols</p>
<p>if but1 = &#8216;O&#8217; AND but4 = &#8216;O&#8217; AND but7 = &#8216;O&#8217;.</p>
<p>Message = &#8216;O wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but2 = &#8216;O&#8217; AND but5 = &#8216;O&#8217; AND but8 = &#8216;O&#8217;.</p>
<p>Message = &#8216; O wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but3 = &#8216;O&#8217; AND but6 = &#8216;O&#8217; AND but9 = &#8216;O&#8217;.</p>
<p>Message = &#8216; O wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>** checking for diagonal</p>
<p>if but1 = &#8216;O&#8217; AND but5 = &#8216;O&#8217; AND but9 = &#8216;O&#8217;.</p>
<p>Message = &#8216; O wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>if but3 = &#8216;O&#8217; AND but5 = &#8216;O&#8217; AND but7 = &#8216;O&#8217;.</p>
<p>Message = &#8216; O wins &#8216;.</p>
<p>perform reset.</p>
<p>endif.</p>
<p>endform. &#8220;check_o_win</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form who_wins</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form who_wins.</p>
<p>perform check_x_win.</p>
<p>perform check_o_win.</p>
<p>endform. &#8220;who_wins</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>**&amp; Form reset</p>
<p>**&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;**</p>
<p>** text</p>
<p>**&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-**</p>
<p>form reset.</p>
<p>BUT1 = &#8216; &#8216;.</p>
<p>BUT2 = &#8216; &#8216;.</p>
<p>BUT3 = &#8216; &#8216;.</p>
<p>BUT4 = &#8216; &#8216;.</p>
<p>BUT5 = &#8216; &#8216;.</p>
<p>BUT6 = &#8216; &#8216;.</p>
<p>BUT7 = &#8216; &#8216;.</p>
<p>BUT8 = &#8216; &#8216;.</p>
<p>BUT9 = &#8216; &#8216;.</p>
<p>f1 = &#8216; &#8216;.</p>
<p>f2 =&#8217; &#8216;.</p>
<p>f3 = &#8216; &#8216;.</p>
<p>f4 =&#8217; &#8216;.</p>
<p>f5 = &#8216; &#8216;.</p>
<p>f6 =&#8217; &#8216;.</p>
<p>f7 = &#8216; &#8216;.</p>
<p>f8 =&#8217; &#8216;.</p>
<p>f9 = &#8216; &#8216;.</p>
<p>** Message = &#8216; &#8216;.</p>
<p>** Score = &#8216; &#8216;.</p>
<p>count = 0.</p>
<p>endform. &#8220;reset</p>
<p>initialization.</p>
<p>count = 0.</p>
<p>BUT1 = p1.</p>
<p>BUT2 = p1.</p>
<p>BUT3 = p1.</p>
<p>BUT4 = p1.</p>
<p>BUT5 = p1.</p>
<p>BUT6 = p1.</p>
<p>BUT7 = p1.</p>
<p>BUT8 = p1.</p>
<p>BUT9 = p1.</p>
<p></span></span></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenvishal.wordpress.com/734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenvishal.wordpress.com/734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenvishal.wordpress.com/734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenvishal.wordpress.com/734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenvishal.wordpress.com/734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenvishal.wordpress.com/734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenvishal.wordpress.com/734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenvishal.wordpress.com/734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenvishal.wordpress.com/734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenvishal.wordpress.com/734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenvishal.wordpress.com/734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenvishal.wordpress.com/734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenvishal.wordpress.com/734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenvishal.wordpress.com/734/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=734&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenvishal.wordpress.com/2009/08/24/tic-tac-toe-game-in-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55302662ee2aeea96d20ccea7bf37e93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">naveenvishal</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/tictactoe1.jpg" medium="image">
			<media:title type="html">Tic-Tac-Toe Game</media:title>
		</media:content>
	</item>
		<item>
		<title>Convert Spool Request to PDF in SAP</title>
		<link>http://naveenvishal.wordpress.com/2009/08/22/convert-spool-request-to-pdf-in-sap/</link>
		<comments>http://naveenvishal.wordpress.com/2009/08/22/convert-spool-request-to-pdf-in-sap/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 06:08:43 +0000</pubDate>
		<dc:creator>naveenvishal</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Report]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Upload Download]]></category>
		<category><![CDATA[Utility]]></category>
		<category><![CDATA[OTF]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Spool Request]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=724</guid>
		<description><![CDATA[The following program converts the spool requests (can be seen using SP01) to PDF format on your PC. At Program execution, specify the path where to download the PDF file.   Spool Request-To-PDF   Program Code REPORT ZPDF line-size 80. * * Read spool job contents (OTF or ABAP list) and convert * to PDF, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=724&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">The following program converts the spool requests (can be seen using SP01) to PDF format on your PC.</p>
<p style="text-align:justify;">At Program execution, specify the path where to download the PDF file.</p>
<p style="text-align:justify;"> </p>
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-725" title="Spool Request-To-PDF" src="http://naveenvishal.files.wordpress.com/2009/08/spool_to_pdf.jpg?w=450&#038;h=326" alt="Spool Request-To-PDF" width="450" height="326" /></dt>
<dd class="wp-caption-dd">Spool Request-To-PDF</dd>
</dl>
</div>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><span id="more-724"></span></p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Program Code</span></strong></p>
<p style="text-align:justify;"><strong><span style="color:#339966;"><br />
</span></strong></p>
<p style="text-align:justify;">REPORT ZPDF line-size 80.</p>
<p style="text-align:justify;"><span style="color:#3366ff;">*</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">* Read spool job contents (OTF or ABAP list) and convert</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">* to PDF, download PDF</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">* B20K8A0IKH replace WS_DOWNLOAD with GUI_DOWNLOAD</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*</span></p>
<p style="text-align:justify;">PARAMETERS:</p>
<p style="text-align:justify;">SPOOLNO LIKE TSP01-RQIDENT,</p>
<p style="text-align:justify;">DOWNLOAD AS CHECKBOX DEFAULT &#8216;X&#8217;,</p>
<p style="text-align:justify;">P_FILE LIKE RLGRAP-FILENAME DEFAULT &#8216;C:\temp\file.pdf&#8217;. </p>
<p style="text-align:justify;">DATA otf like itcoo occurs 100 with header line.</p>
<p style="text-align:justify;">DATA CANCEL.</p>
<p style="text-align:justify;">DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.</p>
<p style="text-align:justify;">DATA DOCTAB LIKE DOCS OCCURS 1 WITH HEADER LINE.</p>
<p style="text-align:justify;">DATA: NUMBYTES TYPE I,</p>
<p style="text-align:justify;">ARC_IDX LIKE TOA_DARA,</p>
<p style="text-align:justify;">pdfspoolid like tsp01-rqident,</p>
<p style="text-align:justify;">jobname like tbtcjob-jobname,</p>
<p style="text-align:justify;">jobcount like tbtcjob-jobcount,</p>
<p style="text-align:justify;">is_otf.</p>
<p style="text-align:justify;">data: client like tst01-dclient,</p>
<p style="text-align:justify;">name like tst01-dname,</p>
<p style="text-align:justify;">objtype like rststype-type,</p>
<p style="text-align:justify;">type like rststype-type.</p>
<p style="text-align:justify;">tables: tsp01.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">select single * from tsp01 where rqident = spoolno.</p>
<p style="text-align:justify;">if sy-subrc &lt;&gt; 0.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Spoolauftrag existiert nicht&#8217;(003).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">endif.</p>
<p style="text-align:justify;">client = tsp01-rqclient.</p>
<p style="text-align:justify;">name   = tsp01-rqo1name.</p>
<p style="text-align:justify;">CALL FUNCTION &#8216;RSTS_GET_ATTRIBUTES&#8217;</p>
<p style="text-align:justify;">EXPORTING</p>
<p style="text-align:justify;">AUTHORITY     = &#8216;SP01&#8242;</p>
<p style="text-align:justify;">CLIENT        = client</p>
<p style="text-align:justify;">NAME          = name</p>
<p style="text-align:justify;">PART          = 1</p>
<p style="text-align:justify;">IMPORTING</p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           CHARCO        =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           CREATER       =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           CREDATE       =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           DELDATE       =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           MAX_CREDATE   =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           MAX_DELDATE   =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           NON_UNIQ      =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           NOOF_PARTS    =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           RECTYP        =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           SIZE          =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*           STOTYP        =</span></p>
<p style="text-align:justify;">TYPE          = type</p>
<p style="text-align:justify;">OBJTYPE       = objtype</p>
<p style="text-align:justify;">EXCEPTIONS</p>
<p style="text-align:justify;">FB_ERROR      = 1</p>
<p style="text-align:justify;">FB_RSTS_OTHER = 2</p>
<p style="text-align:justify;">NO_OBJECT     = 3</p>
<p style="text-align:justify;">NO_PERMISSION = 4.</p>
<p style="text-align:justify;">if objtype(3) = &#8216;OTF&#8217;.</p>
<p style="text-align:justify;">is_otf = &#8216;X&#8217;.</p>
<p style="text-align:justify;">else.</p>
<p style="text-align:justify;">is_otf = space.</p>
<p style="text-align:justify;">endif.</p>
<p style="text-align:justify;">if is_otf = &#8216;X&#8217;.</p>
<p style="text-align:justify;">CALL FUNCTION &#8216;CONVERT_OTFSPOOLJOB_2_PDF&#8217;</p>
<p style="text-align:justify;">EXPORTING</p>
<p style="text-align:justify;">SRC_SPOOLID                    = spoolno</p>
<p style="text-align:justify;">NO_DIALOG                      = &#8216; &#8216;</p>
<p style="text-align:justify;"><span style="color:#3366ff;">*       DST_DEVICE                     =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*       PDF_DESTINATION                =</span></p>
<p style="text-align:justify;">IMPORTING</p>
<p style="text-align:justify;">PDF_BYTECOUNT                  = numbytes</p>
<p style="text-align:justify;">PDF_SPOOLID                    = pdfspoolid</p>
<p style="text-align:justify;"><span style="color:#3366ff;">*       OTF_PAGECOUNT                  =</span></p>
<p style="text-align:justify;">BTC_JOBNAME                    = jobname</p>
<p style="text-align:justify;">BTC_JOBCOUNT                   = jobcount</p>
<p style="text-align:justify;">TABLES</p>
<p style="text-align:justify;">PDF                            = pdf</p>
<p style="text-align:justify;">EXCEPTIONS</p>
<p style="text-align:justify;">ERR_NO_OTF_SPOOLJOB            = 1</p>
<p style="text-align:justify;">ERR_NO_SPOOLJOB                = 2</p>
<p style="text-align:justify;">ERR_NO_PERMISSION              = 3</p>
<p style="text-align:justify;">ERR_CONV_NOT_POSSIBLE          = 4</p>
<p style="text-align:justify;">ERR_BAD_DSTDEVICE              = 5</p>
<p style="text-align:justify;">USER_CANCELLED                 = 6</p>
<p style="text-align:justify;">ERR_SPOOLERROR                 = 7</p>
<p style="text-align:justify;">ERR_TEMSEERROR                 = 8</p>
<p style="text-align:justify;">ERR_BTCJOB_OPEN_FAILED         = 9</p>
<p style="text-align:justify;">ERR_BTCJOB_SUBMIT_FAILED       = 10</p>
<p style="text-align:justify;">ERR_BTCJOB_CLOSE_FAILED        = 11.</p>
<p style="text-align:justify;">case sy-subrc.</p>
<p style="text-align:justify;">when 0.</p>
<p style="text-align:justify;">perform bd_textbox_msg(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Funktion CONVERT_OTFSPOOLJOB_2_PDF erfolgreich&#8217;(001).</p>
<p style="text-align:justify;">when 1.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Kein OTF- und kein ABAP-Spoolauftrag&#8217;(002).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">when 2.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Spoolauftrag existiert nicht&#8217;(003).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">when 3.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Keine Berechtigung zum Lesen Spoolauftrag&#8217;(004).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">when others.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Fehler bei Funktion CONVERT_OTFSPOOLJOB_2_PDF&#8217;(005).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">endcase.</p>
<p style="text-align:justify;">else.</p>
<p style="text-align:justify;">CALL FUNCTION &#8216;CONVERT_ABAPSPOOLJOB_2_PDF&#8217;</p>
<p style="text-align:justify;">EXPORTING</p>
<p style="text-align:justify;">SRC_SPOOLID                    = spoolno</p>
<p style="text-align:justify;">NO_DIALOG                      = &#8216; &#8216;</p>
<p style="text-align:justify;"><span style="color:#3366ff;">*       DST_DEVICE                     =</span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*       PDF_DESTINATION                =</span></p>
<p style="text-align:justify;">IMPORTING</p>
<p style="text-align:justify;">PDF_BYTECOUNT                  = numbytes</p>
<p style="text-align:justify;">PDF_SPOOLID                    = pdfspoolid</p>
<p style="text-align:justify;"><span style="color:#3366ff;">*       LIST_PAGECOUNT                 =</span></p>
<p style="text-align:justify;">BTC_JOBNAME                    = jobname</p>
<p style="text-align:justify;">BTC_JOBCOUNT                   = jobcount</p>
<p style="text-align:justify;">TABLES</p>
<p style="text-align:justify;">PDF                            = pdf</p>
<p style="text-align:justify;">EXCEPTIONS</p>
<p style="text-align:justify;">ERR_NO_ABAP_SPOOLJOB           = 1</p>
<p style="text-align:justify;">ERR_NO_SPOOLJOB                = 2</p>
<p style="text-align:justify;">ERR_NO_PERMISSION              = 3</p>
<p style="text-align:justify;">ERR_CONV_NOT_POSSIBLE          = 4</p>
<p style="text-align:justify;">ERR_BAD_DESTDEVICE             = 5</p>
<p style="text-align:justify;">USER_CANCELLED                 = 6</p>
<p style="text-align:justify;">ERR_SPOOLERROR                 = 7</p>
<p style="text-align:justify;">ERR_TEMSEERROR                 = 8</p>
<p style="text-align:justify;">ERR_BTCJOB_OPEN_FAILED         = 9</p>
<p style="text-align:justify;">ERR_BTCJOB_SUBMIT_FAILED       = 10</p>
<p style="text-align:justify;">ERR_BTCJOB_CLOSE_FAILED        = 11.</p>
<p style="text-align:justify;">case sy-subrc.</p>
<p style="text-align:justify;">when 0.</p>
<p style="text-align:justify;">perform bd_textbox_msg(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Funktion CONVERT_ABAPSPOOLJOB_2_PDF erfolgreich&#8217;(006).</p>
<p style="text-align:justify;">when 1.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Kein OTF- und kein ABAP-Spoolauftrag&#8217;(002).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">when 2.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Spoolauftrag existiert nicht&#8217;(003).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">when 3.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Keine Berechtigung zum Lesen Spoolauftrag&#8217;(004).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">when others.</p>
<p style="text-align:justify;">perform bd_textbox_err(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Fehler bei Funktion CONVERT_ABAPSPOOLJOB_2_PDF&#8217;(007).</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">endcase.</p>
<p style="text-align:justify;">endif.</p>
<p style="text-align:justify;"><span style="color:#3366ff;">*************** download PDF file ***********</span></p>
<p style="text-align:justify;">check download = &#8216;X&#8217;.</p>
<p style="text-align:justify;">if not ( jobname is initial ).</p>
<p style="text-align:justify;">perform bd_textbox_var2_msg(rstxpdft) using 80</p>
<p style="text-align:justify;">&#8216;Konvertierung per Hintergrundjob&#8217;(008)</p>
<p style="text-align:justify;">jobname</p>
<p style="text-align:justify;">jobcount.</p>
<p style="text-align:justify;">exit.</p>
<p style="text-align:justify;">endif.</p>
<p style="text-align:justify;">perform download_w_ext(RSTXPDFT) tables pdf</p>
<p style="text-align:justify;">using p_file</p>
<p style="text-align:justify;">&#8216;.pdf&#8217;</p>
<p style="text-align:justify;">&#8216;BIN&#8217;</p>
<p style="text-align:justify;">numbytes</p>
<p style="text-align:justify;">cancel.</p>
<p style="text-align:justify;">if cancel = space.</p>
<p style="text-align:justify;">data: s(80).</p>
<p style="text-align:justify;">s = numbytes. condense s.</p>
<p style="text-align:justify;">concatenate s &#8216;Bytes heruntergeladen in Datei&#8217;(009)</p>
<p style="text-align:justify;">into s separated by space.</p>
<p style="text-align:justify;">perform bd_textbox_var1_msg(RSTXPDFT) using 80</p>
<p style="text-align:justify;">s</p>
<p style="text-align:justify;">p_file.</p>
<p style="text-align:justify;">endif.</p>
<p style="text-align:justify;"> </p>
<pre style="text-align:justify;">Note: There may be a standard solution provided, but thats what customized PDF converter we use in our premises.</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenvishal.wordpress.com/724/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenvishal.wordpress.com/724/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenvishal.wordpress.com/724/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenvishal.wordpress.com/724/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenvishal.wordpress.com/724/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenvishal.wordpress.com/724/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenvishal.wordpress.com/724/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenvishal.wordpress.com/724/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenvishal.wordpress.com/724/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenvishal.wordpress.com/724/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenvishal.wordpress.com/724/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenvishal.wordpress.com/724/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenvishal.wordpress.com/724/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenvishal.wordpress.com/724/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=724&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenvishal.wordpress.com/2009/08/22/convert-spool-request-to-pdf-in-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55302662ee2aeea96d20ccea7bf37e93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">naveenvishal</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/spool_to_pdf.jpg" medium="image">
			<media:title type="html">Spool Request-To-PDF</media:title>
		</media:content>
	</item>
		<item>
		<title>Formatting SAPScript / SMARTFORMS in SAP</title>
		<link>http://naveenvishal.wordpress.com/2009/08/21/formatting-sapscript-smartforms-in-sap/</link>
		<comments>http://naveenvishal.wordpress.com/2009/08/21/formatting-sapscript-smartforms-in-sap/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 11:46:56 +0000</pubDate>
		<dc:creator>naveenvishal</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Formatting]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Sapscript]]></category>
		<category><![CDATA[Smartforms]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=718</guid>
		<description><![CDATA[There are few formatting options available in SAP for text formatting in SAPScript as well as Smartforms.             Following are the few useful formatting options:   Offset N left-most characters of the symbol value will not be displayed. If symbol has the value 123456789, the following will be displayed: &#38;symbol&#38; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=718&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">There are few formatting options available in SAP for text formatting in SAPScript as well as Smartforms.</p>
<p style="text-align:justify;"> </p>
<div id="attachment_720" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-720" title="SAPScript Formatting " src="http://naveenvishal.files.wordpress.com/2009/08/fomatting_sapscript.jpg?w=450&#038;h=50" alt="SAPScript Formatting " width="450" height="50" /><p class="wp-caption-text">SAPScript Formatting </p></div>
<p> </p>
<p> </p>
<div id="attachment_721" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-721" title="Smartforms Formatting" src="http://naveenvishal.files.wordpress.com/2009/08/fomatting_smarform.jpg?w=450&#038;h=124" alt="Smartforms Formatting" width="450" height="124" /><p class="wp-caption-text">Smartforms Formatting</p></div>
<p> </p>
<p><span id="more-718"></span></p>
<p> </p>
<p> </p>
<p style="text-align:justify;">Following are the few useful formatting options:</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong>Offset</strong></p>
<p style="text-align:justify;">N left-most characters of the symbol value will not be displayed.</p>
<p style="text-align:justify;">If symbol has the value 123456789, the following will be displayed:</p>
<p style="text-align:justify;">&amp;symbol&amp; -&gt; 123456789</p>
<p style="text-align:justify;">&amp;symbol+3&amp; -&gt; 456789</p>
<p style="text-align:justify;">&amp;symbol+7&amp; -&gt; 89</p>
<p style="text-align:justify;">&amp;symbol+12&amp; -&gt;</p>
<p style="text-align:justify;">&amp;symbol+0&amp; -&gt; 123456789</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Output Length</span></strong></p>
<p style="text-align:justify;">to define how many character positions should be copied from the value.</p>
<p style="text-align:justify;">If symbol has the value 123456789.</p>
<p style="text-align:justify;">&amp;symbol(3)&amp; -&gt; 123</p>
<p style="text-align:justify;">&amp;symbol(7)&amp; -&gt; 1234567</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">The SYST-UNAME field contains the logon name of a user called Einstein. The</p>
<p style="text-align:justify;">Dictionary entry for this field contains an output length of 12.</p>
<p style="text-align:justify;">&amp;SYST-UNAME&amp;&#8230; -&gt; Einstein&#8230;</p>
<p style="text-align:justify;">&amp;SYST-UNAME(9)&amp;&#8230; -&gt; Einstein &#8230;</p>
<p style="text-align:justify;">&amp;SYST-UNAME(*)&amp;&#8230; -&gt; Einstein &#8230;</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Omitting the Leading Sign</span></strong></p>
<p style="text-align:justify;">The S option can be used to ensure that the value is formatted without the sign.</p>
<p style="text-align:justify;">The ITCDP-TDULPOS field contains the value -100.00. The ABAP/4 Dictionary</p>
<p style="text-align:justify;">definition for this field includes a leading sign.</p>
<p style="text-align:justify;">&amp;ITCDP-TDULPOS&amp; -&gt; 100.00-</p>
<p style="text-align:justify;">&amp;ITCDP-TDULPOS(S)&amp; -&gt; 100.00</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Leading Sign to the Left</span></strong></p>
<p style="text-align:justify;">This option enables you to specify that the leading sign should be placed to the left of the number.</p>
<p style="text-align:justify;">&amp;ITCDP-TDULPOS&amp; -&gt; 100.00-</p>
<p style="text-align:justify;">&amp;ITCDP-TDULPOS(&lt;)&amp; -&gt; -100.00</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Leading Sign to the Right</span></strong></p>
<p style="text-align:justify;">If you used the SET SIGN LEFT control command to specify that the leading sign should be output before the value, this specification can be overridden for individual symbols to enable these to be output with the leading sign to the right.</p>
<p style="text-align:justify;">Syntax:</p>
<p style="text-align:justify;">&amp;symbol(&gt;)&amp;</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">Omitting Leading Zeros</p>
<p style="text-align:justify;">Certain symbol values are output with leading zeros. If you wish to suppress these, you may do so with the Z option.</p>
<p style="text-align:justify;">Assuming the current date is 1.1.1994, &amp;DAY&amp; -&gt; 01</p>
<p style="text-align:justify;">&amp;DAY(Z)&amp; -&gt; 1</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Space Compression</span></strong></p>
<p style="text-align:justify;">The C option has the effect of replacing each string of space characters with a single space and shifting the &#8217;words&#8217; to the left as necessary to close up the gaps.</p>
<p style="text-align:justify;">Assuming &#8216; Albert Einstein &#8216; is the symbol value,</p>
<p style="text-align:justify;">&amp;symbol&amp; -&gt; Albert Einstein</p>
<p style="text-align:justify;">&amp;symbol(C)&amp; -&gt; Albert Einstein</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Number of Decimal Places</span></strong></p>
<p style="text-align:justify;">A program symbol of one of the data types DEC, QUAN and FLTP can contain decimal place data. This option is used to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.</p>
<p style="text-align:justify;">The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.</p>
<p style="text-align:justify;">&amp;EKPO-MENGE&amp; -&gt; 1,234.560</p>
<p style="text-align:justify;">&amp;EKPO-MENGE(.1) -&gt; 1,234.6</p>
<p style="text-align:justify;">&amp;EKPO-MENGE&amp;(.4) -&gt; 1,234.5600</p>
<p style="text-align:justify;">&amp;EKPO-MENGE&amp;(.0) -&gt; 1,235</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Specifying an Exponent for Floating Point Numbers</span></strong></p>
<p style="text-align:justify;">The way that a floating point number is formatted depends on whether an exponent is specified.</p>
<p style="text-align:justify;">PLMK-SOLLWERT field is assumed to have the value</p>
<p style="text-align:justify;">123456.78 and to be of data type FLTP.</p>
<p style="text-align:justify;">&amp;PLMK-SOLLWERT&amp; -&gt; +1.23456780000000E+05</p>
<p style="text-align:justify;">&amp;PLMK-SOLLWERT(E3)&amp; -&gt; +123.456780000000E+03</p>
<p style="text-align:justify;">&amp;PLMK-SOLLWERT(E6)&amp; -&gt; +0.12345678000000E+06</p>
<p style="text-align:justify;">&amp;PLMK-SOLLWERT(E0)&amp; -&gt; +123456.780000000</p>
<p style="text-align:justify;">&amp;PLMK-SOLLWERT(E)&amp; -&gt; +123456.780000000</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Right-Justified Output</span></strong></p>
<p style="text-align:justify;">Right-justified formatting can be specified with the R option. This option has to be used in conjunction with an output length specification. If symbol has the value 1234.</p>
<p style="text-align:justify;">&amp;symbol&amp; -&gt; 1234</p>
<p style="text-align:justify;">&amp;symbol(8R) -&gt; 1234</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Fill Characters</span></strong></p>
<p style="text-align:justify;">Leading spaces in a value can be replaced with a fill character.</p>
<p style="text-align:justify;">The figure for customer sales in the KNA1-UMSAT field is $700. The Dictionary description of the field specifies an output length 8.</p>
<p style="text-align:justify;">&amp;KNA1-UMSAT&amp; -&gt; 700.00</p>
<p style="text-align:justify;">&amp;KNA1-UMSAT(F*)&amp; -&gt; **700.00</p>
<p style="text-align:justify;">&amp;KNA1-UMSAT(F0)&amp; -&gt; 00700.00</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Suppress Output of Initial Value</span></strong></p>
<p style="text-align:justify;">The I option can be used to suppress the output of symbols which still contain their initial value.</p>
<p style="text-align:justify;">Assuming KNA1-UMSAT contains the value 0 and the currency is DEM.</p>
<p style="text-align:justify;">&amp;KNA1-UMSAT&amp; -&gt; 0,00</p>
<p style="text-align:justify;">&amp;KNA1-UMSAT(I)&amp; -&gt;</p>
<p style="text-align:justify;">If the field contains an amount other than 0, this value will be output in the normal way.</p>
<p style="text-align:justify;">&amp;KNA1-UMSAT&amp; -&gt; 700,00</p>
<p style="text-align:justify;">&amp;KNA1-UMSAT(I)&amp; -&gt; 700,00</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Ignore Conversion Routines</span></strong></p>
<p style="text-align:justify;">SAPscript conversion routines specified in the Dictionary are automatically recognized and used when program symbols are being formatted. Using the K option can prevent these conversions.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Date Mask</span></strong></p>
<p style="text-align:justify;">The formatting for date fields can be defined with the SAPscript SET DATE MASK command. Executing this command causes all subsequent date fields to be output using the specified formatting.</p>
<p style="text-align:justify;">/: SET DATE MASK = &#8216;date_mask&#8217;</p>
<p style="text-align:justify;">The following templates may be used in the date mask:</p>
<p style="text-align:justify;">DD day (two digits)</p>
<p style="text-align:justify;">DDD name of day (abbreviated)</p>
<p style="text-align:justify;">DDDD name of day (written out in full)</p>
<p style="text-align:justify;">MM month (two digits)</p>
<p style="text-align:justify;">MMM name of month (abbreviated)</p>
<p style="text-align:justify;">MMMM name of month (written out in full)</p>
<p style="text-align:justify;">YY year (two digits)</p>
<p style="text-align:justify;">YYYY year (four digits)</p>
<p style="text-align:justify;">LD day (formatted as for the L option)</p>
<p style="text-align:justify;">LM month (formatted as for the L option)</p>
<p style="text-align:justify;">LY year (formatted as for the L option)</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Time Mask</span></strong></p>
<p style="text-align:justify;">You can use the SAPscript SET TIME MASK command to format time fields in a way that differs from the standard setting.</p>
<p style="text-align:justify;">Assuming the current time is 10:08:12.</p>
<p style="text-align:justify;">&amp;TIME&amp; -&gt; 10:08:12</p>
<p style="text-align:justify;">/: SET TIME MASK = &#8216;HH:MM&#8217;</p>
<p style="text-align:justify;">&amp;TIME&amp; -&gt; 10:08</p>
<p style="text-align:justify;">/: SET TIME MASK = &#8216;HH hours MM minutes&#8217;</p>
<p style="text-align:justify;">&amp;TIME&amp; -&gt; 10 hours 08 minutes</p>
<p style="text-align:justify;">&amp;TIME(Z)&amp; -&gt; 10 hours 8 minutes</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Other Standard Outputs:</span></strong></p>
<p style="text-align:justify;">&amp;DAY&amp;, &amp;MONTH&amp;, &amp;YEAR&amp;, &amp;HOURS&amp;, &amp;MINUTES&amp;, &amp;SECONDS&amp;, &amp;DATE&amp;, &amp;TIME&amp;, &amp;PAGE&amp;, &amp;NEXTPAGE&amp;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenvishal.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenvishal.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenvishal.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenvishal.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenvishal.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenvishal.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenvishal.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenvishal.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenvishal.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenvishal.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenvishal.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenvishal.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenvishal.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenvishal.wordpress.com/718/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=718&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenvishal.wordpress.com/2009/08/21/formatting-sapscript-smartforms-in-sap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55302662ee2aeea96d20ccea7bf37e93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">naveenvishal</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/fomatting_sapscript.jpg" medium="image">
			<media:title type="html">SAPScript Formatting </media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/fomatting_smarform.jpg" medium="image">
			<media:title type="html">Smartforms Formatting</media:title>
		</media:content>
	</item>
		<item>
		<title>Deactivate an Account in SAP</title>
		<link>http://naveenvishal.wordpress.com/2009/08/20/deactivate-an-account-in-sap/</link>
		<comments>http://naveenvishal.wordpress.com/2009/08/20/deactivate-an-account-in-sap/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 07:32:01 +0000</pubDate>
		<dc:creator>naveenvishal</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Report]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[lock]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=715</guid>
		<description><![CDATA[This report de-activates the account of the specified user. This can be used as a utility to SAP BASIS people. Please be cautious of its use, and thus should be used correctly.   Source Code   REPORT Zdispass. tables: usr02. types: begin of ty_users . include structure usr02 . types: end of ty_users. data: it_users type table [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=715&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">This report de-activates the account of the specified user. This can be used as a utility to SAP BASIS people.</p>
<p style="text-align:justify;">Please be cautious of its use, and thus should be used correctly.</p>
<p style="text-align:justify;"><span id="more-715"></span></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Source Code</span></strong></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">REPORT Zdispass.</p>
<p style="text-align:justify;">tables: usr02.</p>
<p style="text-align:justify;">types: begin of ty_users .</p>
<p style="text-align:justify;">include structure usr02 .</p>
<p style="text-align:justify;">types: end of ty_users.</p>
<p style="text-align:justify;">data: it_users type table of ty_users with header line .</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">select-options: s_users for usr02-bname.</p>
<p style="text-align:justify;">start-of-selection.</p>
<p style="text-align:justify;">select * from usr02 into table it_users</p>
<p style="text-align:justify;"> where bname in s_users.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">loop at it_users.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">it_users-codvn = &#8216;X&#8217;.</p>
<p style="text-align:justify;"> clear it_users-bcode.</p>
<p style="text-align:justify;"> write:/1(35) sy-uline.</p>
<p style="text-align:justify;"> write: /1 sy-vline ,</p>
<p style="text-align:justify;"> 2 &#8216;Deactivating &#8216; color 7,</p>
<p style="text-align:justify;"> 22 it_users-bname color 5,</p>
<p style="text-align:justify;"> 35 sy-vline.</p>
<p style="text-align:justify;"> write:/1(35) sy-uline.</p>
<p style="text-align:justify;"> update usr02.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">endloop .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenvishal.wordpress.com/715/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenvishal.wordpress.com/715/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenvishal.wordpress.com/715/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenvishal.wordpress.com/715/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenvishal.wordpress.com/715/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenvishal.wordpress.com/715/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenvishal.wordpress.com/715/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenvishal.wordpress.com/715/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenvishal.wordpress.com/715/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenvishal.wordpress.com/715/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenvishal.wordpress.com/715/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenvishal.wordpress.com/715/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenvishal.wordpress.com/715/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenvishal.wordpress.com/715/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=715&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenvishal.wordpress.com/2009/08/20/deactivate-an-account-in-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55302662ee2aeea96d20ccea7bf37e93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">naveenvishal</media:title>
		</media:content>
	</item>
		<item>
		<title>Lock Objects in SAP</title>
		<link>http://naveenvishal.wordpress.com/2009/08/19/lock-objects-in-sap/</link>
		<comments>http://naveenvishal.wordpress.com/2009/08/19/lock-objects-in-sap/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 04:42:03 +0000</pubDate>
		<dc:creator>naveenvishal</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Abap Objects]]></category>
		<category><![CDATA[DDIC]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Module Pool]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[lock objects]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=705</guid>
		<description><![CDATA[Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database. SAP Provide three type of Lock objects.   - Read Lock(Shared Locked)     protects read access to an object. The read lock allows other  transactions read access but not write access to the locked area of  the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=705&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.</p>
<p>SAP Provide <strong><span style="color:#339966;">three type of Lock objects</span></strong>.  </p>
<p>- <strong>Read Lock(Shared Locked) </strong><br />
   protects read access to an object. The read lock allows other  transactions read access but not write access to the locked area of  the table</p>
<p>- <strong>Write Lock(exclusive lock) </strong><br />
   protects write access to an object. The write lock allows other  transactions neither read nor write access to the locked area of the  table.</p>
<p>- <strong>Enhanced write lock (exclusive lock without cumulating) </strong><br />
  works like a write lock except that the enhanced write lock also  protects from further accesses from the same transaction.</p>
<p style="text-align:justify;"> </p>
<div id="attachment_707" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-707" title="Type of Locks" src="http://naveenvishal.files.wordpress.com/2009/08/lock_01.jpg?w=450&#038;h=256" alt="Type of Locks" width="450" height="256" /><p class="wp-caption-text">Type of Locks</p></div>
<p> </p>
<p style="text-align:justify;"><span id="more-705"></span></p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Steps:</span></strong></p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;">Go to  SE11 transaction and create a lock object for the table .Custom lock  object<br />
name should be start with EY or EZ.</span></span></span></span></p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;"> </span></span></span></span></p>
<div id="attachment_708" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-708" title="Lock Object -  Initial Screen" src="http://naveenvishal.files.wordpress.com/2009/08/lock_initial1.jpg?w=450&#038;h=326" alt="Lock Object -  Initial Screen" width="450" height="326" /><p class="wp-caption-text">Lock Object -  Initial Screen</p></div>
<p> </p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;">After activating lock object  Function Module will be generated automatically. </span></span></span></span></p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;">Function Modules name will be  like  ENQUEUE_&lt;LOCK_OBJECT_NAME&gt; and  DEQUEUE_&lt;LOCK_OBJECT_NAME&gt;.</span></span></span></span></p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;"> </span></span></span></span></p>
<div id="attachment_709" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-709" title="Lock Modules" src="http://naveenvishal.files.wordpress.com/2009/08/lock_modules.jpg?w=450&#038;h=295" alt="Lock Modules" width="450" height="295" /><p class="wp-caption-text">Lock Modules</p></div>
<p> </p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;">Foe Example:</span></span></span></span></p>
<p>For example you have created a lock object EZSFLIGHT for the SFLIGHT table .</p>
<p>So first lock the table , then update then release the lock.</p>
<p> </p>
<p>Check this code &#8212;</p>
<p> </p>
<p>DATA : t_itab like table of SFLIGHT,</p>
<p>fs_itab like SFLIGHT.</p>
<p> </p>
<p>fs_itab-carrid = &#8216;AA&#8217;.</p>
<p>fs_itab-connid = &#8217;0017&#8242;.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>APPEND fs_itab TO t_itab.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>CALL FUNCTION &#8216;ENQUE_EZSFLIGHT&#8217; &#8221; SET lock to the table</p>
<p>EXPORTING</p>
<p>CARRID = &#8230;.</p>
<p>CONNID = &#8230;.</p>
<p>.</p>
<p>.</p>
<p>IF sy-subrc eq 0.</p>
<p>INSERT sflight from table t_itab. &#8221; Update the DB table</p>
<p>ENDIF.</p>
<p> </p>
<p>CALL FUNCTION &#8216;ENQUE_EZSFLIGHT&#8217; &#8221; Unlock the table</p>
<p>EXPORTING</p>
<p>CARRID = &#8230;.</p>
<p>CONNID = &#8230;.</p>
<p>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenvishal.wordpress.com/705/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenvishal.wordpress.com/705/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenvishal.wordpress.com/705/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenvishal.wordpress.com/705/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenvishal.wordpress.com/705/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenvishal.wordpress.com/705/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenvishal.wordpress.com/705/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenvishal.wordpress.com/705/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenvishal.wordpress.com/705/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenvishal.wordpress.com/705/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenvishal.wordpress.com/705/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenvishal.wordpress.com/705/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenvishal.wordpress.com/705/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenvishal.wordpress.com/705/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=705&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenvishal.wordpress.com/2009/08/19/lock-objects-in-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55302662ee2aeea96d20ccea7bf37e93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">naveenvishal</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/lock_01.jpg" medium="image">
			<media:title type="html">Type of Locks</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/lock_initial1.jpg" medium="image">
			<media:title type="html">Lock Object -  Initial Screen</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/lock_modules.jpg" medium="image">
			<media:title type="html">Lock Modules</media:title>
		</media:content>
	</item>
		<item>
		<title>Field Exit in SAP</title>
		<link>http://naveenvishal.wordpress.com/2009/08/12/field-exit-in-sap/</link>
		<comments>http://naveenvishal.wordpress.com/2009/08/12/field-exit-in-sap/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 05:33:43 +0000</pubDate>
		<dc:creator>naveenvishal</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Enhancement/Modification]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[enhancement]]></category>
		<category><![CDATA[field exit]]></category>
		<category><![CDATA[modification]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=697</guid>
		<description><![CDATA[Field exit are use to create programming logic for any data element.It carry out any checks,Conversions or Business related processing of screen fields. Important thing is it can not be debugged.It have its own naming convention FIELD_EXIT_. In transaction code CMOD choose Text element -&#62; Field exit. Field Exit Initial Screen   Steps: 1. Click Field [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=697&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Field exit are use to create programming logic for any data element.It carry out any checks,Conversions or Business related processing of screen fields. Important thing is it can not be debugged.It have its own naming convention FIELD_EXIT_.</p>
<p style="text-align:justify;">In transaction code CMOD choose Text element -&gt; Field exit.</p>
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-698" title="Field Exit Initial Screen" src="http://naveenvishal.files.wordpress.com/2009/08/field_exits.jpg?w=450&#038;h=326" alt="Field Exit Initial Screen" width="450" height="326" /></dt>
<dd class="wp-caption-dd">Field Exit Initial Screen</dd>
</dl>
</div>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><span id="more-697"></span></p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Steps:</span></strong></p>
<p style="text-align:justify;"><strong><span style="color:#339966;"><br />
</span></strong></p>
<p style="text-align:justify;">1. Click Field Exit &#8211; &gt; Create. Enter Data Element for Field Exit.</p>
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-699" title="Create Field Exit" src="http://naveenvishal.files.wordpress.com/2009/08/field_exits2.jpg?w=450&#038;h=110" alt="Create Field Exit" width="450" height="110" /></dt>
<dd class="wp-caption-dd">Create Field Exit</dd>
</dl>
</div>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">2. You are taken to the screen to define the function module/ code that will be called when the field exit is performed. Click Create to create the function for the field.</p>
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-700" title="Function Module for Field Exit" src="http://naveenvishal.files.wordpress.com/2009/08/field_exits3.jpg?w=450&#038;h=141" alt="Function Module for Field Exit" width="450" height="141" /></dt>
<dd class="wp-caption-dd">Function Module for Field Exit</dd>
</dl>
</div>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">3. Enter the code in the function and then activate the function module.</p>
<p style="text-align:justify;"> </p>
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-702" title="Enter the code" src="http://naveenvishal.files.wordpress.com/2009/08/field_exits1.jpg?w=450&#038;h=326" alt="Enter the code" width="450" height="326" /></dt>
<dd class="wp-caption-dd">Enter the code</dd>
</dl>
</div>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">After you have created the processing logic for your field exit, you must <strong>assign the exit to one or more programs and screens</strong>. This assignment tells the system which screens to trigger your function module on. To assign your field exit module to one or more screens,proceed as follows:</p>
<p style="text-align:justify;">1. Select the field exit.</p>
<p style="text-align:justify;">2. Choose Assign prog./screen.</p>
<p style="text-align:justify;">3. Enter the name of the program and the screen number.</p>
<p style="text-align:justify;">4. ChooseSave.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">For some fields, you might want to trigger a different processing logic on different screens. You can trigger screen-specific logic by allocating a field exit identifier when you make your screen assignments.</p>
<p style="text-align:justify;">A field exit identifier can be any number or letter. The field exit identifier tells the system to trigger the function module that has this identifier in its name.</p>
<p style="text-align:justify;"> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenvishal.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenvishal.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenvishal.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenvishal.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenvishal.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenvishal.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenvishal.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenvishal.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenvishal.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenvishal.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenvishal.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenvishal.wordpress.com/697/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenvishal.wordpress.com/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenvishal.wordpress.com/697/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=697&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenvishal.wordpress.com/2009/08/12/field-exit-in-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55302662ee2aeea96d20ccea7bf37e93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">naveenvishal</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/field_exits.jpg" medium="image">
			<media:title type="html">Field Exit Initial Screen</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/field_exits2.jpg" medium="image">
			<media:title type="html">Create Field Exit</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/field_exits3.jpg" medium="image">
			<media:title type="html">Function Module for Field Exit</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/field_exits1.jpg" medium="image">
			<media:title type="html">Enter the code</media:title>
		</media:content>
	</item>
		<item>
		<title>Check Tables and Value Tables in SAP</title>
		<link>http://naveenvishal.wordpress.com/2009/08/11/check-tables-and-value-tables-in-sap/</link>
		<comments>http://naveenvishal.wordpress.com/2009/08/11/check-tables-and-value-tables-in-sap/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 06:28:55 +0000</pubDate>
		<dc:creator>naveenvishal</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[DDIC]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[check table]]></category>
		<category><![CDATA[foreign key]]></category>
		<category><![CDATA[Parent-Child relationship]]></category>
		<category><![CDATA[value table]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=688</guid>
		<description><![CDATA[Many ABAPers gets confused initially with these tables. The difference lies in there Implementation and Behavior. Lets have a closer look at each to understand them better.   Value Table  This is maintained at Domain Level. Defining Value Table In some cases you already know when you define a domain that all the fields referring [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=688&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Many ABAPers gets confused initially with these tables. The difference lies in there Implementation and Behavior. Lets have a closer look at each to understand them better.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><span id="more-688"></span></p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Value Table</span></strong></p>
<p style="text-align:justify;"> This is maintained at Domain Level.</p>
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-689" title="Defining Value Table" src="http://naveenvishal.files.wordpress.com/2009/08/value_table.jpg?w=450&#038;h=326" alt="Defining Value Table" width="450" height="326" /></dt>
<dd class="wp-caption-dd">Defining Value Table</dd>
</dl>
</div>
<p style="text-align:justify;">In some cases you already know when you define a domain that all the fields referring to this domain should be checked against a certain table. This information can be stored in the domain by entering a value table.</p>
<p style="text-align:justify;"> The system proposes the value table as check table when you try to define a foreign key for this field. You can override this proposal.</p>
<p style="text-align:justify;"> Entering a value table does not implement a check. The check against the value table only takes place when a foreign key is defined.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"> <strong><span style="color:#339966;">Check table</span></strong></p>
<p style="text-align:justify;"> Table whose key fields are used to check the foreign key fields (see Foreign Keys). Only entries that are contained in the key fields of the check table can be contained in the foreign key fields. </p>
<div id="attachment_690" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-690" title="Defining Check Table" src="http://naveenvishal.files.wordpress.com/2009/08/value_table1.jpg?w=450&#038;h=324" alt="Defining Check Table" width="450" height="324" /><p class="wp-caption-text">Defining Check Table</p></div>
<p>The check table is used to check whether the input values are valid and for the input help (F4 help).</p>
<p style="text-align:justify;">For example you have Employee master table &amp; Employee Transaction table.</p>
<p style="text-align:justify;">When ever an employee Transacts we need to check whether that employee exists , so we can refer to the employee master table. This is nothing but a Parent &amp; Child relationship . Here data can be maintained at client level, no development involved.</p>
<p style="text-align:justify;"> As per DBMS what we call Parent table, is called as check table in SAP.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Notable Difference</span></strong></p>
<p style="text-align:justify;">The contents of the check will be used as an input help(F4 Help) for a particular field on which a check table is assigned. But the contents of Value Table are never used in Input Help.</p>
<p style="text-align:justify;"> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/naveenvishal.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/naveenvishal.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/naveenvishal.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/naveenvishal.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/naveenvishal.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/naveenvishal.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/naveenvishal.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/naveenvishal.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/naveenvishal.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/naveenvishal.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/naveenvishal.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/naveenvishal.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/naveenvishal.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/naveenvishal.wordpress.com/688/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=naveenvishal.wordpress.com&amp;blog=8391156&amp;post=688&amp;subd=naveenvishal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://naveenvishal.wordpress.com/2009/08/11/check-tables-and-value-tables-in-sap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55302662ee2aeea96d20ccea7bf37e93?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">naveenvishal</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/value_table.jpg" medium="image">
			<media:title type="html">Defining Value Table</media:title>
		</media:content>

		<media:content url="http://naveenvishal.files.wordpress.com/2009/08/value_table1.jpg" medium="image">
			<media:title type="html">Defining Check Table</media:title>
		</media:content>
	</item>
	</channel>
</rss>
