SAP Reports / Programs | Sales and Distribution | Basic Functions(SD-BF) SAP SD

S3VBAKPT SAP ABAP Report - Archiving orders: Analysis







S3VBAKPT is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Archiving Sales Documents in SD: Check Program This program checks sales documents for their archivability...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter S3VBAKPT 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 S3VBAKPT. "Basic submit
SUBMIT S3VBAKPT AND RETURN. "Return to original report after report execution complete
SUBMIT S3VBAKPT VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: SO_VBELN = Document selection
Selection Text: CHK_ITAB = Alternative DB access
Selection Text: CHK_DTAI = Detailed Display
Selection Text: CHK_DBAS = Check flow documents residence
Selection Text: CHK_BANF = Check purchase order
Selection Text: CHK_AUSG = Check FI document
Selection Text: CHK_AEDA = Change Date: Residence Time
Title: Archiving orders: Analysis
Text Symbol: 300 = Overview: Consistency checks
Text Symbol: 310 = User exit
Text Symbol: 315 = Formal check
Text Symbol: 320 = Purch. Requisitions
Text Symbol: 325 = POs
Text Symbol: 330 = Subs. docs
Text Symbol: 335 = Cleared
Text Symbol: 340 = Costs
Text Symbol: 345 = Residence time
Text Symbol: 400 = Checked
Text Symbol: 410 = can be archived
Text Symbol: 420 = cannot be archived
Text Symbol: 421 = RevRec: Doc. Not Archivable as VBUK-RRSTA Does Not Equal 'C' or ' '
Text Symbol: 422 = RevRec: Document Not Archivable as VBREVC Entry Still Exists
Text Symbol: 423 = RevRec: Doc. Not Archivable as VBREVK-RRSTA Does Not Equal 'C'
Text Symbol: 233 = Rev. Rec. Check: VBREVK-RRSTA <> 'C'
Text Symbol: 001 = Doc. can be archived
Text Symbol: 002 = Cust-specific check & prevents archiving
Text Symbol: 003 = Document number is made up of zeros and spaces
Text Symbol: 004 = Purchase requisistions still exist for this document
Text Symbol: 005 = Purchase orders still exist for this document
Text Symbol: 006 = Subsequent document (order) & is not complete
Text Symbol: 007 = Subsequent document (delivery) & is not complete
Text Symbol: 008 = Subsequent doc. (billing doc.) & is not complete
Text Symbol: 009 = Accounting documents are not yet cleared for this document
Text Symbol: 010 = Costs still exist for this document (CO checks)
Text Symbol: 011 = Document entered after &
Text Symbol: 012 = The document is not complete
Text Symbol: 013 = No archiving controlling maintained for this document
Text Symbol: 110 = Doc. &1 Sales organization &2 Order type &3





Text Symbol: 111 = Subsq. doc. &1 created after &2
Text Symbol: 200 = Overview: Residence times not reached
Text Symbol: 210 = Sales organization
Text Symbol: 215 = Order type
Text Symbol: 220 = Deadline
Text Symbol: 225 = Number
Text Symbol: 230 = Incomplete bill.docs
Text Symbol: 231 = Rev. Rec. Check: VBUK-RRSRA <> 'C' or ' '
Text Symbol: 232 = Rev. Rec. Check: VBREVC Entry Still Exists


INCLUDES used within this REPORT S3VBAKPT

INCLUDE S3VBAKTB.
INCLUDE RVVBTYP.
INCLUDE SDVBAKSP.
INCLUDE S3VBAKCO.


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:

MSKA_EXTEND call function 'MSKA_EXTEND' TABLES mska_tab = tab_mska.

GET_HANDLE_SD_ARCHIVING CALL FUNCTION 'GET_HANDLE_SD_ARCHIVING' IMPORTING HANDLE = L_SD_ARCHIVING_EXIT ACTIVE = ACTIVE.

DYNSQL_GENERATE_WHERE_CLAUSE CALL FUNCTION 'DYNSQL_GENERATE_WHERE_CLAUSE' EXPORTING fieldname_key_1 = 'AUART' fieldname_key_2 = 'VKORG' fieldname_value = 'ERDAT' operator = '<=' TABLES where_clause = dyn_sql control_table = ztvara all_values_key_1 = auart_all values_key_1 = auart_teil all_values_key_2 = vkorg_all values_key_2 = vkorg_teil EXCEPTIONS dynsql_too_large = 1 wrong_entry_in_control_table = 2 key_values_inconsistent = 3 no_entry_found = 4 function_already_called = 5.

MESSAGES_INITIALIZE CALL FUNCTION 'MESSAGES_INITIALIZE' EXPORTING collect_and_send = ' ' reset = 'X' line_from = space line_to = space EXCEPTIONS OTHERS = 1.

RS_REFRESH_FROM_SELECTOPTIONS CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS' EXPORTING curr_report = prgname TABLES selection_table = vari_tab EXCEPTIONS not_found = 1 no_report = 2 OTHERS = 3.

RS_LIST_SELECTION_TABLE CALL FUNCTION 'RS_LIST_SELECTION_TABLE' EXPORTING report = prgname seltext = 'X' TABLES sel_tab = vari_tab.

DYNSQL_READ_CONTROL_TABLE CALL FUNCTION 'DYNSQL_READ_CONTROL_TABLE' EXPORTING key_1 = wa-auart key_2 = wa-vkorg IMPORTING control_line = ztvara EXCEPTIONS key_value_invalid = 1 OTHERS = 2.

DYNSQL_READ_CONTROL_TABLE CALL FUNCTION 'DYNSQL_READ_CONTROL_TABLE' EXPORTING key_1 = wa-auart key_2 = wa-vkorg IMPORTING control_line = ztvara EXCEPTIONS key_value_invalid = 1 OTHERS = 2.

DYNSQL_READ_CONTROL_TABLE CALL FUNCTION 'DYNSQL_READ_CONTROL_TABLE' EXPORTING key_1 = wa-auart key_2 = wa-vkorg IMPORTING control_line = ztvara EXCEPTIONS key_value_invalid = 1 OTHERS = 2.

VFKK_ARCH_BADI_FICA_CHECK CALL FUNCTION 'VFKK_ARCH_BADI_FICA_CHECK' EXPORTING i_awtyp = 'VBRK' i_awkey = ld_awkey CHANGING c_subrc = ld_subrc.



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