SAP Function Modules

AIPB_PROGPOS_EXTERNAL_TO_SAP SAP Function module







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

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


Pattern for FM AIPB_PROGPOS_EXTERNAL_TO_SAP - AIPB PROGPOS EXTERNAL TO SAP





CALL FUNCTION 'AIPB_PROGPOS_EXTERNAL_TO_SAP' "
  EXPORTING
    i_program =                 " bapiprogid-program
    i_approvalyear =            " bapiprogid-approvalyear
    i_bapiprogstruc =           " bapiprogstruc
    i_posnr =                   " impr-posnr
    i_langu =                   " sy-langu
  IMPORTING
    e_impr =                    " impr
    e_impu =                    " impu
* TABLES
*   it_return =                 " bapiret2
* CHANGING
*   flg_error =                 " xfeld
    .  "  AIPB_PROGPOS_EXTERNAL_TO_SAP

ABAP code example for Function Module AIPB_PROGPOS_EXTERNAL_TO_SAP





The ABAP code below is a full code listing to execute function module AIPB_PROGPOS_EXTERNAL_TO_SAP 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_e_impr  TYPE IMPR ,
ld_e_impu  TYPE IMPU ,
it_it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_it_return  LIKE LINE OF it_it_return .

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

DATA(ld_i_program) = some text here

DATA(ld_i_approvalyear) = Check type of data required
DATA(ld_i_bapiprogstruc) = 'Check type of data required'.

SELECT single POSNR
FROM IMPR
INTO @DATA(ld_i_posnr).

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

"populate fields of struture and append to itab
append wa_it_return to it_it_return. . CALL FUNCTION 'AIPB_PROGPOS_EXTERNAL_TO_SAP' EXPORTING i_program = ld_i_program i_approvalyear = ld_i_approvalyear i_bapiprogstruc = ld_i_bapiprogstruc i_posnr = ld_i_posnr i_langu = ld_i_langu IMPORTING e_impr = ld_e_impr e_impu = ld_e_impu * TABLES * it_return = it_it_return * CHANGING * flg_error = ld_flg_error . " AIPB_PROGPOS_EXTERNAL_TO_SAP
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_flg_error  TYPE XFELD ,
ld_e_impr  TYPE IMPR ,
ld_i_program  TYPE BAPIPROGID-PROGRAM ,
it_it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_it_return  LIKE LINE OF it_it_return,
ld_e_impu  TYPE IMPU ,
ld_i_approvalyear  TYPE BAPIPROGID-APPROVALYEAR ,
ld_i_bapiprogstruc  TYPE BAPIPROGSTRUC ,
ld_i_posnr  TYPE IMPR-POSNR ,
ld_i_langu  TYPE SY-LANGU .

ld_flg_error = 'Check type of data required'.

ld_i_program = some text here

"populate fields of struture and append to itab
append wa_it_return to it_it_return.

ld_i_approvalyear = Check type of data required
ld_i_bapiprogstruc = 'Check type of data required'.

SELECT single POSNR
FROM IMPR
INTO ld_i_posnr.

ld_i_langu = 'Check type of data required'.

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