SAP Reports / Programs

RM06BB20 SAP ABAP Report - Automatic Creation of Purchase Orders from Requisitions







RM06BB20 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter RM06BB20 into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT RM06BB20. "Basic submit
SUBMIT RM06BB20 AND RETURN. "Return to original report after report execution complete
SUBMIT RM06BB20 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Log for Automatic Creation of Purchase Orders from Requisitions
Selection Text: S_PSTYP = Item Category
Selection Text: S_PSEXT = WBS Element
Selection Text: S_NPLNR = Network
Selection Text: S_MATNR = Material
Selection Text: S_MATKL = Material Group
Selection Text: S_LGORT = Receiving Storage Location
Selection Text: S_LFDAT = Delivery Date
Selection Text: S_KOSTL = Cost Center
Selection Text: S_KONNR = Contract
Selection Text: S_KNTTP = Account Assignment Category
Selection Text: S_FRGDT = Release Date
Selection Text: S_FLIEF = Vendor
Selection Text: S_EKORG = Purchasing Organization
Selection Text: S_EKGRP = Purchasing Group
Selection Text: S_DISPO = MRP Controller
Selection Text: S_BSART = Document Type
Selection Text: S_BEDNR = Requirement Tracking Number
Selection Text: S_BANFN = Purchase Requisition
Selection Text: S_AUFNR = Order
Selection Text: S_ANLN2 = Asset Subnumber
Selection Text: S_ANLN1 = Asset
Selection Text: S_RESWK = Supplying Plant
Selection Text: S_STATU = Processing Status
Selection Text: S_VBELN = Sales Order
Selection Text: S_VBELP = Sales Order Item
Selection Text: S_VORNR = Operation Number
Selection Text: S_WERKS = Plant
Selection Text: I_BUKRS = D .
Selection Text: S_BANPR = D .
Selection Text: S_BESWK = D .
Selection Text: S_OBART = D .
Selection Text: S_PRIO_R = D .
Selection Text: S_RECNNR = D .
Selection Text: S_RESLO = D .
Selection Text: S_SEMPSL = D .
Selection Text: S_SGENR = D .
Selection Text: S_SGRNR = D .





Selection Text: S_SMENR = D .
Selection Text: S_SMIVE = D .
Selection Text: S_SNKSL = D .
Selection Text: S_SVWNR = D .
Selection Text: S_SWENR = D .
Selection Text: S_VONBIS = D .
Selection Text: S_ADVCOD = Advice Code
Selection Text: P_VRTYPK = Contracts
Selection Text: P_TXZ01 = Short Text
Selection Text: P_TEST = Test Run
Selection Text: P_STICH = Start of Settlement Period
Selection Text: P_SEBAKZ = Requisition Closed
Selection Text: P_POSERR = Exclude Faulty Items
Selection Text: P_GWERKS = New PO per Plant
Selection Text: P_GPSTYP = New PO per Item Category
Selection Text: P_GLFDAT = Per Delivery Date
Selection Text: P_GEKGRP = New PO per Purchasing Group
Selection Text: P_DETPRO = Detailed Log
Selection Text: P_AFNAM = Requisitioner
Title: Automatic Creation of Purchase Orders from Requisitions
Text Symbol: 015 = Test run successful
Text Symbol: 014 = PO not created due to item error
Text Symbol: 013 = PReq
Text Symbol: 012 = W/o Contract
Text Symbol: 011 = Created
Text Symbol: 010 = Purchase order
Text Symbol: 009 = New Purchase Order
Text Symbol: 008 = Reqs PO Item|Message
Text Symbol: 007 = P
Text Symbol: 006 = PGp
Text Symbol: 005 = Plant
Text Symbol: 004 = |Pur.Req. |Item |Message
Text Symbol: 003 = Supplying Plant
Text Symbol: 002 = |POrg OTy. Contract
Text Symbol: 001 = Vendor
Text Symbol: 016 = Other Parameters
Text Symbol: P02 = Real Estate Mgmt
Text Symbol: S01 = Per Purchasing Group
Text Symbol: S02 = Per Plant





Text Symbol: S03 = Per Item Category
Text Symbol: S04 = Per Storage Location
Text Symbol: S05 = Per Delivery Date
Text Symbol: S06 = Per Vendor Subrange
Text Symbol: S07 = Per Requisition Item
Text Symbol: S08 = Generate Schedule Lines
Text Symbol: S09 = Per Requisition
Text Symbol: S10 = Per Company Code
Text Symbol: S11 = Omit Faulty Items
Text Symbol: S21 = Detailed Log
Text Symbol: S22 = Test Run
Text Symbol: S23 = Set Requisitions to "Closed"


INCLUDES used within this REPORT RM06BB20

INCLUDE RM06BBCO.
INCLUDE FM06LCIM.
INCLUDE FM06BCS3.


TABLES used within REPORT and the associated SELECT statement:

No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

ME_CCP_ACTIVE_CHECK CALL FUNCTION 'ME_CCP_ACTIVE_CHECK' IMPORTING ef_ccp_active = lf_ccp_active.

ME_ITEM_CATEGORY_SELOPT_INPUT CALL FUNCTION 'ME_ITEM_CATEGORY_SELOPT_INPUT' TABLES ext_pstyp = s_pstyp int_pstyp = r_pstyp.

HELP_VALUES_EPSTP CALL FUNCTION 'HELP_VALUES_EPSTP' EXPORTING program = sy-cprog dynnr = sy-dynnr fieldname = 'S_PSTYP-LOW' * BSART = * BSTYP = IMPORTING epstp = s_pstyp-low EXCEPTIONS OTHERS = 1.

RS_SUPPORT_SELECTIONS CALL FUNCTION 'RS_SUPPORT_SELECTIONS' EXPORTING report = l_report variant = l_set_variant EXCEPTIONS variant_not_existent = 1 variant_obsolete = 2 OTHERS = 3.

ME_DELIV_STRG_LOC_ACTIVE CALL FUNCTION 'ME_DELIV_STRG_LOC_ACTIVE' IMPORTING ef_del_strg_loc_act = gv_del_strg_loc_act.

GET_DEFAULT_PRIO_ACTIVE CALL FUNCTION 'GET_DEFAULT_PRIO_ACTIVE' IMPORTING ev_mm_prio_active = gv_mm_prio_active EXCEPTIONS no_pact_entry = 1 OTHERS = 2.

ME_READ_EBAN_MULTIPLE CALL FUNCTION 'ME_READ_EBAN_MULTIPLE' * EXPORTING * I_DYNSEL = * I_DYNFIE = * IMPORTING * E_REQS_WITHOUT_AUTH = TABLES te_eban = ban * TE_EBKN = * TI_TACT = ti_banfn_range = s_banfn ti_matnr_range = s_matnr ti_matkl_range = s_matkl ti_werks_range = s_werks ti_ekgrp_range = s_ekgrp ti_bsakz_range = r_bsakz ti_bsart_range = s_bsart ti_pstyp_range = r_pstyp ti_knttp_range = s_knttp ti_lfdat_range = s_lfdat ti_frgdt_range = s_frgdt ti_dispo_range = s_dispo ti_statu_range = s_statu ti_flief_range = s_flief ti_bednr_range = s_bednr ti_konnr_range = s_konnr ti_reswk_range = s_reswk ti_ekorg_range = s_ekorg ti_vrtyp_range = r_vrtyp ti_txz01_range = r_txz01 ti_afnam_range = r_afnam ti_kostl_range = s_kostl ti_aufnr_range = s_aufnr ti_anln1_range = s_anln1 ti_anln2_range = s_anln2 ti_vbeln_range = s_vbeln ti_vbelp_range = s_vbelp ti_nplnr_range = s_nplnr ti_vornr_range = s_vornr ti_zugba_range = r_zugba ti_eban_loekz_range = r_loekz ti_ebkn_loekz_range = r_loekz ti_ebakz_range = r_ebakz
ti_beswk_range = s_beswk ti_blckd_range = r_blckd ti_banpr_range = s_banpr *** TI_FRGRL_RANGE = *** TI_GSFRG_RANGE = ** TI_PS_PSP_PNR_RANGE = ti_pspid_ext_range = s_psext ti_imkeys = t_imkeys.

MMPUR_COMPARE_COMPANY_CODES CALL FUNCTION 'MMPUR_COMPARE_COMPANY_CODES' EXPORTING im_plant1 = ban-werks im_plant2 = ban-reswk IMPORTING ex_same_company_code = l_same_company_code EXCEPTIONS error = 1.

AIP01_PLANT_DETERMINE CALL FUNCTION 'AIP01_PLANT_DETERMINE' EXPORTING i_werks = ban-reswk IMPORTING e_ownls = l_ownls EXCEPTIONS OTHERS = 1.

ME_ITEM_CATEGORY_OUTPUT CALL FUNCTION 'ME_ITEM_CATEGORY_OUTPUT' EXPORTING pstyp = bpr-pstyp IMPORTING epstp = rm06b-epstp.

MESSAGE_TEXT_BUILD CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING msgid = bpr-msgid msgnr = bpr-msgno msgv1 = bpr-msgv1 msgv2 = bpr-msgv2 msgv3 = bpr-msgv3 msgv4 = bpr-msgv4 IMPORTING message_text_output = omess.




REMD_GET_IMKEY_FOR_SELECT_OPT CALL FUNCTION 'REMD_GET_IMKEY_FOR_SELECT_OPT' EXPORTING i_bukrs = i_bukrs i_dstich = p_stich * I_DVON = P_DVON * I_DBIS = P_DBIS TABLES s_swenr = s_swenr s_sgenr = s_sgenr s_sgrnr = s_sgrnr s_smenr = s_smenr s_smive = s_smive s_svwnr = s_svwnr s_snksl = s_snksl s_empsl = s_sempsl s_recnnr = s_recnnr s_obart = s_obart s_vonbis = s_vonbis e_imkeys = t_imkeys.

HELP_VALUES_EPSTP CALL FUNCTION 'HELP_VALUES_EPSTP' EXPORTING program = sy-cprog dynnr = sy-dynnr fieldname = 'S_PSTYP-HIGH' * BSART = * BSTYP = IMPORTING epstp = s_pstyp-high EXCEPTIONS OTHERS = 1.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name RM06BB20 or its description.