SAP Function Modules

PROMOTION_INFOSTRUC_DATA_GET SAP Function module







PROMOTION_INFOSTRUC_DATA_GET 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 PROMOTION_INFOSTRUC_DATA_GET into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: WAK1
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM PROMOTION_INFOSTRUC_DATA_GET - PROMOTION INFOSTRUC DATA GET





CALL FUNCTION 'PROMOTION_INFOSTRUC_DATA_GET' "
  EXPORTING
    faktnr =                    " wakh-aktnr    Promotion number
    fmatnr =                    " mara-matnr    Article Number
*   fmeinh =                    " wakp-mebme    Unit of Measure
*   fwerbm = SPACE              " rwaka-kwerb
*   pi_buffers = ' '            " wakpd-selkz   Selection Indicator
  IMPORTING
    fthema =                    " wakp-akthe    Promotion Theme
    ftyp =                      " wakh-aktyp    Action Category
    fstat_media =               " waktp_mediastruc
* TABLES
*   fmedia =                    " waktp_media
  EXCEPTIONS
    NOT_FOUND = 1               "
    .  "  PROMOTION_INFOSTRUC_DATA_GET

ABAP code example for Function Module PROMOTION_INFOSTRUC_DATA_GET





The ABAP code below is a full code listing to execute function module PROMOTION_INFOSTRUC_DATA_GET 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_fthema  TYPE WAKP-AKTHE ,
ld_ftyp  TYPE WAKH-AKTYP ,
ld_fstat_media  TYPE WAKTP_MEDIASTRUC ,
it_fmedia  TYPE STANDARD TABLE OF WAKTP_MEDIA,"TABLES PARAM
wa_fmedia  LIKE LINE OF it_fmedia .


SELECT single AKTNR
FROM WAKH
INTO @DATA(ld_faktnr).


SELECT single MATNR
FROM MARA
INTO @DATA(ld_fmatnr).


SELECT single MEBME
FROM WAKP
INTO @DATA(ld_fmeinh).


DATA(ld_fwerbm) = some text here

DATA(ld_pi_buffers) = some text here

"populate fields of struture and append to itab
append wa_fmedia to it_fmedia. . CALL FUNCTION 'PROMOTION_INFOSTRUC_DATA_GET' EXPORTING faktnr = ld_faktnr fmatnr = ld_fmatnr * fmeinh = ld_fmeinh * fwerbm = ld_fwerbm * pi_buffers = ld_pi_buffers IMPORTING fthema = ld_fthema ftyp = ld_ftyp fstat_media = ld_fstat_media * TABLES * fmedia = it_fmedia EXCEPTIONS NOT_FOUND = 1 . " PROMOTION_INFOSTRUC_DATA_GET
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_fthema  TYPE WAKP-AKTHE ,
ld_faktnr  TYPE WAKH-AKTNR ,
it_fmedia  TYPE STANDARD TABLE OF WAKTP_MEDIA ,
wa_fmedia  LIKE LINE OF it_fmedia,
ld_ftyp  TYPE WAKH-AKTYP ,
ld_fmatnr  TYPE MARA-MATNR ,
ld_fstat_media  TYPE WAKTP_MEDIASTRUC ,
ld_fmeinh  TYPE WAKP-MEBME ,
ld_fwerbm  TYPE RWAKA-KWERB ,
ld_pi_buffers  TYPE WAKPD-SELKZ .


SELECT single AKTNR
FROM WAKH
INTO ld_faktnr.


"populate fields of struture and append to itab
append wa_fmedia to it_fmedia.

SELECT single MATNR
FROM MARA
INTO ld_fmatnr.


SELECT single MEBME
FROM WAKP
INTO ld_fmeinh.


ld_fwerbm = some text here

ld_pi_buffers = some text here

SAP Documentation for FM PROMOTION_INFOSTRUC_DATA_GET


This function module returns the respective attributes PROMOTION-THEME and PROMOTION-TYPE to a given promotion material (import parameters ...See here for full SAP fm documentation

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