SAP Function Modules

AD_SAVE_TAB_ALL SAP Function module - start UPDATE TASK to save the AD data







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

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


Pattern for FM AD_SAVE_TAB_ALL - AD SAVE TAB ALL





CALL FUNCTION 'AD_SAVE_TAB_ALL' "start UPDATE TASK to save the AD data
* EXPORTING
*   p_ebeln =                   " ebeln         Purchasing Document Number
*   p_vbeln =                   " vbeln         Sales document
  TABLES
*   p_yekpo =                   " ekpo          Purchasing Document Item
*   p_yeket =                   " eket          Scheduling Agreement Schedule Lines
*   p_xekpo =                   " ekpo          Purchasing Document Item
*   p_xeket =                   " eket          Scheduling Agreement Schedule Lines
    p_tab_all =                 " adspcm_tab_all  all additional A&D data
    .  "  AD_SAVE_TAB_ALL

ABAP code example for Function Module AD_SAVE_TAB_ALL





The ABAP code below is a full code listing to execute function module AD_SAVE_TAB_ALL 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:
it_p_yekpo  TYPE STANDARD TABLE OF EKPO,"TABLES PARAM
wa_p_yekpo  LIKE LINE OF it_p_yekpo ,
it_p_yeket  TYPE STANDARD TABLE OF EKET,"TABLES PARAM
wa_p_yeket  LIKE LINE OF it_p_yeket ,
it_p_xekpo  TYPE STANDARD TABLE OF EKPO,"TABLES PARAM
wa_p_xekpo  LIKE LINE OF it_p_xekpo ,
it_p_xeket  TYPE STANDARD TABLE OF EKET,"TABLES PARAM
wa_p_xeket  LIKE LINE OF it_p_xeket ,
it_p_tab_all  TYPE STANDARD TABLE OF ADSPCM_TAB_ALL,"TABLES PARAM
wa_p_tab_all  LIKE LINE OF it_p_tab_all .

DATA(ld_p_ebeln) = 'Check type of data required'.
DATA(ld_p_vbeln) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_p_yekpo to it_p_yekpo.

"populate fields of struture and append to itab
append wa_p_yeket to it_p_yeket.

"populate fields of struture and append to itab
append wa_p_xekpo to it_p_xekpo.

"populate fields of struture and append to itab
append wa_p_xeket to it_p_xeket.

"populate fields of struture and append to itab
append wa_p_tab_all to it_p_tab_all. . CALL FUNCTION 'AD_SAVE_TAB_ALL' * EXPORTING * p_ebeln = ld_p_ebeln * p_vbeln = ld_p_vbeln TABLES * p_yekpo = it_p_yekpo * p_yeket = it_p_yeket * p_xekpo = it_p_xekpo * p_xeket = it_p_xeket p_tab_all = it_p_tab_all . " AD_SAVE_TAB_ALL
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_p_ebeln  TYPE EBELN ,
it_p_yekpo  TYPE STANDARD TABLE OF EKPO ,
wa_p_yekpo  LIKE LINE OF it_p_yekpo,
ld_p_vbeln  TYPE VBELN ,
it_p_yeket  TYPE STANDARD TABLE OF EKET ,
wa_p_yeket  LIKE LINE OF it_p_yeket,
it_p_xekpo  TYPE STANDARD TABLE OF EKPO ,
wa_p_xekpo  LIKE LINE OF it_p_xekpo,
it_p_xeket  TYPE STANDARD TABLE OF EKET ,
wa_p_xeket  LIKE LINE OF it_p_xeket,
it_p_tab_all  TYPE STANDARD TABLE OF ADSPCM_TAB_ALL ,
wa_p_tab_all  LIKE LINE OF it_p_tab_all.

ld_p_ebeln = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_p_yekpo to it_p_yekpo.
ld_p_vbeln = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_p_yeket to it_p_yeket.

"populate fields of struture and append to itab
append wa_p_xekpo to it_p_xekpo.

"populate fields of struture and append to itab
append wa_p_xeket to it_p_xeket.

"populate fields of struture and append to itab
append wa_p_tab_all to it_p_tab_all.

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