WGEN_PURCHASE_ORDER_GENERATION 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 WGEN_PURCHASE_ORDER_GENERATION into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
WGEN
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'WGEN_PURCHASE_ORDER_GENERATION' "
EXPORTING
* im_messg_yes_no = 'N' " c
im_fb_typ = " wauf_fb_typ
im_prot = "
* im_fbg_call = SPACE " c
im_add_dc_po = " rwscreenhelp-add_dc_po
IMPORTING
ex_purchase_order_generated = " c
TABLES
im_ex_postab = " watfg_postab_table
im_ex_betriebsdaten = " watfg_zuordnung_table
im_ex_messg = " rw17a
im_aupo = " rw01a
CHANGING
im_ex_ekko = " fbg_ekko
. " WGEN_PURCHASE_ORDER_GENERATION
The ABAP code below is a full code listing to execute function module WGEN_PURCHASE_ORDER_GENERATION 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).
| ld_ex_purchase_order_generated | TYPE C , |
| it_im_ex_postab | TYPE STANDARD TABLE OF WATFG_POSTAB_TABLE,"TABLES PARAM |
| wa_im_ex_postab | LIKE LINE OF it_im_ex_postab , |
| it_im_ex_betriebsdaten | TYPE STANDARD TABLE OF WATFG_ZUORDNUNG_TABLE,"TABLES PARAM |
| wa_im_ex_betriebsdaten | LIKE LINE OF it_im_ex_betriebsdaten , |
| it_im_ex_messg | TYPE STANDARD TABLE OF RW17A,"TABLES PARAM |
| wa_im_ex_messg | LIKE LINE OF it_im_ex_messg , |
| it_im_aupo | TYPE STANDARD TABLE OF RW01A,"TABLES PARAM |
| wa_im_aupo | LIKE LINE OF it_im_aupo . |
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_im_ex_ekko | TYPE FBG_EKKO , |
| ld_ex_purchase_order_generated | TYPE C , |
| ld_im_messg_yes_no | TYPE C , |
| it_im_ex_postab | TYPE STANDARD TABLE OF WATFG_POSTAB_TABLE , |
| wa_im_ex_postab | LIKE LINE OF it_im_ex_postab, |
| ld_im_fb_typ | TYPE WAUF_FB_TYP , |
| it_im_ex_betriebsdaten | TYPE STANDARD TABLE OF WATFG_ZUORDNUNG_TABLE , |
| wa_im_ex_betriebsdaten | LIKE LINE OF it_im_ex_betriebsdaten, |
| ld_im_prot | TYPE STRING , |
| it_im_ex_messg | TYPE STANDARD TABLE OF RW17A , |
| wa_im_ex_messg | LIKE LINE OF it_im_ex_messg, |
| ld_im_fbg_call | TYPE C , |
| it_im_aupo | TYPE STANDARD TABLE OF RW01A , |
| wa_im_aupo | LIKE LINE OF it_im_aupo, |
| ld_im_add_dc_po | TYPE RWSCREENHELP-ADD_DC_PO . |
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 WGEN_PURCHASE_ORDER_GENERATION or its description.