Tuesday, July 1, 2025

❓ SAP ABAP – Common Questions on Table Control, PF-Status, and UCOMM

Ques-1:Suppose in table control when I entered few records then I selected ‘Enter’ option, I found that the records are completely vanished from table control. Why it happens & What logic you will write to avoid problem?

Ans:

  • When you select ‘Enter’, control moves from screen to program
  • In the program, there is no logic provided for storing the table control data in the internal table
  • So nothing is transferred back to the table control screen
  • Therefore, it looks empty

Logic to Avoid the Issue:

MODIFY it_demo FROM zmm_demo INDEX vcontrol-current_line.

 IF SY-SUBRC NE 0.

  APPEND zmm_demo TO it_demo.

ENDIF.


Ques-2:
In table control how you can perform auto calculations whenever ‘Enter’ key is selected?

Ans:

Remove comment for SET PF_STATUS.

Under MODULE STATUS_100 ‘xxxxxxxxx’.

Remove ‘xxxxxxxxxx’ and provide ’BACK’.

Yes

Yes

Short Text: BACK

Enter

Expand Function Keys option

_/ ENTER

Activate

You will find a pop-up, Enter

Function Text: Enter

Enter

Back (F3)

Activate the program


Ques-3:
What is the difference between SSCRFIELDS-UCOMM & SY-UCOMM?

Ans:

  • SSCRFIELDS is a structure for maintaining text for the buttons in SELECTION-SCREEN
  • SSCRFIELDS-UCOMM returns FCT code for buttons maintained in SELECTION-SCREEN
  • SY-UCOMM returns FCT code for buttons maintained in SCREEN
  • SY-UCOMM works for both Screen & Selection-screen