SAP Tables

SHOPPING_LIST_DIALOG SAP Function module






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


Pattern for FM SHOPPING_LIST_DIALOG - SHOPPING LIST DIALOG
Associated Function Group: WVKD
Released Date: Not Released
CALL FUNCTION 'SHOPPING_LIST_DIALOG' "
  EXPORTING
*   pi_trtyp = 'A'              " pispc-trtyp
*   pi_title =                  " sy-title
*   pi_dplay = ' '              " sy-marky
    pi_i_welpk_line =           " wvkm_welpk_line
  IMPORTING
    pe_i_welpk_line =           " wvkm_welpk_line
    pe_datar =                  " sy-datar
    pe_fcode =                  " sy-tcode
  TABLES
    px_t_welpp_ltab =           " wvkm_welpp_ltab
    pe_t_welpp_ltab_d =         " wvkm_welpp_ltab
  EXCEPTIONS
    EXIT = 1                    "
    .  "  SHOPPING_LIST_DIALOG

ABAP code example for Function Module SHOPPING_LIST_DIALOG

The ABAP code below is a full code listing to execute function module SHOPPING_LIST_DIALOG 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_pe_i_welpk_line   TYPE WVKM_WELPK_LINE,
ld_pe_datar   TYPE SY-DATAR,
ld_pe_fcode   TYPE SY-TCODE,
it_px_t_welpp_ltab   TYPE STANDARD TABLE OF WVKM_WELPP_LTAB,"tables param
wa_px_t_welpp_ltab LIKE LINE OF it_px_t_welpp_ltab  ,
it_pe_t_welpp_ltab_d   TYPE STANDARD TABLE OF WVKM_WELPP_LTAB,"tables param
wa_pe_t_welpp_ltab_d LIKE LINE OF it_pe_t_welpp_ltab_d  .


DATA(ld_pi_trtyp). = 'some text here'
DATA(ld_pi_title) = 'some text here'.
DATA(ld_pi_dplay) = 'some text here'.
DATA(ld_pi_i_welpk_line) = 'some text here'.

"populate fields of struture and append to itab
append wa_px_t_welpp_ltab to it_px_t_welpp_ltab.

"populate fields of struture and append to itab
append wa_pe_t_welpp_ltab_d to it_pe_t_welpp_ltab_d.. CALL FUNCTION 'SHOPPING_LIST_DIALOG' EXPORTING * pi_trtyp = ld_pi_trtyp * pi_title = ld_pi_title * pi_dplay = ld_pi_dplay pi_i_welpk_line = ld_pi_i_welpk_line IMPORTING pe_i_welpk_line = ld_pe_i_welpk_line pe_datar = ld_pe_datar pe_fcode = ld_pe_fcode TABLES px_t_welpp_ltab = it_px_t_welpp_ltab pe_t_welpp_ltab_d = it_pe_t_welpp_ltab_d EXCEPTIONS EXIT = 1 . " SHOPPING_LIST_DIALOG
IF SY-SUBRC EQ 0.   "All OK ELSEIF SY-SUBRC EQ 1. "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_pe_i_welpk_line TYPE WVKM_WELPK_LINE ,
ld_pi_trtyp TYPE PISPC-TRTYP ,
it_px_t_welpp_ltab TYPE STANDARD TABLE OF WVKM_WELPP_LTAB ,
wa_px_t_welpp_ltab LIKE LINE OF it_px_t_welpp_ltab,
ld_pe_datar TYPE SY-DATAR ,
ld_pi_title TYPE SY-TITLE ,
it_pe_t_welpp_ltab_d TYPE STANDARD TABLE OF WVKM_WELPP_LTAB ,
wa_pe_t_welpp_ltab_d LIKE LINE OF it_pe_t_welpp_ltab_d,
ld_pe_fcode TYPE SY-TCODE ,
ld_pi_dplay TYPE SY-MARKY ,
ld_pi_i_welpk_line TYPE WVKM_WELPK_LINE .

ld_pe_i_welpk_line = 'some text here'.

DATA(ld_pi_trtyp). = 'some text here'

"populate fields of struture and append to itab
append wa_px_t_welpp_ltab to it_px_t_welpp_ltab.
ld_pe_datar = 'some text here'.
ld_pi_title = 'some text here'.

"populate fields of struture and append to itab
append wa_pe_t_welpp_ltab_d to it_pe_t_welpp_ltab_d.
ld_pe_fcode = 'some text here'.
ld_pi_dplay = 'some text here'.
ld_pi_i_welpk_line = 'some text here'..