Internal tables are usually processed in loops. In this loop, all elements of the internal table are read, starting from the first line. The keyword that starts the loop is LOOP AT, followed by the name of the internal table. If You can now write a statement block to process the individual lines of the internal table. At the end of the block, close the loop using the keyword ENDLOOP. Processing an internal table looks like this in the program: LOOP AT itab INTO wa. ENDLOOP. The program based on the examples below is listed in Sample program: internal tables. If you encounter any problems coding your program, you can look for tips in the sample program. Output of the table contents To output table contents, you use a WRITE statement within a LOOP. Make sure that the contents of the current table line is in the work area of the table by specifying in the WRITE statement the relevant fields of the work area You can use the statement pattern to create the WRITE statement. However, note that you cannot mark Output to Struct. in the window Assemble a WRITE Statement. Instead, use Output from fld for each field you want to output. Enter the entire field name into the adjacent input field and choose Copy. In the last exercise, you wrote a program that filled the internal table without header line The system displays a list of all flights that correspond to the selections entered on the selection screen.
Confused? Feel free to ask
Your feedback is always appreciated.I will try to reply Ur queries as soon as time allows.
Regards,
SAPhelpdesk
0 comments:
Post a Comment