SAP Function Modules

PIG_EASY_CHART SAP Function module







PIG_EASY_CHART is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name PIG_EASY_CHART into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SPIG
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM PIG_EASY_CHART - PIG EASY CHART





CALL FUNCTION 'PIG_EASY_CHART' "
  EXPORTING
    format = 0                  " i
    width = 320                 " i
    height = 200                " i
    use_db = SPACE              " pigdata-char1
    typ = 'PIE'                 " pigdata-char20
    title = ''                  " pigdata-char20
    legend = 'DEFAULT'          " pigdata-char20
    scheme = 'DEFAULT'          " pigdata-char20
    values =                    " pigdata-char30k
  IMPORTING
    content_type =              " w3param-cont_type
    content_length =            " w3param-cont_len
    content_id =                " pigdata-char32
* TABLES
*   content =                   " w3mime
*   imagemap =                  " w3html
    .  "  PIG_EASY_CHART

ABAP code example for Function Module PIG_EASY_CHART





The ABAP code below is a full code listing to execute function module PIG_EASY_CHART including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet 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_content_type  TYPE W3PARAM-CONT_TYPE ,
ld_content_length  TYPE W3PARAM-CONT_LEN ,
ld_content_id  TYPE PIGDATA-CHAR32 ,
it_content  TYPE STANDARD TABLE OF W3MIME,"TABLES PARAM
wa_content  LIKE LINE OF it_content ,
it_imagemap  TYPE STANDARD TABLE OF W3HTML,"TABLES PARAM
wa_imagemap  LIKE LINE OF it_imagemap .

DATA(ld_format) = 'Check type of data required'.
DATA(ld_width) = 'Check type of data required'.
DATA(ld_height) = 'Check type of data required'.

DATA(ld_use_db) = some text here

DATA(ld_typ) = some text here

DATA(ld_title) = some text here

DATA(ld_legend) = some text here

DATA(ld_scheme) = some text here

DATA(ld_values) = some text here

"populate fields of struture and append to itab
append wa_content to it_content.

"populate fields of struture and append to itab
append wa_imagemap to it_imagemap. . CALL FUNCTION 'PIG_EASY_CHART' EXPORTING format = ld_format width = ld_width height = ld_height use_db = ld_use_db typ = ld_typ title = ld_title legend = ld_legend scheme = ld_scheme values = ld_values IMPORTING content_type = ld_content_type content_length = ld_content_length content_id = ld_content_id * TABLES * content = it_content * imagemap = it_imagemap . " PIG_EASY_CHART
IF SY-SUBRC EQ 0. "All OK 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_content_type  TYPE W3PARAM-CONT_TYPE ,
ld_format  TYPE I ,
it_content  TYPE STANDARD TABLE OF W3MIME ,
wa_content  LIKE LINE OF it_content,
ld_content_length  TYPE W3PARAM-CONT_LEN ,
ld_width  TYPE I ,
it_imagemap  TYPE STANDARD TABLE OF W3HTML ,
wa_imagemap  LIKE LINE OF it_imagemap,
ld_content_id  TYPE PIGDATA-CHAR32 ,
ld_height  TYPE I ,
ld_use_db  TYPE PIGDATA-CHAR1 ,
ld_typ  TYPE PIGDATA-CHAR20 ,
ld_title  TYPE PIGDATA-CHAR20 ,
ld_legend  TYPE PIGDATA-CHAR20 ,
ld_scheme  TYPE PIGDATA-CHAR20 ,
ld_values  TYPE PIGDATA-CHAR30K .

ld_format = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_content to it_content.
ld_width = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_imagemap to it_imagemap.
ld_height = 'Check type of data required'.

ld_use_db = some text here

ld_typ = some text here

ld_title = some text here

ld_legend = some text here

ld_scheme = some text here

ld_values = some text here

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 PIG_EASY_CHART or its description.