Free SAP Netweaver Tutorials & InterviewQuestions

Home

 

SAPAG.CO.IN in this website you can find SAP Related Tutorials, like SAP ABAP ,SAP Meterial Management (MM),SAP Customer Relationship Management (CRM),MySAP,SAP Finance And Controling (FICO),SAP Sales And Distribution (SD),SAP Business Warehousing (BW),SAP Netweaver,SAP Exhcange Infrastructure (XI ),SAP Enterprise Portal (EP) ,SAP Master Data Management (MDM),SAP Web Application Server (WAS),SAP Mobile Infrastructure (MI ),SAP Business Intelegent (BI ) ,SAP Knowledge Management (KM ) and Maney more..... Tutorials @ single point.

 

 

SAP ABAP Interview Questions

  1. SAP ABAP Technical Questions ( Data Dictonary )
  2. SAP ABAP Real Time Questions
  3. SAP ABAP Reports Questions
  4. SAP ABAP Internal Tables Questions
  5. SAP Scripts and Smart Forms Questions
  6. SAP ABAP Scripts Question and Answers Part 1
  7. SAP ABAP Scripts Question and Answers Part 2
  8. SAP ABAP Scripts Question and Answers Part 3
  9. SAP ABAP Scripts Question and Answers Part 4
  10. SAP ABAP Scripts Question and Answers Part 5
  11. SAP ABAP Scripts Question and Answers Part 6
  12. SAP ABAP Scripts Question and Answers Part 7
  13. SAP ABAP BDC Programs Questions 1
  14. SAP ABAP BDC Programs Questions 2
  15. SAP ABAP BDC Programs Questions 3
  16. SAP ABAP Report Programming Questions 1
  17. SAP ABAP Report Programming Questions 2
  18. SAP ABAP Report Programming Questions 3
  19. SAP ABAP Report Programming Questions 4
  20. SAP ABAP Report Programming Questions 5
  21. SAP ABAP Report Programming Questions 6
  22. SAP ABAP Report Programming Questions 7
  23. SAP ABAP BDC , LSMW, Conversions Questions
  24. SAP ABAP Performance Tuning Questions
  25. SAP ABAP Miscellaneous Questions
  26. SAP ABAP Written Test Questions
  27. Sample Test Questions on SAP ABAP Programming
  28. SAP ABAP Interview Questions Part 1
  29. SAP ABAP Interview QUestions Part 2
  30. SAP ABAP Interview QUestions Part 3
  31. SAP ABAP Interview QUestions Part 4
  32. SAP ABAP Interview Questions Part 5
  33. SAP ABAP Interview Questions Part 6
  34. 100 SAP ABAP Interview Questions
  35. SAP ABAP Technical Interview Questions
  36. ABAP Certification Sample Questions for Abapers
  37. SAP ABAP Certification Questions
  38. SAP ABAP Questions with Answers
 

    SAP ABAP Scripts Question and Answers Part 3

    61. Calling a form from SapScript (*****)

     

    /:DEFINE &CUST& = '00000021'.
    /:PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_HF
    /:  USING &CUST&
    /:  CHANGING &NAME&
    /:ENDPERFORM.

    Dear &NAME&

    The ABAP routine could be defined as follows:

    IMPORTANT: The structure itcsy must be used for the parameters.

    REPORT Z_HENRIKF_SCRIPT_FORM .
    tables scustom.
    form get_name tables in_tab structure itcsy
    out_tab structure itcsy.

    read table in_tab index 1.

    select single * from scustom
    where id = in_tab-value.

    if sy-subrc = 0.
    read table out_tab index 1.
    move scustom-name to out_tab-value.
    modify out_tab index sy-tabix.
    else.
    read table out_tab index 1.
    move 'No name' to out_tab-value.
    modify out_tab index sy-tabix.
    endif.

    **  You could also fill the ouput parameter table this way
    READ TABLE out_par WITH KEY 'NAME1'.
    out_par-value = l_name1.

    MODIFY out_par INDEX sy-tabix.

    endform.

    Note that if you use more than one parameter you must use Using or Changing before every parameter !

    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    ......
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    ......
    /: ENDPERFORM

    62. Structure of a print program

    The print program is used to print forms. The program retieves the necesary data from datbase tables, defines the order of in which text elements are printed, chooses a form for printing and selects an output device and print options.

    Open form printing - Must be called before working with any of the other form function modules.
    call function 'OPEN_FORM'.....
    Must be ended with function module CLOSE FORM

    *To begin several indentical forms containing different data within a single spool request, begin each form using START_FORM, and end it using END_FORM
    call funtion 'START_FORM'.....

    Write text elements to a window of the form
    call function 'WRITE_FORM'.....

    Ends form
    call funtion 'END_FORM'.....

    Closes form printing
    call function 'CLOSE_FORM'....

    Examples of function calls

    OPEN FORM

    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    *         APPLICATION                 = 'TX'
    *         ARCHIVE_INDEX            =
    *         ARCHIVE_PARAMS       =
    DEVICE                            = 'PRINTER'
    DIALOG                            = 'X'
    *         FORM                               = ' '
    *         LANGUAGE                     = SY-LANGU
    OPTIONS                          = OPTIONS

    *         MAIL_SENDER                =
    *         MAIL_RECIPIENT              =
    *         MAIL_APPL_OBJECT            =
    *         RAW_DATA_INTERFACE          = '*'
    IMPORTING
    *         LANGUAGE                    =
    *         NEW_ARCHIVE_PARAMS          =
    *         RESULT                      =
    EXCEPTIONS
    CANCELED                    = 1
    DEVICE                      = 2
    FORM                        = 3
    OPTIONS                     = 4

    UNCLOSED                    = 5
    MAIL_OPTIONS                = 6
    ARCHIVE_ERROR               = 7
    INVALID_FAX_NUMBER          = 8
    MORE_PARAMS_NEEDED_IN_BATCH = 9
    OTHERS                      = 10
    .


    START_FORM

    CALL FUNCTION 'START_FORM'
    EXPORTING
    *         ARCHIVE_INDEX    =
    FORM                       = 'MY_FORM'

    *          LANGUAGE             = ' '
    *         STARTPAGE           = ' '
    *         PROGRAM              = ' '
    MAIL_APPL_OBJECT =
    IMPORTING
    *         LANGUAGE         =
    EXCEPTIONS
    FORM             = 1
    FORMAT           = 2
    UNENDED          = 3
    UNOPENED         = 4
    UNUSED           = 5
    OTHERS           = 6

    WRITE_FORM

    See 'WRITE_FORM'

    END_FORM

    CALL FUNCTION 'END_FORM'

    IMPORTING
    *        RESULT                   =
    EXCEPTIONS
    *        UNOPENED                 = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    OTHERS                   = 3

    CLOSE_FORM

    Structure for Print options (return values) - Pages selected for printing, Number of copies etc.
    DATA BEGIN OF RESULT.
    INCLUDE STRUCTURE ITCPP.
    DATA END   OF RESULT.

    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT                   = RESULT

    *         RDI_RESULT               =
    TABLES
    *         OTFDATA                  =
    EXCEPTIONS
    *         UNOPENED                 = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    *         SEND_ERROR               = 3
    *         OTHERS                   = 4.

    63. CONTROL_FORM - Calling Commands Using a program

    The function module CONTROL_FORM can be used to create SapScript control statements from within an ABAP program.

    Example:

    call function 'CONTROL_FORM'
    EXPORTING
    COMMAND = 'PROTECT'.

    call function 'WRITE_FORM'.....................

    call function 'CONTROL_FORM'
    EXPORTING
    COMMAND = 'ENDPROTECT'.

    Styles

    Styles are used to predefine paragraph and character formats for forms. SAP provides several standard styles e.g. for Address includes, on-line documentation and so on. You can define your own styles.

    To find styles, create styles and maintaine styles, use transaction SE72.

    You assign style to a text by using menu Format -> Style

    You can make temporary style changes using the control command /: STYLE

     Using graphics in SapScript

    Use transaction SE78 to inmport graphics to SAP.

    In the form painter, you can either include directly to the form using menu Edit->Graphic->Create or using the INCLUDE statement in a window.

    To use an INCLUDE stanment, goto into the woindow script editor and use menu Include->Graphic. The include can look like this for a bitmap:

    /: BITMAP MYLOGO OBJECT GRAPHICS ID BMAP TYPE BMON

    Modifications
    Considerations in connection with modifications

    The standard SAP print program should only be changed when it is absolutely necessary. If additional data is needed, these can in many cases be retrieved using a a PERFORM statement in the form instead of changing the print program..

    There can be the following reasons to change the print program:

    Structureal changes
    New text eloements are needed
    Print program to be used to print additional forms

    Determine/change which forms and printprograms that are used for printing

    The forms and print programs for a given output type and application can be found in table TNAPR Processing programs for output

    Use view V_TNAPR in (Transaction SE30) to change entries

.


.