01-07-2015 3:53 PM
Hi, I want to know more about field descriptions on dynpro development.
Now, this might be an odd question: the coding below is used in SAP to Display Information to Output only fields.
Can some one explain me the used naming scheme MODULE KNVV-KALKS_BEZ ? It reads like 'table'-'field_name'. Is it just for descriptional purpose or does choosing this naming offer some functionality? I cant read out of the coding where the selected value is going to be stored.
Is it stored in KNVV-KALKS_BEZ? If yes, how and where?
Thank you.
MODULE KNVV-KALKS_BEZ OUTPUT.
CHECK SY-BINPT NE 'X'.
IF KNVV-KALKS EQ SPACE.
CLEAR TVKDT.
ELSE.
IF TVKDT-SPRAS NE SY-LANGU
OR TVKDT-KALKS NE KNVV-KALKS.
SELECT SINGLE * FROM TVKDT WHERE SPRAS = SY-LANGU
AND KALKS = KNVV-KALKS.
IF SY-SUBRC NE 0.
CLEAR TVKDT.
ENDIF.
ENDIF.
ENDIF.
ENDMODULE. "KNVV-KALKS_BEZ OUTPUT
01-08-2015 5:44 AM
Hi Kai-Markus,
the module names are free to choose. But it's easier to read the code, if the name is telling something about the code.
In your case the content of TABLES structure TVKDT will be updated in some cases. Maybe a TVKDT is placed on that screen, I think, it might be TVKDT-VTEXT. Or TVKDT-VTEXT will be moved to a screen field in another module.
Regards,
Klaus
01-08-2015 10:31 AM
Thank you Klaus, I was very curious about the module naming. From my past, I know some (non-SAP) Frameworks and programming languages that provide functionality based on naming convention.