A question on itab

hello abap masters,
in my requirement,
there are two ztables,  ZTABLE1,ZTABLE2.
there are two internal tables corresponding to above ztables :  ITAB1, ITAB2.
plz look into the foolowing code you might get better idea.
DATA: ITAB1 TYPE ZTABLE1,
WA_ITAB1 TYPE ITAB1.
DATA: ITAB2 TYPE ZTABLE2,
WA_ITAB2 TYPE ITAB2.
SELECT * FROM ZTABLE1 INTO ITAB1 .
LOOP AT ITAB1.
SELECT ALL ENTRIES FROM ZTABLE2 WHERE ITAB1-NAME EQ ZTABLE2-NAME INTO ITAB2.
MOVE FIELD1,FIELD2     FROM  ITAB1          TO ITAB2.
MOVE FIELD3,FIELD4     FROM  ZTABLE2    TO ITAB2.
ENDLOOP.
here FIELD3 is key field for ZTABLE2 but not for ZTABLE1.
CAN ANY ONE HELP ME THROUGH THIS.
one selection from ztable and another from itab.
thank you.

to make things clear here is my explanation,
in my scenario
the following data is in an itab.
date           account       amount
may01        102                  50
may01        104                  60
may01        102                   80
may02        103                   100
may02        103                   40
may03        104                   30
now what i need to do  is calculate for every combination of date and
account i need to sum up the amount like. ie,
calculate all the deposits to an account on each day like:
date         account      amount
may01     102             50+80 = 130
may01     104              60
may02      103             100+40=140
may03     104              30
can some one help me plz.

Similar Messages

  • XSLT question, Parameters from itab

    Hi Experts,
    I'm using the following code in my abap program:
    TYPE-POOLS: abap.
    TYPES: BEGIN OF line_type,
      vartag   TYPE string,
      varvalue TYPE string,
      END OF line_type.
    TYPES: itype TYPE TABLE OF line_type.
    DATA: gt_source_itab TYPE abap_trans_srcbind_tab,
          gs_source_wa   TYPE abap_trans_resbind.
    DATA: line TYPE line_type.
    DATA: itab TYPE itype.
    DATA: output_stream TYPE xstring.
    clear line.
    line-vartag   = 'tagname'.
    line-varvalue = 'value'.
    APPEND line TO itab.
    GET REFERENCE OF itab INTO gs_source_wa-value.
    gs_source_wa-name = 'TAG'.
    APPEND gs_source_wa TO gt_source_itab.
    TRY.
        CALL TRANSFORMATION z_cd_xsl
          SOURCE (gt_source_itab)
          RESULT XML output_stream.
    In my Transformation I'm having trouble using the right expression in the select-attribute of xslt-element "xsl:with-param".
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
    >
    <xsl:include sap:name="Z_INCLUDE_UDKXML"/>
    <!-- xsl:strip-space elements="*"/ -->
    <xsl:template match="/">
    <xsl:call-template name="udk_nachrichtenAnfang">
                   <xsl:with-param name="NachrAnf_MesBez" select=<Don't know what to do here> />
    There are no syntactic errors (rest of the corresponding code is in the include). If i just set the select attribute with plain text, it works. But I want to use the value from my abap variable "varvalue".
    I tried select='$LINE-VARVALUE', select="//TAG/VARVALUE", select="VARVALUE" and several others, didn't work.
    I'm guessing I'll need some XPATH expression to access the serialized asXML deep structure, but I can't figure it out
    Regards, Lukas

    Check this code.....
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <TAG>
          <xsl:apply-templates select="//TAG/item"/>
        </TAG>
      </xsl:template>
      <xsl:template match="TAG/item">
        <item>
          <VARTAG>
            <xsl:value-of select="VARTAG"/>
          </VARTAG>
          <VARVALUE>
            <xsl:value-of select="VARVALUE"/>
          </VARVALUE>
        </item>
      </xsl:template>
    </xsl:transform>

  • Newbie question on "refresh itab"

    Dear forumers,
    What does the sequence of these codes mean? More specifically, what does REFRESH do to lt_tmp_mchb and why is it needed here?
    REFRESH lt_tmp_mchb.
    lt_tmp_mchb[] = tt_mchb[].
    DELETE ADJACENT DUPLICATES FROM lt_tmp_mchb COMPARING matnr werks.
    Fuller code snippet:-
    DATA:
    lt_tmp_mchb TYPE STANDARD TABLE OF ty_mchb WITH HEADER LINE,
    lt_tmp_msku TYPE STANDARD TABLE OF ty_msku WITH HEADER LINE.
      IF r_n_spe = 'X'.
        SELECT matnr werks charg vfdat
            INTO TABLE tt_mcha
            FROM mcha
            WHERE werks IN s_werks
            AND vfdat BETWEEN sy-datum AND expire_within.
        SORT tt_mcha BY matnr werks charg.
        IF tt_mcha[] IS NOT INITIAL.
          SELECT matnr werks lgort charg clabs
              INTO TABLE tt_mchb
              FROM mchb
              FOR ALL ENTRIES IN tt_mcha
              WHERE matnr = tt_mcha-matnr
              AND   werks = tt_mcha-werks
              AND   lgort IN s_lgort
              AND   charg = tt_mcha-charg
              AND   lvorm <> 'X'.
          SORT tt_mchb BY matnr werks lgort charg.
        ENDIF.
        lt_tmp_mchb[] = tt_mchb[].
        DELETE ADJACENT DUPLICATES FROM lt_tmp_mchb COMPARING matnr.
        IF lt_tmp_mchb[] IS NOT INITIAL.
          SELECT matnr bismt mhdrz meins matkl
              INTO TABLE ts_mara
              FROM mara
              FOR ALL ENTRIES IN lt_tmp_mchb
              WHERE matnr = lt_tmp_mchb-matnr
              AND matkl IN s_matkl.
          SELECT matnr maktx
              INTO TABLE ts_makt
              FROM makt
              FOR ALL ENTRIES IN ts_mara
              WHERE matnr = ts_mara-matnr
              AND spras = sy-langu.
        ENDIF.
        REFRESH lt_tmp_mchb.
        lt_tmp_mchb[] = tt_mchb[].
        DELETE ADJACENT DUPLICATES FROM lt_tmp_mchb COMPARING matnr werks.
        IF lt_tmp_mchb[] IS NOT INITIAL.
          SELECT matnr bwkey bwtar lbkum salk3
              INTO TABLE tt_mbew
              FROM mbew
              FOR ALL ENTRIES IN lt_tmp_mchb
              WHERE matnr = lt_tmp_mchb-matnr
              AND bwkey = lt_tmp_mchb-werks.
          SORT tt_mbew BY matnr bwkey bwtar.
        ENDIF.
        REFRESH lt_tmp_mchb.
        lt_tmp_mchb[] = tt_mchb[].
        DELETE ADJACENT DUPLICATES FROM lt_tmp_mchb
                                          COMPARING matnr werks lgort.

    Hi...
    REFRESH ITAB or CLEAR ITAB[].
    Both these statements to clear the contents of internal table body. As we know where CLEAR ITAB clears the contents of its header line.
    In your case...
    REFRESH lt_tmp_mchb.  <----- *lt_tmp_mchb* table body contents are deleted. So now its empty
    lt_tmp_mchb[] = tt_mchb[]. <------- *lt_tmp_mchb* filled with the contents of *tt_mchb*. For this both itabs should have same structure
    DELETE ADJACENT DUPLICATES FROM lt_tmp_mchb COMPARING matnr werks.<------ You are deleting the repeated entries in *lt_tmp_mchb* by comparing with those two fields.
    Thanks,
    Naveen.I

  • ALV question: Changes in cells not updated in itab

    Hi experts,
    Please help this newbie here. I have problem with updating my internal table with multiple cells changes in my ALV. I've used the FM 'GET_GLOBALS_FROM_SLVC_FULLSCR' and the method 'CHECK_CHANGED_DATA'. When I debugged, I could see the changes being captured in ref1.
    How can I make sure that the changes were already updated into the itab new_antrag after I presses the button command 'EX_SEND'? The original program is leave program RPTARQUIATEST.
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                                                      RS_SELFIELD LIKE SLIS_SELFIELD
    Data: ref1 type ref to cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          E_GRID = ref1.
    call method ref1->check_changed_data.
    read table new_antrag index rs_selfield-index into wa_new_antrag.
    case r_ucomm.
      when 'EX_SEND'.
          perform before_prepare using rs_selfield
                                                new_antrag
                                       changing
                                                wa_new_antrag.
          perform request_check using req
                                                pernr
                                                modus
                                                check_command
                                                g_check_mode
                                        changing
                                                checked_req
                                                messages.
          perform request_exec using wa_new_antrag-request_id
                                                pernr
                                                modus
                                                c_cmd_exec_cmd
                                        changing
                                                exec_req
                                                messages.
          perform after_exec using exec_req.
      endcase.
    ENDFORM.
    Please help. Points will be awarded for constructive solutions which help in the problem solving. Thank you.
    Cheers,
    Damien

    Hi,
    where you are filling itab new_*  there write condition like  on ehich field you are expecting changes check with condition .
    after put sy-subrc variable if operation success fields are chnged with necessary changes.
    It can help you .
    try it once where you have written code for new_* table.
    reward points if usefull

  • Itab question

    Hi All,
    I have a z table in data dictionary with fields f1 f2 and f3. f1 and f2 form the primary key,
    Now i have an itab with fields f2 and f3. I want to update the table ztable from the itab for a key f1(which i already have ).
    I have tried modify ztable from itab where f1 = f1. but it doesnt like it.
    Can you please advise what will be the best way
    thanks

    First read the SAP documentation on MODIFY/UDPATE FROM internal table. You will notice that the internal table must have a structure compatible with the database table. So you should find yourself.
    - [MODIFY dbtab FROM TABLE itab |http://help.sap.com/abapdocu_70/en/ABAPMODIFY_SOURCE.htm#!ABAP_ALTERNATIVE_2@2@] or [UPDATE dbtab FROM TABLE itab|http://help.sap.com/abapdocu_70/en/ABAPUPDATE_SOURCE.htm#!ABAP_ALTERNATIVE_3@3@]
    - [Work Areas in Open SQL Statements|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm]
    Regards,
    Raymond

  • What will be the Structure of itab created with "LIKE TABLE OF sy-ucomm"

    Data fcode like table of sy-ucomm
    The table thus created will have one column but it will not have any structure.
    How can I write a code with this effect:
    LOOP AT fcode.
      WRITE:/ fcode-????.
    ENDLOOP.
    This question is just out of my curiosity I undertsand that by altering the declaration like
    Data begin of fcode occurs 0,
    data ucomm like sy-ucomm,
    end of fcode.
    I will be able to name it. But out of the academic interest I want to know that without altering the decalation part can we do it

    Hello Flora,
    There are two points to be noted here -
    1. the table you have created doesn't have a header line.
    2. The table you have created doesn't have a "structure".
    All internal tables declared with reference to a non-structural type / object have got only one field.
    for example -
    Data ITAB TYPE I OCCURS 0.
    These internal tables have certain limitations. They cannot be displayed in an ALV Grid, for instance.
    And since they do not have a <i>structure</i>, the hypen operator '-' doesn't really make sense. When you say SYST-UCOMM, you are referring to the field UCOMM in the structure SYST.
    Hope that's clear.
    Regards,
    Anand Mandalika.

  • Can any one give me answer for these questions

    Can any one give me answer for these questions. I  got these questions from net plz post the answers you know
    ABAP CERTIFICATION QUESTIONS
    1. If a table does not have MANDT as part of the primary key, it is ____.
    A: A structure
    B: Invalid
    C: Client-independent
    D: Not mandatory
    2. In regard to CALL, which of the following is NOT a valid statement?
    A: CALL FUNCTION
    B: CALL SCREEN
    C: CALL TRANSACTION
    D: CALL PROGRAM
    3. Name the type of ABAP Dictionary table that has these characteristics:
    Same number of fields as the database table
    Same name as database table
    Maps 1:1 to database table
    A: Pooled
    B: Cluster
    C: Transparent
    D: View
    4. An event starts with an event keyword and ends with:
    A: Program execution.
    B: END-OF-EVENT.
    C: Another event keyword.
    D: END-EVENT.
    5. What is the system field for the current date?
    A: SY-DATUM
    B: SY-DATE
    C: SY-DATID
    D: SY-SDATE
    6. The following code indicates:
    SELECT fld1 fld2 FROM tab1 APPENDING TABLE itab
    WHERE fld1 IN sfld1.
    A: Add rows to the existing rows of itab.
    B: Add rows to itab after first deleting any existing rows of itab.
    C: Select rows from tab1 for matching itab entries.
    D: Nothing, this is a syntax error.
    7. You may change the following data object as shown below so that it equals 3.14.
    CONSTANTS: PI type P decimals 2 value '3.1'.
    PI = '3.14'.
    A: True
    B: False
    8. The SAP service that ensures data integrity by handling locking is called:
    A: Update
    B: Dialog
    C: Enqueue/Dequeue
    D: Spool
    9. Which of these sentences most accurately describes the GET VBAK LATE. event?
    A: This event is processed before the second time the GET VBAK event is processed.
    B: This event is processed after all occurrences of the GET VBAK event are completed.
    C: This event will only be processed after the user has selected a basic list row.
    D: This event is only processed if no records are selected from table VBAK.
    10. Which of the following is not a true statement in regard to a hashed internal table type?
    A: Its key must always be UNIQUE.
    B: May only be accessed by its key.
    C: Response time for accessing a row depends on the number of entries in the table.
    D: Declared using internal table type HASHED TABLE.
    11. TO include database-specific SQL statements within an ABAP program, code them between:
    A: NATIVE SQL_ENDNATIVE.
    B: DB SQL_ENDDB.
    C: SELECT_ENDSELECT.
    D: EXEC SQL_ENDEXEC.
    12. To measure how long a block of code runs, use the ABAP statement:
    A: GET TIME .
    B: SET TIME FIELD .
    C: GET RUN TIME FIELD .
    D: SET CURSOR FIELD .
    13. When a secondary list is being processed, the data of the basic list is available by default.
    A: True
    B: False
    14. Given:
    DATA: BEGIN OF itab OCCURS 10,
    qty type I,
    END OF itab.
    DO 25 TIMES. itab-qty = sy-index. APPEND itab. ENDDO.
    LOOP AT itab WHERE qty > 10.
    WRITE: /1 itab-qty.
    ENDLOOP.
    This will result in:
    A: Output of only those itab rows with a qty field less than 10
    B: Output of the first 10 itab rows with a qty field greater than 10
    C: A syntax error
    D: None of the above
    15. After a DESCRIBE TABLE statement SY-TFILL will contain
    A: The number of rows in the internal table.
    B: The current OCCURS value.
    C: Zero, if the table contains one or more rows.
    D: The length of the internal table row structure.
    16. You may declare your own internal table type using the TYPES keyword.
    A: True
    B: False
    17. After adding rows to an internal table with COLLECT, you should avoid adding more rows with APPEND.
    A: True
    B: False
    18. Which of the following is not a component of control break processing when looping at an internal table?
    A: AT START OF
    B: AT FIRST
    C: AT LAST
    D: AT NEW
    19. A dictionary table is made available for use within an ABAP program via the TABLES statement.
    A: True
    B: False
    20. Which of the following would be best for hiding further selection criteria until a function is chosen?
    A: AT NEW SELECTION-SCREEN
    B: SELECTION-SCREEN AT LINE-SELECTION
    C: SUBMIT SELECTION-SCREEN
    D: CALL SELECTION-SCREEN
    21. What must you code in the flow logic to prevent a module from being called unless a field contains a non-initial value (as determined by its data type)?
    A: ON INPUT
    B: CHAIN
    C: FIELD
    D: ON REQUEST
    22. The AT USER-COMMAND event is triggered by functions defined in the ____.
    A: screen painter
    B: ABAP report
    C: menu painter status
    D: ABAP Dictionary
    23. In regard to a function group, which of the following is NOT a true statement?
    A: Combines similar function modules.
    B: Shares global data with all its function modules.
    C: Exists within the ABAP workbench as an include program.
    D: Shares subroutines with all its function modules.
    24. In regard to SET PF-STATUS, you can deactivate unwanted function codes by using ____.
    A: EXCLUDING
    B: IMMEDIATELY
    C: WITHOUT
    D: HIDE
    25. In regard to data transported in PAI when the FIELD statement is used, which of the following is NOT a true statement?
    A: Fields in PBO are transported directly from PAI.
    B: Fields with identical names are transported to the ABAP side.
    C: Fields not defined in FIELD statements are transported first.
    D: Fields that are defined in FIELD statements are transported when their corresponding module is called.
    26. The order in which an event appears in the ABAP code determines when the event is processed.
    A: True
    B: False
    27. A field declared as type T has the following internal representation:
    A: SSMMHH
    B: HHMMSS
    C: MMHHSS
    D: HHSSMM
    28. Which of the following is NOT a component of the default standard ABAP report header?
    A: Date and Time
    B: List title
    C: Page number
    D: Underline
    29. Assuming a pushbutton with function code 'FUNC' is available in the toolbar of a list report, what event is processed when the button is clicked?
    A: AT USER-COMMAND.
    B: AT PFn.
    C: AT SELECTION-SCREEN.
    D: END-OF-SELECTION.
    30. In regard to field selection, what option of the SELECT statement is required?
    A: FOR ALL ENTRIES
    B: WHERE
    C: INTO
    D: MOVE-CORRESPONDING
    31. The following program outputs what?
    report zjgtest1
    write: /1 'Ready_'.
    PARAMETER: test.
    INITIALIZATION.
    write: /1 'Set_'.
    START-OF-SELECTION.
    write: /1 'GO!!'.
    A: Set_ GO!! (each on its own line)
    B: Set_ Ready_ GO!! (all on their own lines)
    C: Ready_ GO!! (each on its own line)
    D: Ready_ Set_ GO!! (all on their own lines)
    32. To declare a selection criterion that does not appear on the selection screen, use:
    A: NO-DISPLAY
    B: INVISIBLE
    C: MODIF ID
    D: OBLIGATORY
    33. An internal table that is nested within another internal table should not contain a header line.
    A: True
    B: False
    34. What is output by the following code?
    DATA: BEGIN OF itab OCCURS 0, letter type c, END OF itab.
    itab-letter = 'A'. APPEND itab. itab-letter = 'B'. APPEND itab.
    itab-letter = 'C'. APPEND itab. itab-letter = 'D'. APPEND itab.
    LOOP AT itab.
    SY-TABIX = 2.
    WRITE itab-letter.
    EXIT.
    ENDLOOP.
    A: A
    B: A B C D
    C: B
    D: B C D
    35. To select all database entries for a certain WHERE clause into an internal table in one step, use
    A: SELECT_INTO TABLE itab_
    B: SELECT_INTO itab_
    C: SELECT_APPENDING itab
    D: SELECT_itab_
    36. After a successful SELECT statement, what does SY-SUBRC equal?
    A: 0
    B: 4
    C: 8
    D: Null
    37. This selection screen syntax forces the user to input a value:
    A: REQUIRED-ENTRY
    B: OBLIGATORY
    C: DEFAULT
    D: SELECTION-SCREEN EXCLUDE
    38. If the following code results in a syntax error, the remedy is:
    DATA: itab TYPE SORTED TABLE OF rec_type WITH UNIQUE KEY field1
    WITH HEADER LINE.
    itab-field1 = 'Company'. itab-field2 = '1234'. INSERT TABLE itab.
    itab-field1 = 'Bank'. itab-field2 = 'ABC'. INSERT TABLE itab.
    SORT itab.
    LOOP AT itab.
    write: /1 itab-field1, itab-field2.
    ENDLOOP.
    A: There is no syntax error here
    B: Remove the SORT statement
    C: Change INSERT to APPEND
    D: Add a WHERE clause to the loop
    39. If this code results in an error, the remedy is:
    SELECT fld1 fld2 FROM tab1 WHERE fld3 = pfld3.
    WRITE: /1 tab1-fld1, tab1-fld2.
    ENDSELECT.
    A: Add a SY-SUBRC check.
    B: Change the WHERE clause to use fld1 or fld2.
    C: Remove the /1 from the WRITE statement.
    D: Add INTO (tab1-fld1, tab1-fld2).
    40. When modifying an internal table within LOOP AT itab. _ ENDLOOP. you must include an index number.
    A: True
    B: False
    41. To allow the user to enter values on the screen for a list field, use:
    A: OPEN LINE.
    B: SET CURSOR FIELD.
    C: WRITE fld AS INPUT FIELD.
    D: FORMAT INPUT ON.
    42. Before a function module may be tested, it must first be:
    A: Linked
    B: Authorized
    C: Released
    D: Active
    43. To include a field on your screen that is not in the ABAP Dictionary, which include program should contain the data declaration for the field?
    A: PBO module include program
    B: TOP include program
    C: PAI module include program
    D: Subroutine include program
    44. If a table contains many duplicate values for a field, minimize the number of records returned by using this SELECT statement addition.
    A: MIN
    B: ORDER BY
    C: DISTINCT
    D: DELETE
    45. The system internal table used for dynamic screen modification is named:
    A: ITAB
    B: SCREEN
    C: MODTAB
    D: SMOD
    46. Within the source code of a function module, errors are handled via the keyword:
    A: EXCEPTION
    B: RAISE
    C: STOP
    D: ABEND
    47. Which system field contains the contents of a selected line?
    A: SY-CUCOL
    B: SY-LILLI
    C: SY-CUROW
    D: SY-LISEL
    48. The following statement writes what type of data object?
    WRITE: /1 'Total Amount:'.
    A: Text literal
    B: Text variable
    C: In-code comment
    D: Text integer
    49. For the code below, second_field is of what data type?
    DATA: first_field type P, second_field like first_field.
    A: P
    B: C
    C: N
    D: D
    50. Which of the following describes the internal representation of a type D data object?
    A: DDMMYYYY
    B: YYYYDDMM
    C: MMDDYYYY
    D: YYYYMMDD
    51. A BDC program is used for all of the following except:
    A: Downloading data to a local file
    B: Data interfaces between SAP and external systems
    C: Initial data transfer
    D: Entering a large amount of data
    52. In regard to PERFORM, which of the following is NOT a true statement?
    A: May be used within a subroutine.
    B: Requires actual parameters.
    C: Recursive calls are allowed in ABAP.
    D: Can call a subroutine in another program.
    53. What is the transaction code for the ABAP Editor?
    A: SE11
    B: SE38
    C: SE36
    D: SE16
    54. In regard to HIDE, which of the following is NOT a true statement?
    A: Saves the contents of variables in relation to a list line's row number.
    B: The hidden variables must be output on a list line.
    C: The HIDE area is retrieved when using the READ LINE statement.
    D: The HIDE area is retrieved when an interactive event is triggered.
    55. Database locks are sufficient in a multi-user environment.
    A: True
    B: False
    56. The complete technical definition of a table field is determined by the field's:
    A: Domain
    B: Field name
    C: Data type
    D: Data element
    57. In regard to LEAVE, which of the following is NOT a true statement?
    A: May be used to return immediately to a calling program.
    B: May be used to stop the current loop pass and get the next.
    C: May be used to start a new transaction.
    D: May be used to go to the next screen.
    58. The following code indicates:
    SELECT fld6 fld3 fld2 fld1 FROM tab1 INTO CORRESPONDING FIELDS OF TABLE itab
    WHERE fld3 = pfld3.
    A: The order of the fields in itab does not matter.
    B: Fill the header line of itab, but not the body.
    C: Table itab can only contain fields also in table tab1.
    D: None of the above.
    59. The ABAP statement below indicates that the program should continue with the next line of code if the internal table itab:
    CHECK NOT itab[] IS INITIAL.
    A: Contains no rows
    B: Contains at least one row
    C: Has a header line
    D: Has an empty header line
    60. What will be output by the following code?
    DATA: BEGIN OF itab OCCURS 0, fval type i, END OF itab.
    itab-fval = 1. APPEND itab.
    itab-fval = 2. APPEND itab.
    FREE itab.
    WRITE: /1 itab-fval.
    A: 2
    B: 0
    C: blank
    D: 1
    61. To allow the user to enter a range of values on a selection screen, use the ABAP keyword:
    A: DATA.
    B: RANGES.
    C: PARAMETERS.
    D: SELECT-OPTIONS.
    62. If an internal table is declared without a header line, what else must you declare to work with the table's rows?
    A: Another internal table with a header line.
    B: A work area with the same structure as the internal table.
    C: An internal table type using the TYPES statement.
    D: A PARAMETER.
    63. Assuming an internal table contains 2000 entries, how many entries will it have after the following line of code is executed?
    DELETE itab FROM 1500 TO 1700.
    A: This is a syntax error.
    B: 1801
    C: 1800
    D: 1799
    64. To remove lines from a database table, use ____.
    A: UPDATE
    B: MODIFY
    C: ERASE
    D: DELETE
    65. All of the following may be performed using SET CURSOR except:
    A: Move the cursor to a specific field on a list.
    B: Move the cursor to a specific list line.
    C: Move the cursor to a specific pushbutton, activating that function.
    D: Move the cursor to a specific row and column on a list.
    66. When is it optional to pass an actual parameter to a required formal parameter of a function module?
    A: The actual parameter is type C.
    B: The formal parameter contains a default value.
    C: The formal parameter's \"Reference\" attribute is turned on.
    D: It is never optional.
    67. Coding two INITIALIZATION events will cause a syntax error.
    A: True
    B: False
    68. Adding a COMMIT WORK statement between SELECT_ENDSELECT is a good method for improving performance.
    A: True
    B: False
    69. To save information on a list line for use after the line is selected, use this keyword.
    A: APPEND
    B: EXPORT
    C: WRITE
    D: HIDE
    70. To bypass automatic field input checks, include this in PAI.
    A: AT EXIT-COMMAND
    B: ON INPUT
    C: ON REQUEST
    D: LEAVE TO SCREEN 0.
    71. Within a function module's source code, if the MESSAGE_RAISING statement is executed, all of the following system fields are filled automatically except:
    A: SY-MSGTY
    B: SY-MSGNO
    C: SY-MSGV1
    D: SY-MSGWA
    72. The following code indicates:
    REPORT ZLISTTST.
    START-OF-SELECTION.
    WRITE: text-001.
    FORMAT HOTSPOT ON.
    WRITE: text-002.
    FORMAT HOTSPOT OFF.
    AT LINE-SELECTION.
    WRITE / text-003.
    A: Text-002 may not be selected.
    B: The value of text-002 is stored in a special memory area.
    C: Text-002 may be clicked once to trigger the output of text-003.
    D: None of the above.
    73. The ____ type of ABAP Dictionary view consists of one or more transparent tables and may be accessed by an ABAP program using Open SQL.
    A: Database view
    B: Projection view
    C: Help view
    D: Entity view
    74. A concrete field is associated with a field-symbol via ABAP keyword
    A: MOVE
    B: WRITE
    C: ASSIGN
    D: VALUE
    75. The output for the following code will be:
    report zabaprg.
    DATA: char_field type C.
    char_field = 'ABAP data'.
    WRITE char_field.
    A: ABAP data
    B: A
    C: Nothing, there is a syntax error
    D: None of the above
    76. Page footers are coded in the event:
    A: TOP-OF-PAGE.
    B: END-OF-SELECTION.
    C: NEW-PAGE.
    D: END-OF-PAGE.
    77. The event AT SELECTION-SCREEN OUTPUT. occurs before the selection screen is displayed and is the best event for assigning default values to selection criteria.
    A: True
    B: False
    78. The TABLES statement declares a data object.
    A: True
    B: False
    79. Assuming tab1-fld7 is not a key field, how can you prevent reading all the table rows?
    SELECT fld1 fld2 fld3 FROM tab1 INTO (fld4, fld5, fld6)
    WHERE fld7 = pfld7.
    WRITE: /1 fld4, fld5, fld6.
    ENDSELECT.
    A: Take fld7 out of the WHERE clause.
    B: Create an index in the ABAP Dictionary for tab1-fld7.
    C: Use INTO TABLE instead of just INTO.
    D: Take the WRITE statement out of the SELECT_ENDSELECT.
    80. Which of the following is NOT a required attribute when creating an ABAP program?
    A: Application
    B: Title
    C: Status
    D: Type
    81. When creating a transparent table in the ABAP Dictionary, which step automatically creates the table in the underlying database?
    A: Adding technical settings to the table
    B: Checking the table syntax
    C: Saving the table
    D: Activating the table
    82. Within the ABAP program attributes, Type = 1 represents:
    A: INCLUDE program
    B: Online program
    C: Module pool
    D: Function group
    E: Subroutine pool
    83. If this code results in an error, the remedy is:
    SELECT fld1 SUM( fld1 ) FROM tab1 INTO_
    A: Remove the spaces from SUM( fld1 ).
    B: Move SUM( fld1 ) before fld1.
    C: Add GROUP BY f1.
    D: Change to SUM( DISTINCT f1 ).
    84. Which keyword adds rows to an internal table while accumulating numeric values?
    A: INSERT
    B: APPEND
    C: COLLECT
    D: GROUP
    85. Assuming itab has a header line, what will be output by the following code?
    READ TABLE itab INDEX 3 TRANSPORTING field1.
    WRITE: /1 itab-field1, itab-field2.
    A: The contents of the third row's itab-field1.
    B: The contents of the third row's itab-field1 and itab-field2.
    C: The contents of the third row's itab-field2.
    D: Nothing.
    86. The following code indicates:
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS: myparam(10) type C,
    Myparam2(10) type N,
    SELECTION-SCREEN END OF BLOCK.
    A: Draw a box around myparam and myparam2 on the selection screen.
    B: Allow myparam and myparam2 to be ready for input during an error dialog.
    C: Do not display myparam and myparam2 on the selection screen.
    D: Display myparam and myparam2 only if both fields have default values.
    87. Which statement will sort the data of an internal table with fields FRUIT, QTY, and PRICE so that it appears as follows?
    FRUIT QTY PRICE
    Apples 12 22.50
    Apples 9 18.25
    Oranges 15 17.35
    Bananas 20 10.20
    Bananas 15 6.89
    Bananas 5 2.75
    A: SORT itab DESCENDING BY QTY PRICE.
    B: SORT itab BY PRICE FRUIT.
    C: SORT itab.
    D: SORT itab BY PRICE DESCENDING.
    88. Which keyword adds a line anywhere within an internal table?
    A: APPEND
    B: MODIFY
    C: ADD
    D: INSERT
    89. To read a single line of an internal table, use the following:
    A: LOOP AT itab. _ ENDLOOP.
    B: READ itab.
    C: SELECT SINGLE * FROM itab.
    D: READ TABLE itab.
    90. Which Open SQL statement should not be used with cluster databases?
    A: UPDATE
    B: MODIFY
    C: DELETE
    D: INSERT
    91. To include a field on your screen that is not in the ABAP Dictionary, which include program should contain the data declaration for the field?
    A: PBO module include program
    B: TOP include program
    C: PAI module include program
    D: Subroutine include program
    92. This flow logic statement is used to make multiple fields open for input after an error or warning message.
    A: GROUP
    B: FIELD-GROUP
    C: CHAIN
    D: LOOP AT SCREEN
    93. Given:
    PERFORM subroutine USING var.
    The var field is known as what type of parameter?
    A: Formal
    B: Actual
    C: Static
    D: Value

    ANSWERS :
    1. If a table does not have MANDT as part of the primary key, it is ____.
    A: A structure
    B: Invalid
    C: Client-independent
    D: Not mandatory
    Ans : C
    2. In regard to CALL, which of the following is NOT a valid statement?
    A: CALL FUNCTION
    B: CALL SCREEN
    C: CALL TRANSACTION
    D: CALL PROGRAM
    Ans : D
    3. Name the type of ABAP Dictionary table that has these characteristics:
    Same number of fields as the database table
    Same name as database table
    Maps 1:1 to database table
    A: Pooled
    B: Cluster
    C: Transparent
    D: View
    Ans : C
    4. An event starts with an event keyword and ends with:
    A: Program execution.
    B: END-OF-EVENT.
    C: Another event keyword.
    D: END-EVENT.
    Ans: C
    5. What is the system field for the current date?
    A: SY-DATUM
    B: SY-DATE
    C: SY-DATID
    D: SY-SDATE
    Ans : A
    6. The following code indicates:
    SELECT fld1 fld2 FROM tab1 APPENDING TABLE itab
    WHERE fld1 IN sfld1.
    A: Add rows to the existing rows of itab.
    B: Add rows to itab after first deleting any existing rows of itab.
    C: Select rows from tab1 for matching itab entries.
    D: Nothing, this is a syntax error.
    Ans : B
    7. You may change the following data object as shown below so that it equals 3.14.
    CONSTANTS: PI type P decimals 2 value '3.1'.
    PI = '3.14'.
    A: True
    B: False
    Ans : B
    8. The SAP service that ensures data integrity by handling locking is called:
    A: Update
    B: Dialog
    C: Enqueue/Dequeue
    D: Spool
    Ans : C
    9. Which of these sentences most accurately describes the GET VBAK LATE. event?
    A: This event is processed before the second time the GET VBAK event is processed.
    B: This event is processed after all occurrences of the GET VBAK event are completed.
    C: This event will only be processed after the user has selected a basic list row.
    D: This event is only processed if no records are selected from table VBAK.
    Ans :
    10. Which of the following is not a true statement in regard to a hashed internal table type?
    A: Its key must always be UNIQUE.
    B: May only be accessed by its key.
    C: Response time for accessing a row depends on the number of entries in the table.
    D: Declared using internal table type HASHED TABLE.
    Ans : C
    11. TO include database-specific SQL statements within an ABAP program, code them between:
    A: NATIVE SQL_ENDNATIVE.
    B: DB SQL_ENDDB.
    C: SELECT_ENDSELECT.
    D: EXEC SQL_ENDEXEC.
    Ans : D
    12. To measure how long a block of code runs, use the ABAP statement:
    A: GET TIME .
    B: SET TIME FIELD .
    C: GET RUN TIME FIELD .
    D: SET CURSOR FIELD .
    Ans : C
    13. When a secondary list is being processed, the data of the basic list is available by default.
    A: True
    B: False
    Ans : B
    14. Given:
    DATA: BEGIN OF itab OCCURS 10,
    qty type I,
    END OF itab.
    DO 25 TIMES. itab-qty = sy-index. APPEND itab. ENDDO.
    LOOP AT itab WHERE qty > 10.
    WRITE: /1 itab-qty.
    ENDLOOP.
    This will result in:
    A: Output of only those itab rows with a qty field less than 10
    B: Output of the first 10 itab rows with a qty field greater than 10
    C: A syntax error
    D: None of the above
    Ans : B
    15. After a DESCRIBE TABLE statement SY-TFILL will contain
    A: The number of rows in the internal table.
    B: The current OCCURS value.
    C: Zero, if the table contains one or more rows.
    D: The length of the internal table row structure.
    Ans ; A
    16. You may declare your own internal table type using the TYPES keyword.
    A: True
    B: False
    Ans : A
    17. After adding rows to an internal table with COLLECT, you should avoid adding more rows with APPEND.
    A: True
    B: False
    Ans : A
    18. Which of the following is not a component of control break processing when looping at an internal table?
    A: AT START OF
    B: AT FIRST
    C: AT LAST
    D: AT NEW
    Ans : A
    19. A dictionary table is made available for use within an ABAP program via the TABLES statement.
    A: True
    B: False
    Ans : A
    20. Which of the following would be best for hiding further selection criteria until a function is chosen?
    A: AT NEW SELECTION-SCREEN
    B: SELECTION-SCREEN AT LINE-SELECTION
    C: SUBMIT SELECTION-SCREEN
    D: CALL SELECTION-SCREEN
    Ans : D
    21. What must you code in the flow logic to prevent a module from being called unless a field contains a non-initial value (as determined by its data type)?
    A: ON INPUT
    B: CHAIN
    C: FIELD
    D: ON REQUEST
    Ans : A
    22. The AT USER-COMMAND event is triggered by functions defined in the ____.
    A: screen painter
    B: ABAP report
    C: menu painter status
    D: ABAP Dictionary
    Ans : C
    23. In regard to a function group, which of the following is NOT a true statement?
    A: Combines similar function modules.
    B: Shares global data with all its function modules.
    C: Exists within the ABAP workbench as an include program.
    D: Shares subroutines with all its function modules.
    Ans ; C
    24. In regard to SET PF-STATUS, you can deactivate unwanted function codes by using ____.
    A: EXCLUDING
    B: IMMEDIATELY
    C: WITHOUT
    D: HIDE
    Ans : A
    25. In regard to data transported in PAI when the FIELD statement is used, which of the following is NOT a true statement?
    A: Fields in PBO are transported directly from PAI.
    B: Fields with identical names are transported to the ABAP side.
    C: Fields not defined in FIELD statements are transported first.
    D: Fields that are defined in FIELD statements are transported when their corresponding module is called.
    Ans ; C
    26. The order in which an event appears in the ABAP code determines when the event is processed.
    A: True
    B: False
    Ans : B
    27. A field declared as type T has the following internal representation:
    A: SSMMHH
    B: HHMMSS
    C: MMHHSS
    D: HHSSMM
    Ans : B
    28. Which of the following is NOT a component of the default standard ABAP report header?
    A: Date and Time
    B: List title
    C: Page number
    D: Underline
    Ans ; A
    29. Assuming a pushbutton with function code 'FUNC' is available in the toolbar of a list report, what event is processed when the button is clicked?
    A: AT USER-COMMAND.
    B: AT PFn.
    C: AT SELECTION-SCREEN.
    D: END-OF-SELECTION.
    Ans : A
    30. In regard to field selection, what option of the SELECT statement is required?
    A: FOR ALL ENTRIES
    B: WHERE
    C: INTO
    D: MOVE-CORRESPONDING
    Ans : B
    31. The following program outputs what?
    report zjgtest1
    write: /1 'Ready_'.
    PARAMETER: test.
    INITIALIZATION.
    write: /1 'Set_'.
    START-OF-SELECTION.
    write: /1 'GO!!'.
    A: Set_ GO!! (each on its own line)
    B: Set_ Ready_ GO!! (all on their own lines)
    C: Ready_ GO!! (each on its own line)
    D: Ready_ Set_ GO!! (all on their own lines)
    Ans : C
    32. To declare a selection criterion that does not appear on the selection screen, use:
    A: NO-DISPLAY
    B: INVISIBLE
    C: MODIF ID
    D: OBLIGATORY
    Ans : A
    33. An internal table that is nested within another internal table should not contain a header line.
    A: True
    B: False
    Ans : B
    34. What is output by the following code?
    DATA: BEGIN OF itab OCCURS 0, letter type c, END OF itab.
    itab-letter = 'A'. APPEND itab. itab-letter = 'B'. APPEND itab.
    itab-letter = 'C'. APPEND itab. itab-letter = 'D'. APPEND itab.
    LOOP AT itab.
    SY-TABIX = 2.
    WRITE itab-letter.
    EXIT.
    ENDLOOP.
    A: A
    B: A B C D
    C: B
    D: B C D
    Ans : A
    35. To select all database entries for a certain WHERE clause into an internal table in one step, use
    A: SELECT_INTO TABLE itab_
    B: SELECT_INTO itab_
    C: SELECT_APPENDING itab
    D: SELECT_itab_
    36. After a successful SELECT statement, what does SY-SUBRC equal?
    A: 0
    B: 4
    C: 8
    D: Null
    Ans : A
    37. This selection screen syntax forces the user to input a value:
    A: REQUIRED-ENTRY
    B: OBLIGATORY
    C: DEFAULT
    D: SELECTION-SCREEN EXCLUDE
    Ans : B
    38. If the following code results in a syntax error, the remedy is:
    DATA: itab TYPE SORTED TABLE OF rec_type WITH UNIQUE KEY field1
    WITH HEADER LINE.
    itab-field1 = 'Company'. itab-field2 = '1234'. INSERT TABLE itab.
    itab-field1 = 'Bank'. itab-field2 = 'ABC'. INSERT TABLE itab.
    SORT itab.
    LOOP AT itab.
    write: /1 itab-field1, itab-field2.
    ENDLOOP.
    A: There is no syntax error here
    B: Remove the SORT statement
    C: Change INSERT to APPEND
    D: Add a WHERE clause to the loop
    Ans :
    39. If this code results in an error, the remedy is:
    SELECT fld1 fld2 FROM tab1 WHERE fld3 = pfld3.
    WRITE: /1 tab1-fld1, tab1-fld2.
    ENDSELECT.
    A: Add a SY-SUBRC check.
    B: Change the WHERE clause to use fld1 or fld2.
    C: Remove the /1 from the WRITE statement.
    D: Add INTO (tab1-fld1, tab1-fld2).
    Ans : D
    40. When modifying an internal table within LOOP AT itab. _ ENDLOOP. you must include an index number.
    A: True
    B: False
    Ans : A
    41. To allow the user to enter values on the screen for a list field, use:
    A: OPEN LINE.
    B: SET CURSOR FIELD.
    C: WRITE fld AS INPUT FIELD.
    D: FORMAT INPUT ON.
    Ans : C
    42. Before a function module may be tested, it must first be:
    A: Linked
    B: Authorized
    C: Released
    D: Active
    Ans : D
    43. To include a field on your screen that is not in the ABAP Dictionary, which include program should contain the data declaration for the field?
    A: PBO module include program
    B: TOP include program
    C: PAI module include program
    D: Subroutine include program
    Ans : B
    44. If a table contains many duplicate values for a field, minimize the number of records returned by using this SELECT statement addition.
    A: MIN
    B: ORDER BY
    C: DISTINCT
    D: DELETE
    Ans : C
    45. The system internal table used for dynamic screen modification is named:
    A: ITAB
    B: SCREEN
    C: MODTAB
    D: SMOD
    Ans : B
    46. Within the source code of a function module, errors are handled via the keyword:
    A: EXCEPTION
    B: RAISE
    C: STOP
    D: ABEND
    Ans : A
    47. Which system field contains the contents of a selected line?
    A: SY-CUCOL
    B: SY-LILLI
    C: SY-CUROW
    D: SY-LISEL
    Ans : D
    48. The following statement writes what type of data object?
    WRITE: /1 'Total Amount:'.
    A: Text literal
    B: Text variable
    C: In-code comment
    D: Text integer
    Ans : A
    49. For the code below, second_field is of what data type?
    DATA: first_field type P, second_field like first_field.
    A: P
    B: C
    C: N
    D: D
    Ans : A
    50. Which of the following describes the internal representation of a type D data object?
    A: DDMMYYYY
    B: YYYYDDMM
    C: MMDDYYYY
    D: YYYYMMDD
    Ans : A
    51. A BDC program is used for all of the following except:
    A: Downloading data to a local file
    B: Data interfaces between SAP and external systems
    C: Initial data transfer
    D: Entering a large amount of data
    Ans : A
    52. In regard to PERFORM, which of the following is NOT a true statement?
    A: May be used within a subroutine.
    B: Requires actual parameters.
    C: Recursive calls are allowed in ABAP.
    D: Can call a subroutine in another program.
    Ans : B
    53. What is the transaction code for the ABAP Editor?
    A: SE11
    B: SE38
    C: SE36
    D: SE16
    Ans : B
    54. In regard to HIDE, which of the following is NOT a true statement?
    A: Saves the contents of variables in relation to a list line's row number.
    B: The hidden variables must be output on a list line.
    C: The HIDE area is retrieved when using the READ LINE statement.
    D: The HIDE area is retrieved when an interactive event is triggered.
    Ans : B
    55. Database locks are sufficient in a multi-user environment.
    A: True
    B: False
    Ans : B
    56. The complete technical definition of a table field is determined by the field's:
    A: Domain
    B: Field name
    C: Data type
    D: Data element
    Ans : A
    57. In regard to LEAVE, which of the following is NOT a true statement?
    A: May be used to return immediately to a calling program.
    B: May be used to stop the current loop pass and get the next.
    C: May be used to start a new transaction.
    D: May be used to go to the next screen.
    Ans : B
    58. The following code indicates:
    SELECT fld6 fld3 fld2 fld1 FROM tab1 INTO CORRESPONDING FIELDS OF TABLE itab
    WHERE fld3 = pfld3.
    A: The order of the fields in itab does not matter.
    B: Fill the header line of itab, but not the body.
    C: Table itab can only contain fields also in table tab1.
    D: None of the above.
    Ans : C
    59. The ABAP statement below indicates that the program should continue with the next line of code if the internal table itab:
    CHECK NOT itab[] IS INITIAL.
    A: Contains no rows
    B: Contains at least one row
    C: Has a header line
    D: Has an empty header line
    Ans : B
    60. What will be output by the following code?
    DATA: BEGIN OF itab OCCURS 0, fval type i, END OF itab.
    itab-fval = 1. APPEND itab.
    itab-fval = 2. APPEND itab.
    FREE itab.
    WRITE: /1 itab-fval.
    A: 2
    B: 0
    C: blank
    D: 1
    Ans : A
    61. To allow the user to enter a range of values on a selection screen, use the ABAP keyword:
    A: DATA.
    B: RANGES.
    C: PARAMETERS.
    D: SELECT-OPTIONS.
    Ans : D
    62. If an internal table is declared without a header line, what else must you declare to work with the table's rows?
    A: Another internal table with a header line.
    B: A work area with the same structure as the internal table.
    C: An internal table type using the TYPES statement.
    D: A PARAMETER.
    Ans : B
    63. Assuming an internal table contains 2000 entries, how many entries will it have after the following line of code is executed?
    DELETE itab FROM 1500 TO 1700.
    A: This is a syntax error.
    B: 1801
    C: 1800
    D: 1799
    Ans : A
    64. To remove lines from a database table, use ____.
    A: UPDATE
    B: MODIFY
    C: ERASE
    D: DELETE
    Ans : D
    65. All of the following may be performed using SET CURSOR except:
    A: Move the cursor to a specific field on a list.
    B: Move the cursor to a specific list line.
    C: Move the cursor to a specific pushbutton, activating that function.
    D: Move the cursor to a specific row and column on a list.
    Ans : C
    66. When is it optional to pass an actual parameter to a required formal parameter of a function module?
    A: The actual parameter is type C.
    B: The formal parameter contains a default value.
    C: The formal parameter's \"Reference\" attribute is turned on.
    D: It is never optional.
    Ans : B
    67. Coding two INITIALIZATION events will cause a syntax error.
    A: True
    B: False
    Ans : B
    68. Adding a COMMIT WORK statement between SELECT_ENDSELECT is a good method for improving performance.
    A: True
    B: False
    Ans : B
    69. To save information on a list line for use after the line is selected, use this keyword.
    A: APPEND
    B: EXPORT
    C: WRITE
    D: HIDE
    Ans : D
    70. To bypass automatic field input checks, include this in PAI.
    A: AT EXIT-COMMAND
    B: ON INPUT
    C: ON REQUEST
    D: LEAVE TO SCREEN 0.
    Ans : A
    71. Within a function module's source code, if the MESSAGE_RAISING statement is executed, all of the following system fields are filled automatically except:
    A: SY-MSGTY
    B: SY-MSGNO
    C: SY-MSGV1
    D: SY-MSGWA
    Ans : D
    72. The following code indicates:
    REPORT ZLISTTST.
    START-OF-SELECTION.
    WRITE: text-001.
    FORMAT HOTSPOT ON.
    WRITE: text-002.
    FORMAT HOTSPOT OFF.
    AT LINE-SELECTION.
    WRITE / text-003.
    A: Text-002 may not be selected.
    B: The value of text-002 is stored in a special memory area.
    C: Text-002 may be clicked once to trigger the output of text-003.
    D: None of the above.
    Ans : C
    73. The ____ type of ABAP Dictionary view consists of one or more transparent tables and may be accessed by an ABAP program using Open SQL.
    A: Database view
    B: Projection view
    C: Help view
    D: Entity view
    Ans : A
    74. A concrete field is associated with a field-symbol via ABAP keyword
    A: MOVE
    B: WRITE
    C: ASSIGN
    D: VALUE
    Ans : C
    75. The output for the following code will be:
    report zabaprg.
    DATA: char_field type C.
    char_field = 'ABAP data'.
    WRITE char_field.
    A: ABAP data
    B: A
    C: Nothing, there is a syntax error
    D: None of the above
    Ans : B
    76. Page footers are coded in the event:
    A: TOP-OF-PAGE.
    B: END-OF-SELECTION.
    C: NEW-PAGE.
    D: END-OF-PAGE.
    Ans : D
    77. The event AT SELECTION-SCREEN OUTPUT. occurs before the selection screen is displayed and is the best event for assigning default values to selection criteria.
    A: True
    B: False
    Ans : B
    78. The TABLES statement declares a data object.
    A: True
    B: False
    Ans : A
    79. Assuming tab1-fld7 is not a key field, how can you prevent reading all the table rows?
    SELECT fld1 fld2 fld3 FROM tab1 INTO (fld4, fld5, fld6)
    WHERE fld7 = pfld7.
    WRITE: /1 fld4, fld5, fld6.
    ENDSELECT.
    A: Take fld7 out of the WHERE clause.
    B: Create an index in the ABAP Dictionary for tab1-fld7.
    C: Use INTO TABLE instead of just INTO.
    D: Take the WRITE statement out of the SELECT_ENDSELECT.
    Ans :
    80. Which of the following is NOT a required attribute when creating an ABAP program?
    A: Application
    B: Title
    C: Status
    D: Type
    Ans : A
    81. When creating a transparent table in the ABAP Dictionary, which step automatically creates the table in the underlying database?
    A: Adding technical settings to the table
    B: Checking the table syntax
    C: Saving the table
    D: Activating the table
    Ans : D
    82. Within the ABAP program attributes, Type = 1 represents:
    A: INCLUDE program
    B: Online program
    C: Module pool
    D: Function group
    E: Subroutine pool
    Ans : B
    83. If this code results in an error, the remedy is:
    SELECT fld1 SUM( fld1 ) FROM tab1 INTO_
    A: Remove the spaces from SUM( fld1 ).
    B: Move SUM( fld1 ) before fld1.
    C: Add GROUP BY f1.
    D: Change to SUM( DISTINCT f1 ).
    Ans : C
    84. Which keyword adds rows to an internal table while accumulating numeric values?
    A: INSERT
    B: APPEND
    C: COLLECT
    D: GROUP
    Ans : C
    85. Assuming itab has a header line, what will be output by the following code?
    READ TABLE itab INDEX 3 TRANSPORTING field1.
    WRITE: /1 itab-field1, itab-field2.
    A: The contents of the third row's itab-field1.
    B: The contents of the third row's itab-field1 and itab-field2.
    C: The contents of the third row's itab-field2.
    D: Nothing.
    Ans ; A
    86. The following code indicates:
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS: myparam(10) type C,
    Myparam2(10) type N,
    SELECTION-SCREEN END OF BLOCK.
    A: Draw a box around myparam and myparam2 on the selection screen.
    B: Allow myparam and myparam2 to be ready for input during an error dialog.
    C: Do not display myparam and myparam2 on the selection screen.
    D: Display myparam and myparam2 only if both fields have default values.
    Ans : A
    87. Which statement will sort the data of an internal table with fields FRUIT, QTY, and PRICE so that it appears as follows?
    FRUIT QTY PRICE
    Apples 12 22.50
    Apples 9 18.25
    Oranges 15 17.35
    Bananas 20 10.20
    Bananas 15 6.89
    Bananas 5 2.75
    A: SORT itab DESCENDING BY QTY PRICE.
    B: SORT itab BY PRICE FRUIT.
    C: SORT itab.
    D: SORT itab BY PRICE DESCENDING.
    Ans : D
    88. Which keyword adds a line anywhere within an internal table?
    A: APPEND
    B: MODIFY
    C: ADD
    D: INSERT
    Ans : D
    89. To read a single line of an internal table, use the following:
    A: LOOP AT itab. _ ENDLOOP.
    B: READ itab.
    C: SELECT SINGLE * FROM itab.
    D: READ TABLE itab.
    Ans : D
    90. Which Open SQL statement should not be used with cluster databases?
    A: UPDATE
    B: MODIFY
    C: DELETE
    D: INSERT
    Ans :
    91. To include a field on your screen that is not in the ABAP Dictionary, which include program should contain the data declaration for the field?
    A: PBO module include program
    B: TOP include program
    C: PAI module include program
    D: Subroutine include program
    Ans : B
    92. This flow logic statement is used to make multiple fields open for input after an error or warning message.
    A: GROUP
    B: FIELD-GROUP
    C: CHAIN
    D: LOOP AT SCREEN
    Ans ; C
    93. Given:
    PERFORM subroutine USING var.
    The var field is known as what type of parameter?
    A: Formal
    B: Actual
    C: Static
    D: Value
    Ans : B

  • 'Search' internal table - sy-tabix question

    I realize there are many questions out there on sy-tabix but non that answer my question. 
    I have an internal table that will be filled with material numbers (among other things).  I need to loop through the internal table to see if the material number already exists in the table.  If so I need to store the index of the material number.  What is the best way to go about doing this?
    Regards,
    Davis

    Thanks Ravi, I guess instead of
    WRITE: / sy-tabix I can have something like
    LineIndex = sy-tabix.  is that correct?
    I wasn't sure if I could do something like
    READ TABLE itab WITH KEY matnr....
    I thought that I had to include a string that was searched through the whole table like the example in the online help.  Thanks again!
    Davis.
    I'm keeping this question open to see what other suggestions I receive.

  • Loop at itab in a Smarform problem

    Hi Guys,
    Right now i'm developing my first OO program that calls a Smartform, but I'm having the following issue.
    I call a method exporting the internal table that i want to pass to the SF, but when i want to make a loop statement in the SF I get a dump. I asked some friends and they told me that right now is obsolete the table statement, so i declare in the SF in the importing tab and then declare it in the exporting part of the FM that calls the SF.
    Now when i try to activate the SF i guet the following error: "You may only read from table "IT_GRID1". - reading.".
    so my question is, how can i declare my itab in order to be able to add a loop statement?.
    Regards,
    Eric

    Hi Subramanian,
    At first I did what you suggest, but for a reason that I can`t explain, when the loop begins I always get a dump. The only way that i could make the dump disappear was by replacing the name of the parameter that I receive from the method for the original table.
    Example:
    " I call the method in the main method.
           lcl_reporte_auditoria=>llamar_sf( EXPORTING
                                                               table = it_sf ).
      METHOD llamar_sf.
    *   Llamar al Formulario
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZQM_RPT_AUDITORIA_LLANTA_VERDE'
          IMPORTING
            fm_name            = fm_name
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
    *¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯*
    * CONFIGURO LOS OPARAMETROS DE SALIDA PARA Q NO APAREZACA       *
    * LA CAJA DE DIALOGO DE LA IMPRESION                            *
        wa_ssfctrlop-device     = 'PRINTER'.
        wa_ssfctrlop-langu      = sy-langu.
        wa_ssfctrlop-replangu1  = sy-langu.
        wa_ssfctrlop-replangu2  = sy-langu.
        wa_ssfctrlop-replangu3  = sy-langu.
        wa_ssfctrlop-no_dialog  = 'X'.      "SIN DIALOGO
        wa_ssfctrlop-preview    = 'X'.      "VISTA PREVIA
        wa_ssfcompop-tddest     = 'LOCL'.   "LOCAL AL PC
        wa_ssfcompop-tdimmed    = 'X'.      "IMPRESION IMEDIATA
        CALL FUNCTION fm_name
          EXPORTING
            control_parameters = wa_ssfctrlop
            output_options     = wa_ssfcompop
            user_settings      = ''
          TABLES
            it_grid1               = table
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
      ENDMETHOD.                    "llamar_sf
    In this case I get a dump as soon as the SF reach the loop statement. If I change the
    TABLES
    it_grid1 = table
    for
    TABLES
    it_grid1 = it_sf
    The dump doesn't appear anymore.
    The dump says: MOVE_TO_LIT_NOTALLOWED_NODATA
    Assignment error: Overwriting a protected field.
    At that moment a friend told me that the table statement was obsolete in OO programing, and encourage me to change it for a exporting parameter. This is the reason why i'm doing it, please anyone tell me is that affirmation is correct. Otherwise, could someone explain me why i'm getting that error when i export the table that i'm receiving in the method call.
    Regards,
    Eric
    Message was edited by:
            Eric Hernandez Pardo

  • Follow-up question for Chris H on longtext in BDC for IW31

    Chris -
    Here's the relevant part of my code:
    PERFORM DYNPRO USING:
    'X' 'SAPLCOIH'          '3000',            "
    ' ' 'CAUFVD-KTEXT   '   SCRN_PROBLEM1,     " 1st line problem text
    ' ' 'CAUFVD-ANLZU   '   CAUFVD-ANLZU,      " System condition
    ' ' 'BDC_OKCODE'       '=LTXK'.            "
    LOOP AT i_txt INTO wa_txt.
      v_txtln_ctr_n = sy-tabix + 2.    " Chris - note that I'm bumping to "3" here
      v_txtln_ctr_c = v_txtln_ctr_n.
      CONCATENATE 'RSTXT-TXLINE('
                  v_txtln_ctr_c
             INTO v_bdc_txtln_lit.
      CONDENSE v_bdc_txtln_lit NO-GAPS.
      PERFORM DYNPRO USING:
        'X' 'SAPLSTXX'          '1100',              "
        ' ' v_bdc_txtln_lit     wa_txt,              " line of problem text
        ' ' 'BDC_OKCODE'        '=ENTR'.             "
    ENDLOOP.
    This actually works - it creates an order in which the long text begins with what is in the variable SCRN_PROBLEM1 and continues with what is in i_txt concatenated together.  So I get, for example:
    "This is the short description. a b c d e"
    where:
    scrn_problem1 = 'This is the short description'
    row 1 of i_txt = 'a'
    row 2 of i_txt = 'b'
    row 3 of i_txt = 'c'
    row 4 of i_txt = 'd'
    row 5 of i_txt = 'e'
    The only problem is that the BDC doesn't go thru on its own.  When I change 'N' to 'E', the BDC brings up a screen with the title:
    "Change order text header Alternative Language EN"
    Then, when I just "back-arrow" from this, the BDC does complete successfully and I can see the correct text saved for the order in IW32.
    What am I doing wrong to cause this "change order text header" screen to come up?  Is it the "LTXK" value of the OK-CODE in the first dynpro call above?
    Or maybe something with my default user parameters?  I had to set quite a few of these in order to get the BDC to go with just a system, priority, and short text/long text.
    I'm really hoping you can see what's going on here because I'm at a loss.
    Thanks for whatever help you can provide.  You seem to have coded this BDC before, so that's why I'm directing this question to you.
    BTW, I'd try the BAPI except the documentation specifically says it won't observe user default parameters and this is a must in our situation.
    Thanks again
    Dave

    Chris/Rich -
    My suspicion was correct.  In the last loop over the longtext itab, the ok_code must be 'TXBA', not 'ENTR'.
    Here's the code that works without any 'E' interruptions:
    PERFORM DYNPRO USING:
    'X' 'SAPLCOIH'          '3000',            "
    ' ' 'CAUFVD-KTEXT   '   SCRN_PROBLEM1,     " 1st line problem text
    ' ' 'CAUFVD-ANLZU   '   CAUFVD-ANLZU,      " System condition
    ' ' 'BDC_OKCODE'       '=LTXK'.            "
    DESCRIBE TABLE i_txt LINES v_txt_cnt.
    LOOP AT i_txt INTO wa_txt.
      v_txtln_ctr_n = sy-tabix + 2.
      v_txtln_ctr_c = v_txtln_ctr_n.
      CONCATENATE 'RSTXT-TXLINE('
                  v_txtln_ctr_c
             INTO v_bdc_txtln_lit.
      CONDENSE v_bdc_txtln_lit NO-GAPS.
      IF sy-tabix = v_txt_cnt.
        v_txt_ok = '=TXBA'.                    " no more text lines coming
      ELSE.
        v_txt_ok = '=ENTR'.                    " more text lines coming
      ENDIF.
      PERFORM DYNPRO USING:
        'X' 'SAPLSTXX'          '1100',       
        ' ' v_bdc_txtln_lit     wa_txt,        " line of problem text
        ' ' 'BDC_OKCODE'        v_txt_ok.      " ok_code
    ENDLOOP.
    The result is that the longtest display in IW32 will be what's in "SCRN_PROBLEM1" followed by all the lines that are in i_txt.
    Reagrds
    djh

  • OPEN SQL performance question

    Hi friends,
    I'm going to read and process data in an interface coded in ABAP and OPEN SQL. To improve efficiency and reliability I'm processing the data in packets of a fixed size of rows - reading rows up to a predetermined numer into an internal table which then is processed and then finaly written back to database followed by "commit work". Then the process will continue with reading the next fixed number of rows, process them, and so on ...
    The general question is, which is the most efficient way to implement this scenario?
    I think of two basic approaches:
    1.1) Loop over results from a cursor using FETCH NEXT CURSOR inside a LOOP appending the lines to the internal table.
    2.1) Execute SELECT ... INTO TABLE <itab> FROM <table> UP TO <data packet size> ROWS.
    My assumtion is that approach 2 would be the more effecient, is that correct?
    The processed data will be written back to the database in one single statement:
    2.2) INSERT <table> FROM TABLE <itab>
    Which I assume is more efficient than doing the same using multiple inserts within a loop?
    Regards,
    Christian

    In native SQL you can also use the packet options.
    SELECT  <Fields name>      appending corresponding fields of table <Internal table>
                <b>package size 20000</b>
                FROM <Database table name>
                WHERE <Condition>.
    ENDSELECT.
    By using this the system will fetch the records from database table in packets [20000 records per package]
    Regards
    Aman

  • Please help me with the following two questions, very urgent

    Hi All,
    Please help me with some scenerios about what are the common problems when modifying a standard script such a standard Invoice script and how can we overcome them.
    What are the common problems encountered when working with SAP SMARTFORMS and how to overcome them?
    Please help me with these questions, its very urgent.
    Thanks in advance.
    MD.

    hi
    hope it will help you.
    reward if ehlp.
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Smartform
    you can check this link here you can see the steps and you can do it the same by looking at it..
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SMARTFORMS STEPS.
    1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
    2. Create Table type(t_struct) of stracture in se11.
    3. In your program declare Internal table(Itab) type table of structure(struct).
    4. Define work area(wa) like line of internal table.
    5. Open Tcode Smartforms
    6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
    7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
    8. In form pages and window, create Page node by default Page1 is available.
    9. In page node you can create numbers of secondary window. But in form there is only one Main window.
    10. By right click on page you can create windows or Go to Edit, Node, Create.
    11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
    12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
    13. In table there are three areas Header, Main Area, Footer.
    14. Right click on the Main area create table line by default line type1 is there select it.
    15. Divide line into cells according to your need then for each cell create Text node.
    16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
    17. Save form and activate it.
    18. Then go to Environment, function module name, there you get the name of function module copy it.
    19. In your program call the function module that you have copied from your form.
    20. In your program in exporting parameter of function pass the internal table(itab).
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
    configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
    What Transaction to start SAP Smart Forms?
    Execute transaction SMARTFORMS to start SAP Smart Forms.
    Key Benefits of SAP Smart Forms:
    SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
    To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
    These actions do not include writing of coding lines or using a Script language.
    Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
    For Web publishing, the system provides a generated XML output of the processed form.
    Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
    SmartForms System Fields
    Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
    System fields of Smart Forms
    &SFSY-DATE&
    Displays the date. You determine the display format in the user master record.
    &SFSY-TIME&
    Displays the time of day in the form HH:MM:SS.
    &SFSY-PAGE&
    Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
    &SFSY-FORMPAGES&
    Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
    &SFSY-JOBPAGES&
    Contains the total page number of all forms in the currently processed print request.
    &SFSY-WINDOWNAME&
    Contains the name of the current window (string in the Window field)
    &SFSY-PAGENAME&
    Contains the name of the current page (string in the Page field)
    &SFSY-PAGEBREAK&
    Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
    &SFSY-MAINEND&
    Is set as soon as processing of the main window on the current page ends
    &SFSY-EXCEPTION&
    Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
    Example Forms Available in Standard SAP R/3
    SF_EXAMPLE_01
    Simple example; invoice with table output of flight booking for one customer
    SF_EXAMPLE_02
    Similar to SF_EXAMPLE_01 but with subtotals
    SF_EXAMPLE_03
    Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
    Advantages of SAP Smart Forms
    SAP Smart Forms have the following advantages:
    1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
    2. Displaying table structures (dynamic framing of texts)
    3. Output of background graphics, for form design in particular the use of templates which were scanned.
    4. Colored output of texts
    5. User-friendly and integrated Form Painter for the graphical design of forms
    6. Graphical Table Painter for drawing tables
    7. Reusing Font and paragraph formats in forms (Smart Styles)
    8. Data interface in XML format (XML for Smart Forms, in short XSF)
    9. Form translation is supported by standard translation tools
    10. Flexible reuse of text modules
    11. HTML output of forms (Basis release 6.10)
    12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)

  • Abap-hr real time questions

    hi friends
    kindly send me ABAP-HR REAL TIME QUESTION to my mail [email protected]
    Thanks&Regards
    babasish

    Hi
    Logical database
    A logical database is a special ABAP/4 program which combines the contents of certain database tables. Using logical databases facilitates the process of reading database tables.
    HR Logical Database is PNP
    Main Functions of the logical database PNP:
    Standard Selection screen
    Data Retrieval
    Authorization check 
    To use logical database PNP in your program, specify in your program attributes.
    Standard Selection Screen
    Date selection
    Date selection delimits the time period for which data is evaluated. GET PERNR retrieves all records of the relevant infotypes from the database.  When you enter a date selection period, the PROVIDE loop retrieves the infotype records whose validity period overlaps with at least one day of this period.
    Person selection
    Person selection is the 'true' selection of choosing a group of employees for whom the report is to run.
    Sorting Data
    · The standard sort sequence lists personnel numbers in ascending order.
    · SORT function allows you to sort the report data otherwise. All the sorting fields are from infotype 0001.
    Report Class
    · You can suppress input fields which are not used on the selection screen by assigning a report class to your program.
    · If SAP standard delivered report classes do not satisfy your requirements, you can create your own report class through the IMG.
    Data Retrieval from LDB
    1. Create data structures for infotypes.
        INFOTYPES: 0001, "ORG ASSIGNMENT
                            0002, "PERSONAL DATA
                            0008. "BASIC PAY
    2. Fill data structures with the infotype records.
        Start-of-selection.
             GET PERNR.
        End-0f-selection. 
        Read Master Data
    Infotype structures (after GET PERNR) are internal tables loaded with data.
    The infotype records (selected within the period) are processed sequentially by the PROVIDE - ENDPROVIDE loop.
              GET PERNR.
                 PROVIDE * FROM Pnnnn BETWEEN PN/BEGDA AND PN/ENDDA
                        If Pnnnn-XXXX = ' '. write:/ Pnnnn-XXXX. endif.
                 ENDPROVIDE.
    Period-Related Data
    All infotype records are time stamped.
    IT0006 (Address infotype)
    01/01/1990   12/31/9999  present
              Which record to be read depends on the date selection period specified on the
              selection screen. PN/BEGDA PN/ENDDA.
    Current Data
    IT0006 Address  -  01/01/1990 12/31/9999   present
    RP-PROVIDE-FROM-LAST retrieves the record which is valid in the data selection period.
    For example, pn/begda = '19990931'    pn/endda = '99991231'
    IT0006 subtype 1 is resident address
    RP-PROVIDE-FROM-LAST P0006 1 PN/BEGDA PN/ENDDA.
    Process Infotypes
    RMAC Modules - RMAC module as referred to Macro, is a special construct of ABAP/4 codes. Normally, the program code of these modules is stored in table 'TRMAC'. The table key combines the program code under a given name. It can also be defined in programs.The RMAC defined in the TRMAC can be used in all Reports. When an RMAC is changed, the report has to be regenerated manually to reflect the change.
    Reading Infotypes - by using RMAC (macro) RP-READ-INFOTYPE
              REPORT ZHR00001.
              INFOTYPE: 0002.
              PARAMETERS: PERNR LIKE P0002-PERNR.
              RP-READ-INFOTYPE PERNR 0002 P0002 .
              PROVIDE * FROM P0002
                  if ... then ...endif.
              ENDPROVIDE.
    Changing Infotypes - by using RMAC (macro) RP-READ-INFOTYPE. 
    · Three steps are involved in changing infotypes:
    1. Select the infotype records to be changed;
    2. Make the required changes and store the records in an alternative table;
    3. Save this table to the database;
    The RP-UPDATE macro updates the database. The parameters of this macro are the OLD internal table containing the unchanged records and the NEW internal table containing the changed records. You cannot create or delete data. Only modification is possible.
    INFOTYPES: Pnnnn NAME OLD,
    Pnnnn NAME NEW.
    GET PERNR.
        PROVIDE * FROM OLD
               WHERE .... = ... "Change old record
               *Save old record in alternate table
               NEW = OLD.
        ENDPROVIDE.
        RP-UPDATE OLD NEW. "Update changed record
    Infotype with repeat structures
    · How to identify repeat structures.
    a. On infotype entry screen, data is entered in table form.
        IT0005, IT0008, IT0041, etc.
    b. In the infotype structure, fields are grouped by the same name followed by sequence number.
        P0005-UARnn P0005-UANnn P0005-UBEnn
        P0005-UENnn P0005-UABnn
    Repeat Structures
    · Data is entered on the infotype screen in table format but stored on the database in a linear  
      structure.
    · Each row of the table is stored in the same record on the database.
    · When evaluating a repeat structure, you must define the starting point, the increment and the
      work area which contains the complete field group definition.
    Repeat Structures Evaluation (I)
    · To evaluate the repeat structures
       a. Define work area.
           The work area is a field string. Its structure is identical to that of the field group.
       b. Use a DO LOOP to divide the repeat structure into segments and make it available for  
           processing in the work area, one field group (block) at a time.
    Repeat Structures Evaluation(II)
    Define work area
    DATA: BEGIN OF VACATION,
                  UAR LIKE P0005-UAR01, "Leave type
                  UAN LIKE P0005-UAN01, "Leave entitlement
                  UBE LIKE P0005-UBE01, "Start date
                  UEN LIKE P0005-UEN01, "End date
                  UAB LIKE P0005-UAB01, "Leave accounted
               END OF VACATION.
    GET PERNR.
         RP-PROVIDE-FROM-LAST P0005 SPACE PN/BEGDA PN/ENDDA.
         DO 6 TIMES VARYING VACATION
                 FROM P0005-UAR01 "Starting point
                     NEXT P0005-UAR02. "Increment
                 If p0005-xyz then ... endif.
          ENDDO.
    Processing 'Time Data'.
    · Dependence of time data on validity period
    · Importing time data
    · Processing time data using internal tables
    Time Data and Validity Period
    · Time data always applies to a specific validity period.
    · The validity periods of different types of time data are not always the same as the date selection period specified in the selection screen.
    Date selection period |----
    |
    Leave |----
    |
    · PROVIDE in this case is therefore not used for time infotypes.
    Importing Time Data
    · GET PERNR reads all time infotypes from the lowest to highest system data, not only those within the date selection period.
    · To prevent memory overload, add MODE N to the infotype declaration. This prevents the logical database from importing all data into infotype tables at GET PERNR.
    · Use macro RP-READ-ALL-TIME-ITY to fill infotype table.
    INFOTYPES: 2001 MODE N.
    GET PERNR.
        RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA.
        LOOP AT P0021.
             If P0021-XYZ = ' '. A=B. Endif.
        ENDLOOP.
    Processing Time Data
    · Once data is imported into infotype tables, you can use an internal table to process the interested data.
    DATA: BEGIN OF ITAB OCCURS 0,
                  BUKRS LIKE P0001-BUKRS, "COMPANY
                  WERKS LIKE P0001-WERKS, "PERSONNEL AREA
                  AWART LIKE P2001-AWART, "ABS./ATTEND. TYPE
                  ASWTG LIKE P2001-ASWTG, "ABS./ATTEND. DAYS
               END OF ITAB.
    GET PERNR.
    RP-PROVIDE-FROM-LAST P0001 SAPCE PN/BEGDA PN/ENDDA.
    CLEAR ITAB.
    ITAB-BUKRS = P0001-BURKS. ITAB-WERKS = P0001-WERKS.
    RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA.
    LOOP AT P2001.
          ITAB-AWART = P2001-AWART. ITAB-ASWTG = P2001-ASWTG.
          COLLECT ITAB. (OR: APPEND ITAB.)
    ENDLOOP.
    Database Tables in HR
    ·  Personnel Administration (PA) - master and time data infotype tables (transparent tables).
       PAnnnn: e.g. PA0001 for infotype 0001
    ·  Personnel Development (PD) - Org Unit, Job, Position, etc. (transparent tables).
       HRPnnnn: e.g. HRP1000 for infotype 1000
    ·  Time/Travel expense/Payroll/Applicant Tracking data/HR work areas/Documents (cluster  
       PCLn: e.g. PCL2 for time/payroll results.
    Cluster Table
    · Cluster tables combine the data from several tables with identical (or almost identical) keys
      into one physical record on the database.
    . Data is written to a database in compressed form.
    · Retrieval of data is very fast if the primary key is known.
    · Cluster tables are defined in the data dictionary as transparent tables.
    · External programs can NOT interpret the data in a cluster table.
    · Special language elements EXPORT TO DATABASE, IMPORT TO DATABASE and DELETE
      FROM DATABASE are used to process data in the cluster tables.
    PCL1 - Database for HR work area;
    PCL2 - Accounting Results (time, travel expense and payroll);
    PCL3 - Applicant tracking data;
    PCL4 - Documents, Payroll year-end Tax data
    Database Tables PCLn
    · PCLn database tables are divided into subareas known as data clusters.
    · Data Clusters are identified by a two-character code. e.g RU for US payroll result, B2 for
      time evaluation result...
    · Each HR subarea has its own cluster.
    · Each subarea has its own key.
    Database Table PCL1
    · The database table PCL1 contains the following data areas:
      B1 time events/PDC
      G1 group incentive wages
      L1 individual incentive wages
      PC personal calendar
      TE travel expenses/payroll results
      TS travel expenses/master data
      TX infotype texts
      ZI PDC interface -> cost account
    Database Table PCL2
    · The database table PCL2 contains the following data areas:
      B2 time accounting results
      CD cluster directory of the CD manager
      PS generated schemas
      PT texts for generated schemas
      RX payroll accounting results/international
      Rn payroll accounting results/country-specific ( n = HR country indicator )
      ZL personal work schedule
    Database Table PCL3
    · The database table PCL3 contains the following data areas:
      AP action log / time schedule
      TY texts for applicant data infotypes
    Data Management of PCLn
    · The ABAP commands IMPORT and EXPORT are used for management of read/write to
      database tables PCLn.
    · A unique key has to be used when reading data from or writing data to the PCLn.
      Field Name KEY Length Text
      MANDT X 3 Client
      RELID X 2 Relation ID (RU,B2..)
      SRTFD X 40 Work Area Key
      SRTF2 X 4 Sort key for dup. key
    Cluster Definition
    · The data definition of a work area for PCLn is specified in separate programs which comply  
       with fixed naming conventions.
    · They are defined as INCLUDE programs (RPCnxxy0). The following naming convention applies:
       n = 1 or 2 (PCL1 or PCL2)
       xx = Relation ID (e.g. RX)
       y = 0 for international clusters or country indicator (T500L) for different country cluster
    Exporting Data (I)
    · The EXPORT command causes one or more 'xy' KEY data objects to be written to cluster xy.
    · The cluster definition is integrated with the INCLUDE statement.
    REPORT ZHREXPRT.
    TABLES: PCLn.
    INCLUDE: RPCnxxy0. "Cluster definition
    Fill cluster KEY
    xy-key-field = .
    Fill data object
    Export record
    EXPORT TABLE1 TO DATABASE PCLn(xy) ID xy-KEY.
       IF SY-SUBRC EQ 0.
           WRITE: / 'Update successful'.
       ENDIF.
    Exporting Data (II)
    . Export data using macro RP-EXP-Cn-xy.
    · When data records are exported using macro, they are not written to the database but to a  
      main memory buffer.
    · To save data, use the PREPARE_UPDATE routine with the USING parameter 'V'.
    REPORT ZHREXPRT.
    *Buffer definition
    INCLUDE RPPPXD00. INCLUDE RPPPXM00. "Buffer management
    DATA: BEGIN OF COMMON PART 'BUFFER'.
    INCLUDE RPPPXD10.
    DATA: END OF COMMON PART 'BUFFER'.
    RP-EXP-Cn-xy.
    IF SY-SUBRC EQ 0.
        PERFORM PREPARE_UPDATE USING 'V'..
    ENDIF.
    Importing Data (I)
    · The IMPORT command causes data objects with the specified key values to be read from
       PCLn.
    · If the import is successful, SY-SUBRC is 0; if not, it is 4.
    REPORT RPIMPORT.
    TABLES: PCLn.
    INCLUDE RPCnxxy0. "Cluster definition
    Fill cluster Key
    Import record
    IMPORT TABLE1 FROM DATABASE PCLn(xy) ID xy-KEY.
       IF SY-SUBRC EQ 0.
    Display data object
       ENDIF.
    Importing data (II)
    · Import data using macro RP-IMP-Cn-xy.
    · Check return code SY-SUBRC. If 0, it is successful. If 4, error.
    · Need include buffer management routines RPPPXM00
    REPORT RPIMPORT.
    *Buffer definition
    INCLUDE RPPPXD00.
    DATA: BEGIN OF COMMON PART 'BUFFER'.
    INCLUDE RPPPXD10.
    DATA: END OF COMMON PART 'BUFFER'.
    *import data to buffer
    RP-IMP-Cn-xy.
    *Buffer management routines
    INCLUDE RPPPXM00.
    Cluster Authorization
    · Simple EXPORT/IMPORT statement does not check for cluster authorization.
    · Use EXPORT/IMPORT via buffer, the buffer management routines check for cluster
      authorization.
    Payroll Results (I)
    · Payroll results are stored in cluster Rn of PCL2 as field string and internal tables.
      n - country identifier.
    · Standard reports read the results from cluster Rn. Report RPCLSTRn lists all payroll results;
      report RPCEDTn0 lists the results on a payroll form.
    Payroll Results (II)
    · The cluster definition of payroll results is stored in two INLCUDE reports:
      include: rpc2rx09. "Definition Cluster Ru (I)
      include: rpc2ruu0. "Definition Cluster Ru (II)
    The first INCLUDE defines the country-independent part; The second INCLUDE defines the country-specific part (US).
    · The cluster key is stored in the field string RX-KEY.
    Payroll Results (III)
    · All the field string and internal tables stored in PCL2 are defined in the ABAP/4 dictionary. This
      allows you to use the same structures in different definitions and nonetheless maintain data
      consistency.
    · The structures for cluster definition comply with the name convention PCnnn. Unfortunately, 
       'nnn' can be any set of alphanumeric characters.
    *Key definition
    DATA: BEGIN OF RX-KEY.
         INCLUDE STRUCTURE PC200.
    DATA: END OF RX-KEY.
    *Payroll directory
    DATA: BEGIN OF RGDIR OCCURS 100.
         INCLUDE STRUCTURE PC261.
    DATA: END OF RGDIR.
    Payroll Cluster Directory
    · To read payroll results, you need two keys: pernr and seqno
    . You can get SEQNO by importing the cluster directory (CD) first.
    REPORT ZHRIMPRT.
    TABLES: PERNR, PCL1, PCL2.
    INLCUDE: rpc2cd09. "definition cluster CD
    PARAMETERS: PERSON LIKE PERNR-PERNR.
    RP-INIT-BUFFER.
    *Import cluster Directory
       CD-KEY-PERNR = PERNR-PERNR.
    RP-IMP-C2-CU.
       CHECK SY-SUBRC = 0.
    LOOP AT RGDIR.
       RX-KEY-PERNR = PERSON.
       UNPACK RGDIR-SEQNR TO RX-KEY-SEQNO.
       *Import data from PCL2
       RP-IMP-C2-RU.
       INLCUDE: RPPPXM00. "PCL1/PCL2 BUFFER HANDLING
    Function Module (I)
      CD_EVALUATION_PERIODS
    · After importing the payroll directory, which record to read is up to the programmer.
    · Each payroll result has a status.
      'P' - previous result
      'A' - current (actual) result
      'O' - old result
    · Function module CD_EVALUATION_PERIODS will restore the payroll result status for a period
       when that payroll is initially run. It also will select all the relevant periods to be evaluated.
    Function Module (II)
    CD_EVALUATION_PERIODS
    call function 'CD_EVALUATION_PERIODS'
         exporting
              bonus_date = ref_periods-bondt
              inper_modif = pn-permo
              inper = ref_periods-inper
              pay_type = ref_periods-payty
              pay_ident = ref_periods-payid
         tables
              rgdir = rgdir
              evpdir = evp
              iabkrs = pnpabkrs
         exceptions
              no_record_found = 1.
    Authorization Check
       Authorization for Persons
    ·  In the authorization check for persons, the system determines whether the user has the 
       authorizations required for the organizational features of the employees selected with
       GET PERNR.
    ·  Employees for which the user has no authorization are skipped and appear in a list at the end
       of the report.
    ·  Authorization object: 'HR: Master data'
    Authorization for Data
    · In the authorization check for data, the system determines whether the user is authorized to
      read the infotypes specified in the report.
    · If the authorization for a particular infotype is missing, the evaluation is terminated and an error
      message is displayed.
    Deactivating the Authorization Check
    · In certain reports, it may be useful to deactivate the authorization check in order to improve
      performance. (e.g. when running payroll)
    · You can store this information in the object 'HR: Reporting'.
    these are the main areas they ask q?

  • Question in ABAP syntax, read & insert data from internal table, while loop

    Hi, SDN Fellow.
    I am from Java background and learnt ABAP, I don't usually write much ABAP code.
    I am trying to implement the following logic in a RFC now.
    I have one z-custom database table, the structure as the following:
    It has two columns, with these sample data.
    Says datable table is ZEMPMGRTAB.
    EmployeeID,ManagerID
    user10,user1
    user9,user1
    user8,user1
    user7,user2
    user6,user2
    user5,user2
    user4,user2
    user2,user1
    The logic is this:
    I have a input parameter, userid. I am using this parameter to have a select statement to query the record into export table,EXPTAB 'LIKE' table ZEMPMGRTAB.
    SELECT * FROM  ZEMPMGRTAB
      into table EXPTAB
       WHERE  EMPLOYEEID  = USERID.
    Say, my parameter value, USERID ='USER4'.
    Referring to the sample data above, I can get the record of this in my EXPTAB,
    EmployeeID,ManagerID
    user4,user2
    Now, I want to iterately use the EXPTABLE-ManagerID
    as the USERID input in SELECT statement, until it has no return result. Then, insert the new records in
    EXPTAB.
    In above new loop case, we will get this table content in EXPTAB,
    EmployeeID,ManagerID
    user4,user2
    user2,user1
    I kind of think of the pseudocode logic as below:
    (These may not be a valid ABAP code, so I need help to convert/correct them)
    DATA:
    IWA TYEP ZZEMPMGRTAB,
    ITAB
    HASHED TABLE OF ZZEMPMGRTAB
    WITH UNIQUE KEY EMPLOYEEID.
    SELECT * FROM  ZEMPMGRTAB
      into table ITAB
       WHERE  EMPLOYEEID  = USERID.
    *Question 1: I cannot insert a internal table to export table, it is *incompatible type, what is the alternative way fo this?
    *Question 2: How can I access thedata of the internal table like this,ITAB-MANAGERID? As if I can, I would do this:
    * IWA-EMPLOYEEE = ITAB-EMPLOYEEID. IWA-MANAGERID = IWA-MANAGERID. INSERT IWA INTO TABLE EXPTAB.
    * Question 3: Is the 'NE NULL' - 'not equal to NULL' is right syntax?
    IF ITAB NE NULL.
    INSERT ITAB INTO EXPTAB.
    ENDIF
    * Question 4: Is my WHILE loop setup right here? And are the syntax right?
    WHILE ITAB NE NULL.
    SELECT * FROM  ZEMPMGRTAB
      into table ITAB
       WHERE  EMPLOYEEID  = ITAB-MANAGERID.
    IF ITAB NE NULL.
    INSERT ITAB INTO EXPTAB.
    ENDIF
    REFRESH ITAB.
    ENDWHILE.
    Assume all the syntax and logic are right, I should get this result:
    EmployeeID,ManagerID
    user4,user2
    user2,user1
    If I have a new entry in datable table,ZEMPMGRTAB like this:
    user1,user0
    My pseudocode logic will get this result:
    EmployeeID,ManagerID
    user4,user2
    user2,user1
    user1,user0
    I truly appreciate if you can help me to validate the above syntax and pseudocode logic.
    Thanks in advance.
    KC

    Hi,
    FUNCTION ZGETSOMEINFO3.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(USERID) TYPE  AWTXT
    *"     VALUE(FMTYPEID) TYPE  AWTXT
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRETURN
    *"  TABLES
    *"      APPROVERT STRUCTURE  ZTAB_FMAPPROVER
    *"      ACTOWNERT STRUCTURE  ZTAB_FMACTOWNER
    DATA: T_RESULT TYPE STANDARD TABLE OF ZTAB_FMAPPROVER.
    **Question 1: For this line, I got an error says "Program ''USERID" *not found. Is the syntax right, as the USERID is a parameter for the function.
    perform add_line(USERID).
      ENDFUNCTION.
    form add_line using i_user type ZTAB_FMAPPROVER.EMPLOYEEID
                        changing T_RESULT TYPE ZTAB_FMAPPROVER.
    data: ls_row type ZTAB_FMAPPROVER.
    * Get record for i_user
    select single * into ls_row from ZTAB_FMAPPROVER
    where EmployeeID = i_user.
    if sy-subrc NE 0.
    * Do nothing, there is not manager for this employee
    else.
    * Store result
    QUESTION 2: I am still got stuck on this line of code. It still *says that "T_RESULT" is not an internal table "OCCURS n" *specification is missing. I thought the line: "T_RESULT TYPE *ZTAB_FMAPPROVER" means declare internal table, T_RESULT as type of ZTAB_FMAPPROVER". Am I understand it wrongly?
    append ls_row to t_result.
    * Call recursion
    perform add_line using ls_row-ManagerID
                              changing t_result.
    endif.
    endform.
    Thanks,
    KC

  • Questions in HANA Sql

    Hi Team,
    I have some questions as under:
         1)how can i use a dynamic tables/fields in the Cursor definition :
                   say for eg.., Delcare Cursor Cur_1(dyn_field1 varchar(10), dyn_field2 varchar(10), dyn_table varchar(15)
                                   for select <dyn_field1> <dyn_field2>... <dyn_fieldn> from <dyn_table> ? as it is not acceptable in the Cursor definition to use as:
                                   for select :dyn_field1 :dyn_field2 from :dyn_table ? as it is not acceptable in the Cursor definition to use a Colon(:) before them..
         2)how to processing the records fetched from a table type:
                   say for eg.., if I got a set of records from another procedure that contained a set of records(of a table type)
                                     how to Loop at the records and check for the fields inside them... say I got table that has 5 records and each with 3 fields in it...
                                       after I receive them in the calling procedure, how can Loop at them and check for conditions on the fields... Just like how the
                                       processing will be done in ABAP... Loop at itab into wa_tab.... check the conditions on the fields and Endloop.. ?
         3)how to check for dynamic fields while looping in the Cursor records...
                   say for eg.., if I got 10 records from a stored procedure and I am not aware of the names of the fields in the cursor records
                                       if the code is like: I fetched all the fields from a table which has been derived out of another Cursor...
                                       For tab1 as Cursor_1 do
                                                 tab1 has a field called Hana_table and this changes for every cursor loop...
                                                 I defined a Cursor_2 as Select * from tab1.hana_table...
                                                 Now in the Cursor loop of tab2.... For tab2 as Cursor_2 do
                                                      how do I know which fields are there in the Cursor_2 and to process them? 
         4)how to use Local and Global Internal tables in HANA sql and what is its impact on the HANA tables ?
    Please provide answers on the above points as they are very much need for my current development.
    Thanks in advance for your inputs.
    Regards,
    Vishnu                   

    hi Lars,
    thanks for your inputs...
    I am very much new to HANA and Sql - just 1.5 months into these areas...
    well my requirement is as under:
              I was given a task to check the differences in the loaded tables in HANA...
    1)there is a table(say tab_1) which has 3 fields(say field1, field2 and field3) and field1 refers to a HANA table and field2 and field3 refer to the fields in that HANA table...
    2)now I need to read all the records of the table tab_1 and for every record of tab_1, I need to take the HANA table(field1) and get the entries against the fields 2 and 3... this referred HANA table can have multiple records....
    3)now I have to check other fields say field4 and field5( of the table tab_1) with that of each and every record obtained against the HANA table entries of the Step(2)...
    4)if for any one record of Step(2) matches with the field values of field2 and field3(of tab_1), I need to do some INSERTION into a table...
    Dynamic things are:
    a)the HANA table might change for each record of records of table tab_1
    b)the fields in the HANA table get changed.. need compare field2 with first field of HANA table and field3 with the 2nd record of HANA table...
    for this requirement I resorted to Cursors as I am not aware of any other Sql result sets that can be useful in my requirement...
    I used the following logic:
          For tab1 as cursor_1(fetched fields 1 to 5)
              For tab2 as cursor_2(fetched the fields -> from HANA table of cursor_1-hana_table)
                   Now I created a Local temporary table using EXEC statement as under:
                  va_sql := 'INSERT INTO #hana_table select "' || tab2.field1 || '" as field1'  || ' ' ||
                    '"' || tab2.field2 || '" as field2 ' || 'from ' || :va_hana_table;
                  exec (:va_sql);
             the Stored procedure was successful, how to read the values present in #hana_table?
         I am getting an error:
         invalid table name:  Could not find table/view #hana_table in schema SYSTEM
         if I use as under:
         for tab3 as "#hana_table" do
         end for;
         the error is:
         identifier must be declared
    I hope the requirement is clear to you... please provide your valuable suggestions...
    Regards,
    Vishnu

Maybe you are looking for

  • List of stock by storage bin

    Hi, I need to display a list of materials by storage bin. How to display in this list the quantity and valuation of stock for each material and for each storage bin. Thanks for your comments and suggestions.

  • Message While Loading JSP

    some of my jsp's take a very long time to appear on the screen...some users complain about that because they don't know if the server is down or if the server is working... So I would like to show them a kind of message like. "Page Loading Please wai

  • Chart on variables

    Hello All, We have variables (measures) TypeA, TypeB, TypeC created at report level in webi. It has the below mentioned example data: TypeA 50 TypeB 30 TypeC 80 I am expecting bar/line chart with TypeA, TypeB, TypeC in Category (X) axis and values on

  • Disappearing applications from ipad2

    I recently synced my ipad 2 with itunes (after browsing a few days on it), and shortly after the sync was completed, noticed that three applications being, camera, facetime and photobooth disappeared from the ipad. I recenrtly restored the ipad, wher

  • HT1430 My Ipad won't start up.  The apple logo appears and just stays on the screen. after a while it starts blinking every minute

    My Ipad won't start up.  The apple logo appears and just stays on the screen. after a while it starts blinking every minute