SAP Function Modules

MSR20_MD_PROPOSAL_GETLIST SAP Function module - Get List of Item Proposals







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

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


Pattern for FM MSR20_MD_PROPOSAL_GETLIST - MSR20 MD PROPOSAL GETLIST





CALL FUNCTION 'MSR20_MD_PROPOSAL_GETLIST' "Get List of Item Proposals
* EXPORTING
*   application =               " msr_select-application  Application Name
*   pi_doc_categ = 'D'          " vbak-vbtyp    SD Document Category
*   pi_doc_type =               " vbak-auart    Sales document type (MSR_SELECT)
*   pi_vkorg =                  " vbak-vkorg    Sales organization (MSR_SELECT)
*   pi_vtweg =                  " vbak-vtweg    Distribution channel (MSR_SELECT)
*   pi_spart =                  " vbak-spart    Division (MSR_SELECT)
*   pi_valid_now =              " bapita-wait   Proposals valid now ('X')  / all proposals (' ')
  IMPORTING
    return =                    " bapiret2      Return parameter
  TABLES
    pot_proposal_header =       " msr20_proposal_header  MSR: Item Proposal Header
    .  "  MSR20_MD_PROPOSAL_GETLIST

ABAP code example for Function Module MSR20_MD_PROPOSAL_GETLIST





The ABAP code below is a full code listing to execute function module MSR20_MD_PROPOSAL_GETLIST 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_return  TYPE BAPIRET2 ,
it_pot_proposal_header  TYPE STANDARD TABLE OF MSR20_PROPOSAL_HEADER,"TABLES PARAM
wa_pot_proposal_header  LIKE LINE OF it_pot_proposal_header .


SELECT single APPLICATION
FROM MSR_SELECT
INTO @DATA(ld_application).


SELECT single VBTYP
FROM VBAK
INTO @DATA(ld_pi_doc_categ).


SELECT single AUART
FROM VBAK
INTO @DATA(ld_pi_doc_type).


SELECT single VKORG
FROM VBAK
INTO @DATA(ld_pi_vkorg).


SELECT single VTWEG
FROM VBAK
INTO @DATA(ld_pi_vtweg).


SELECT single SPART
FROM VBAK
INTO @DATA(ld_pi_spart).


DATA(ld_pi_valid_now) = some text here

"populate fields of struture and append to itab
append wa_pot_proposal_header to it_pot_proposal_header. . CALL FUNCTION 'MSR20_MD_PROPOSAL_GETLIST' * EXPORTING * application = ld_application * pi_doc_categ = ld_pi_doc_categ * pi_doc_type = ld_pi_doc_type * pi_vkorg = ld_pi_vkorg * pi_vtweg = ld_pi_vtweg * pi_spart = ld_pi_spart * pi_valid_now = ld_pi_valid_now IMPORTING return = ld_return TABLES pot_proposal_header = it_pot_proposal_header . " MSR20_MD_PROPOSAL_GETLIST
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_return  TYPE BAPIRET2 ,
ld_application  TYPE MSR_SELECT-APPLICATION ,
it_pot_proposal_header  TYPE STANDARD TABLE OF MSR20_PROPOSAL_HEADER ,
wa_pot_proposal_header  LIKE LINE OF it_pot_proposal_header,
ld_pi_doc_categ  TYPE VBAK-VBTYP ,
ld_pi_doc_type  TYPE VBAK-AUART ,
ld_pi_vkorg  TYPE VBAK-VKORG ,
ld_pi_vtweg  TYPE VBAK-VTWEG ,
ld_pi_spart  TYPE VBAK-SPART ,
ld_pi_valid_now  TYPE BAPITA-WAIT .


SELECT single APPLICATION
FROM MSR_SELECT
INTO ld_application.


"populate fields of struture and append to itab
append wa_pot_proposal_header to it_pot_proposal_header.

SELECT single VBTYP
FROM VBAK
INTO ld_pi_doc_categ.


SELECT single AUART
FROM VBAK
INTO ld_pi_doc_type.


SELECT single VKORG
FROM VBAK
INTO ld_pi_vkorg.


SELECT single VTWEG
FROM VBAK
INTO ld_pi_vtweg.


SELECT single SPART
FROM VBAK
INTO ld_pi_spart.


ld_pi_valid_now = 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 MSR20_MD_PROPOSAL_GETLIST or its description.