How to debug a popup screen in ABAP?


Methods to debug a Popup screen in ABAP debugger.

It is always difficult to debug a popup screen in SAP ABAP.

To debug a Popup screen, we need to create a system file that could generate a system command to allow debugging for the Popup screen.

There are three different methods that could allow to debug a Popup screen.

The best way is to create a shortcut file from the SAP screen. Click icon in the SAP toolbar.
It shows a screen to create shortcut for the debugging.





Enter the title as "Debugger".
Choose "System Command" as type and enter "/h" in the command.
Enter your system details where you want to debug. Here i am going to debug the production system, so i have entered the system id as K9P.

Click "Finish" and you could see a short cut in your desktop with *.sap extension.

Now drag the debug.sap file to the popup screen that you need to debug.




This will make the popup screen enter into debugging mode. Proceed from here with your debugging skills to debug.

But still, there are other two methods to create the shortcut debug file for Popup screen debug.

Option 2
You can create a shortcut from your desktop using Windows shortcut creating functionality.
Right click in your desktop and select "New-> SAP GUI Shortcut".


Name it as "debug.sap".
Right click on the shortcut icon and click edit and proceed as above to create a shortcut.



Option 3

You can also create a debugging file from notepad. But this is a worst case method where you are not able to create a shortcut from SAP.

Open your notepad and enter the following.


[ F u n c t i o n ]
C o m m a n d = / H
T i t l e = D e b u g g e r
T y p e = S y s t e m C o m m a n d

Save it as "debug.sap".

Drag and drop on the popup screen you want to debug.


For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

Steps to copy or rename existing programs in SAP

Copy an existing program in SAP


To Copy an existing program in SAP, follow the below steps.

1. Go to SE38
2. Enter the program that you need to copy.
3. Press the copy button in the toolbar or press CTRL+F5.

Screen shot to explain copying in ABAP editor


In the popup screen, enter the target program name. This copies the source program to target program.

Pop up to name the target program for copy in ABAP Editor
Once done, you get an another popup screen for the elements to be copied. Select the elements according to your requirement that is shown in the below screen shot.

Press Copy and the source program is copied to the target program with the program elements you selected.


Renaming an existing program 


To Rename an existing program in SAP, follow the below steps.

1. Go to SE38
2. Enter the program that you need to rename.
3. Press the rename button in the toolbar or press CTRL+F6.


It is same as explained above for the copying.


Here all the program elements are transferred to the target program.
Includes are not renamed but you could select it to rename the includes in the program.



For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

How to link a Methods of a Class to SAP TCode?

Linking Class Methods to Transaction Code in SAP

You can create a transaction code linked to a public method o f a class.

You can also do it for local method defined in an ABAP program.

Goto SE93. 

Enter the transaction code you want to link to, Choose "Method of a class" option and click the Create button.


Image to How to create OO transaction in ABAP

By default, you will have Method to link from Class Builder which is a global class.
Enter the Class Name and Method in the input field. Choose the update mode as per your requirement.

Image to How to create a transaction code from Global Class in ABAP


If you want to link your Local method of class from an ABAP program which is a Local Class,
just uncheck the checkbox "OO transaction model"

This will include you with an option "Local in Program". Check it and enter your ABAP program name and then the class and method.

Image to How to create a transaction code from local Class in ABAP Report




For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

How to create documentation for ABAP Programs?

Documentation Creation for ABAP Programs

Open the ABAP program in SE38, that you w ant to create documentation
In the menu path, select G o t o • D o c u m e n t a t i o n.

ABAP Documentation for reference



When you open documentation, the system proposes a template where you can enter the documentation of the program . It has headers to let you organize the documentation into groups such as purpose, functionality, and integration . Enter the documentation as required, save the documentation. Now the documentation is available for reference.




For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

Generating Blank Lines in the Output - ABAP Programming Tricks


Blank Lines in the Output Screen.

While generating a report, ABAPers need at some point of time a blank line in the output screen.
It is bit hard to achieve it as Blank Lines will be ignored by the ABAP runtime environment.

To overcome this situation, SAP has provided SET BLANK LINES statement with ON and OFF options.

Let us see this with an example code and output.

Code

WRITE '*****'.

NEW-PAGE.

SET BLANK LINES OFF.

DO 5 TIMES.
  WRITE / ' '.
ENDDO.

WRITE '*****'.

NEW-PAGE.

SET BLANK LINES ON.
DO 5 TIMES.
  WRITE / ' '.
ENDDO.
SET BLANK LINES OFF
WRITE  / '*****'.

Output



.




As you see above code and the output, SKIP statement skips 5 lines in the output screen.
But it is not the right approach. Use the SET BLANK LINES statement for any blank lines to be displayed in the output screen.


For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

Color Format for the text in the output screen


Format the text with colors in the Output List

To format the text, color field in the WRITE statement can be used.

The Color value decides the color type for the text.
Below is the Color value for the text.


Color Value for Text Format


Code 

DATA i TYPE i VALUE 0.
DATA col(15) TYPE c.

WHILE i < 8.

  CASE i.
    WHEN 0. col = 'COL_BACKGROUND '.
    WHEN 1. col = 'COL_HEADING    '.
    WHEN 2. col = 'COL_NORMAL     '.
    WHEN 3. col = 'COL_TOTAL      '.
    WHEN 4. col = 'COL_KEY        '.
    WHEN 5. col = 'COL_POSITIVE   '.
    WHEN 6. col = 'COL_NEGATIVE   '.
    WHEN 7. col = 'COL_GROUP      '.
  ENDCASE.

  FORMAT INTENSIFIED COLOR = i.
  WRITE: /(4) i, AT 7            sy-vline,
            col,                 sy-vline,
            col INTENSIFIED OFF, sy-vline,
            col INVERSE.

  i = i + 1.


ENDWHILE.


Output





For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

Complex Output Screens Design with Page Header and Footer


Output with Page Header and Footer


The Header and Footer is achieved by TOP-OF-PAGE and END-OF-PAGE events in the program.
Please see the below code for reference and the output it generated.


Code

TOP-OF-PAGE.
*          This event generates the Page Header Title
  WRITE: 'Page with Header and Footer'.
  ULINE AT /(27).

END-OF-PAGE.
*        This event generates the Footer for the output
  ULINE.
  WRITE: /30 'Page', sy-pagno.

START-OF-SELECTION.

  DO 6 TIMES.
    WRITE / sy-index.
  ENDDO.



Output




For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

Know ABAP debugging



ABAP Bebugger

Classic Debugger.

The classical Debugger has always had certain limitations.
A maximum of eight data objects could be displayed, and also 4 at a time.
The layout is fixed to display the data objects.
There is no way, from within the Debugger, to look up within the repository a function module, method, or subroutine name to set a breakpoint.
ABAP Classic Debugger with fields and execution area


New ABAP Debugger

It is generally not possible to analyze programs in debugging mode that run in an ABAP processor unit.

This had made SAP releases its new version of Debugger "New Debugger". The reason for this is that the new Debugger executes in its own external mode. This allows the code to be analyzed to run with virtually no impact from the Debugger. It has more interaction with the developer and the system allowing search help use, the display of more than one internal table simultaneously, and an unlimited number of data objects.



You can set the New Debugger as the default debugger in
Utilities =>Settings=>ABAP Editor =>Debugging.

User Specific Setting for default Debugger

It is possible to switch between the classic Debugger and the new Debugger by selecting 
Debugger=> Switch to New ABAP Debugger or 
Debugger => Switch toClassic ABAP Debugger.


You can exit the new Debugger while debugging in the following ways.

1. Debugger =>Exit Debugger, which closes just the Debugger, and the application continues to run.

2. /hx” in the command field and press Enter closes just the Debugger and allows the application to continue to run.

3. Debugger =>Exit Application and Debugger, which closes both the Debugger and the application.

When the Debugger starts, It opens as – "ABAP Debugger Controls Session x (Exclusive)", where again X is the external mode of the application.




If the debugger opens in "ABAP Debugger Controls Session x (NOT Exclusive)". You can change the non-exclusive mode to exclusive mode using the option in the Debugger menu 
"Debugger Exclusive Debugging Mode On"

Exclusive Debugging Mode on



In Non-Exclusive mode, the debugger has limited functionality.
1. You cannot debug between the statements SELECT and ENDSELECT.
2. Debugging mode is not possible for conversion or field exits.
3. COMMIT statement can lead to an inconsistent datasets in the database.

New ABAP  Debugger Tools
The tools are grouped into four categories:



1. Standard Tools
2. Data Objects
3. Memory Management
4. Special Tools

New ABAP Debugger Tools


For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

ABAP Programming Guidelines

Programming Guidelines


Programming guidelines are indispensable in large software development projects because they are used to standardize source code structures and development objects. and therefore improve both the readability and comprehensibility of developments in ABAP.

1. Good Readability of Custom Programs
Don't use short names for variables like i1, i2, a, b, and so on, that could confuse at times. 
Use clear and understandable names for the variables.

2.Easy Orientation in External Programs
For example, if you generally adhere to the layer model regarding functions, external developers will find it much easier to understand the program structure.



3.Simple Modification and Maintenance of Programs
If, for instance, you use factory methods and interfaces to generate classes, it is very easy to implement completely new customer-specific classes, which can be used by the remaining program code as well because they use the same interface .

4. Good Quality due to the Avoidance of Errors
A standardized, tried-and-tested software development procedure cannot prevent you from making severe errors in your concept. but it can help you avoid small errors that are difficult to find at a later
stage.

Best Technique in ABAP - Using Hashed Internal Table

Hashed Internal table faster access

The source tables ITAB1 and ITAB2 are standard tables. It is assumed that ITAB1 takes more entries than ITAB2. Otherwise, the table with more entries must be computed with "DESCRIBE TABLE ... LINES ...".
Since both tables shall represent sets, it is assumed that their entries are unique with respect to component K.

The algorithm works with a temporary table with unique key K. The table is a copy of ITAB1 and is used to locate the entries being also contained in ITAB2. The matching entries are copied to ITAB3.

The left-hand and right-hand side differ only by the kind of the temporary table being used. For a hashed table, the READ statement in the LOOP is faster than for the sorted table.


Using a sorted table 



STAB1 = ITAB1.
REFRESH ITAB3.
LOOP AT ITAB2 ASSIGNING <WA>.
  READ TABLE STAB1 FROM <WA>
                   TRANSPORTING NO FIELDS.
  IF SY-SUBRC = 0.
    APPEND <WA> TO ITAB3.
  ENDIF.
ENDLOOP.

FREE STAB1.

Using a hashed table


HTAB1 = ITAB1.
REFRESH ITAB3.
LOOP AT ITAB2 ASSIGNING <WA>.
  READ TABLE HTAB1 FROM <WA>
                   TRANSPORTING NO FIELDS.
  IF SY-SUBRC = 0.
    APPEND <WA> TO ITAB3.
  ENDIF.
ENDLOOP.

FREE HTAB1.


For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

Best Technique to use Nested Loop in ABAP Programming


Nested Loops in ABAP


If ITAB1 has n1 entries and ITAB2 has n2 entries, the time needed for the nested loop with the straightforward algorithm is O(n1 * n2), whereas the parallel cursor approach takes only O(n1 + n2) time.

The above parallel cursor algorithm assumes that ITAB2 contains only entries also contained in ITAB1.  If this assumption does not hold, the parallel cursor algorithm gets slightly more complicated, but its performance characteristics remain the same.

Straightforward nested loop 


LOOP AT ITAB1 INTO WA1.
  LOOP AT ITAB2 INTO WA2
                WHERE K = WA1-K.
    " ...
  ENDLOOP.

ENDLOOP.

More sophisticated loop: parallel cursors 

I = 1.
LOOP AT ITAB1 INTO WA1.
  LOOP AT ITAB2 INTO WA2 FROM I.
    IF WA2-K <> WA1-K.
      I = SY-TABIX.
      EXIT.
    ENDIF.
    " ...
  ENDLOOP.
ENDLOOP.

For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

Best Techniques in ABAP Programming - Internal table appending


Joining Two Internal Tables - Best Technique


If ITAB1 has n1 entries and ITAB2 has n2 entries, the time needed for joining ITAB1 and ITAB2 with the straightforward algorithm is O( n1 * log2( n2 ) ), whereas the parallel cursor approach takes only O( n1 + n2 ) time. 

The parallel cursor algorithm assumes that ITAB2 is a secondary table containing only entries also contained in primary table ITAB1. 

If this assumption does not hold, the parallel cursor algorithm gets slightly more complicated, but its performance characteristics remain the same. 

Normal Technique used by ABAPers  

LOOP AT ITAB1 INTO WA1.
  READ TABLE ITAB2 INTO WA2
             WITH KEY K = WA1-K BINARY SEARCH.
  IF SY-SUBRC = 0.
    " ...
  ENDIF.
ENDLOOP.

Parallel Cursor Technique

DATA: I TYPE I.

I = 1.
LOOP AT ITAB1 INTO WA1.
  do.
    READ TABLE ITAB2 INTO WA2 INDEX I.
    IF SY-SUBRC <> 0. EXIT. ENDIF.
    IF WA2-K < WA1-K.
      ADD 1 TO I.
    ELSEIF WA2-K = WA1-K.
      " ...
      ADD 1 TO I.
      EXIT.
    ELSE.
      EXIT.
    endif.
  enddo.
  if sy-subrc <> 0. exit. endif.
ENDLOOP.


For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

Best Practices in ABAP Programming - SELECT Query



Tips# 1:

Always specify your conditions in the Where-clause instead of
checking them yourself with check-statements.
The database system can then use an index (if possible) and the
network load is considerably less.


Example:

Don'ts 

Select Query with CHECK statement will reduce the performance of the query.

SELECT * FROM SBOOK INTO SBOOK_WA.
  CHECK: SBOOK_WA-CARRID = 'LH' AND
         SBOOK_WA-CONNID = '0400'.
ENDSELECT.

Do's

Use WHERE condition Instead.

SELECT * FROM SBOOK INTO SBOOK_WA
  WHERE CARRID = 'LH' AND
        CONNID = '0400'.

ENDSELECT.


Tips# 2:

If you are interested if there exists at least one row of a database  table or view with a certain condition, use the Select ... Up To 1 Rows statement instead of a Select-Endselect-loop with an Exit.

If all primary key fields are supplied in the Where condition you can even use Select Single.
Select Single requires one communication with the database system, whereas Select-Endselect needs two.

Example:

Don'ts

Select Query loop with EXIT statement is not good practice.

SELECT * FROM SBOOK INTO SBOOK_WA
    WHERE CARRID = 'LH'.
  EXIT.
ENDSELECT.

Do's

Use Upto 1 row instead of EXIT statement or use SELECT SINGLE statement to increase the performance.

SELECT * FROM SBOOK INTO SBOOK_WA
  UP TO 1 ROWS
  WHERE CARRID = 'LH'.

ENDSELECT.


SELECT SINGLE * FROM SBOOK INTO SBOOK_WA
  WHERE CARRID = 'LH'.

ENDSELECT.


Tips# 3

If you want to find the maximum, minimum, sum and average value or the count of a database column, use a select list with aggregate functions instead of computing the aggregates yourself.

Network load is considerably less.


Don'ts  

Calculation of a field is not a good practice to be used inside a SELECT loop Statement.

DATA: MAX_MSGNR type t100-msgnr.
MAX_MSGNR = '000'.
SELECT * FROM T100 INTO T100_WA
  WHERE SPRSL = 'D' AND
        ARBGB = '00'.
  CHECK: T100_WA-MSGNR > MAX_MSGNR.
  MAX_MSGNR = T100_WA-MSGNR.
ENDSELECT.


Do's

Use aggregate function and reduce the complexity of SELECT loop.

DATA: MAX_MSGNR type t100-msgnr.
SELECT MAX( MSGNR ) FROM T100 INTO max_msgnr
  WHERE SPRSL = 'D' AND

        ARBGB = '00'.

Tips# 4

Use a select list or a view instead of Select * , if you are only interested in specific columns of the table. Network load is considerably less. 

Example

Don'ts

Using * to select all the fields instead of specific fields reduces the performance during Runtime.

SELECT * FROM DD01L INTO DD01L_WA
  WHERE DOMNAME LIKE 'CHAR%'
        AND AS4LOCAL = 'A'.
ENDSELECT.  
Do's

Select only the specific field needed for processing the program.

SELECT DOMNAME FROM DD01L
  INTO DD01L_WA-DOMNAME
  WHERE DOMNAME LIKE 'CHAR%'
        AND AS4LOCAL = 'A'.
ENDSELECT.


Tips# 5:

Whenever possible, use column updates instead of single-row updates to update your database tables.
Network load is considerably less.


Example

Don'ts


SELECT * FROM SFLIGHT INTO SFLIGHT_WA.
  SFLIGHT_WA-SEATSOCC =
    SFLIGHT_WA-SEATSOCC - 1.
  UPDATE SFLIGHT FROM SFLIGHT_WA.

ENDSELECT.

Do's

UPDATE SFLIGHT

       SET SEATSOCC = SEATSOCC - 1.


How to suppress messages during code inspection using pseudo comments?

Suppressing messages during Code check using pseudo comments in ABAP?


There are different ways of finding out whether a particular message may be hidden and the code for hiding such messages using pseudo-comments.

1. From the message results, navigate to the message to suppress.
2. Expand the folder icon to display its details.
3. Then, check the icon is displayed before the message as shown.





4. This will display the dialog box, as shown. This will inform you how the code can be handled.



5. Note the comment. This may be included in the coding with the statement that
generated the message as shown as follows:

SELECT * FROM ZDATABASE_TABLE.                "EC# CI_NOWHERE





How to improve performance by database checks in ABAP?

Database-specific performance checks by Code inspector

Use SCII or SCI transaction code

Within the checks, expand the Performance Checks category.

From the list of checks that appear, select the checks shown in the following screenshot:



During this, the code inspector checks the syntax of the program and refers to the attributes and technical settings of the tables involved.

  • CHECK or EXIT statements used within a SELECT statement instead of highlighting a WHERE clause.




  • SELECT statements included in a loop such as a DO loop or within a loop at ITAB.



  • Any SELECT statements that use the BYPASSING BUFFER addition.



  • SELECT statements that are without a WHERE clause will be included in the warning.

The following is one such example:

SELECT * FROM ZMYTAB INTO IT_TAB



  • Any table that is buffered but is included in a subquery will also result in a warning. This is because the buffering may not be used in this case, since the result of the subquery will be used at the database level in order to determine the selection set of the main SELECT statement.



SELECT FIELD1 INTO TABLE IT_FIELDS
FROM ZTAB1
WHERE FIELD2 EQ 'ABC' AND
FIELD3 IN ( SELECT FIELD1 FROM ZTAB2
WHERE FIELD2 EQ 'Z1' AND FIELD3 EQ'A'.)



  • If the ZTAB2 table is buffered, a warning message will appear in the result.






How to use Code Inspector in quick steps?

AdHoc Inspection for ABAP Program in Quick Method

We will see how we can do a quick code inspection on a single program or an
object set. This is also termed as an Ad Hoc Inspection, since the inspection results are not
saved and are not available for future.


1. Call the SAP transaction SCII. Alternatively, you may go to transaction SCI and on
the main screen, leave the Inspection field blank and press the Create button below
the Inspection Input field. The screen appears as follows:




2. Select the Single radio-button option. From the list box, select the Program option
and then enter the name of the program in the field provided. We enter the name
of a previously created program ZST9_TEST_FOR_ALL_ENTRIES_2.



3. From the area in the lower part of the screen, we will select the option Temporary
Definition. Then we select from the available checks that we want to be carried out.
Selecting or deselecting a particular category will include or exclude all checks within
the category in the inspection. For resetting to default values at any time, select the
menu path by going to Utilities | Set Initial. Alternatively, use the toolbar button
or press F7.



4. Finally, press F8 to carry out the inspection.


The code of the program mentioned is scanned and checked based on the selected checks.
The results are then displayed. The results comprise of tree structure (hierarchy) within nodes
corresponding to the checkbox selected. There are three columns shown for messages within
the different categories and then the checkboxes pertaining to the category in question.
These are Errors, Warnings, and Information messages. You may open the various
categories to see the detail of the messages found in each category. For example,
we have two information messages found under Use of Indexes in SELECT statement.





You may double-click on a particular message to reach the actual line of the code in the
program that generated the message in question.

While selecting the checks to be run from a particular category, a check may have further
attributes. This is denoted by the icon before it. You may click on the icon to view a list of
the attributes and choose the ones relevant for your requirement. If you find an icon, it means
that there is at least one value that must be set for the attributes contained within the check.
Otherwise, selecting the check will produce an error and the inspection will not run.



For running another inspection from the results screen, use the toolbar button .

For viewing the results in a compact display format, use the toolbar button .  


You have also the option of checking objects using object sets or the object contained within a
request. However, the transaction has a limitation that you may not check over 50 objects and
that the inspection may not be saved for reuse. In this case, the inspection is not stored and
does not have a name (that is, it is anonymous). The next recipe will cover the ones that will
overcome these limitations.


How to Sort or Sub-Total a table field in SMARTFORMS?

Sorting and Sub-totaling to table fields.

We will see how we can sort a given table within the Smart Form and calculate
totals based on a particular field as the sort criterion. In this recipe, we will use an example of
employees and their allowances and amounts.

We define a structure in the database ZST9_EMPLOYEES comprising three
fields PERNR, ALLOWANCE, and AMOUNT. We define a table type also based on this
structure, as shown in the following screenshot:




A table EMPLOYEE_TABLE (based on the defined dictionary table type) is included in the
TABLES tab of the Smart Form interface, and a corresponding work area WA_EMPLOYEE
in the global definition.

A table is then created on the Smart Form layout. The loop of the table is shown as follows:



Appropriate texts are created within the cells in order to print the employee number,
allowance, and amount values passed. A program is then created and the Smart Form is
called. A tabular output is generated.



We will see how sorting along with totaling may be so that the total of each
employee's allowance is printed at the end of each employee's details.


For subtotaling and sorting, proceed as follows:

1. Double-click the defined table node in the left-hand pane. In the right-hand pane, on
the Data tab, within Sort Criteria, select the Event on Sort End checkbox. Also, enter
PERNR as the field name.




2. This will add a PERNR Event on Sort End node.





3. We define a subtotal variable in the global definition. This is a temporary storage
variable for totals of each employee's allowances.



4. On the Calculations tab of the table, we enter the values shown in the
following screenshot:





5. Right-click the PERNR Event on Sort End node to create a table line. Use the same
line type used for the rows of the table (containing three cells).

6. For the second and third cell, we define texts outputting SUBTOTAL and VARIABLE
and SUBTOTAL respectively.

7. Also, a line of code is added after the text that clears the SUBTOTAL variable.





8. The final state will look like the one shown in following screenshot:




The settings we did in the Smart Form will output the subtotal of the allowances of each
employee as shown. At the end of each employee, the total allowances are calculated
and printed.




The entries made on the Calculation tab of the table totals all the amounts of a particular
PERNR field (the SORT criterion) and stores in the SUBTOTAL variable. The output will then be
generated at the EVENT on SORT end. After that, we clear the old value of SUBTOTAL so that
the value of the next employee may be calculated.

How to convert SmartForms into PDF document?

Converting Smart Forms to PDF output

we will see how the form output may be suppressed and returned as internal
table to our calling program and then how a PDF is generated within the program. We will
set values to some fields in the control structure of the Smart Form and use it with the
CONVERT_OTF_2_PDF function module.

For generating PDF output without showing the Smart Form on the screen, follow these steps:

1. First, we define two structures cont_parameters and myoutput based on the
dictionary structures ssfctrlop and ssfcrescl respectively.



2. Then, we assign 'X' to the setotf and no_dialog fields of the control structure.



3. The dynamic call of the Smart Form function module is then carried out.



4. Appropriate variables are then defined. The most important is the internal
table pdf_content used for storing the converted PDF output of the form.
The filesize and doc_archive tables are necessary for calling the function
module CONVERT_OTF_2_PDF.



5. The function module CONVERT_OTF_2_PDF is then called. The OTF parameter
passes the value of the field otfdata of the myoutput structure.



The control structure fields no_dialog and the getotf are assigned the value 'X'. This
ensures that the form output is suppressed but the form generated is returned to the program in
otf format. The call to the Smart Form function module (stored in the variable myfunction)
returns to the program the otf format in the otfdata field of the myoutput structure.


We then pass this otfdata to the function module CONVERT_OTF_2_PDF.
The function module converts the smart form otf to a PDF and stores it in the internal table
pdf_content passed to the function module for table lines. The PDF file may then be
saved on the desktop using the method CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD,
or e-mailed to another user.