SAP Reports / Programs

/PTGWFI/DEL_INV_006 SAP ABAP Report - Cancel the current PO invoice and re-enter as Non-PO invoice







/PTGWFI/DEL_INV_006 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 /PTGWFI/DEL_INV_006 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

/PTGWFI/CANC_INV_06 - Cancel PO invoice, re-ent Non-PO


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 /PTGWFI/DEL_INV_006. "Basic submit
SUBMIT /PTGWFI/DEL_INV_006 AND RETURN. "Return to original report after report execution complete
SUBMIT /PTGWFI/DEL_INV_006 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: L_BELNR = Invoice number
Selection Text: L_GJAHR = Fiscal year
Title: Cancel the current PO invoice and re-enter as Non-PO invoice
Text Symbol: 001 = Invoice
Text Symbol: 002 = is cancelled successfully.
Text Symbol: 003 = is created successfully.
Text Symbol: 004 = is not created successfully. please contact administrator.
Text Symbol: 005 = Image
Text Symbol: 006 = is linked with invoice
Text Symbol: 007 = is not linked with invoice
Text Symbol: 008 = successfully.


INCLUDES used within this REPORT /PTGWFI/DEL_INV_006

No INCLUDES are used within this REPORT code!


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:

ARCHIV_GET_CONNECTIONS CALL FUNCTION 'ARCHIV_GET_CONNECTIONS' EXPORTING objecttype = objtype object_id = objkey TABLES connections = t_con EXCEPTIONS nothing_found = 1 OTHERS = 2.

/PTGWFI/CP_READCONSTANT CALL FUNCTION '/PTGWFI/CP_READCONSTANT' EXPORTING constname = 'CANCEL_PO_BDC_FM' productcode = 'LIX' IMPORTING constvalue = zconst EXCEPTIONS constant_not_found = 1 OTHERS = 2.

/PTGWFI/VIM_CANC_PO_INV * CALL FUNCTION '/PTGWFI/VIM_CANC_PO_INV' CALL FUNCTION zconst EXPORTING belnr = l_belnr gjahr = l_gjahr EXCEPTIONS cancel_failed = 1 not_exist = 2 already_cancelled = 3 OTHERS = 4.

/PTGWFI/VIM_CANC_PO_INV CALL FUNCTION '/PTGWFI/VIM_CANC_PO_INV' EXPORTING belnr = l_belnr gjahr = l_gjahr EXCEPTIONS cancel_failed = 1 not_exist = 2 already_cancelled = 3 OTHERS = 4.

/PTGWFI/CP_READCONSTANT CALL FUNCTION '/PTGWFI/CP_READCONSTANT' EXPORTING constname = 'IMAGE_DISP_FM' productcode = 'LIX' IMPORTING constvalue = zconst EXCEPTIONS constant_not_found = 1 OTHERS = 2.

/PTGWFI/CP_READCONSTANT CALL FUNCTION '/PTGWFI/CP_READCONSTANT' EXPORTING constname = 'CREATE_BDC_FM' productcode = 'PIR' IMPORTING constvalue = zconst EXCEPTIONS constant_not_found = 1 OTHERS = 2.

/PTGWFI/VIM_CRE_NPO_INV CALL FUNCTION '/PTGWFI/VIM_CRE_NPO_INV' EXPORTING bukrs = space belnr = l_belnr gjahr = l_gjahr IMPORTING nbukrs = nbukrs nbelnr = nbelnr ngjahr = ngjahr EXCEPTIONS create_failed = 1 OTHERS = 2.

/PTGWFI/CP_READCONSTANT CALL FUNCTION '/PTGWFI/CP_READCONSTANT' EXPORTING constname = 'NON_PO_OBJTYP' productcode = 'PIR' IMPORTING constvalue = zconst EXCEPTIONS constant_not_found = 1 OTHERS = 2.

/PTGWFI/CP_READCONSTANT CALL FUNCTION '/PTGWFI/CP_READCONSTANT' EXPORTING constname = 'NPO_INV_ARCHIVE_OBJ' productcode = 'PIR' IMPORTING constvalue = zconst EXCEPTIONS constant_not_found = 1 OTHERS = 2.

ARCHIV_CONNECTION_INSERT CALL FUNCTION 'ARCHIV_CONNECTION_INSERT' EXPORTING archiv_id = t_con-archiv_id arc_doc_id = t_con-arc_doc_id ar_date = t_con-ar_date *Patch5prod552 ar_object = ar_object * AR_OBJECT = t_con-AR_OBJECT *Endpatch * DEL_DATE = ' ' ** MANDANT = ' ' object_id = objkey sap_object = objtype * DOC_TYPE = EXCEPTIONS error_connectiontable = 1 OTHERS = 2.



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 /PTGWFI/DEL_INV_006 or its description.