SAP Tables

QEGR_HISTOGRAM_FOR_QAKL SAP Function module - Histogram for Classed Inspection Results






QEGR_HISTOGRAM_FOR_QAKLis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name QEGR_HISTOGRAM_FOR_QAKL into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name QEGR_HISTOGRAM_FOR_QAKL or its description.


Pattern for FM QEGR_HISTOGRAM_FOR_QAKL - QEGR HISTOGRAM FOR QAKL
Associated Function Group: QEGR
Released Date: 22.01.1996
CALL FUNCTION 'QEGR_HISTOGRAM_FOR_QAKL' "Histogram for Classed Inspection Results
  EXPORTING
*   i_merknr =                  " qamv-merknr   Characteristic number in the operation
*   i_kurztext =                " qamv-kurztext  Description of the Characteristic
*   i_ktextmat =                " qals-ktextmat  Description of the material
*   i_masseinhsw3 =             " qamv-masseinhsw  Characteristic unit (internal format)
*   i_masseinhsw6 =             " qamkr-masseinhsw  Characteristic unit (display format)
    i_stellen =                 " qamv-stellen  Number of decimal places
    i_klasbreite =              " qamv-klasbreite  Class range
*   i_scaling = 'P'             " qegr_scaling  Presentation (A=absolute, P=percentage, R=relative)
*   i_tolobni =                 " qamv-tolobni  Upper specification limit active ('X'=yes)
*   i_toleranzob =              " qamv-toleranzob  Upper specification limit
*   i_sollwni =                 " qamv-sollwni  Target value/ nominal value active ('X'=yes)
*   i_sollwert =                " qamv-sollwert  Target value/ nominal value
*   i_tolunni =                 " qamv-tolunni  Lower specification limit active ('X'=yes)
*   i_toleranzun =              " qamv-toleranzun  Lower specification limit
  IMPORTING
    e_graphics_still_active =   " qm00-qkz      Graphic is still active ('X' = yes)
* TABLES
*   t_qakltab =                 " qakl          Classified original values 1st variant
*   t_qaklrtab =                " qaklr         Classified original values 2nd variant
*   t_qasktab =                 " qask          Classified original values 3rd variant
  EXCEPTIONS
    MISSING_DATA = 1            "               Missing data
    INCONSISTENT_DATA = 2       "               Inconsistent data
    PROGRAMMING_ERROR = 3       "               Unforseen programming error
    .  "  QEGR_HISTOGRAM_FOR_QAKL

ABAP code example for Function Module QEGR_HISTOGRAM_FOR_QAKL

The ABAP code below is a full code listing to execute function module QEGR_HISTOGRAM_FOR_QAKL including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
DATA:
ld_e_graphics_still_active   TYPE QM00-QKZ,
it_t_qakltab   TYPE STANDARD TABLE OF QAKL,"tables param
wa_t_qakltab LIKE LINE OF it_t_qakltab  ,
it_t_qaklrtab   TYPE STANDARD TABLE OF QAKLR,"tables param
wa_t_qaklrtab LIKE LINE OF it_t_qaklrtab  ,
it_t_qasktab   TYPE STANDARD TABLE OF QASK,"tables param
wa_t_qasktab LIKE LINE OF it_t_qasktab  .


SELECT single MERKNR
FROM QAMV
INTO @DATA(ld_i_merknr).


SELECT single KURZTEXT
FROM QAMV
INTO @DATA(ld_i_kurztext).


SELECT single KTEXTMAT
FROM QALS
INTO @DATA(ld_i_ktextmat).


SELECT single MASSEINHSW
FROM QAMV
INTO @DATA(ld_i_masseinhsw3).


DATA(ld_i_masseinhsw6). = 'some text here'

SELECT single STELLEN
FROM QAMV
INTO @DATA(ld_i_stellen).


SELECT single KLASBREITE
FROM QAMV
INTO @DATA(ld_i_klasbreite).

DATA(ld_i_scaling) = 'Check type of data required'.

SELECT single TOLOBNI
FROM QAMV
INTO @DATA(ld_i_tolobni).


SELECT single TOLERANZOB
FROM QAMV
INTO @DATA(ld_i_toleranzob).


SELECT single SOLLWNI
FROM QAMV
INTO @DATA(ld_i_sollwni).


SELECT single SOLLWERT
FROM QAMV
INTO @DATA(ld_i_sollwert).


SELECT single TOLUNNI
FROM QAMV
INTO @DATA(ld_i_tolunni).


SELECT single TOLERANZUN
FROM QAMV
INTO @DATA(ld_i_toleranzun).


"populate fields of struture and append to itab
append wa_t_qakltab to it_t_qakltab.

"populate fields of struture and append to itab
append wa_t_qaklrtab to it_t_qaklrtab.

"populate fields of struture and append to itab
append wa_t_qasktab to it_t_qasktab.. CALL FUNCTION 'QEGR_HISTOGRAM_FOR_QAKL' EXPORTING * i_merknr = ld_i_merknr * i_kurztext = ld_i_kurztext * i_ktextmat = ld_i_ktextmat * i_masseinhsw3 = ld_i_masseinhsw3 * i_masseinhsw6 = ld_i_masseinhsw6 i_stellen = ld_i_stellen i_klasbreite = ld_i_klasbreite * i_scaling = ld_i_scaling * i_tolobni = ld_i_tolobni * i_toleranzob = ld_i_toleranzob * i_sollwni = ld_i_sollwni * i_sollwert = ld_i_sollwert * i_tolunni = ld_i_tolunni * i_toleranzun = ld_i_toleranzun IMPORTING e_graphics_still_active = ld_e_graphics_still_active * TABLES * t_qakltab = it_t_qakltab * t_qaklrtab = it_t_qaklrtab * t_qasktab = it_t_qasktab EXCEPTIONS MISSING_DATA = 1 INCONSISTENT_DATA = 2 PROGRAMMING_ERROR = 3 . " QEGR_HISTOGRAM_FOR_QAKL
IF SY-SUBRC EQ 0.   "All OK ELSEIF SY-SUBRC EQ 1. "Exception   "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception   "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception   "Add code for exception here ENDIF.

ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
ld_e_graphics_still_active TYPE QM00-QKZ ,
ld_i_merknr TYPE QAMV-MERKNR ,
it_t_qakltab TYPE STANDARD TABLE OF QAKL ,
wa_t_qakltab LIKE LINE OF it_t_qakltab,
ld_i_kurztext TYPE QAMV-KURZTEXT ,
it_t_qaklrtab TYPE STANDARD TABLE OF QAKLR ,
wa_t_qaklrtab LIKE LINE OF it_t_qaklrtab,
ld_i_ktextmat TYPE QALS-KTEXTMAT ,
it_t_qasktab TYPE STANDARD TABLE OF QASK ,
wa_t_qasktab LIKE LINE OF it_t_qasktab,
ld_i_masseinhsw3 TYPE QAMV-MASSEINHSW ,
ld_i_masseinhsw6 TYPE QAMKR-MASSEINHSW ,
ld_i_stellen TYPE QAMV-STELLEN ,
ld_i_klasbreite TYPE QAMV-KLASBREITE ,
ld_i_scaling TYPE QEGR_SCALING ,
ld_i_tolobni TYPE QAMV-TOLOBNI ,
ld_i_toleranzob TYPE QAMV-TOLERANZOB ,
ld_i_sollwni TYPE QAMV-SOLLWNI ,
ld_i_sollwert TYPE QAMV-SOLLWERT ,
ld_i_tolunni TYPE QAMV-TOLUNNI ,
ld_i_toleranzun TYPE QAMV-TOLERANZUN .


DATA(ld_e_graphics_still_active). = 'some text here'

SELECT single MERKNR
FROM QAMV
INTO ld_i_merknr.


"populate fields of struture and append to itab
append wa_t_qakltab to it_t_qakltab.

SELECT single KURZTEXT
FROM QAMV
INTO ld_i_kurztext.


"populate fields of struture and append to itab
append wa_t_qaklrtab to it_t_qaklrtab.

SELECT single KTEXTMAT
FROM QALS
INTO ld_i_ktextmat.


"populate fields of struture and append to itab
append wa_t_qasktab to it_t_qasktab.

SELECT single MASSEINHSW
FROM QAMV
INTO ld_i_masseinhsw3.


DATA(ld_i_masseinhsw6). = 'some text here'

SELECT single STELLEN
FROM QAMV
INTO ld_i_stellen.


SELECT single KLASBREITE
FROM QAMV
INTO ld_i_klasbreite.

ld_i_scaling = 'Check type of data required'.

SELECT single TOLOBNI
FROM QAMV
INTO ld_i_tolobni.


SELECT single TOLERANZOB
FROM QAMV
INTO ld_i_toleranzob.


SELECT single SOLLWNI
FROM QAMV
INTO ld_i_sollwni.


SELECT single SOLLWERT
FROM QAMV
INTO ld_i_sollwert.


SELECT single TOLUNNI
FROM QAMV
INTO ld_i_tolunni.


SELECT single TOLERANZUN
FROM QAMV
INTO ld_i_toleranzun.
.

SAP Documentation for FM QEGR_HISTOGRAM_FOR_QAKL


A display of the frequency distribution of inspection results as a histogram using the SAP statistics graphics. The inspection ...See here for full SAP fm documentation