Sunday, 9 November 2014

SCRIPT : Page view Comparison : Potrait Vs. Landscape

Step1.   We have a Main Window with WIDTH & Height. Go to Header of the FORM by selceting the marked button.


































Step2. So here we have the selected Format as Portrait. Activate the form. Under the menu option choose, printing Test.
























Step3. Select Print Preview.
























Step4. So we have the Portrait output of the Form. Go Back.







































Step5. Select the Orientation as Landscape and activate the form. If the form height is too big then it will be an activation error (Usually portrait page height is more than the landscape page height ). Then choose Printing Test.
























Step6. Choose Print Preview.























Step7. So we have the Landscape output.



























------------------------------------------------------------------------------------------

SCRIPT : Simple Design and driver program for SAP Script

Step1. Go to Tcode- SE71.






Step2 . Provide a script name and click on Create button.
























Step3 Provide the Meaning and click on Paragraph format button.






















Step4. The below screen appears.































Step5. In the second part of the screen, in the Standard Attributes , provide a paragraph name as P1, its meaning, left margin and right margin and hit the Enter key and at last click on the Header button.































Step6 . Now we have defined the Paragraph, let's create a page. So click on the pages button as highlighted.

























Step7. The below screen appears on selecting pages button.


































Step8. In the second part of the screen, in the Standard attribute, provide the page name as FIRST, its meaning and set Next Page as FIRST and hit the ENTER key. Finally Click on the WINDOWS button.



































Step9. By default we have a Main Window ( type MAIN) with name MAIN. To add the Window on the created Page (FIRST) , click on the Page Windows.



































Step10. The below screen appears, from the menu navigation click on, Create Element option.


































Step11. As we have only one main windows available, so on the pop up screen , only one lien appears. As we want to add the MAIN window on the screen, now double click on the line in the pop up window.




























Step12. So now the MAIN window is added on the page FIRST and in the second part of the screen, provide the margins and window width and height.


































Step13. In the page windows, from the Menu option , under settings select Form Painter.


































Step14. select the Graphical form painter and continue.


































Step15. In the graphical form painter, adjust the width, height and margins of the window as per required. According to it, the values are adjusted.


























Step16. Again select form painter under Settings menu.

























Step17. Deselect graphical form painter and continue.



























Step18. Click on the Basic settings Button.

























Step19. Now here we have to fill the default paragraph and the first page.
























Step20 . Maintain default paragraph as P1 and First Page as FIRST which we already created in the pre stages. Finally click on page windows button.
























Step21 . Double click on the Window MAIN and click on the Button 'Text Elements' .













Step22. here maintain some text line which will be displayed on the MAIN Window. Go back.












Step23. From the menu option, Activate the Form.














Step24 . We receive the success message if here is no error .























Step25. To get the print preview we have to set up the default printer. So go to Tcode- SU3 and  maintain the default device under Defaults tab.

























Step27.  Under the Menu Utilities select printing Test.


























Step28. Select Print Preview.























Step29. So we have the output.






































Step30. Create a Report and use the standard Function Module, OPEN_FORM, CLOSE_FORM, START_FROM, END_FORM & WRITE_FORM . In the WRITE_FORM , pass the window name MAIN. Execute the Program.

























Step31. Select print Preview.
























Step32. So we have the output




































------------------------------------------------------------------------------------------------

Thursday, 6 November 2014

Database Lock(Open SQL Statement ) Vs. SAP Lock (Enqueue & Dequeue FM)


 Generally there are two lock categories offered by SAP ABAP.
1. DataBase Lock
2. SAP Lock

When any record is selected in update mode, an implicit lock is requested and if it is granted ( if no previous lock is there) then the same lock can be released by a DB LUW ( commit work / rollback work) or by a specific time interval out.

As most of the SAP GUI transaction consists a lot of screen navigation which may take more time which is subsequently grater than the time interval allowed for an implicit lock leading to data inconsistencies. So SAP Lock mechanism Enqueue and Dequeue FM can be a another choice  to maintain the data consistencies.
-----------------------------------------------------------------------------------------------
Step1. Create two programs as shown below: Put the debug points at specific points and execute the two report one after another from left and then right.















Step2. The left side program selects the record  in update mode which puts an implicit database lock on the record. Halt the left side program at the specific debug point so that the lock will be remain there and we can test any other program update query on the same record. Run the second program and the right side program reads the same record as of the left side program and when the update query will run by the right side program on the same record, the update query execution will be in the processing mode until unless the left side program remove the implicit lock by a commit work or rollback work or time out interval.















-----------------------------------------------------------------------------------------------------------------------
Step3. In this case also the two programs tries to select the record in update mode, if any program is executed first and puts a implicit DB lock on the record, the other programs select in update mode will be delayed until the lock is released by the first one.

















--------------------------------------------------------------------------------------------------

Comments system

Disqus Shortname