SAP ABAP Table Control with Examples - Shikshaglobe

Content Creator: Satish kumar

SAP ABAP Table Control with Examples

Table controls and step circles are objects for screen table presentation that you add to a screen in the Screen Painter.From a programming outlook, table controls and step circles are the very same. Table controls are basically further developed step circles that show information with the look and feel related with tables in work area applications.

Data declarations

DATA: lt_data TYPE TABLE OF ty_data,

      ls_data TYPE ty_data,

      wa_tc TYPE scrfname.

 

Constants for table control

CONSTANTS: c_col1 TYPE i VALUE 1,

           c_col2 TYPE i VALUE 2,

           c_col3 TYPE i VALUE 3,

           c_col4 TYPE i VALUE 4.

 

Table control structure

DATA: BEGIN OF it_field OCCURS 0,

        field(10) TYPE c,

      END OF it_field.

 

Screen elements

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: p_exit AS CHECKBOX.

SELECTION-SCREEN END OF BLOCK b1.

 

Module to populate data into internal table lt_data

MODULE populate_data.

  ls_data-field1 = 'Value1'.

  ls_data-field2 = 'Value2'.

  ls_data-field3 = 'Value3'.

  ls_data-field4 = 'Value4'.

  APPEND ls_data TO lt_data.

ENDMODULE.

 

Click here for details

PBO module for the screen

MODULE user_interface OUTPUT.

  CALL SCREEN 100.

ENDMODULE.

 

PAI module for the screen

MODULE user_interface INPUT.

  DATA: lv_row TYPE i,

        lv_col TYPE i.

 

  CASE sy-ucomm.

    WHEN 'BACK' OR 'EXIT'.

      p_exit = abap_true.

 

    WHEN 'ADD_ROW'.

      CLEAR ls_data.

      APPEND ls_data TO lt_data.

 

    WHEN 'DEL_ROW'.

      READ TABLE it_field INDEX tc_row-col1.

      IF sy-subrc = 0.

        DELETE it_field INDEX tc_row-col1.

      ENDIF.

 

Take the next step

    WHEN OTHERS.

      lv_row = tc_row.

      lv_col = tc_col.

      CASE lv_col.

        WHEN c_col1.

          READ TABLE lt_data INTO ls_data INDEX lv_row.

          IF sy-subrc = 0.

            it_field-col1 = ls_data-field1.

          ENDIF.

        WHEN c_col2.

          READ TABLE lt_data INTO ls_data INDEX lv_row.

          IF sy-subrc = 0.

            it_field-col2 = ls_data-field2.

          ENDIF.

        WHEN c_col3.

          READ TABLE lt_data INTO ls_data INDEX lv_row.

          IF sy-subrc = 0.

            it_field-col3 = ls_data-field3.

          ENDIF.

        WHEN c_col4.

          READ TABLE lt_data INTO ls_data INDEX lv_row.

          IF sy-subrc = 0.

            it_field-col4 = ls_data-field4.

          ENDIF.

      ENDCASE.

  ENDCASE.

ENDMODULE.

 

Experience the difference

Screen 100 with table control

With table controls, the client can:

Look at the table upward and evenly

Re-size the width of a section

Look inside a field (when field contents are more extensive than the field)

Select table lines or segments

Re-request the arrangement of sections

Save the ongoing presentation settings for sometime later

Table controls additionally offer extraordinary designing elements (some programmed, some discretionary) that make tables simpler to check out and utilize. Table Control gives -

programmed table resizing (vertical and level) when the client resizes the window

separator lines among columns and between segments (vertical and level)

Take the next step

section header fields for all segments

One element of step circles is that their table columns can traverse more than one line on the screen. A column of a table control, then again, should constantly be contained in a solitary line (despite the fact that looking over is conceivable).As a general rule, a significant number of the highlights given by the table control are taken care of locally by your framework's SAPgui frontend, so you don't have to program them yourself. The main outstanding exemption for this is vertical looking over.where is the name of the table control on a screen in the ABAP program. The control permits the ABAP program to peruse the characteristics of the table control and to impact the control .Here, is the screen number where the underlying upsides of the table are stacked.

Cursor Position for a table control can be set in following ways:

At PBO you can set the cursor on a particular field of a particular line of a table control.

Utilizing the discretionary expansion OFFSET, you can enter the offset of the cursor in the field as portrayed under Setting the Cursor Position.

At PAI you can peruse the ongoing cursor position.

Notwithstanding the data given under Finding Out the Cursor Position, field contains data on which line of the table control the cursor is as of now on. You can likewise utilize

The framework variable stepl - contains the ongoing table line record in a circle … endloop. Loopc - contains number of lines apparent in the table

To make a table control

1.Add a table control component to your screen

2.Give a name to the table control. In the ABAP program proclaim a design with something similar ( CONTROLS type TABLEVIEW USING SCREEN )

3.To make fields go to the Dict./Program fields capability.

Enter the name of the design whose fields you need. (Assuming that you believe it should pick it from word reference of your program click the pertinent puhbutton).

In the field list pick the fields you need and pick alright.In the event that you need a choice segment , check the suitable really take a look at confine the characteristics and give it a name. Make the field in the ABAP program.

In the PBO you ought to have the assertion

It is inside the circles that information move occurs between the screen and the inside table.When you populate the interior table use DESCRIBE TABLE LINES -lines, to store the complete number of lines in the control.The FIELD explanation can be utilized to control when the information move occursTo change the qualities of individual cells briefly change the SCREEN table in the PBO. You can change the traits of the design made by the CONTROLS articulation


Click Here

Explore More

BRS vs SRS: Know the DifferenceProcess on Value & Process on Help What Is Workers Compensation Insurance Change Control Process in Software Engineering with Steps 

Tags:

sap abap table control with examplessap abap reduce examplesap abap table control with examples and examplessap abap table control with examples and definitionssap abap table control with examples and syntaxsap abap table control with examples answerssap abap table control with examples and exercisessap abap table control with examples add new linesap abap table control with examples attributessap abap table control with examples add columnsap abap table control with examples add buttonsap abap table control with examples add checkboxsap abap table control with examples booksap abap table control with examples between tablessap abap table control with examples basicsap abap table control with examples based on conditionsap abap table control with examples bdcsap abap table control with examples break statementssap abap table control with examples by stepsap abap table control with examples bdc usingsap abap table control with examples barsap abap table control with examples buttonsap abap table control with examples codesap abap table control with examples c#sap abap table control with examples classsap abap table control with examples codepensap abap table control with examples columnsap abap table control with examples codeprojectsap abap table control with examples class 9sap abap table control with examples checkboxsap abap table control with examples cursor linesap abap table control with examples clicksap abap table control with examples documentsap abap table control with examples downloadsap abap table control with examples descriptionsap abap table control with examples datasap abap table control with examples dbsap abap table control with examples during a speechsap abap table control with examples during a negotiationsap abap table control with examples during pregnancysap abap table control with examples double clicksap abap table control with examples disablesap abap table control with examples examplesap abap table control with examples excelsap abap table control with examples example codesap abap table control with examples each of the sevensap abap table control with examples editsap abap table control with examples from tablesap abap table control with examples from excelsap abap table control with examples from excel filesap abap table control with examples for beginnerssap abap table control with examples for experiencedsap abap table control with examples factssap abap table control with examples filtersap abap table control with examples fieldsap abap table control with examples f4 helpsap abap table control with examples guidesap abap table control with examples guisap abap table control with examples gridsap abap table control with examples gcpsap abap table control with examples geometry answerssap abap table control with examples geometrysap abap table control with examples get cursor linesap abap table control with examples get selected linesap abap table control with examples getsap abap table control with examples hanasap abap table control with examples howsap abap table control with examples hierarchysap abap table control with examples headersap abap table control with examples htmlsap abap table control with examples hide columnsap abap table control with examples hidesap abap table control with examples hotspotsap abap table control with examples helpsap abap table control with examples in sap abapsap abap table control with examples in sapsap abap table control with examples in javasap abap table control with examples in oracle apps r12sap abap table control with examples in rsap abap table control with examples in c#sap abap table control with examples in selection screensap abap table control with examples javasap abap table control with examples jpasap abap table control with examples jsonsap abap table control with examples jvmsap abap table control with examples javarevisitedsap abap table control with example joinsap abap table control with examples keysap abap table control with examples keywordsap abap table control with examples listsap abap table control with examples librarysap abap table control with examples loopsap abap table control with examples likesap abap table control with examples linesap abap table control with examples literaturesap abap table control with examples listboxsap abap table control with examples line selectionsap abap table control with examples modulesap abap table control with examples manualsap abap table control with examples matrixsap abap table control with examples mkyongsap abap table control with examples module poolsap abap table control with examples not workingsap abap table control with examples numberssap abap table control with examples namesap abap table control with examples notessap abap table control with examples new linesap abap table control with examples of tablessap abap table control with examples of datasap abap table control with examples of motionsap abap table control with examples of eachsap abap table control with examples of figurative languagesap abap table control with example operationssap abap table control with examples pdfsap abap table control with examples pdf downloadsap abap table control with examples pptsap abap table control with examples programsap abap table control with examples poolsap abap table control with examples paintersap abap table control with examples propertiessap abap table control with examples push buttonsap abap table control with examples querysap abap table control with examples quizletsap abap table control with examples questionssap abap table control with examples quizlet livesap abap table control with examples reportsap abap table control with examples restsap abap table control with examples rest apisap abap table control with examples recordsap abap table control with examples real lifesap abap table control with examples resumesap abap table control with examples redditsap abap table control with examples refreshsap abap table control with examples rowsap abap table control with examples site stackoverflow.comsap abap table control with examples sapsap abap table control with examples sheetsap abap table control with examples step by stepsap abap table control with examples stepsap abap table control with examples sentencessap abap table control with examples symmetric and asymmetric encryptionsap abap table control with examples sqlsap abap table control with examples scrollingsap abap table control with examples selection screensap abap table control with examples tablesap abap table control with examples tutorialsap abap table control with examples tcodesap abap table control with examples teacher's editionsap abap table control with examples to hidesap abap table control with examples technicalsap abap table control with examples tabstripsap abap table control with examples usersap abap table control with examples using querysap abap table control with examples using tablesap abap table control with examples using sqlsap abap table control with examples using datasap abap table control with examples using osgi pdfsap abap table control with examples using osgisap abap table control with examples using aws lambdasap abap table control with example update databasesap abap table control with example updatesap abap table control with examples viewsap abap table control with examples variablesap abap table control with examples vs codesap abap table control with examples videosap abap table control with examples vertical scrollingsap abap table control with examples w3schoolssap abap table control with examples with examplesap abap table control with examples wikipediasap abap table control with examples why or why notsap abap table control with examples with c#sap abap table control with examples wizardsap abap table control with examples web dynprosap abap table control with examples xmlsap abap table control with examples xml filesap abap table control with examples xsssap abap table control with examples xlssap abap table control with examples youtubesap abap table control with examples yamlsap abap table control with examples youtube videosap abap table control with examples yes or nosap abap table control with examples ymlsap abap table control with examples zerosap abap table control with examples z/ossap abap table control with examples z tablesap abap table control with examples zapsap abap table control with examples 2024-25sap abap table control with example 7.5 sum internal

Featured Universities

Mahatma Gandhi University

Location: Soreng ,Sikkim , India
Approved: UGC
Course Offered: UG and PG

MATS University

Location: Raipur, Chhattisgarh, India
Approved: UGC
Course Offered: UG and PG

Kalinga University

Location: Raipur, Chhattisgarh,India
Approved: UGC
Course Offered: UG and PG

Vinayaka Missions Sikkim University

Location: Gangtok, Sikkim, India
Approved: UGC
Course Offered: UG and PG

Sabarmati University

Location: Ahmedabad, Gujarat, India
Approved: UGC
Course Offered: UG and PG

Arni University

Location: Tanda, Himachal Pradesh, India.
Approved: UGC
Course Offered: UG and PG

Capital University

Location: Jhumri Telaiya Jharkhand,India
Approved: UGC
Course Offered: UG and PG

Glocal University

Location: Saharanpur, UP, India.
Approved: UGC
Course Offered: UG and PG

Himalayan Garhwal University

Location: PG, Uttarakhand, India
Approved: UGC
Course Offered: UG and PG

Sikkim Professional University

Location: Sikkim, India
Approved: UGC
Course Offered: UG and PG

North East Frontier Technical University

Location: Aalo, AP ,India
Approved: UGC
Course Offered: UG and PG